Stop listening root change events when the activity is destroyed.
BUG=26454244 Change-Id: I4be98f21843d6d501dd9c6fc343e905e107fc1c1
This commit is contained in:
@@ -176,6 +176,12 @@ public abstract class BaseActivity extends Activity {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
mRoots.setOnCacheUpdateListener(null);
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
State buildDefaultState() {
|
||||
State state = new State();
|
||||
|
||||
@@ -518,7 +524,7 @@ public abstract class BaseActivity extends Activity {
|
||||
|
||||
@Override
|
||||
protected void onPostExecute(DocumentInfo result) {
|
||||
if (result != null) {
|
||||
if (result != null && !isDestroyed()) {
|
||||
openContainerDocument(result);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user