-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSwitch.xm
More file actions
24 lines (18 loc) · 679 Bytes
/
Copy pathSwitch.xm
File metadata and controls
24 lines (18 loc) · 679 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#import <Flipswitch/FSSwitchDataSource.h>
#import <Flipswitch/FSSwitchPanel.h>
@interface HomeButtonRestingUnlockSwitch : NSObject <FSSwitchDataSource>
@end
extern "C" BOOL _AXSHomeButtonRestingUnlock();
extern "C" void _AXSHomeButtonSetRestingUnlock(BOOL);
@implementation HomeButtonRestingUnlockSwitch
- (FSSwitchState)stateForSwitchIdentifier:(NSString *)switchIdentifier
{
return _AXSHomeButtonRestingUnlock() ? FSSwitchStateOn : FSSwitchStateOff;
}
- (void)applyState:(FSSwitchState)newState forSwitchIdentifier:(NSString *)switchIdentifier
{
if (newState == FSSwitchStateIndeterminate)
return;
_AXSHomeButtonSetRestingUnlock(newState == FSSwitchStateOn);
}
@end