Fix QS CTS failure caused by tile backup

am: 34f6cbc288

Change-Id: Ic82ccc386b8ab81797e748893b831601c34c12ce
This commit is contained in:
Jason Monk
2016-08-31 01:36:54 +00:00
committed by android-build-merger
2 changed files with 7 additions and 0 deletions

View File

@@ -129,6 +129,12 @@ public class TileLifecycleManager extends BroadcastReceiver implements
}
public void setBindService(boolean bind) {
if (mBound && mUnbindImmediate) {
// If we are already bound and expecting to unbind, this means we should stay bound
// because something else wants to hold the connection open.
mUnbindImmediate = false;
return;
}
mBound = bind;
if (bind) {
if (mBindTryCount == MAX_BIND_RETRIES) {

View File

@@ -95,6 +95,7 @@ public class TileServiceManager {
if (!TileLifecycleManager.isTileAdded(context, component)) {
TileLifecycleManager.setTileAdded(context, component, true);
mStateManager.onTileAdded();
mStateManager.flushMessagesAndUnbind();
}
}