Retry crashed bound foreground service with some delay
After quick crashes, back-off for 30 minutes and try again.
Keep backing-off up to 10 times and then give up.
Bug: 63075467
Test: runtest -x frameworks/base/tests/ServiceCrashTest
Change-Id: I3819aefac5fd48b49a70b1765e07696f2ad61328
diff --git a/tests/ServiceCrashTest/AndroidManifest.xml b/tests/ServiceCrashTest/AndroidManifest.xml
new file mode 100644
index 0000000..387c8b8
--- /dev/null
+++ b/tests/ServiceCrashTest/AndroidManifest.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.tests.servicecrashtest">
+
+ <application android:label="Service Crash Test">
+ <uses-library android:name="android.test.runner" />
+
+ <service android:name=".CrashingService"
+ android:process=":badservice" />
+
+ <activity android:name=".MainActivity" >
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ </intent-filter>
+ </activity>
+ </application>
+
+ <instrumentation android:label="Test bound service crash restart"
+ android:name="android.test.InstrumentationTestRunner"
+ android:targetPackage="com.android.tests.servicecrashtest" />
+
+</manifest>