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

Commit defff83b authored by Hui Yu's avatar Hui Yu Committed by Android (Google) Code Review
Browse files

Merge "FGS background start restriction."

parents 49df6f1b 88910dec
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -77,6 +77,8 @@ package android.app {
    method @RequiresPermission(android.Manifest.permission.CHANGE_CONFIGURATION) public void scheduleApplicationInfoChanged(java.util.List<java.lang.String>, int);
    method @RequiresPermission("android.permission.MANAGE_USERS") public boolean switchUser(@NonNull android.os.UserHandle);
    field public static final int PROCESS_CAPABILITY_ALL = 7; // 0x7
    field public static final int PROCESS_CAPABILITY_ALL_EXPLICIT = 1; // 0x1
    field public static final int PROCESS_CAPABILITY_ALL_IMPLICIT = 6; // 0x6
    field public static final int PROCESS_CAPABILITY_FOREGROUND_CAMERA = 2; // 0x2
    field public static final int PROCESS_CAPABILITY_FOREGROUND_LOCATION = 1; // 0x1
    field public static final int PROCESS_CAPABILITY_FOREGROUND_MICROPHONE = 4; // 0x4
+16 −0
Original line number Diff line number Diff line
@@ -602,6 +602,22 @@ public class ActivityManager {
    public static final int PROCESS_CAPABILITY_ALL = PROCESS_CAPABILITY_FOREGROUND_LOCATION
            | PROCESS_CAPABILITY_FOREGROUND_CAMERA
            | PROCESS_CAPABILITY_FOREGROUND_MICROPHONE;
    /**
     * All explicit capabilities. These are capabilities that need to be specified from manifest
     * file.
     * @hide
     */
    @TestApi
    public static final int PROCESS_CAPABILITY_ALL_EXPLICIT =
            PROCESS_CAPABILITY_FOREGROUND_LOCATION;

    /**
     * All implicit capabilities. There are capabilities that process automatically have.
     * @hide
     */
    @TestApi
    public static final int PROCESS_CAPABILITY_ALL_IMPLICIT = PROCESS_CAPABILITY_FOREGROUND_CAMERA
            | PROCESS_CAPABILITY_FOREGROUND_MICROPHONE;

    // NOTE: If PROCESS_STATEs are added, then new fields must be added
    // to frameworks/base/core/proto/android/app/enums.proto and the following method must
+6 −0
Original line number Diff line number Diff line
@@ -377,4 +377,10 @@ public abstract class ActivityManagerInternal {
     * uid, false otherwise
     */
    public abstract boolean isUidCurrentlyInstrumented(int uid);

    /**
     * Show a debug toast, asking user to file a bugreport.
     */
    // TODO: remove this toast after feature development is done
    public abstract void showWhileInUseDebugToast(int uid, int op, int mode);
}
+9 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package android.app;

import android.annotation.NonNull;
import android.annotation.Nullable;
import android.util.SparseArray;
import android.util.SparseIntArray;

import com.android.internal.util.function.HexFunction;
@@ -82,4 +83,12 @@ public abstract class AppOpsManagerInternal {
     * access to app ops for their user.
     */
    public abstract void setDeviceAndProfileOwners(SparseIntArray owners);

    /**
     * Update if the list of AppWidget becomes visible/invisible.
     * @param uidPackageNames uid to packageName map.
     * @param visible true for visible, false for invisible.
     */
    public abstract void updateAppWidgetVisibility(SparseArray<String> uidPackageNames,
            boolean visible);
}
+9 −0
Original line number Diff line number Diff line
@@ -11100,6 +11100,15 @@ public final class Settings {
        public static final String ACTIVITY_STARTS_LOGGING_ENABLED
                = "activity_starts_logging_enabled";
        /**
         * Feature flag to enable or disable the foreground service starts logging feature.
         * Type: int (0 for false, 1 for true)
         * Default: 1
         * @hide
         */
        public static final String FOREGROUND_SERVICE_STARTS_LOGGING_ENABLED =
                "foreground_service_starts_logging_enabled";
        /**
         * @hide
         * @see com.android.server.appbinding.AppBindingConstants
Loading