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

Commit 8d866e52 authored by Dianne Hackborn's avatar Dianne Hackborn
Browse files

More on issue #7318666: hide developer options from user build

The action to launch the developer settings panel is now required
by the platform.

Add a new hidden API to LauncherActivity so I can better integrate
these into the existing Dev Tools app.

Change-Id: I9c082622fd4c8f4a5be51cabb664741a3782ece1
parent bcfc1ca8
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -440,13 +440,20 @@ public abstract class LauncherActivity extends ListActivity {
        return mPackageManager.queryIntentActivities(queryIntent, /* no flags */ 0);
    }

    /**
     * @hide
     */
    protected void onSortResultList(List<ResolveInfo> results) {
        Collections.sort(results, new ResolveInfo.DisplayNameComparator(mPackageManager));
    }

    /**
     * Perform the query to determine which results to show and return a list of them.
     */
    public List<ListItem> makeListItems() {
        // Load all matching activities and sort correctly
        List<ResolveInfo> list = onQueryPackageManager(mIntent);
        Collections.sort(list, new ResolveInfo.DisplayNameComparator(mPackageManager));
        onSortResultList(list);

        ArrayList<ListItem> result = new ArrayList<ListItem>(list.size());
        int listSize = list.size();
+3 −4
Original line number Diff line number Diff line
@@ -386,10 +386,9 @@ public final class Settings {

    /**
     * Activity Action: Show settings to allow configuration of application
     * development-related settings.
     * <p>
     * In some cases, a matching Activity may not exist, so ensure you safeguard
     * against this.
     * development-related settings.  As of
     * {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1} this action is
     * a required part of the platform.
     * <p>
     * Input: Nothing.
     * <p>