From 41ca7e59fc624b8108328ab7fe5a4b0d00dfb21e Mon Sep 17 00:00:00 2001 From: "matthias.ringwald" Date: Wed, 16 Sep 2009 21:40:13 +0000 Subject: [PATCH] added test call to enable bluetooth icon --- SpringBoardAccess/SpringBoardAccess.mm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/SpringBoardAccess/SpringBoardAccess.mm b/SpringBoardAccess/SpringBoardAccess.mm index 190e3bae9..f5ba4546a 100644 --- a/SpringBoardAccess/SpringBoardAccess.mm +++ b/SpringBoardAccess/SpringBoardAccess.mm @@ -10,6 +10,14 @@ #import "../3rdparty/substrate.h" #import "../3rdparty/SpringBoard.h" +@interface UIApplication (privateStatusBarIconAPI) +- (void)addStatusBarImageNamed:(id)fp8 removeOnAbnormalExit:(BOOL)fp12; +- (void)addStatusBarImageNamed:(id)fp8; +- (void)removeStatusBarImageNamed:(id)fp8; +// iPhoneOS >= 2.2 +- (void)addStatusBarImageNamed:(id)fp8 removeOnExit:(BOOL)fp12; +@end + #define HOOK(class, name, type, args...) \ static type (*_ ## class ## $ ## name)(class *self, SEL sel, ## args); \ static type $ ## class ## $ ## name(class *self, SEL sel, ## args) @@ -21,7 +29,8 @@ _ ## class ## $ ## name(self, sel, ## args) CFDataRef myCallBack(CFMessagePortRef local, SInt32 msgid, CFDataRef data, void *info) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; - + UIApplication *theApp = [UIApplication sharedApplication]; + [theApp addStatusBarImageNamed:@"BluetoothActive"]; char *message = "Thanks for calling!"; CFDataRef returnData = CFDataCreate(NULL, (const UInt8 *) message, strlen(message)+1);