Loading res/values/strings.xml +2 −0 Original line number Diff line number Diff line Loading @@ -3431,6 +3431,8 @@ <string name="allow_mock_location">Allow mock locations</string> <!-- setting Checkbox summary whether to allow mock locations --> <string name="allow_mock_location_summary">Allow mock locations</string> <!-- Setting Checkbox title whether to enable view attribute inspection --> <string name="debug_view_attributes">Enable view attribute inspection</string> <!-- Title of warning dialog about the implications of enabling USB debugging --> <string name="adb_warning_title">Allow USB debugging?</string> <!-- Warning text to user about the implications of enabling USB debugging --> Loading res/xml/development_prefs.xml +4 −0 Original line number Diff line number Diff line Loading @@ -86,6 +86,10 @@ android:title="@string/allow_mock_location" android:summary="@string/allow_mock_location_summary"/> <CheckBoxPreference android:key="debug_view_attributes" android:title="@string/debug_view_attributes" /> <PreferenceScreen android:key="debug_app" android:title="@string/debug_app" /> Loading src/com/android/settings/DevelopmentSettings.java +10 −1 Original line number Diff line number Diff line Loading @@ -110,6 +110,7 @@ public class DevelopmentSettings extends SettingsPreferenceFragment private static final String DEBUG_APP_KEY = "debug_app"; private static final String WAIT_FOR_DEBUGGER_KEY = "wait_for_debugger"; private static final String VERIFY_APPS_OVER_USB_KEY = "verify_apps_over_usb"; private static final String DEBUG_VIEW_ATTRIBUTES = "debug_view_attributes"; private static final String STRICT_MODE_KEY = "strict_mode"; private static final String POINTER_LOCATION_KEY = "pointer_location"; private static final String SHOW_TOUCHES_KEY = "show_touches"; Loading Loading @@ -187,6 +188,7 @@ public class DevelopmentSettings extends SettingsPreferenceFragment private CheckBoxPreference mBtHciSnoopLog; private CheckBoxPreference mEnableOemUnlock; private CheckBoxPreference mAllowMockLocation; private CheckBoxPreference mDebugViewAttributes; private PreferenceScreen mPassword; private String mDebugApp; Loading Loading @@ -295,6 +297,7 @@ public class DevelopmentSettings extends SettingsPreferenceFragment mEnableOemUnlock = null; } mAllowMockLocation = findAndInitCheckboxPref(ALLOW_MOCK_LOCATION); mDebugViewAttributes = findAndInitCheckboxPref(DEBUG_VIEW_ATTRIBUTES); mPassword = (PreferenceScreen) findPreference(LOCAL_BACKUP_PASSWORD); mAllPrefs.add(mPassword); Loading Loading @@ -513,6 +516,8 @@ public class DevelopmentSettings extends SettingsPreferenceFragment } updateCheckBox(mAllowMockLocation, Settings.Secure.getInt(cr, Settings.Secure.ALLOW_MOCK_LOCATION, 0) != 0); updateCheckBox(mDebugViewAttributes, Settings.Global.getInt(cr, Settings.Global.DEBUG_VIEW_ATTRIBUTES, 0) != 0); updateHdcpValues(); updatePasswordSummary(); updateDebuggerOptions(); Loading Loading @@ -1380,6 +1385,10 @@ public class DevelopmentSettings extends SettingsPreferenceFragment Settings.Secure.putInt(getActivity().getContentResolver(), Settings.Secure.ALLOW_MOCK_LOCATION, mAllowMockLocation.isChecked() ? 1 : 0); } else if (preference == mDebugViewAttributes) { Settings.Global.putInt(getActivity().getContentResolver(), Settings.Global.DEBUG_VIEW_ATTRIBUTES, mDebugViewAttributes.isChecked() ? 1 : 0); } else if (preference == mDebugAppPref) { startActivityForResult(new Intent(getActivity(), AppPicker.class), RESULT_DEBUG_APP); } else if (preference == mWaitForDebugger) { Loading Loading
res/values/strings.xml +2 −0 Original line number Diff line number Diff line Loading @@ -3431,6 +3431,8 @@ <string name="allow_mock_location">Allow mock locations</string> <!-- setting Checkbox summary whether to allow mock locations --> <string name="allow_mock_location_summary">Allow mock locations</string> <!-- Setting Checkbox title whether to enable view attribute inspection --> <string name="debug_view_attributes">Enable view attribute inspection</string> <!-- Title of warning dialog about the implications of enabling USB debugging --> <string name="adb_warning_title">Allow USB debugging?</string> <!-- Warning text to user about the implications of enabling USB debugging --> Loading
res/xml/development_prefs.xml +4 −0 Original line number Diff line number Diff line Loading @@ -86,6 +86,10 @@ android:title="@string/allow_mock_location" android:summary="@string/allow_mock_location_summary"/> <CheckBoxPreference android:key="debug_view_attributes" android:title="@string/debug_view_attributes" /> <PreferenceScreen android:key="debug_app" android:title="@string/debug_app" /> Loading
src/com/android/settings/DevelopmentSettings.java +10 −1 Original line number Diff line number Diff line Loading @@ -110,6 +110,7 @@ public class DevelopmentSettings extends SettingsPreferenceFragment private static final String DEBUG_APP_KEY = "debug_app"; private static final String WAIT_FOR_DEBUGGER_KEY = "wait_for_debugger"; private static final String VERIFY_APPS_OVER_USB_KEY = "verify_apps_over_usb"; private static final String DEBUG_VIEW_ATTRIBUTES = "debug_view_attributes"; private static final String STRICT_MODE_KEY = "strict_mode"; private static final String POINTER_LOCATION_KEY = "pointer_location"; private static final String SHOW_TOUCHES_KEY = "show_touches"; Loading Loading @@ -187,6 +188,7 @@ public class DevelopmentSettings extends SettingsPreferenceFragment private CheckBoxPreference mBtHciSnoopLog; private CheckBoxPreference mEnableOemUnlock; private CheckBoxPreference mAllowMockLocation; private CheckBoxPreference mDebugViewAttributes; private PreferenceScreen mPassword; private String mDebugApp; Loading Loading @@ -295,6 +297,7 @@ public class DevelopmentSettings extends SettingsPreferenceFragment mEnableOemUnlock = null; } mAllowMockLocation = findAndInitCheckboxPref(ALLOW_MOCK_LOCATION); mDebugViewAttributes = findAndInitCheckboxPref(DEBUG_VIEW_ATTRIBUTES); mPassword = (PreferenceScreen) findPreference(LOCAL_BACKUP_PASSWORD); mAllPrefs.add(mPassword); Loading Loading @@ -513,6 +516,8 @@ public class DevelopmentSettings extends SettingsPreferenceFragment } updateCheckBox(mAllowMockLocation, Settings.Secure.getInt(cr, Settings.Secure.ALLOW_MOCK_LOCATION, 0) != 0); updateCheckBox(mDebugViewAttributes, Settings.Global.getInt(cr, Settings.Global.DEBUG_VIEW_ATTRIBUTES, 0) != 0); updateHdcpValues(); updatePasswordSummary(); updateDebuggerOptions(); Loading Loading @@ -1380,6 +1385,10 @@ public class DevelopmentSettings extends SettingsPreferenceFragment Settings.Secure.putInt(getActivity().getContentResolver(), Settings.Secure.ALLOW_MOCK_LOCATION, mAllowMockLocation.isChecked() ? 1 : 0); } else if (preference == mDebugViewAttributes) { Settings.Global.putInt(getActivity().getContentResolver(), Settings.Global.DEBUG_VIEW_ATTRIBUTES, mDebugViewAttributes.isChecked() ? 1 : 0); } else if (preference == mDebugAppPref) { startActivityForResult(new Intent(getActivity(), AppPicker.class), RESULT_DEBUG_APP); } else if (preference == mWaitForDebugger) { Loading