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

Commit b039ff61 authored by Peter Kalauskas's avatar Peter Kalauskas
Browse files

Move sysui QS user detail config to feature flag

This replaces config_keyguard_user_switch_opens_qs_details in config.xml
with flag_lockscreen_qs_user_detail_shortcut in flags.xml

Replacing the config with a feature flag allows the UX to be toggled on
and off using adb.

Bug: 194237078
Test: adb shell setprop \
	persist.systemui.flag_lockscreen_qs_user_detail_shortcut 1
Change-Id: I99d224137c23a41de0bda1c40ff5622e267347b2
parent a5c57af8
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -310,11 +310,6 @@
    <!-- Whether to show the full screen user switcher. -->
    <bool name="config_enableFullscreenUserSwitcher">false</bool>

    <!-- Whether the multi-user switch on the keyguard opens QS user panel. If false, clicking the
         user switch on the keyguard will replace the notifications and status area with the user
         switcher. The multi-user switch is only shown if config_keyguardUserSwitcher=false. -->
    <bool name="config_keyguard_user_switch_opens_qs_details">false</bool>

    <!-- SystemUIFactory component -->
    <string name="config_systemUIFactoryComponent" translatable="false">com.android.systemui.SystemUIFactory</string>

+6 −1
Original line number Diff line number Diff line
@@ -37,6 +37,11 @@
         the swipe. -->
    <bool name="flag_new_unlock_swipe_animation">true</bool>

    <!-- Whether the multi-user icon on the lockscreen opens the QS user detail. If false, clicking
         the multi-user icon will display a list of users directly on the lockscreen. The multi-user
         icon is only shown if config_keyguardUserSwitcher=false in the frameworks config. -->
    <bool name="flag_lockscreen_qs_user_detail_shortcut">false</bool>

    <!-- The shared-element transition between lockscreen smartspace and launcher smartspace. -->
    <bool name="flag_smartspace_shared_element_transition">false</bool>

+4 −0
Original line number Diff line number Diff line
@@ -173,6 +173,10 @@ public class FeatureFlags {
        return mFlagReader.isEnabled(R.bool.flag_new_unlock_swipe_animation);
    }

    public boolean isKeyguardQsUserDetailsShortcutEnabled() {
        return mFlagReader.isEnabled(R.bool.flag_lockscreen_qs_user_detail_shortcut);
    }

    public boolean isSmartSpaceSharedElementTransitionEnabled() {
        return mFlagReader.isEnabled(R.bool.flag_smartspace_shared_element_transition);
    }
+6 −2
Original line number Diff line number Diff line
@@ -113,6 +113,7 @@ import com.android.systemui.controls.dagger.ControlsComponent;
import com.android.systemui.dagger.qualifiers.DisplayId;
import com.android.systemui.dagger.qualifiers.Main;
import com.android.systemui.doze.DozeLog;
import com.android.systemui.flags.FeatureFlags;
import com.android.systemui.fragments.FragmentHostManager.FragmentListener;
import com.android.systemui.fragments.FragmentService;
import com.android.systemui.idle.IdleHostViewController;
@@ -279,6 +280,7 @@ public class NotificationPanelViewController extends PanelViewController {
            new AnimationProperties().setDuration(StackStateAnimator.ANIMATION_DURATION_STANDARD);

    private final LayoutInflater mLayoutInflater;
    private final FeatureFlags mFeatureFlags;
    private final PowerManager mPowerManager;
    private final AccessibilityManager mAccessibilityManager;
    private final NotificationWakeUpCoordinator mWakeUpCoordinator;
@@ -712,6 +714,7 @@ public class NotificationPanelViewController extends PanelViewController {
            @Main Resources resources,
            @Main Handler handler,
            LayoutInflater layoutInflater,
            FeatureFlags featureFlags,
            NotificationWakeUpCoordinator coordinator, PulseExpansionHandler pulseExpansionHandler,
            DynamicPrivacyController dynamicPrivacyController,
            KeyguardBypassController bypassController, FalsingManager falsingManager,
@@ -810,6 +813,7 @@ public class NotificationPanelViewController extends PanelViewController {
        mView.setWillNotDraw(!DEBUG);
        mSplitShadeHeaderController = splitShadeHeaderController;
        mLayoutInflater = layoutInflater;
        mFeatureFlags = featureFlags;
        mFalsingManager = falsingManager;
        mFalsingCollector = falsingCollector;
        mPowerManager = powerManager;
@@ -4049,8 +4053,8 @@ public class NotificationPanelViewController extends PanelViewController {
        mKeyguardUserSwitcherEnabled = mResources.getBoolean(
                com.android.internal.R.bool.config_keyguardUserSwitcher);
        mKeyguardQsUserSwitchEnabled =
                mKeyguardUserSwitcherEnabled && mResources.getBoolean(
                        R.bool.config_keyguard_user_switch_opens_qs_details);
                mKeyguardUserSwitcherEnabled
                        && mFeatureFlags.isKeyguardQsUserDetailsShortcutEnabled();
    }

    private void registerSettingsChangeListener() {
+4 −0
Original line number Diff line number Diff line
@@ -95,6 +95,7 @@ import com.android.systemui.communal.CommunalStateController;
import com.android.systemui.communal.dagger.CommunalViewComponent;
import com.android.systemui.controls.dagger.ControlsComponent;
import com.android.systemui.doze.DozeLog;
import com.android.systemui.flags.FeatureFlags;
import com.android.systemui.fragments.FragmentHostManager;
import com.android.systemui.fragments.FragmentService;
import com.android.systemui.idle.IdleHostViewController;
@@ -199,6 +200,8 @@ public class NotificationPanelViewTest extends SysuiTestCase {
    @Mock
    private LayoutInflater mLayoutInflater;
    @Mock
    private FeatureFlags mFeatureFlags;
    @Mock
    private DynamicPrivacyController mDynamicPrivacyController;
    @Mock
    private ShadeController mShadeController;
@@ -464,6 +467,7 @@ public class NotificationPanelViewTest extends SysuiTestCase {
                mResources,
                new Handler(Looper.getMainLooper()),
                mLayoutInflater,
                mFeatureFlags,
                coordinator, expansionHandler, mDynamicPrivacyController, mKeyguardBypassController,
                mFalsingManager, new FalsingCollectorFake(),
                mNotificationLockscreenUserManager, mNotificationEntryManager,