Merge "QS tile lifecycle management" into nyc-dev
This commit is contained in:
@@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user