Commit 7cb6d91d authored by Felix Paul Kühne's avatar Felix Paul Kühne

Activity Manager: add ATV support

parent 64930448
......@@ -50,8 +50,10 @@
- (void)networkActivityStarted
{
_networkActivityCounter++;
#if TARGET_OS_IOS
if ([UIApplication sharedApplication].networkActivityIndicatorVisible == NO)
[UIApplication sharedApplication].networkActivityIndicatorVisible = YES;
#endif
}
- (BOOL)haveNetworkActivity
......@@ -62,8 +64,10 @@
- (void)networkActivityStopped
{
_networkActivityCounter--;
#if TARGET_OS_IOS
if (_networkActivityCounter < 1)
[UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
#endif
}
@end
......@@ -14,8 +14,8 @@
#import "VLCDropboxController.h"
#import "NSString+SupportedMedia.h"
#import "VLCPlaybackController.h"
#if !TARGET_OS_TV
#import "VLCActivityManager.h"
#if !TARGET_OS_TV
#import "VLCMediaFileDiscoverer.h"
#endif
#import "DBKeychain.h"
......@@ -265,25 +265,21 @@
- (void)networkRequestStarted
{
_outstandingNetworkRequests++;
#if TARGET_OS_IOS
if (_outstandingNetworkRequests == 1) {
VLCActivityManager *activityManager = [VLCActivityManager defaultManager];
[activityManager networkActivityStarted];
[activityManager disableIdleTimer];
}
#endif
}
- (void)networkRequestStopped
{
_outstandingNetworkRequests--;
#if TARGET_OS_IOS
if (_outstandingNetworkRequests == 0) {
VLCActivityManager *activityManager = [VLCActivityManager defaultManager];
[activityManager networkActivityStopped];
[activityManager activateIdleTimer];
}
#endif
}
#pragma mark - VLC internal communication and delegate
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment