Skip to content
Browse files

edit it.

1 parent f86fe9c commit dd04983a389d5db73e18849d8c48a5610cc1e27a 郭阳 committed
View
BIN .gradle/2.8/taskArtifacts/cache.properties.lock
Binary file not shown.
View
BIN .gradle/2.8/taskArtifacts/fileHashes.bin
Binary file not shown.
View
BIN .gradle/2.8/taskArtifacts/fileSnapshots.bin
Binary file not shown.
View
BIN .gradle/2.8/taskArtifacts/outputFileStates.bin
Binary file not shown.
View
BIN .gradle/2.8/taskArtifacts/taskArtifacts.bin
Binary file not shown.
View
23 DemoMarsdaemon/DemoMarsdaemon.iml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<module external.linked.project.id=":DemoMarsdaemon" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" external.system.module.group="Marsdaemon2" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
+<module external.linked.project.id=":DemoMarsdaemon" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" external.system.module.group="MarsDaemon" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="android-gradle" name="Android-Gradle">
<configuration>
@@ -12,10 +12,7 @@
<option name="SELECTED_TEST_ARTIFACT" value="_android_test_" />
<option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
<option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" />
- <option name="ASSEMBLE_TEST_TASK_NAME" value="assembleDebugAndroidTest" />
- <option name="COMPILE_JAVA_TEST_TASK_NAME" value="compileDebugAndroidTestSources" />
<afterSyncTasks>
- <task>generateDebugAndroidTestSources</task>
<task>generateDebugSources</task>
</afterSyncTasks>
<option name="ALLOW_USER_CONFIGURATION" value="false" />
@@ -28,6 +25,7 @@
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/build/intermediates/classes/debug" />
+ <output-test url="file://$MODULE_DIR$/build/intermediates/classes/test/debug" />
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/debug" isTestSource="false" generated="true" />
@@ -49,6 +47,13 @@
<sourceFolder url="file://$MODULE_DIR$/src/debug/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/jni" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/rs" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/src/testDebug/res" type="java-test-resource" />
+ <sourceFolder url="file://$MODULE_DIR$/src/testDebug/resources" type="java-test-resource" />
+ <sourceFolder url="file://$MODULE_DIR$/src/testDebug/assets" type="java-test-resource" />
+ <sourceFolder url="file://$MODULE_DIR$/src/testDebug/aidl" isTestSource="true" />
+ <sourceFolder url="file://$MODULE_DIR$/src/testDebug/java" isTestSource="true" />
+ <sourceFolder url="file://$MODULE_DIR$/src/testDebug/jni" isTestSource="true" />
+ <sourceFolder url="file://$MODULE_DIR$/src/testDebug/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/main/res" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/main/assets" type="java-resource" />
@@ -56,6 +61,13 @@
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/jni" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/src/test/res" type="java-test-resource" />
+ <sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
+ <sourceFolder url="file://$MODULE_DIR$/src/test/assets" type="java-test-resource" />
+ <sourceFolder url="file://$MODULE_DIR$/src/test/aidl" isTestSource="true" />
+ <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
+ <sourceFolder url="file://$MODULE_DIR$/src/test/jni" isTestSource="true" />
+ <sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
@@ -75,6 +87,7 @@
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/23.1.1/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" />
+ <excludeFolder url="file://$MODULE_DIR$/build/intermediates/mockable-android-23.jar" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/pre-dexed" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/restart-dex" />
@@ -91,6 +104,8 @@
<orderEntry type="library" exported="" name="support-v4-23.1.1" level="project" />
<orderEntry type="library" exported="" name="design-23.1.1" level="project" />
<orderEntry type="library" exported="" name="appcompat-v7-23.1.1" level="project" />
+ <orderEntry type="library" exported="" scope="TEST" name="hamcrest-core-1.3" level="project" />
+ <orderEntry type="library" exported="" scope="TEST" name="junit-4.12" level="project" />
<orderEntry type="module" module-name="LibMarsdaemon" exported="" />
</component>
</module>
View
13 DemoMarsdaemon/src/main/java/com/marswin89/marsdaemon/demo/MyApplication1.java
@@ -12,6 +12,7 @@
* Created by Mars on 12/24/15.
*/
public class MyApplication1 extends DaemonApplication {
+
/**
* you can override this method instead of {@link android.app.Application attachBaseContext}
* @param base
@@ -28,8 +29,16 @@ public void attachBaseContextByDaemon(Context base) {
*/
@Override
protected DaemonConfigurations getDaemonConfigurations() {
- DaemonConfigurations.DaemonConfiguration configuration1 = new DaemonConfigurations.DaemonConfiguration("com.marswin89.marsdaemon.demo:process1", Service1.class.getCanonicalName(), Receiver1.class.getCanonicalName());
- DaemonConfigurations.DaemonConfiguration configuration2 = new DaemonConfigurations.DaemonConfiguration("com.marswin89.marsdaemon.demo:process2", Service2.class.getCanonicalName(), Receiver2.class.getCanonicalName());
+ DaemonConfigurations.DaemonConfiguration configuration1 = new DaemonConfigurations.DaemonConfiguration(
+ "com.marswin89.marsdaemon.demo:process1",
+ Service1.class.getCanonicalName(),
+ Receiver1.class.getCanonicalName());
+
+ DaemonConfigurations.DaemonConfiguration configuration2 = new DaemonConfigurations.DaemonConfiguration(
+ "com.marswin89.marsdaemon.demo:process2",
+ Service2.class.getCanonicalName(),
+ Receiver2.class.getCanonicalName());
+
DaemonConfigurations.DaemonListener listener = new MyDaemonListener();
//return new DaemonConfigurations(configuration1, configuration2);//listener can be null
return new DaemonConfigurations(configuration1, configuration2, listener);
View
10 DemoMarsdaemon/src/main/java/com/marswin89/marsdaemon/demo/MyApplication2.java
@@ -27,8 +27,14 @@ protected void attachBaseContext(Context base) {
private DaemonConfigurations createDaemonConfigurations(){
- DaemonConfigurations.DaemonConfiguration configuration1 = new DaemonConfigurations.DaemonConfiguration("com.marswin89.marsdaemon.demo:process1", Service1.class.getCanonicalName(), Receiver1.class.getCanonicalName());
- DaemonConfigurations.DaemonConfiguration configuration2 = new DaemonConfigurations.DaemonConfiguration("com.marswin89.marsdaemon.demo:process2", Service2.class.getCanonicalName(), Receiver2.class.getCanonicalName());
+ DaemonConfigurations.DaemonConfiguration configuration1 = new DaemonConfigurations.DaemonConfiguration(
+ "com.marswin89.marsdaemon.demo:process1",
+ Service1.class.getCanonicalName(),
+ Receiver1.class.getCanonicalName());
+ DaemonConfigurations.DaemonConfiguration configuration2 = new DaemonConfigurations.DaemonConfiguration(
+ "com.marswin89.marsdaemon.demo:process2",
+ Service2.class.getCanonicalName(),
+ Receiver2.class.getCanonicalName());
DaemonConfigurations.DaemonListener listener = new MyDaemonListener();
//return new DaemonConfigurations(configuration1, configuration2);//listener can be null
return new DaemonConfigurations(configuration1, configuration2, listener);
View
23 LibMarsdaemon/LibMarsdaemon.iml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<module external.linked.project.id=":LibMarsdaemon" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" external.system.module.group="Marsdaemon2" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
+<module external.linked.project.id=":LibMarsdaemon" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" external.system.module.group="MarsDaemon" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="android-gradle" name="Android-Gradle">
<configuration>
@@ -12,10 +12,7 @@
<option name="SELECTED_TEST_ARTIFACT" value="_android_test_" />
<option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
<option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" />
- <option name="ASSEMBLE_TEST_TASK_NAME" value="assembleDebugAndroidTest" />
- <option name="COMPILE_JAVA_TEST_TASK_NAME" value="compileDebugAndroidTestSources" />
<afterSyncTasks>
- <task>generateDebugAndroidTestSources</task>
<task>generateDebugSources</task>
</afterSyncTasks>
<option name="ALLOW_USER_CONFIGURATION" value="false" />
@@ -29,6 +26,7 @@
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/build/intermediates/classes/debug" />
+ <output-test url="file://$MODULE_DIR$/build/intermediates/classes/test/debug" />
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/debug" isTestSource="false" generated="true" />
@@ -50,6 +48,13 @@
<sourceFolder url="file://$MODULE_DIR$/src/debug/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/jni" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/rs" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/src/testDebug/res" type="java-test-resource" />
+ <sourceFolder url="file://$MODULE_DIR$/src/testDebug/resources" type="java-test-resource" />
+ <sourceFolder url="file://$MODULE_DIR$/src/testDebug/assets" type="java-test-resource" />
+ <sourceFolder url="file://$MODULE_DIR$/src/testDebug/aidl" isTestSource="true" />
+ <sourceFolder url="file://$MODULE_DIR$/src/testDebug/java" isTestSource="true" />
+ <sourceFolder url="file://$MODULE_DIR$/src/testDebug/jni" isTestSource="true" />
+ <sourceFolder url="file://$MODULE_DIR$/src/testDebug/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/main/res" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/main/assets" type="java-resource" />
@@ -64,6 +69,13 @@
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
+ <sourceFolder url="file://$MODULE_DIR$/src/test/res" type="java-test-resource" />
+ <sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
+ <sourceFolder url="file://$MODULE_DIR$/src/test/assets" type="java-test-resource" />
+ <sourceFolder url="file://$MODULE_DIR$/src/test/aidl" isTestSource="true" />
+ <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
+ <sourceFolder url="file://$MODULE_DIR$/src/test/jni" isTestSource="true" />
+ <sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/annotations" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/bundles" />
@@ -71,6 +83,7 @@
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dependency-cache" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/lint" />
+ <excludeFolder url="file://$MODULE_DIR$/build/intermediates/mockable-android-23.jar" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/proguard-rules" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
@@ -83,5 +96,7 @@
<orderEntry type="library" exported="" name="support-annotations-23.1.1" level="project" />
<orderEntry type="library" exported="" name="support-v4-23.1.1" level="project" />
<orderEntry type="library" exported="" name="appcompat-v7-23.1.1" level="project" />
+ <orderEntry type="library" exported="" scope="TEST" name="hamcrest-core-1.3" level="project" />
+ <orderEntry type="library" exported="" scope="TEST" name="junit-4.12" level="project" />
</component>
</module>
View
2 LibMarsdaemon/src/main/java/com/marswin89/marsdaemon/IDaemonStrategy.java
@@ -86,6 +86,8 @@ static IDaemonStrategy fetchStrategy() {
default:
if(Build.MODEL != null && Build.MODEL.toLowerCase().startsWith("mi")){
mDaemonStrategy = new DaemonStrategyXiaomi();
+ }else if(Build.MODEL != null && Build.MODEL.toLowerCase().startsWith("a31")){
+ mDaemonStrategy = new DaemonStrategy21();
}else{
mDaemonStrategy = new DaemonStrategyUnder21();
}
View
11 README.md
@@ -2,10 +2,13 @@
It is a lite library, you can make your project depend it easily, and your project will be UNDEAD.
- * support keeping alive from ADNROID_API 9 to ANDRIOD_API 23
- * support keeping alive in most of devices(contains SUMSUNG\HUAWEI\MEIZU\MI\NEXUS..)
- * support keeping alive in FORCE_CLOSE from SystemSettings and MEMORY_CLEAN from third-part apps (such like CleanMaster\360 and so on)
- * surpports to keep BOOT_RECEIVER work well simplely
+ * support to keep alive from Android_API 9 to Android_API 23
+ * support to keep alive in most of devices(contains Sumsung\Huawei\Meizu\Mi\Nexus..)
+ * support to keep alive in FORCE_CLOSE from SystemSettings and MEMORY_CLEAN from third-part apps (such like CleanMaster\360 and so on)
+ * support to keep BOOT_RECEIVER work well simplely
+
+my Blog in Chinese here:
+[http://blog.csdn.net/marswin89/article/details/50917098](http://blog.csdn.net/marswin89/article/details/50917098)
### Version
View
49 build/intermediates/dex-cache/cache.xml
@@ -2,11 +2,60 @@
<items version="2" >
<item
+ jar="/Users/guoyang/Workspace/workspace_github/MarsDaemon/DemoMarsdaemon/build/intermediates/exploded-aar/com.android.support/design/23.1.1/jars/classes.jar"
+ jumboMode="false"
+ revision="23.0.2"
+ sha1="379471b2bd17d9737c050345c08e8c7d16589784">
+ <dex dex="/Users/guoyang/Workspace/workspace_github/MarsDaemon/DemoMarsdaemon/build/intermediates/pre-dexed/debug/classes-c6fa416b046aaa3c3881aa2adc3de3f86eed5b88.jar" />
+ </item>
+ <item
jar="/Users/guoyang/Workspace/workspace_github/Marsdaemon2/DemoMarsdaemon/build/intermediates/exploded-aar/Marsdaemon2/LibMarsdaemon/unspecified/jars/classes.jar"
jumboMode="false"
revision="23.0.2"
sha1="43b527e25decf1d24c3365c600eef0f5b01ba06e">
<dex dex="/Users/guoyang/Workspace/workspace_github/Marsdaemon2/DemoMarsdaemon/build/intermediates/pre-dexed/debug/classes-9e71f3a69a7a75f0e6ad61f439036846c69c2471.jar" />
</item>
+ <item
+ jar="/Users/guoyang/Workspace/workspace_github/MarsDaemon/DemoMarsdaemon/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.1.1/jars/classes.jar"
+ jumboMode="false"
+ revision="23.0.2"
+ sha1="5c5699834e9722f1c288fea2de82725d078ba127">
+ <dex dex="/Users/guoyang/Workspace/workspace_github/MarsDaemon/DemoMarsdaemon/build/intermediates/pre-dexed/debug/classes-7b436cb1763e591acf0c9e6d3a1907156751d72b.jar" />
+ </item>
+ <item
+ jar="/Users/guoyang/Developer/android-sdk-macosx/extras/android/m2repository/com/android/support/support-annotations/23.1.1/support-annotations-23.1.1.jar"
+ jumboMode="false"
+ revision="23.0.2"
+ sha1="8d680ba5a623724d1fb0e81c36a790f023a6cede">
+ <dex dex="/Users/guoyang/Workspace/workspace_github/MarsDaemon/DemoMarsdaemon/build/intermediates/pre-dexed/debug/support-annotations-23.1.1-38952fc49edad26a0b2eb54c488f5b907e794825.jar" />
+ </item>
+ <item
+ jar="/Users/guoyang/Workspace/workspace_github/MarsDaemon/DemoMarsdaemon/build/intermediates/exploded-aar/com.android.support/support-v4/23.1.1/jars/classes.jar"
+ jumboMode="false"
+ revision="23.0.2"
+ sha1="6cbc7773921fcfedbe55657578f0cbfe614778dc">
+ <dex dex="/Users/guoyang/Workspace/workspace_github/MarsDaemon/DemoMarsdaemon/build/intermediates/pre-dexed/debug/classes-f61bac8e7f98dd4c9f6dad69f7b8e4e01e5cbdd1.jar" />
+ </item>
+ <item
+ jar="/Users/guoyang/Workspace/workspace_github/MarsDaemon/DemoMarsdaemon/build/intermediates/exploded-aar/MarsDaemon/LibMarsdaemon/unspecified/jars/classes.jar"
+ jumboMode="false"
+ revision="23.0.2"
+ sha1="a11b8f6e32b4301d95ef567d59733bfa304565e4">
+ <dex dex="/Users/guoyang/Workspace/workspace_github/MarsDaemon/DemoMarsdaemon/build/intermediates/pre-dexed/debug/classes-d0fa6b7bcd26d49f129741e8767855df20ea7b19.jar" />
+ </item>
+ <item
+ jar="/Users/guoyang/Workspace/workspace_github/MarsDaemon/DemoMarsdaemon/build/intermediates/exploded-aar/com.android.support/recyclerview-v7/23.1.1/jars/classes.jar"
+ jumboMode="false"
+ revision="23.0.2"
+ sha1="09c5e804bc67fc0580360043dff067df574a60d4">
+ <dex dex="/Users/guoyang/Workspace/workspace_github/MarsDaemon/DemoMarsdaemon/build/intermediates/pre-dexed/debug/classes-134ea16ac5e38c934126b074177d0f034fdd6bf8.jar" />
+ </item>
+ <item
+ jar="/Users/guoyang/Workspace/workspace_github/MarsDaemon/DemoMarsdaemon/build/intermediates/exploded-aar/com.android.support/support-v4/23.1.1/jars/libs/internal_impl-23.1.1.jar"
+ jumboMode="false"
+ revision="23.0.2"
+ sha1="a4de9c81ae239414e1ed0f86441b02abaf29bca9">
+ <dex dex="/Users/guoyang/Workspace/workspace_github/MarsDaemon/DemoMarsdaemon/build/intermediates/pre-dexed/debug/internal_impl-23.1.1-5571a2db4ac8b54f08dffabdf6b46d782b3fde03.jar" />
+ </item>
</items>

0 comments on commit dd04983

Please sign in to comment.
Something went wrong with that request. Please try again.