From 5659fc6ac9596c703e75175c3d0a083b57e7e667 Mon Sep 17 00:00:00 2001 From: tmfang Date: Thu, 15 Nov 2018 16:48:21 +0800 Subject: [PATCH] Fix crash on AppInfoDashboardFragment When AppInfoDashboardFragment launch a new page, it sets SUB_INFO_FRAGMENT(1) as request code. This request code is same as REQUEST_REMOVE_DEVICE_ADMIN(1). So, when AppInfoDashboardFragment got onActivityResult callback, it will handle the event about REQUEST_REMOVE_DEVICE_ADMIN. So, we change REQUEST_REMOVE_DEVICE_ADMIN to a unique value. Test: manual test, robotest Fixes: 118841475 Change-Id: Idabd62c5062ccfbf4b8acee82df7401fc9ce7484 --- .../settings/applications/appinfo/AppInfoDashboardFragment.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/android/settings/applications/appinfo/AppInfoDashboardFragment.java b/src/com/android/settings/applications/appinfo/AppInfoDashboardFragment.java index 64fd36d2450..32880d39441 100755 --- a/src/com/android/settings/applications/appinfo/AppInfoDashboardFragment.java +++ b/src/com/android/settings/applications/appinfo/AppInfoDashboardFragment.java @@ -88,7 +88,7 @@ public class AppInfoDashboardFragment extends DashboardFragment // Result code identifiers @VisibleForTesting static final int REQUEST_UNINSTALL = 0; - private static final int REQUEST_REMOVE_DEVICE_ADMIN = 1; + private static final int REQUEST_REMOVE_DEVICE_ADMIN = 5; static final int SUB_INFO_FRAGMENT = 1;