Remove callbacks and messages in onDestroy().
The Runnable is running after destroying the Cursor, which only happens in onDestroy(). So clean up before that happens.
Bug: 151283186
Test: Built, installed, and set ringtone.
Change-Id: I95c824675e6e710a1dc5d1f8faef2daff6f563e6
Merged-In: I95c824675e6e710a1dc5d1f8faef2daff6f563e6
(cherry picked from commit 2e23b5c013)
This commit is contained in:
@@ -333,6 +333,9 @@ public final class RingtonePickerActivity extends AlertActivity implements
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
if (mHandler != null) {
|
||||
mHandler.removeCallbacksAndMessages(null);
|
||||
}
|
||||
if (mCursor != null) {
|
||||
mCursor.close();
|
||||
mCursor = null;
|
||||
|
||||
Reference in New Issue
Block a user