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

Commit 64940e93 authored by Peter Kalauskas's avatar Peter Kalauskas Committed by Android (Google) Code Review
Browse files

Merge "Move sysui QS user detail config to feature flag"

parents f2b91169 b039ff61
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
@@ -117,6 +117,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.IdleHostView;
@@ -273,6 +274,7 @@ public class NotificationPanelViewController extends PanelViewController {
    private static final Rect EMPTY_RECT = new Rect();

    private final LayoutInflater mLayoutInflater;
    private final FeatureFlags mFeatureFlags;
    private final PowerManager mPowerManager;
    private final AccessibilityManager mAccessibilityManager;
    private final NotificationWakeUpCoordinator mWakeUpCoordinator;
@@ -700,6 +702,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,
@@ -798,6 +801,7 @@ public class NotificationPanelViewController extends PanelViewController {
        mView.setWillNotDraw(!DEBUG);
        mSplitShadeHeaderController = splitShadeHeaderController;
        mLayoutInflater = layoutInflater;
        mFeatureFlags = featureFlags;
        mFalsingManager = falsingManager;
        mFalsingCollector = falsingCollector;
        mPowerManager = powerManager;
@@ -4023,8 +4027,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
@@ -96,6 +96,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;
@@ -200,6 +201,8 @@ public class NotificationPanelViewTest extends SysuiTestCase {
    @Mock
    private LayoutInflater mLayoutInflater;
    @Mock
    private FeatureFlags mFeatureFlags;
    @Mock
    private DynamicPrivacyController mDynamicPrivacyController;
    @Mock
    private ShadeController mShadeController;
@@ -465,6 +468,7 @@ public class NotificationPanelViewTest extends SysuiTestCase {
                mResources,
                new Handler(Looper.getMainLooper()),
                mLayoutInflater,
                mFeatureFlags,
                coordinator, expansionHandler, mDynamicPrivacyController, mKeyguardBypassController,
                mFalsingManager, new FalsingCollectorFake(),
                mNotificationLockscreenUserManager, mNotificationEntryManager,