Reconnect service when disconnected by launcher reinstall
When launcher is reinstalled, the current service is disconnected, now
reconnect it. Also added some unlinking with the death recipient.
Bug: 67957962
Test: manual, reinstall launcher
Change-Id: Id776948df50ce27de9e73037573be1e7eac989f5
diff --git a/packages/SystemUI/src/com/android/systemui/OverviewProxyService.java b/packages/SystemUI/src/com/android/systemui/OverviewProxyService.java
index 9d960a1..734ee43 100644
--- a/packages/SystemUI/src/com/android/systemui/OverviewProxyService.java
+++ b/packages/SystemUI/src/com/android/systemui/OverviewProxyService.java
@@ -111,7 +111,7 @@
private final IBinder.DeathRecipient mOverviewServiceDeathRcpt = new IBinder.DeathRecipient() {
@Override
public void binderDied() {
- mOverviewProxy = null;
+ startConnectionToCurrentUser();
}
};
@@ -150,6 +150,7 @@
private void disconnectFromLauncherService() {
if (mOverviewProxy != null) {
+ mOverviewProxy.asBinder().unlinkToDeath(mOverviewServiceDeathRcpt, 0);
mContext.unbindService(mOverviewServiceConnection);
mOverviewProxy = null;
}