Suspend action in security patch when browser is disabled
am: 013da34209
Change-Id: I408fadd1b4d5a3455eb70dc808efe18e258f26c0
diff --git a/src/com/android/settings/DeviceInfoSettings.java b/src/com/android/settings/DeviceInfoSettings.java
index dd8064f..de62f92 100644
--- a/src/com/android/settings/DeviceInfoSettings.java
+++ b/src/com/android/settings/DeviceInfoSettings.java
@@ -277,6 +277,13 @@
Toast.LENGTH_LONG);
mDevHitToast.show();
}
+ } else if (preference.getKey().equals(KEY_SECURITY_PATCH)) {
+ if (getPackageManager().queryIntentActivities(preference.getIntent(), 0).isEmpty()) {
+ // Don't send out the intent to stop crash
+ Log.w(LOG_TAG, "Stop click action on " + KEY_SECURITY_PATCH + ": "
+ + "queryIntentActivities() returns empty" );
+ return true;
+ }
} else if (preference.getKey().equals(KEY_DEVICE_FEEDBACK)) {
sendFeedback();
} else if(preference.getKey().equals(KEY_SYSTEM_UPDATE_SETTINGS)) {