Просмотр исходного кода

160810
optimised offline power management.

Ray Zhang 9 лет назад
Родитель
Сommit
ac0cbecf10
1 измененных файлов с 3 добавлено и 1 удалено
  1. 3 1
      RedAnt ERP Mobile/iSales-NPD/AppDelegate.m

+ 3 - 1
RedAnt ERP Mobile/iSales-NPD/AppDelegate.m

@@ -774,7 +774,7 @@
             return;
             return;
         }
         }
         
         
-        
+        [ [ UIApplication sharedApplication] setIdleTimerDisabled:YES ] ;
         NSMutableDictionary* download_json=nil;
         NSMutableDictionary* download_json=nil;
         
         
 //        NSString* vid=@"31f4d59d-c229-47e3-9270-e15425777186";
 //        NSString* vid=@"31f4d59d-c229-47e3-9270-e15425777186";
@@ -834,6 +834,7 @@
 //                self.downloadlog=nil;
 //                self.downloadlog=nil;
                 self.downloading=false;
                 self.downloading=false;
             });
             });
+            [ [ UIApplication sharedApplication] setIdleTimerDisabled:NO ] ;
             [self.settingUI onSyncFinish];
             [self.settingUI onSyncFinish];
             return;
             return;
             //一直没取到json,出错处理
             //一直没取到json,出错处理
@@ -848,6 +849,7 @@
 //                    self.downloadlog=nil;
 //                    self.downloadlog=nil;
                     self.downloading=false;
                     self.downloading=false;
                 });
                 });
+                [ [ UIApplication sharedApplication] setIdleTimerDisabled:NO ] ;
                 [self.settingUI onSyncFinish];
                 [self.settingUI onSyncFinish];
                 return;
                 return;
             }
             }