Ignore onPostListReady call if the activity has been destroyed
ResolverActivity#onPostListReady is called asynchronously on the main thread and it is possible for it to be executed after activity’s onDestroy call. A check for activity’s status is added to the method. Test: atest FrameworksCoreTests:ChooserActivityTest Fix: 254787909 Change-Id: I96d98a03d86881845868a67e33ea8ee7c9dc6631
This commit is contained in:
@@ -1098,6 +1098,9 @@ public class ResolverActivity extends Activity implements
|
||||
@Override // ResolverListCommunicator
|
||||
public final void onPostListReady(ResolverListAdapter listAdapter, boolean doPostProcessing,
|
||||
boolean rebuildCompleted) {
|
||||
if (isDestroyed()) {
|
||||
return;
|
||||
}
|
||||
if (isAutolaunching()) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user