Advertisement
Guest User

Untitled

a guest
Jul 28th, 2016
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. //
  2. // NoEUVolumeRestrictions
  3. // Stefan Wittwer
  4. //
  5.  
  6. %hook SBVolumeHUDView
  7.  
  8. + (float)volumeStepUpForCurrentVolume:(float)volume euVolumeLimit:(float)euVolumeLimit {
  9. return %orig(volume,1.2);
  10. }
  11. + (bool)wouldShowAtLeastAYellowBlockForVolume:(float)volume euVolumeLimit:(float)euVolumeLimit {
  12. return %orig(volume,1.2);
  13. }
  14. - (float)EUVolumeLimit {
  15. return 1.2;
  16. }
  17. - (void)setEUVolumeLimit:(float)volume {
  18. // Do nothing
  19. }
  20.  
  21. %end
  22.  
  23. %hook VolumeControl
  24.  
  25. - (void)initializeEUVolumeLimits {
  26. // Do nothing
  27. }
  28. - (_Bool)turnOnScreenIfNecessaryForEULimit:(_Bool)arg1 {
  29. return NO;
  30. }
  31. - (void)sendEUVolumeLimitAcknowledgementIfNecessary {
  32. // Do even less
  33. }
  34. - (void)EUVolumeEnforcementChanged {
  35. // Still nothing
  36. }
  37.  
  38. - (void)EUVolumeLimitChanged {
  39. // Does - you guessed it – nothing
  40. }
  41.  
  42. %end
  43.  
  44. %hook AVSystemController
  45.  
  46. - (bool)allowUserToExceedEUVolumeLimit {
  47. return YES;
  48. }
  49.  
  50. %end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement