- (void) enableCydget:(SBAwayController *)away {
if (NSString *plugin = [self objectForKey:@"CYPlugin"] ?: [self objectForKey:@"Plugin"]) {
++online_;
- UIKeyboardEnableAutomaticAppearance();
- [[UITextEffectsWindow sharedTextEffectsWindow] setWindowLevel:1000];
+ if (kCFCoreFoundationVersionNumber < 600)
+ UIKeyboardEnableAutomaticAppearance();
+ [[UITextEffectsWindow sharedTextEffectsWindow] setWindowLevel:1000];
[away enableLockScreenBundleWithName:plugin];
}
}
- (void) disableCydget:(SBAwayController *)away {
if (NSString *plugin = [self objectForKey:@"CYPlugin"] ?: [self objectForKey:@"Plugin"]) {
[away disableLockScreenBundleWithName:plugin];
-
[$UIPeripheralHost _releaseSharedInstance];
- UIKeyboardDisableAutomaticAppearance();
+ if (kCFCoreFoundationVersionNumber < 600)
+ UIKeyboardDisableAutomaticAppearance();
+
--online_;
}
}
// avoid rendering a keyboard onto the default SBAwayView while automatic keyboard is online
MSInstanceMessageHook0(UIView *, SBAwayView, inputView) {
// XXX: there is a conceptual error here
- if (online_ == 0 && false)
+ if (online_ == 0 && false || kCFCoreFoundationVersionNumber > 600)
return MSOldCall();
return [[[UIView alloc] init] autorelease];
// by default, keyboard actions are redirected to SBAwayController and press menu button
MSInstanceMessageHook1(void, SpringBoard, handleKeyEvent, GSEventRef, event) {
- if (online_ == 0)
+ if (online_ == 0 || kCFCoreFoundationVersionNumber > 600)
return MSOldCall(event);
return MSSuperCall(event);
}
MSInstanceMessageHook1(void, SBAwayView, addGestureRecognizer, id, recognizer) {
- if (online_ == 0)
+ if (online_ == 0 || kCFCoreFoundationVersionNumber > 600)
return MSOldCall(recognizer);
}
MSInstanceMessageHook1(void, SBAwayWindow, sendGSEvent, GSEventRef, event) {
- NSLog(@"sendGSEvent");
- if (online_ == 0)
+ if (online_ == 0 || kCFCoreFoundationVersionNumber > 600)
return MSOldCall(event);
return MSSuperCall(event);