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

Commit c742f973 authored by Winson's avatar Winson Committed by Winson Chung
Browse files

Adding tuner param to enable fast-toggling.

- Moving constants to a more explicit flags class, which also handles
  tuner changes.
- Removing some unused flags

Change-Id: If370581d431784f606c4b8d0c0face5b9a4b9fad
parent 8958c1ef
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -1067,6 +1067,9 @@
    <!-- Name of status bar -->
    <string name="status_bar">Status bar</string>

    <!-- Name of overview -->
    <string name="overview">Overview</string>

    <!-- Name of demo mode (mode with preset icons for screenshots) -->
    <string name="demo_mode">Demo mode</string>

@@ -1156,6 +1159,11 @@
    <!-- Option to use new paging layout in quick settings [CHAR LIMIT=60] -->
    <string name="qs_paging" translatable="false">Use the new Quick Settings</string>

    <!-- Toggles fast-toggling recents via the recents button -->
    <string name="overview_fast_toggle_via_button">Enable fast toggle</string>
    <!-- Description for the toggle for fast-toggling recents via the recents button -->
    <string name="overview_fast_toggle_via_button_desc">Enable paging via the Overview button</string>

    <!-- Category in the System UI Tuner settings, where new/experimental
         settings are -->
    <string name="experimental">Experimental</string>
+11 −0
Original line number Diff line number Diff line
@@ -87,6 +87,17 @@

    </PreferenceScreen>


    <PreferenceScreen
        android:title="@string/overview" >

        <com.android.systemui.tuner.TunerSwitch
            android:key="overview_fast_toggle"
            android:title="@string/overview_fast_toggle_via_button"
            android:summary="@string/overview_fast_toggle_via_button_desc" />

    </PreferenceScreen>

    <SwitchPreference
        android:key="battery_pct"
        android:title="@string/show_battery_percentage"
+4 −3
Original line number Diff line number Diff line
@@ -30,7 +30,8 @@ public final class Prefs {

    @Retention(RetentionPolicy.SOURCE)
    @StringDef({
        Key.SEARCH_APP_WIDGET_ID,
        Key.OVERVIEW_SEARCH_APP_WIDGET_ID,
        Key.OVERVIEW_SEARCH_APP_WIDGET_PACKAGE,
        Key.DEBUG_MODE_ENABLED,
        Key.HOTSPOT_TILE_LAST_USED,
        Key.COLOR_INVERSION_TILE_LAST_USED,
@@ -43,8 +44,8 @@ public final class Prefs {
        Key.DND_FAVORITE_ZEN,
    })
    public @interface Key {
        String SEARCH_APP_WIDGET_ID = "searchAppWidgetId";
        String SEARCH_APP_WIDGET_PACKAGE = "searchAppWidgetPackage";
        String OVERVIEW_SEARCH_APP_WIDGET_ID = "searchAppWidgetId";
        String OVERVIEW_SEARCH_APP_WIDGET_PACKAGE = "searchAppWidgetPackage";
        String DEBUG_MODE_ENABLED = "debugModeEnabled";
        String HOTSPOT_TILE_LAST_USED = "HotspotTileLastUsed";
        String COLOR_INVERSION_TILE_LAST_USED = "ColorInversionTileLastUsed";
+0 −30
Original line number Diff line number Diff line
@@ -29,34 +29,4 @@ public class Constants {
        public static final int DismissSourceHeaderButton = 2;
    }

    // TODO: Move into RecentsDebugFlags
    public static class DebugFlags {

        public static class App {
            // Enables debug drawing for the transition thumbnail
            public static final boolean EnableTransitionThumbnailDebugMode = false;
            // Enables the filtering of tasks according to their grouping
            public static final boolean EnableTaskFiltering = false;
            // Enables dismiss-all
            public static final boolean EnableDismissAll = false;
            // Enables fast-toggling by just tapping on the recents button
            public static final boolean EnableFastToggleRecents = false;
            // Enables the thumbnail alpha on the front-most task
            public static final boolean EnableThumbnailAlphaOnFrontmost = false;
            // This disables the search bar integration
            public static final boolean DisableSearchBar = true;
            // This disables the bitmap and icon caches
            public static final boolean DisableBackgroundCache = false;
            // Enables the simulated task affiliations
            public static final boolean EnableSimulatedTaskGroups = false;
            // Defines the number of mock task affiliations per group
            public static final int TaskAffiliationsGroupCount = 12;
            // Enables us to create mock recents tasks
            public static final boolean EnableSystemServicesProxy = false;
            // Defines the number of mock recents packages to create
            public static final int SystemServicesProxyMockPackageCount = 3;
            // Defines the number of mock recents tasks to create
            public static final int SystemServicesProxyMockTaskCount = 100;
        }
    }
}
+7 −0
Original line number Diff line number Diff line
@@ -62,6 +62,7 @@ public class Recents extends SystemUI
    private final static String ACTION_TOGGLE_RECENTS = "com.android.systemui.recents.ACTION_TOGGLE";

    private static SystemServicesProxy sSystemServicesProxy;
    private static RecentsDebugFlags sDebugFlags;
    private static RecentsTaskLoader sTaskLoader;
    private static RecentsConfiguration sConfiguration;

@@ -148,8 +149,13 @@ public class Recents extends SystemUI
        return sConfiguration;
    }

    public static RecentsDebugFlags getDebugFlags() {
        return sDebugFlags;
    }

    @Override
    public void start() {
        sDebugFlags = new RecentsDebugFlags(mContext);
        sSystemServicesProxy = new SystemServicesProxy(mContext);
        sTaskLoader = new RecentsTaskLoader(mContext);
        sConfiguration = new RecentsConfiguration(mContext);
@@ -166,6 +172,7 @@ public class Recents extends SystemUI

        // Register with the event bus
        EventBus.getDefault().register(this, EVENT_BUS_PRIORITY);
        EventBus.getDefault().register(sSystemServicesProxy, EVENT_BUS_PRIORITY);
        EventBus.getDefault().register(sTaskLoader, EVENT_BUS_PRIORITY);

        // Due to the fact that RecentsActivity is per-user, we need to establish and interface for
Loading