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

Commit b82b5421 authored by Ale Nijamkin's avatar Ale Nijamkin
Browse files

[conflict] Merge changes Ie810d37d,I6947e1f7 into tm-qpr-dev am: 33b10071 am: 9e708c99

parents e2a06426 9e708c99
Loading
Loading
Loading
Loading
+27 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2022 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */

package com.android.systemui.shared.keyguard.shared.model

/**
 * Collection of all supported "slots", placements where keyguard quick affordances can appear on
 * the lock screen.
 */
object KeyguardQuickAffordanceSlots {
    const val SLOT_ID_BOTTOM_START = "bottom_start"
    const val SLOT_ID_BOTTOM_END = "bottom_end"
}
+8 −0
Original line number Diff line number Diff line
@@ -129,6 +129,14 @@ object Flags {

    @JvmField val NEW_UDFPS_OVERLAY = UnreleasedFlag(215)

    /**
     * Whether to enable the code powering customizable lock screen quick affordances.
     *
     * Note that this flag does not enable individual implementations of quick affordances like the
     * new camera quick affordance. Look for individual flags for those.
     */
    @JvmField val CUSTOMIZABLE_LOCK_SCREEN_QUICK_AFFORDANCES = UnreleasedFlag(216, teamfood = false)

    // 300 - power menu
    // TODO(b/254512600): Tracking Bug
    @JvmField val POWER_MENU_LITE = ReleasedFlag(300)
+2 −0
Original line number Diff line number Diff line
@@ -42,6 +42,7 @@ import com.android.systemui.dump.DumpManager;
import com.android.systemui.keyguard.DismissCallbackRegistry;
import com.android.systemui.keyguard.KeyguardUnlockAnimationController;
import com.android.systemui.keyguard.KeyguardViewMediator;
import com.android.systemui.keyguard.data.quickaffordance.KeyguardDataQuickAffordanceModule;
import com.android.systemui.keyguard.data.repository.KeyguardRepositoryModule;
import com.android.systemui.keyguard.domain.interactor.StartKeyguardTransitionModule;
import com.android.systemui.keyguard.domain.quickaffordance.KeyguardQuickAffordanceModule;
@@ -71,6 +72,7 @@ import dagger.Provides;
        KeyguardUserSwitcherComponent.class},
        includes = {
            FalsingModule.class,
            KeyguardDataQuickAffordanceModule.class,
            KeyguardQuickAffordanceModule.class,
            KeyguardRepositoryModule.class,
            StartKeyguardTransitionModule.class,
+4 −0
Original line number Diff line number Diff line
@@ -53,6 +53,10 @@ constructor(

    override val key: String = BuiltInKeyguardQuickAffordanceKeys.HOME_CONTROLS

    override val pickerName: String by lazy { context.getString(component.getTileTitleId()) }

    override val pickerIconResourceId: Int by lazy { component.getTileImageId() }

    override val lockScreenState: Flow<KeyguardQuickAffordanceConfig.LockScreenState> =
        component.canShowWhileLockedSetting.flatMapLatest { canShowWhileLocked ->
            if (canShowWhileLocked) {
+39 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2022 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */

package com.android.systemui.keyguard.data.quickaffordance

import dagger.Module
import dagger.Provides
import dagger.multibindings.ElementsIntoSet

@Module
object KeyguardDataQuickAffordanceModule {
    @Provides
    @ElementsIntoSet
    fun quickAffordanceConfigs(
        home: HomeControlsKeyguardQuickAffordanceConfig,
        quickAccessWallet: QuickAccessWalletKeyguardQuickAffordanceConfig,
        qrCodeScanner: QrCodeScannerKeyguardQuickAffordanceConfig,
    ): Set<KeyguardQuickAffordanceConfig> {
        return setOf(
            home,
            quickAccessWallet,
            qrCodeScanner,
        )
    }
}
Loading