Loading packages/SystemUI/aconfig/systemui.aconfig +8 −0 Original line number Diff line number Diff line Loading @@ -2193,3 +2193,11 @@ flag { description: "Use AAD proximity sensor if flag is enabled and sensor is present" bug: "402534470" } flag { name: "enable_underlay" namespace: "ailabs" description: "Enable the underlay additional layer" bug: "403422950" } packages/SystemUI/src/com/android/systemui/underlay/OWNERS 0 → 100644 +9 −0 Original line number Diff line number Diff line # pixel team dupin@google.com klikli@google.com chriscui@google.com # System UI nijamkin@google.com pixel@google.com packages/SystemUI/src/com/android/systemui/underlay/UnderlayCoreStartable.kt 0 → 100644 +45 −0 Original line number Diff line number Diff line /* * Copyright (C) 2025 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.underlay import android.util.Log import com.android.systemui.CoreStartable import com.android.systemui.dagger.SysUISingleton import com.android.systemui.underlay.shared.flag.UnderlayFlag import javax.inject.Inject /** * Core startable for the underlay. * * This is responsible for starting the underlay and its dependencies. */ @SysUISingleton class UnderlayCoreStartable @Inject constructor() : CoreStartable { override fun start() { if (!UnderlayFlag.isEnabled) { Log.d(TAG, "Underlay flag is disabled, not starting.") return } Log.d(TAG, "start!") } private companion object { const val TAG = "UnderlayCoreStartable" } } packages/SystemUI/src/com/android/systemui/underlay/UnderlayModule.kt 0 → 100644 +32 −0 Original line number Diff line number Diff line /* * Copyright (C) 2025 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.underlay import com.android.systemui.CoreStartable import dagger.Binds import dagger.Module import dagger.multibindings.ClassKey import dagger.multibindings.IntoMap @Module interface UnderlayModule { @Binds @IntoMap @ClassKey(UnderlayCoreStartable::class) fun bindUnderlayCoreStartable(startable: UnderlayCoreStartable): CoreStartable } packages/SystemUI/src/com/android/systemui/underlay/shared/flag/UnderlayFlag.kt 0 → 100644 +29 −0 Original line number Diff line number Diff line /* * Copyright 2025 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. */ @file:Suppress("NOTHING_TO_INLINE") package com.android.systemui.underlay.shared.flag import com.android.systemui.Flags.enableUnderlay /** Helper for reading or using the underlay flag state. */ object UnderlayFlag { @JvmStatic inline val isEnabled get() = enableUnderlay() } Loading
packages/SystemUI/aconfig/systemui.aconfig +8 −0 Original line number Diff line number Diff line Loading @@ -2193,3 +2193,11 @@ flag { description: "Use AAD proximity sensor if flag is enabled and sensor is present" bug: "402534470" } flag { name: "enable_underlay" namespace: "ailabs" description: "Enable the underlay additional layer" bug: "403422950" }
packages/SystemUI/src/com/android/systemui/underlay/OWNERS 0 → 100644 +9 −0 Original line number Diff line number Diff line # pixel team dupin@google.com klikli@google.com chriscui@google.com # System UI nijamkin@google.com pixel@google.com
packages/SystemUI/src/com/android/systemui/underlay/UnderlayCoreStartable.kt 0 → 100644 +45 −0 Original line number Diff line number Diff line /* * Copyright (C) 2025 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.underlay import android.util.Log import com.android.systemui.CoreStartable import com.android.systemui.dagger.SysUISingleton import com.android.systemui.underlay.shared.flag.UnderlayFlag import javax.inject.Inject /** * Core startable for the underlay. * * This is responsible for starting the underlay and its dependencies. */ @SysUISingleton class UnderlayCoreStartable @Inject constructor() : CoreStartable { override fun start() { if (!UnderlayFlag.isEnabled) { Log.d(TAG, "Underlay flag is disabled, not starting.") return } Log.d(TAG, "start!") } private companion object { const val TAG = "UnderlayCoreStartable" } }
packages/SystemUI/src/com/android/systemui/underlay/UnderlayModule.kt 0 → 100644 +32 −0 Original line number Diff line number Diff line /* * Copyright (C) 2025 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.underlay import com.android.systemui.CoreStartable import dagger.Binds import dagger.Module import dagger.multibindings.ClassKey import dagger.multibindings.IntoMap @Module interface UnderlayModule { @Binds @IntoMap @ClassKey(UnderlayCoreStartable::class) fun bindUnderlayCoreStartable(startable: UnderlayCoreStartable): CoreStartable }
packages/SystemUI/src/com/android/systemui/underlay/shared/flag/UnderlayFlag.kt 0 → 100644 +29 −0 Original line number Diff line number Diff line /* * Copyright 2025 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. */ @file:Suppress("NOTHING_TO_INLINE") package com.android.systemui.underlay.shared.flag import com.android.systemui.Flags.enableUnderlay /** Helper for reading or using the underlay flag state. */ object UnderlayFlag { @JvmStatic inline val isEnabled get() = enableUnderlay() }