|
|
@ -87,8 +87,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
[self performUpdateCheck];
|
|
|
|
[self performUpdateCheck];
|
|
|
|
|
|
|
|
|
|
|
|
[self prepareScreenshotProtection];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
self.notificationTracker = [NotificationTracker notificationTracker];
|
|
|
|
self.notificationTracker = [NotificationTracker notificationTracker];
|
|
|
|
|
|
|
|
|
|
|
|
CategorizingLogger* logger = [CategorizingLogger categorizingLogger];
|
|
|
|
CategorizingLogger* logger = [CategorizingLogger categorizingLogger];
|
|
|
@ -120,6 +118,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
[self.window makeKeyAndVisible];
|
|
|
|
[self.window makeKeyAndVisible];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[self prepareScreenshotProtection];
|
|
|
|
|
|
|
|
|
|
|
|
[Environment.phoneManager.currentCallObservable watchLatestValue:^(CallState* latestCall) {
|
|
|
|
[Environment.phoneManager.currentCallObservable watchLatestValue:^(CallState* latestCall) {
|
|
|
|
if (latestCall == nil){
|
|
|
|
if (latestCall == nil){
|
|
|
|
return;
|
|
|
|
return;
|
|
|
@ -245,6 +245,10 @@
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- (void)applicationWillResignActive:(UIApplication *)application{
|
|
|
|
|
|
|
|
[self protectScreen];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
- (void)application:(UIApplication *)application handleActionWithIdentifier:(NSString *)identifier forRemoteNotification:(NSDictionary *)userInfo completionHandler:(void (^)())completionHandler{
|
|
|
|
- (void)application:(UIApplication *)application handleActionWithIdentifier:(NSString *)identifier forRemoteNotification:(NSDictionary *)userInfo completionHandler:(void (^)())completionHandler{
|
|
|
|
if ([identifier isEqualToString:Signal_Call_Accept_Identifier]) {
|
|
|
|
if ([identifier isEqualToString:Signal_Call_Accept_Identifier]) {
|
|
|
|
[self.callPickUpFuture trySetResult:@YES];
|
|
|
|
[self.callPickUpFuture trySetResult:@YES];
|
|
|
@ -276,12 +280,9 @@
|
|
|
|
- (void)protectScreen{
|
|
|
|
- (void)protectScreen{
|
|
|
|
if (Environment.preferences.screenSecurityIsEnabled) {
|
|
|
|
if (Environment.preferences.screenSecurityIsEnabled) {
|
|
|
|
self.blankWindow.rootViewController = [UIViewController new];
|
|
|
|
self.blankWindow.rootViewController = [UIViewController new];
|
|
|
|
|
|
|
|
|
|
|
|
UIImageView *imageView = [[UIImageView alloc] initWithFrame:self.blankWindow.bounds];
|
|
|
|
UIImageView *imageView = [[UIImageView alloc] initWithFrame:self.blankWindow.bounds];
|
|
|
|
if (self.blankWindow.bounds.size.height == 568) {
|
|
|
|
imageView.backgroundColor = [UIColor whiteColor];
|
|
|
|
imageView.image = [UIImage imageNamed:@"Default-568h"];
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
imageView.image = [UIImage imageNamed:@"Default"];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
imageView.opaque = YES;
|
|
|
|
imageView.opaque = YES;
|
|
|
|
[self.blankWindow.rootViewController.view addSubview:imageView];
|
|
|
|
[self.blankWindow.rootViewController.view addSubview:imageView];
|
|
|
|
self.blankWindow.hidden = NO;
|
|
|
|
self.blankWindow.hidden = NO;
|
|
|
|