QS tile lifecycle management
Ensure we send out the current QSService and Tile to the TileService before we write to mWrapper allowing other commands to come through. Change-Id: Ia3f470083d97d85fa726b1add3706db6278c7d1e Fixes: 27871492
This commit is contained in:
@@ -148,13 +148,20 @@ public class TileLifecycleManager extends BroadcastReceiver implements
|
||||
if (DEBUG) Log.d(TAG, "onServiceConnected " + name);
|
||||
// Got a connection, set the binding count to 0.
|
||||
mBindTryCount = 0;
|
||||
mWrapper = new QSTileServiceWrapper(Stub.asInterface(service));
|
||||
final QSTileServiceWrapper wrapper = new QSTileServiceWrapper(Stub.asInterface(service));
|
||||
try {
|
||||
service.linkToDeath(this, 0);
|
||||
} catch (RemoteException e) {
|
||||
}
|
||||
setQSService(mService);
|
||||
setQSTile(mTile);
|
||||
if (!wrapper.setQSService(mService)) {
|
||||
handleDeath();
|
||||
return;
|
||||
}
|
||||
if (!wrapper.setQSTile(mTile)) {
|
||||
handleDeath();
|
||||
return;
|
||||
}
|
||||
mWrapper = wrapper;
|
||||
handlePendingMessages();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user