Merge "Remove callbacks and messages in onDestroy()." into rvc-dev-plus-aosp am: e86b1a1574

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12202965

Change-Id: I7c4fd257db7b1d7199d79350f7529a3b5fd3eaf2
This commit is contained in:
Matthew Mintz
2020-07-22 08:36:50 +00:00
committed by Automerger Merge Worker

View File

@@ -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;