Loading core/java/android/app/StatusBarManager.java +29 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ import com.android.internal.statusbar.NotificationVisibility; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.util.Objects; import java.util.Set; import java.util.concurrent.Executor; import java.util.function.Consumer; Loading Loading @@ -213,6 +214,34 @@ public class StatusBarManager { /** @hide */ public static final int CAMERA_LAUNCH_SOURCE_LIFT_TRIGGER = 2; /** * Session flag for {@link #registerSessionListener} indicating the listener * is interested in sessions on the keygaurd * @hide */ public static final int SESSION_KEYGUARD = 1 << 0; /** * Session flag for {@link #registerSessionListener} indicating the current session * is interested in session on the biometric prompt. * @hide */ public static final int SESSION_BIOMETRIC_PROMPT = 1 << 1; /** @hide */ public static final Set<Integer> ALL_SESSIONS = Set.of( SESSION_KEYGUARD, SESSION_BIOMETRIC_PROMPT ); /** @hide */ @Retention(RetentionPolicy.SOURCE) @IntDef(flag = true, prefix = { "SESSION_KEYGUARD" }, value = { SESSION_KEYGUARD, SESSION_BIOMETRIC_PROMPT, }) public @interface SessionFlags {} /** * Response indicating that the tile was not added. */ Loading core/java/com/android/internal/logging/InstanceId.aidl 0 → 100644 +19 −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.internal.logging; parcelable InstanceId; core/java/com/android/internal/statusbar/ISessionListener.aidl 0 → 100644 +25 −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 permissons and * limitations under the License. */ package com.android.internal.statusbar; import com.android.internal.logging.InstanceId; /** {@hide} */ oneway interface ISessionListener { void onSessionStarted(int sessionType, in InstanceId instance); void onSessionEnded(int sessionType, in InstanceId instance); } No newline at end of file core/java/com/android/internal/statusbar/IStatusBarService.aidl +15 −0 Original line number Diff line number Diff line Loading @@ -28,7 +28,9 @@ import android.os.Bundle; import android.os.UserHandle; import android.service.notification.StatusBarNotification; import com.android.internal.logging.InstanceId; import com.android.internal.statusbar.IAddTileResultCallback; import com.android.internal.statusbar.ISessionListener; import com.android.internal.statusbar.IStatusBar; import com.android.internal.statusbar.RegisterStatusBarResult; import com.android.internal.statusbar.StatusBarIcon; Loading Loading @@ -178,4 +180,17 @@ interface IStatusBarService * @hide */ int getNavBarModeOverride(); /** * Register a listener for certain sessions. Each session may be guarded by its own permission. */ void registerSessionListener(int sessionFlags, in ISessionListener listener); void unregisterSessionListener(int sessionFlags, in ISessionListener listener); /** * Informs all registered listeners that a session has begun and has the following instanceId. * Can only be set by callers with certain permission based on the session type being updated. */ void onSessionStarted(int sessionType, in InstanceId instanceId); void onSessionEnded(int sessionType, in InstanceId instanceId); } packages/SystemUI/res/values/config.xml +1 −0 Original line number Diff line number Diff line Loading @@ -309,6 +309,7 @@ <item>com.android.systemui.globalactions.GlobalActionsComponent</item> <item>com.android.systemui.ScreenDecorations</item> <item>com.android.systemui.biometrics.AuthController</item> <item>com.android.systemui.log.SessionTracker</item> <item>com.android.systemui.SliceBroadcastRelayHandler</item> <item>com.android.systemui.statusbar.notification.InstantAppNotifier</item> <item>com.android.systemui.theme.ThemeOverlayController</item> Loading Loading
core/java/android/app/StatusBarManager.java +29 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ import com.android.internal.statusbar.NotificationVisibility; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.util.Objects; import java.util.Set; import java.util.concurrent.Executor; import java.util.function.Consumer; Loading Loading @@ -213,6 +214,34 @@ public class StatusBarManager { /** @hide */ public static final int CAMERA_LAUNCH_SOURCE_LIFT_TRIGGER = 2; /** * Session flag for {@link #registerSessionListener} indicating the listener * is interested in sessions on the keygaurd * @hide */ public static final int SESSION_KEYGUARD = 1 << 0; /** * Session flag for {@link #registerSessionListener} indicating the current session * is interested in session on the biometric prompt. * @hide */ public static final int SESSION_BIOMETRIC_PROMPT = 1 << 1; /** @hide */ public static final Set<Integer> ALL_SESSIONS = Set.of( SESSION_KEYGUARD, SESSION_BIOMETRIC_PROMPT ); /** @hide */ @Retention(RetentionPolicy.SOURCE) @IntDef(flag = true, prefix = { "SESSION_KEYGUARD" }, value = { SESSION_KEYGUARD, SESSION_BIOMETRIC_PROMPT, }) public @interface SessionFlags {} /** * Response indicating that the tile was not added. */ Loading
core/java/com/android/internal/logging/InstanceId.aidl 0 → 100644 +19 −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.internal.logging; parcelable InstanceId;
core/java/com/android/internal/statusbar/ISessionListener.aidl 0 → 100644 +25 −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 permissons and * limitations under the License. */ package com.android.internal.statusbar; import com.android.internal.logging.InstanceId; /** {@hide} */ oneway interface ISessionListener { void onSessionStarted(int sessionType, in InstanceId instance); void onSessionEnded(int sessionType, in InstanceId instance); } No newline at end of file
core/java/com/android/internal/statusbar/IStatusBarService.aidl +15 −0 Original line number Diff line number Diff line Loading @@ -28,7 +28,9 @@ import android.os.Bundle; import android.os.UserHandle; import android.service.notification.StatusBarNotification; import com.android.internal.logging.InstanceId; import com.android.internal.statusbar.IAddTileResultCallback; import com.android.internal.statusbar.ISessionListener; import com.android.internal.statusbar.IStatusBar; import com.android.internal.statusbar.RegisterStatusBarResult; import com.android.internal.statusbar.StatusBarIcon; Loading Loading @@ -178,4 +180,17 @@ interface IStatusBarService * @hide */ int getNavBarModeOverride(); /** * Register a listener for certain sessions. Each session may be guarded by its own permission. */ void registerSessionListener(int sessionFlags, in ISessionListener listener); void unregisterSessionListener(int sessionFlags, in ISessionListener listener); /** * Informs all registered listeners that a session has begun and has the following instanceId. * Can only be set by callers with certain permission based on the session type being updated. */ void onSessionStarted(int sessionType, in InstanceId instanceId); void onSessionEnded(int sessionType, in InstanceId instanceId); }
packages/SystemUI/res/values/config.xml +1 −0 Original line number Diff line number Diff line Loading @@ -309,6 +309,7 @@ <item>com.android.systemui.globalactions.GlobalActionsComponent</item> <item>com.android.systemui.ScreenDecorations</item> <item>com.android.systemui.biometrics.AuthController</item> <item>com.android.systemui.log.SessionTracker</item> <item>com.android.systemui.SliceBroadcastRelayHandler</item> <item>com.android.systemui.statusbar.notification.InstantAppNotifier</item> <item>com.android.systemui.theme.ThemeOverlayController</item> Loading