You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" package="com.shihoo.daemon" >
<!-- 前台运行权限 进程守护必须--> <uses-permission android:name="android.permission.FOREGROUND_SERVICE" /> <!-- 特权system/priv-app/目录下的app才可以申请豁免--> <uses-permission android:name="android.permission.START_ACTIVITIES_FROM_BACKGROUND" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> <uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS"/> <!-- 进程守护--> <uses-permission android:name="android.permission.FORCE_STOP_PACKAGES" tools:ignore="ProtectedPermissions" /> <uses-permission android:name="android.permission.KILL_BACKGROUND_PROCESSES"/> <uses-permission android:name="android.permission.SHUTDOWN" tools:ignore="ProtectedPermissions" /> <uses-permission android:name="android.permission.DISABLE_KEYGUARD"/> <uses-permission android:name="android.permission.REORDER_TASKS" /> <!-- 进程守护 over-->
<application android:label="@string/app_name" > <receiver android:name="com.shihoo.daemon.watch.WakeUpReceiver" android:exported="true" android:process=":watch"> <intent-filter> <action android:name="android.intent.action.USER_PRESENT"/> <action android:name="android.intent.action.BOOT_COMPLETED" /> <action android:name="android.net.conn.CONNECTIVITY_CHANGE" /> <action android:name="android.intent.action.USER_PRESENT" /> <action android:name="android.intent.action.MEDIA_MOUNTED" /> <action android:name="android.intent.action.ACTION_POWER_CONNECTED" /> <action android:name="android.intent.action.ACTION_POWER_DISCONNECTED" /> </intent-filter> </receiver>
<receiver android:name="com.shihoo.daemon.watch.WakeUpReceiver$StartWatchReceiver" android:exported="true" android:process=":watch"> <intent-filter> <action android:name="com.shihoo.START_JOB_ALARM_SUB"/> </intent-filter> </receiver> <!-- 广播接收者 receiver 进程--> <receiver android:name="com.shihoo.daemon.watch.WakeUpReceiver$WakeUpAutoStartReceiver" android:exported="true" android:process=":watch"> <!-- 手机启动 --> <intent-filter> <action android:name="android.intent.action.BOOT_COMPLETED"/> <action android:name="android.net.conn.CONNECTIVITY_CHANGE"/> </intent-filter> <!-- 软件安装卸载--> <intent-filter> <action android:name="android.intent.action.PACKAGE_ADDED"/> <action android:name="android.intent.action.PACKAGE_REMOVED"/> <data android:scheme="package"/> </intent-filter> <!-- 网络监听 --> <intent-filter> <action android:name="android.net.conn.CONNECTIVITY_CHANGE"/> <action android:name="android.net.wifi.WIFI_STATE_CJANGED"/> <action android:name="android.net.wifi.STATE_CHANGE"/> </intent-filter> <!-- 文件挂载 --> <intent-filter> <action android:name="android.intent.action.MEDIA_EJECT"/> <action android:name="android.intent.action.MEDIA_MOUNTED"/> <data android:scheme="file"/> </intent-filter>
</receiver>
<!-- 守护进程 watch --> <service android:name="com.shihoo.daemon.watch.JobSchedulerService" android:permission="android.permission.BIND_JOB_SERVICE" android:enabled="true" android:exported="true" android:process=":watch"/>
<service android:name="com.shihoo.daemon.watch.WatchDogService" android:process=":watch"/>
<activity android:name="com.shihoo.daemon.singlepixel.SinglePixelActivity" android:configChanges="keyboardHidden|orientation|screenSize|navigation|keyboard" android:excludeFromRecents="true" android:finishOnTaskLaunch="false" android:launchMode="singleInstance" android:theme="@style/SingleActivityStyle" />
<service android:name=".watch.PlayMusicService" android:process=":watch"/>
<service android:name="com.shihoo.daemon.watchdog.MainWorkService" /> <!-- 注意 : 看业务需求,工作Service是否要放在主进程还是work进程 , 大部业务分放在主进程即可-->
</application>
</manifest>
|