Merge "QS tile lifecycle management" into nyc-dev

This commit is contained in:
Jason Monk
2016-04-20 17:08:59 +00:00
committed by Android (Google) Code Review

View File

@@ -148,13 +148,20 @@ public class TileLifecycleManager extends BroadcastReceiver implements
if (DEBUG) Log.d(TAG, "onServiceConnected " + name); if (DEBUG) Log.d(TAG, "onServiceConnected " + name);
// Got a connection, set the binding count to 0. // Got a connection, set the binding count to 0.
mBindTryCount = 0; mBindTryCount = 0;
mWrapper = new QSTileServiceWrapper(Stub.asInterface(service)); final QSTileServiceWrapper wrapper = new QSTileServiceWrapper(Stub.asInterface(service));
try { try {
service.linkToDeath(this, 0); service.linkToDeath(this, 0);
} catch (RemoteException e) { } catch (RemoteException e) {
} }
setQSService(mService); if (!wrapper.setQSService(mService)) {
setQSTile(mTile); handleDeath();
return;
}
if (!wrapper.setQSTile(mTile)) {
handleDeath();
return;
}
mWrapper = wrapper;
handlePendingMessages(); handlePendingMessages();
} }