Merge "Fix lowMemoryKill with app2.MyService" into pie-cts-dev

am: 86ca1697d0

Change-Id: Ie2858fee81196b360cca2179cba4052ad0ef8831
This commit is contained in:
Juju Sung
2018-12-25 00:25:43 -08:00
committed by android-build-merger

View File

@@ -62,10 +62,10 @@ public class MyServiceClient {
final Intent intent = new Intent(); final Intent intent = new Intent();
intent.setComponent(new ComponentName(APP2_PACKAGE, SERVICE_NAME)); intent.setComponent(new ComponentName(APP2_PACKAGE, SERVICE_NAME));
// Needs to use BIND_ALLOW_OOM_MANAGEMENT and BIND_NOT_FOREGROUND so app2 does not run in // Needs to use BIND_NOT_FOREGROUND so app2 does not run in
// the same process state as app // the same process state as app
mContext.bindService(intent, mServiceConnection, Context.BIND_AUTO_CREATE mContext.bindService(intent, mServiceConnection, Context.BIND_AUTO_CREATE
| Context.BIND_ALLOW_OOM_MANAGEMENT | Context.BIND_NOT_FOREGROUND); | Context.BIND_NOT_FOREGROUND);
cv.block(TIMEOUT_MS); cv.block(TIMEOUT_MS);
if (mService == null) { if (mService == null) {
throw new IllegalStateException( throw new IllegalStateException(