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

Commit 7a126247 authored by Sherry Zhou's avatar Sherry Zhou Committed by Android (Google) Code Review
Browse files

Merge "Change MIGRATE_CLOCKS_TO_BLUEPRINT to aconfig" into main

parents 8c041687 860c9b9d
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -188,6 +188,14 @@ flag {
   bug: "305049544"
}

flag {
   name: "migrate_clocks_to_blueprint"
   namespace: "systemui"
   description: "Move clock related views from KeyguardStatusView to KeyguardRootView, "
        "and use modern architecture for lockscreen clocks"
   bug: "301502635"
}

flag {
   name: "fast_unlock_transition"
   namespace: "systemui"
+0 −1
Original line number Diff line number Diff line
@@ -198,7 +198,6 @@ class DefaultClockController(
        }

        override fun recomputePadding(targetRegion: Rect?) {
            // TODO(b/310989341): remove after changing migrate_clocks_to_blueprint to aconfig
            if (migratedClocks) {
                return
            }
+9 −9
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import static android.view.ViewGroup.LayoutParams.WRAP_CONTENT;

import static com.android.keyguard.KeyguardClockSwitch.LARGE;
import static com.android.keyguard.KeyguardClockSwitch.SMALL;
import static com.android.systemui.Flags.migrateClocksToBlueprint;
import static com.android.systemui.flags.Flags.LOCKSCREEN_WALLPAPER_DREAM_ENABLED;
import static com.android.systemui.util.kotlin.JavaAdapterKt.collectFlow;

@@ -43,7 +44,6 @@ import com.android.systemui.dagger.qualifiers.Background;
import com.android.systemui.dagger.qualifiers.Main;
import com.android.systemui.dump.DumpManager;
import com.android.systemui.flags.FeatureFlagsClassic;
import com.android.systemui.flags.Flags;
import com.android.systemui.keyguard.KeyguardUnlockAnimationController;
import com.android.systemui.keyguard.domain.interactor.KeyguardClockInteractor;
import com.android.systemui.keyguard.domain.interactor.KeyguardInteractor;
@@ -232,7 +232,7 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS
        mClockChangedListener = new ClockRegistry.ClockChangeListener() {
            @Override
            public void onCurrentClockChanged() {
                if (!featureFlags.isEnabled(Flags.MIGRATE_CLOCKS_TO_BLUEPRINT)) {
                if (!migrateClocksToBlueprint()) {
                    setClock(mClockRegistry.createCurrentClock());
                }
            }
@@ -367,7 +367,7 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS
                addDateWeatherView();
            }
        }
        if (!mFeatureFlags.isEnabled(Flags.MIGRATE_CLOCKS_TO_BLUEPRINT)) {
        if (!migrateClocksToBlueprint()) {
            setDateWeatherVisibility();
            setWeatherVisibility();
        }
@@ -418,7 +418,7 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS
    }

    private void addDateWeatherView() {
        if (mFeatureFlags.isEnabled(Flags.MIGRATE_CLOCKS_TO_BLUEPRINT)) {
        if (migrateClocksToBlueprint()) {
            return;
        }
        mDateWeatherView = (ViewGroup) mSmartspaceController.buildAndConnectDateView(mView);
@@ -434,7 +434,7 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS
    }

    private void addWeatherView() {
        if (mFeatureFlags.isEnabled(Flags.MIGRATE_CLOCKS_TO_BLUEPRINT)) {
        if (migrateClocksToBlueprint()) {
            return;
        }
        LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(
@@ -447,7 +447,7 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS
    }

    private void addSmartspaceView() {
        if (mFeatureFlags.isEnabled(Flags.MIGRATE_CLOCKS_TO_BLUEPRINT)) {
        if (migrateClocksToBlueprint()) {
            return;
        }

@@ -650,7 +650,7 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS
    }

    private void setClock(ClockController clock) {
        if (mFeatureFlags.isEnabled(Flags.MIGRATE_CLOCKS_TO_BLUEPRINT)) {
        if (migrateClocksToBlueprint()) {
            return;
        }
        if (clock != null && mLogBuffer != null) {
@@ -664,7 +664,7 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS

    @Nullable
    public ClockController getClock() {
        if (mFeatureFlags.isEnabled(Flags.MIGRATE_CLOCKS_TO_BLUEPRINT)) {
        if (migrateClocksToBlueprint()) {
            return mKeyguardClockInteractor.getClock();
        } else {
            return mClockEventController.getClock();
@@ -676,7 +676,7 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS
    }

    private void updateDoubleLineClock() {
        if (mFeatureFlags.isEnabled(Flags.MIGRATE_CLOCKS_TO_BLUEPRINT)) {
        if (migrateClocksToBlueprint()) {
            return;
        }
        mCanShowDoubleLineClock = mSecureSettings.getIntForUser(
+3 −1
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

package com.android.keyguard.dagger;

import static com.android.systemui.Flags.migrateClocksToBlueprint;

import android.content.Context;
import android.content.res.Resources;
import android.view.LayoutInflater;
@@ -68,7 +70,7 @@ public abstract class ClockRegistryModule {
                        layoutInflater,
                        resources,
                        featureFlags.isEnabled(Flags.STEP_CLOCK_ANIMATION),
                        featureFlags.isEnabled(Flags.MIGRATE_CLOCKS_TO_BLUEPRINT)),
                        migrateClocksToBlueprint()),
                context.getString(R.string.lockscreen_clock_id_fallback),
                logBuffer,
                /* keepAllLoaded = */ false,
+0 −5
Original line number Diff line number Diff line
@@ -230,11 +230,6 @@ object Flags {
    @JvmField val MIGRATE_KEYGUARD_STATUS_BAR_VIEW =
        unreleasedFlag("migrate_keyguard_status_bar_view")

    /** Migrate clocks from keyguard status view to keyguard root view*/
    // TODO(b/301502635): Tracking Bug.
    @JvmField val MIGRATE_CLOCKS_TO_BLUEPRINT =
            unreleasedFlag("migrate_clocks_to_blueprint")

    /** Enables preview loading animation in the wallpaper picker. */
    // TODO(b/274443705): Tracking Bug
    @JvmField
Loading