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

Commit f44439cd authored by Alex Florescu's avatar Alex Florescu Committed by Android (Google) Code Review
Browse files

Merge "Add Feature Flag for guarding development of two-column notification shade"

parents d47c351b 367c9d02
Loading
Loading
Loading
Loading
+12 −4
Original line number Diff line number Diff line
@@ -50,18 +50,26 @@ public class FeatureFlags {
    @Inject
    public FeatureFlags(@Background Executor executor) {
        DeviceConfig.addOnPropertiesChangedListener(
                "systemui",
                /* namespace= */ "systemui",
                executor,
                this::onPropertiesChanged);
    }

    public boolean isNewNotifPipelineEnabled() {
        return getDeviceConfigFlag("notification.newpipeline.enabled", true);
        return getDeviceConfigFlag("notification.newpipeline.enabled", /* defaultValue= */ true);
    }

    public boolean isNewNotifPipelineRenderingEnabled() {
        return isNewNotifPipelineEnabled()
                && getDeviceConfigFlag("notification.newpipeline.rendering", false);
                && getDeviceConfigFlag("notification.newpipeline.rendering", /* defaultValue= */
                false);
    }

    /**
     * Flag used for guarding development of b/171917882.
     */
    public boolean isTwoColumnNotificationShadeEnabled() {
        return getDeviceConfigFlag("notification.twocolumn", /* defaultValue= */ false);
    }

    private void onPropertiesChanged(@NonNull DeviceConfig.Properties properties) {
@@ -76,7 +84,7 @@ public class FeatureFlags {
        synchronized (mCachedDeviceConfigFlags) {
            Boolean flag = mCachedDeviceConfigFlags.get(key);
            if (flag == null) {
                flag = DeviceConfig.getBoolean("systemui", key, defaultValue);
                flag = DeviceConfig.getBoolean(/* namespace= */ "systemui", key, defaultValue);
                mCachedDeviceConfigFlags.put(key, flag);
            }
            return flag;