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

Commit 2c4467fc authored by Liam, Lee Pong Lam's avatar Liam, Lee Pong Lam Committed by Automerger Merge Worker
Browse files

Merge "Add date/weather decoupling config for smartspace" into tm-qpr-dev am:...

Merge "Add date/weather decoupling config for smartspace" into tm-qpr-dev am: 6f9c227d am: 9ae44d92

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20877485



Change-Id: Idf6d700eac10cb6a72104191acfcca0e47b3befb
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents b7c7069d 9ae44d92
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@ java_library {
        "src/**/*.java",
        "src/**/*.kt",
        "bcsmartspace/src/**/*.java",
        "bcsmartspace/src/**/*.kt",
    ],

    static_libs: [
+24 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2023 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.plugins

// TODO(b/265360975): Evaluate this plugin approach.
/** Plugin to provide BC smartspace configuration */
interface BcSmartspaceConfigPlugin {
    /** Gets default date/weather disabled status. */
    val isDefaultDateWeatherDisabled: Boolean
}
+5 −0
Original line number Diff line number Diff line
@@ -93,6 +93,11 @@ public interface BcSmartspaceDataPlugin extends Plugin {
    interface SmartspaceView {
        void registerDataProvider(BcSmartspaceDataPlugin plugin);

        /**
         * Sets {@link BcSmartspaceConfigPlugin}.
         */
        void registerConfigProvider(BcSmartspaceConfigPlugin configProvider);

        /**
         * Primary color for unprotected text
         */
+4 −0
Original line number Diff line number Diff line
@@ -55,6 +55,7 @@ import com.android.systemui.motiontool.MotionToolModule;
import com.android.systemui.navigationbar.NavigationBarComponent;
import com.android.systemui.notetask.NoteTaskModule;
import com.android.systemui.people.PeopleModule;
import com.android.systemui.plugins.BcSmartspaceConfigPlugin;
import com.android.systemui.plugins.BcSmartspaceDataPlugin;
import com.android.systemui.privacy.PrivacyModule;
import com.android.systemui.qs.FgsManagerController;
@@ -210,6 +211,9 @@ public abstract class SystemUIModule {
    @BindsOptionalOf
    abstract BcSmartspaceDataPlugin optionalBcSmartspaceDataPlugin();

    @BindsOptionalOf
    abstract BcSmartspaceConfigPlugin optionalBcSmartspaceConfigPlugin();

    @BindsOptionalOf
    abstract Recents optionalRecents();

+27 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2023 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.smartspace.config

import com.android.systemui.flags.FeatureFlags
import com.android.systemui.flags.Flags
import com.android.systemui.plugins.BcSmartspaceConfigPlugin

class BcSmartspaceConfigProvider(private val featureFlags: FeatureFlags) :
    BcSmartspaceConfigPlugin {
    override val isDefaultDateWeatherDisabled: Boolean
        get() = featureFlags.isEnabled(Flags.SMARTSPACE_DATE_WEATHER_DECOUPLED)
}
Loading