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

Commit f79a5420 authored by James Cook's avatar James Cook Committed by Android (Google) Code Review
Browse files

Merge "Move shelf config setting into SystemUI"

parents 1f4fb3c4 ed5b3e2c
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -1674,9 +1674,6 @@
    <!-- Whether UI for multi user should be shown -->
    <bool name="config_enableMultiUserUI">false</bool>

    <!-- Whether to show a "shelf" of apps at the bottom of the screen. -->
    <bool name="config_enableAppShelf">false</bool>

    <!-- If true, then we do not ask user for permission for apps to connect to USB devices.
         Do not set this to true for production devices. Doing so will cause you to fail CTS. -->
    <bool name="config_disableUsbPermissionDialogs">false</bool>
+0 −1
Original line number Diff line number Diff line
@@ -293,7 +293,6 @@
  <java-symbol type="bool" name="config_forceDefaultOrientation" />
  <java-symbol type="bool" name="config_wifi_batched_scan_supported" />
  <java-symbol type="bool" name="config_enableMultiUserUI"/>
  <java-symbol type="bool" name="config_enableAppShelf"/>
  <java-symbol type="bool" name="config_disableUsbPermissionDialogs"/>
  <java-symbol type="bool" name="config_hasRecents" />
  <java-symbol type="bool" name="config_windowShowCircularMask" />
+4 −0
Original line number Diff line number Diff line
@@ -210,6 +210,7 @@

    <!-- Transposes the nav bar in landscape (only used for purposes of layout). -->
    <bool name="recents_has_transposed_nav_bar">true</bool>

    <!-- Svelte specific logic, see RecentsConfiguration.SVELTE_* constants. -->
    <integer name="recents_svelte_level">0</integer>

@@ -296,5 +297,8 @@
    <!-- Duration of the expansion animation in the volume dialog -->
    <item name="volume_expand_animation_duration" type="integer">300</item>

    <!-- Whether to show a "shelf" of apps at the bottom of the screen. -->
    <bool name="config_enableAppShelf">false</bool>

</resources>
+16 −1
Original line number Diff line number Diff line
@@ -680,7 +680,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
            if (DEBUG) Log.v(TAG, "hasNavigationBar=" + showNav);
            if (showNav) {
                // Optionally show app shortcuts in the nav bar "shelf" area.
                if (res.getBoolean(com.android.internal.R.bool.config_enableAppShelf)) {
                if (shouldShowAppShelf()) {
                    mNavigationBarView = (NavigationBarView) View.inflate(
                            context, R.layout.navigation_bar_with_apps, null);
                } else {
@@ -913,6 +913,21 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
        return mStatusBarView;
    }

    /** Returns true if the app shelf should be shown in the nav bar. */
    private boolean shouldShowAppShelf() {
        // Allow adb to override the default shelf behavior:
        // adb shell settings put system demo_app_shelf 0  # Zero forces it off.
        // adb shell settings put system demo_app_shelf 1  # Non-zero forces it on.
        final int DEFAULT = -1;
        final int shelfOverride =
                Settings.System.getInt(mContext.getContentResolver(), "demo_app_shelf", DEFAULT);
        if (shelfOverride != DEFAULT) {
            return shelfOverride != 0;
        }
        // Otherwise default to the build setting.
        return mContext.getResources().getBoolean(R.bool.config_enableAppShelf);
    }

    private void clearAllNotifications() {

        // animate-swipe all dismissable notifications, then animate the shade closed