diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2014-01-15 04:52:46 -0800 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2014-01-15 04:52:46 -0800 |
commit | f037db0b594b4ab6cab53d106c60fb73b983c626 (patch) | |
tree | 07dc551edfd3e875c4847c42007f693e86506891 | |
parent | 7ebd339758c06a951d708150bb13924d80160d08 (diff) |
Fix the stupid alert popup on ALL the iOS versions.
-rw-r--r-- | Tweak.xm | 25 |
1 files changed, 17 insertions, 8 deletions
@@ -205,24 +205,33 @@ static void AlertIfNeeded() { MSAlert(); } -// on iOS 7 (maybe also iOS 6) we should really just hook the unlock mechanism -// XXX: deterine where this works and maybe unify this code - +// iOS 7 %hook SBLockScreenManager - (void) _finishUIUnlockFromSource:(int)source withOptions:(id)options { %orig; AlertIfNeeded(); } %end +// iOS 6 +%hook SBAwayController +- (void) _finishUnlockWithSound:(BOOL)sound unlockSource:(int)source isAutoUnlock:(BOOL)is { + %orig; + AlertIfNeeded(); +} %end -// on iOS 4.3 and above we can use this advertisement, which seems to check every time the user unlocks -// XXX: verify that this still works on iOS 5.0 - -%hook AAAccountManager -+ (void) showMobileMeOfferIfNecessary { +// iOS 5 +%hook SBAwayController +- (void) _unlockWithSound:(BOOL)sound isAutoUnlock:(BOOL)is unlockSource:(int)source { + %orig; AlertIfNeeded(); } %end +// iOS 4.3 XXX: check lower versions +%hook SBAwayController +- (void) _unlockWithSound:(BOOL)sound isAutoUnlock:(BOOL)is unlockType:(int)type { + %orig; + AlertIfNeeded(); +} %end // -[SBIconController showInfoAlertIfNeeded] explains how to drag icons around the iPhone home screen // it used to be shown to users when they unlocked their screen for the first time, and happened every unlock |