-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathSWUtils.m
31 lines (27 loc) · 1.16 KB
/
SWUtils.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#import "SWUtils.h"
typedef NS_OPTIONS(NSUInteger, SBSRelaunchActionOptions) {
SBSRelaunchActionOptionsNone,
SBSRelaunchActionOptionsRestartRenderServer = 1 << 0,
SBSRelaunchActionOptionsSnapshotTransition = 1 << 1,
SBSRelaunchActionOptionsFadeToBlackTransition = 1 << 2
};
@interface FBSSystemService : NSObject
+(instancetype)sharedService;
-(void)sendActions:(id)arg1 withResult:(id)arg2;
@end
@interface SBSRelaunchAction : NSObject
@property (nonatomic,copy,readonly) NSString * reason;
@property (nonatomic,readonly) unsigned long long options;
@property (nonatomic,retain,readonly) NSURL * targetURL;
+(id)actionWithReason:(id)arg1 options:(unsigned long long)arg2 targetURL:(id)arg3 ;
-(id)initWithReason:(id)arg1 options:(unsigned long long)arg2 targetURL:(id)arg3 ;
-(NSURL *)targetURL;
-(NSString *)reason;
-(unsigned long long)options;
@end
@implementation SWUtils
+(void)respringDevice {
SBSRelaunchAction *restartAction = [SBSRelaunchAction actionWithReason:@"RestartRenderServer" options:SBSRelaunchActionOptionsFadeToBlackTransition targetURL:nil];
[[FBSSystemService sharedService] sendActions:[NSSet setWithObject:restartAction] withResult:nil];
}
@end