Merge "Show back button when launcher is disconnected from proxy service" into pi-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
d2de50b995
@@ -166,9 +166,7 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis
|
|||||||
long token = Binder.clearCallingIdentity();
|
long token = Binder.clearCallingIdentity();
|
||||||
try {
|
try {
|
||||||
mHandler.post(() -> {
|
mHandler.post(() -> {
|
||||||
for (int i = mConnectionCallbacks.size() - 1; i >= 0; --i) {
|
notifyBackButtonAlphaChanged(alpha, animate);
|
||||||
mConnectionCallbacks.get(i).onBackButtonAlphaChanged(alpha, animate);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
} finally {
|
} finally {
|
||||||
Binder.restoreCallingIdentity(token);
|
Binder.restoreCallingIdentity(token);
|
||||||
@@ -355,10 +353,17 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis
|
|||||||
mOverviewProxy.asBinder().unlinkToDeath(mOverviewServiceDeathRcpt, 0);
|
mOverviewProxy.asBinder().unlinkToDeath(mOverviewServiceDeathRcpt, 0);
|
||||||
mContext.unbindService(mOverviewServiceConnection);
|
mContext.unbindService(mOverviewServiceConnection);
|
||||||
mOverviewProxy = null;
|
mOverviewProxy = null;
|
||||||
|
notifyBackButtonAlphaChanged(1f, false /* animate */);
|
||||||
notifyConnectionChanged();
|
notifyConnectionChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void notifyBackButtonAlphaChanged(float alpha, boolean animate) {
|
||||||
|
for (int i = mConnectionCallbacks.size() - 1; i >= 0; --i) {
|
||||||
|
mConnectionCallbacks.get(i).onBackButtonAlphaChanged(alpha, animate);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void notifyConnectionChanged() {
|
private void notifyConnectionChanged() {
|
||||||
for (int i = mConnectionCallbacks.size() - 1; i >= 0; --i) {
|
for (int i = mConnectionCallbacks.size() - 1; i >= 0; --i) {
|
||||||
mConnectionCallbacks.get(i).onConnectionChanged(mOverviewProxy != null);
|
mConnectionCallbacks.get(i).onConnectionChanged(mOverviewProxy != null);
|
||||||
|
|||||||
Reference in New Issue
Block a user