diff --git a/Preferences/Controllers/BatteryBuddyRootListController.m b/Preferences/Controllers/BatteryBuddyRootListController.m index 69d1e04..f79003a 100644 --- a/Preferences/Controllers/BatteryBuddyRootListController.m +++ b/Preferences/Controllers/BatteryBuddyRootListController.m @@ -14,8 +14,9 @@ - (void)setPreferenceValue:(id)value specifier:(PSSpecifier *)specifier { if ([[specifier propertyForKey:@"key"] isEqualToString:kPreferenceKeyEnabled] || [[specifier propertyForKey:@"key"] isEqualToString:kPreferenceKeyShowInStatusBar] || - [[specifier propertyForKey:@"key"] isEqualToString:kPreferenceKeyShowOnLockScreen]) { - [self promptToRespring]; + [[specifier propertyForKey:@"key"] isEqualToString:kPreferenceKeyShowOnLockScreen] + ) { + [self promptToRespring]; } } @@ -35,10 +36,15 @@ - (void)promptToRespring { } - (void)respring { - NSTask* task = [[NSTask alloc] init]; - [task setLaunchPath:@"/usr/bin/killall"]; - [task setArguments:[NSArray arrayWithObjects:@"backboardd", nil]]; - [task launch]; + NSArray* launchPaths = @[@"/usr/bin/killall", @"/var/jb/usr/bin/killall"]; + for (NSString* launchPath in launchPaths) { + if ([[NSFileManager defaultManager] fileExistsAtPath:launchPath]) { + NSTask* task = [[NSTask alloc] init]; + [task setLaunchPath:launchPath]; + [task setArguments:@[@"backboardd"]]; + [task launch]; + } + } } - (void)resetPrompt { diff --git a/control b/control index 4e18112..a66baf4 100644 --- a/control +++ b/control @@ -2,7 +2,7 @@ Package: dev.traurige.batterybuddy Name: BatteryBuddy Depends: firmware (>= 13.0), mobilesubstrate, preferenceloader Conflicts: love.litten.batterybuddy -Version: 1.3.2 +Version: 1.3.3 Architecture: iphoneos-arm Description: Battery indicator, but cute Maintainer: Traurige