Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 912b3ff6 authored by Chirayu Desai's avatar Chirayu Desai Committed by Ricardo Cerqueira
Browse files

Developer Options: launch the Development app

Change-Id: I0f798d197888ef7f40688009536040e061c410f4
parent 47359aca
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -5062,5 +5062,8 @@
    <string name="cmupdate_settings_title">CyanogenMod updates</string>
    <string name="cmupdate_settings_summary">Check for, view or install available updates</string>

    <!-- Launches Dev Tools -->
    <string name="development_tools_title">Launch Tools</string>

    <!-- **** CYANOGENMOD ADDITIONS END **** -->
</resources>
+11 −0
Original line number Diff line number Diff line
@@ -16,6 +16,17 @@

<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
        android:title="@string/development_settings_title">

    <PreferenceScreen
            android:key="development_tools"
            android:title="@string/development_tools_title"
            android:persistent="false" >
        <intent
                android:action="android.settings.development.LAUNCH_TOOLS"
                android:targetPackage="com.android.development"
                android:targetClass="com.android.development.Development" />
    </PreferenceScreen>

    <com.android.settings.BugreportPreference
            android:key="bugreport"
            android:title="@*android:string/bugreport_title"
+6 −0
Original line number Diff line number Diff line
@@ -148,6 +148,8 @@ public class DevelopmentSettings extends RestrictedSettingsFragment

    private static final String TERMINAL_APP_PACKAGE = "com.android.terminal";

    private static final String DEVELOPMENT_TOOLS = "development_tools";

    private static final int RESULT_DEBUG_APP = 1000;

    private IWindowManager mWindowManager;
@@ -203,6 +205,7 @@ public class DevelopmentSettings extends RestrictedSettingsFragment

    private ListPreference mRootAccess;
    private Object mSelectedRootValue;
    private PreferenceScreen mDevelopmentTools;

    private final ArrayList<Preference> mAllPrefs = new ArrayList<Preference>();
    private final ArrayList<CheckBoxPreference> mResetCbPrefs
@@ -332,6 +335,9 @@ public class DevelopmentSettings extends RestrictedSettingsFragment
        if (!removeRootOptionsIfRequired()) {
            mAllPrefs.add(mRootAccess);
        }

        mDevelopmentTools = (PreferenceScreen) findPreference(DEVELOPMENT_TOOLS);
        mAllPrefs.add(mDevelopmentTools);
    }

    private ListPreference addListPreference(String prefKey) {