commit | 5fffa1df0ae842caf2b13911aae6044fb37e712e | [log] [tgz] |
---|---|---|
author | TreeHugger Robot <treehugger-gerrit@google.com> | Wed Sep 15 00:34:37 2021 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Wed Sep 15 00:34:37 2021 +0000 |
tree | f6efa4507c94192e41ac68032dbd41de055316bf | |
parent | 46192d288a3cec563c1eb40c40a3a2ed2f46f6b9 [diff] | |
parent | 25a1e0b91371f575434b23f739b08e59c641d92a [diff] |
Merge "Rebind TISBinder if service killed during connection" into sc-v2-dev am: 25a1e0b913 Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15828615 Change-Id: I06c2a96eaf0372f99ef2f833da41a9615ee899a7
diff --git a/quickstep/src/com/android/launcher3/BaseQuickstepLauncher.java b/quickstep/src/com/android/launcher3/BaseQuickstepLauncher.java index 1f4be5b..d24d752 100644 --- a/quickstep/src/com/android/launcher3/BaseQuickstepLauncher.java +++ b/quickstep/src/com/android/launcher3/BaseQuickstepLauncher.java
@@ -124,6 +124,15 @@ private final ServiceConnection mTisBinderConnection = new ServiceConnection() { @Override public void onServiceConnected(ComponentName componentName, IBinder iBinder) { + if (!(iBinder instanceof TISBinder)) { + // Seems like there can be a race condition when user unlocks, which kills the TIS + // process and re-starts it. I guess in the meantime service can be connected to + // a killed TIS? Either way, unbind and try to re-connect in that case. + unbindService(mTisBinderConnection); + mHandler.postDelayed(mConnectionRunnable, BACKOFF_MILLIS); + return; + } + mTaskbarManager = ((TISBinder) iBinder).getTaskbarManager(); mTaskbarManager.setLauncher(BaseQuickstepLauncher.this);