26 lines
539 B
Objective-C
26 lines
539 B
Objective-C
//
|
|
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
|
|
//
|
|
|
|
#import "MainAppContext.h"
|
|
|
|
@implementation MainAppContext
|
|
|
|
- (BOOL)isMainApp
|
|
{
|
|
return YES;
|
|
}
|
|
|
|
- (BOOL)isMainAppAndActive
|
|
{
|
|
return [UIApplication sharedApplication].applicationState == UIApplicationStateActive;
|
|
}
|
|
|
|
- (UIBackgroundTaskIdentifier)beginBackgroundTaskWithExpirationHandler:
|
|
(BackgroundTaskExpirationHandler)expirationHandler
|
|
{
|
|
return [[UIApplication sharedApplication] beginBackgroundTaskWithExpirationHandler:expirationHandler];
|
|
}
|
|
|
|
@end
|