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

Commit c49cc7d1 authored by Sukesh Ram's avatar Sukesh Ram
Browse files

Improve StatusBarManager disable*() apis

Enable adding a reason to disable api to improve debugging efforts. The goal is to have attribution data for why SystemUI elements are disabled, not just at a package level (as in the status quo) but at a sub package level. Can be tested by manually disabling flags from command line with "adb shell cmd statusbar send-disable-flag clock" and checking at the dump logs via "adb shell dumpsys statusbar".

Flag: NONE
Test: Manually tested in pixel 7.
Bug: 291319588
Change-Id: I52ff935d7d095a7bb1b698207de525bc551a45f6
parent c10dabd7
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1123,13 +1123,17 @@ package android.app {
    field public static final int NAV_BAR_MODE_KIDS = 1; // 0x1
  }
  public static final class StatusBarManager.DisableInfo {
  public static final class StatusBarManager.DisableInfo implements android.os.Parcelable {
    method public boolean areAllComponentsEnabled();
    method public int describeContents();
    method public boolean isBackDisabled();
    method public boolean isNavigateToHomeDisabled();
    method public boolean isNotificationPeekingDisabled();
    method public boolean isRecentsDisabled();
    method public boolean isSearchDisabled();
    method public boolean isStatusBarExpansionDisabled();
    method public void writeToParcel(@NonNull android.os.Parcel, int);
    field @NonNull public static final android.os.Parcelable.Creator<android.app.StatusBarManager.DisableInfo> CREATOR;
  }
  public final class SystemServiceRegistry {
+4 −0
Original line number Diff line number Diff line
@@ -1927,6 +1927,10 @@ UnflaggedApi: android.app.ActivityManager#getExternalHistoricalProcessStartReaso
    New API must be flagged with @FlaggedApi: method android.app.ActivityManager.getExternalHistoricalProcessStartReasons(String,int)
UnflaggedApi: android.app.AppOpsManager#OPSTR_RECEIVE_SANDBOX_TRIGGER_AUDIO:
    New API must be flagged with @FlaggedApi: field android.app.AppOpsManager.OPSTR_RECEIVE_SANDBOX_TRIGGER_AUDIO
UnflaggedApi: android.app.StatusBarManager.DisableInfo#CREATOR:
    New API must be flagged with @FlaggedApi: field android.app.StatusBarManager.DisableInfo.CREATOR
UnflaggedApi: android.app.StatusBarManager.DisableInfo#isBackDisabled():
    New API must be flagged with @FlaggedApi: method android.app.StatusBarManager.DisableInfo.isBackDisabled()
UnflaggedApi: android.companion.virtual.VirtualDeviceManager.VirtualDevice#getPersistentDeviceId():
    New API must be flagged with @FlaggedApi: method android.companion.virtual.VirtualDeviceManager.VirtualDevice.getPersistentDeviceId()
UnflaggedApi: android.content.Context#THREAD_NETWORK_SERVICE:
+1 −1
Original line number Diff line number Diff line
@@ -455,7 +455,7 @@ package android.app {
    method @RequiresPermission(android.Manifest.permission.STATUS_BAR) public void togglePanel();
  }

  public static final class StatusBarManager.DisableInfo {
  public static final class StatusBarManager.DisableInfo implements android.os.Parcelable {
    method public boolean isRotationSuggestionDisabled();
  }

+19 −0
Original line number Diff line number Diff line
/**
 * Copyright (c) 2024, 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 android.app;

parcelable StatusBarManager.DisableInfo;
 No newline at end of file
+393 −48

File changed.

Preview size limit exceeded, changes collapsed.

Loading