hjw
2023-04-20 b2dd8ca6ea52926382dabd0914efcc6b552267d1
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
package com.jwipc.nodka_reboot_under;
 
 
import com.jwipc.nodka_reboot_under.utils.Utils;
 
import android.app.Service;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.Handler;
import android.os.IBinder;
import android.os.Message;
 
public class The_Service extends Service{
 
   
   Utils mUtils = null;
   public static Handler handler;
   
   public static final int apk_feed_dog = 1;
   
   
   
   
   @Override
   public IBinder onBind(Intent arg0) {
       // TODO Auto-generated method stub
       return null;
   }
 
   
   @Override
   public void onCreate() {
       // TODO Auto-generated method stub
       super.onCreate();
       
       mUtils = new Utils(this);
       handler();
       
       receive_BroadcastReceiver_byService();
       mUtils.stop_watch_dog_apk_feed();
       
   }
   
   
   private void receive_BroadcastReceiver_byService()
   {
       IntentFilter filter = new IntentFilter();
       filter.addAction("android.intent.action.auto_power_shut");
       filter.addAction("android.intent.action.NDJ_APP_ALIVE");
       registerReceiver(new BroadcastReceiver_Power(), filter);
   }
   
   
   private void handler()
   {
       handler = new Handler()
       {
           @Override
           public void handleMessage(Message msg) {
               // TODO Auto-generated method stub
               super.handleMessage(msg);
               
               switch (msg.what) {
               case apk_feed_dog:
                   mUtils.stop_watch_dog_apk_feed();
                   break;
               }
           }
       };
   }
   
   
   
   
   
   
}