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

Commit 1c8c9dd1 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 7371618 from 659a42df to sc-release

Change-Id: I49fbebcf6339547e32c500c832394432d8157510
parents 5c611d54 659a42df
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -313,6 +313,7 @@ java_defaults {
    libs: [
        "app-compat-annotations",
        "ext",
        "framework-connectivity-annotations",
        "framework-updatable-stubs-module_libs_api",
        "unsupportedappusage",
    ],
+15 −8
Original line number Diff line number Diff line
@@ -7394,20 +7394,27 @@ public class AppOpsManager {

    /** @hide */
    public void setUserRestriction(int code, boolean restricted, IBinder token) {
        setUserRestriction(code, restricted, token, /*exceptionPackages*/null);
        setUserRestriction(code, restricted, token, (Map<String, String[]>) null);
    }

    /** @hide */
    /**
     * An empty array of attribution tags means exclude all tags under that package.
     * @hide
     */
    public void setUserRestriction(int code, boolean restricted, IBinder token,
            String[] exceptionPackages) {
        setUserRestrictionForUser(code, restricted, token, exceptionPackages, mContext.getUserId());
            @Nullable Map<String, String[]> excludedPackageTags) {
        setUserRestrictionForUser(code, restricted, token, excludedPackageTags,
                mContext.getUserId());
    }

    /** @hide */
    /**
     * An empty array of attribution tags means exclude all tags under that package.
     * @hide
     */
    public void setUserRestrictionForUser(int code, boolean restricted, IBinder token,
            String[] exceptionPackages, int userId) {
            @Nullable Map<String, String[]> excludedPackageTags, int userId) {
        try {
            mService.setUserRestriction(code, restricted, token, userId, exceptionPackages);
            mService.setUserRestriction(code, restricted, token, userId, excludedPackageTags);
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
        }
@@ -7949,7 +7956,7 @@ public class AppOpsManager {
     */
    public int unsafeCheckOpRawNoThrow(int op, int uid, @NonNull String packageName) {
        try {
            return mService.checkOperationRaw(op, uid, packageName);
            return mService.checkOperationRaw(op, uid, packageName, null);
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
        }
+6 −3
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@ import com.android.internal.util.function.HexFunction;
import com.android.internal.util.function.NonaFunction;
import com.android.internal.util.function.OctFunction;
import com.android.internal.util.function.QuadFunction;
import com.android.internal.util.function.QuintFunction;
import com.android.internal.util.function.TriFunction;

/**
@@ -45,12 +46,14 @@ public abstract class AppOpsManagerInternal {
         * @param code The op code to check.
         * @param uid The UID for which to check.
         * @param packageName The package for which to check.
         * @param superImpl The super implementation.
         * @param attributionTag The attribution tag for which to check.
         * @param raw Whether to check the raw op i.e. not interpret the mode based on UID state.
         * @param superImpl The super implementation.
         * @return The app op check result.
         */
        int checkOperation(int code, int uid, String packageName, boolean raw,
                QuadFunction<Integer, Integer, String, Boolean, Integer> superImpl);
        int checkOperation(int code, int uid, String packageName, @Nullable String attributionTag,
                boolean raw,
                QuintFunction<Integer, Integer, String, String, Boolean, Integer> superImpl);

        /**
         * Allows overriding check audio operation behavior.
+7 −0
Original line number Diff line number Diff line
@@ -47,6 +47,13 @@ public interface TimeZoneDetector {
     */
    String SHELL_COMMAND_SET_AUTO_DETECTION_ENABLED = "set_auto_detection_enabled";

    /**
     * A shell command that prints whether the telephony-based time zone detection feature is
     * supported on the device.
     * @hide
     */
    String SHELL_COMMAND_IS_TELEPHONY_DETECTION_SUPPORTED = "is_telephony_detection_supported";

    /**
     * A shell command that prints whether the geolocation-based time zone detection feature is
     * supported on the device.
+4 −0
Original line number Diff line number Diff line
@@ -34,6 +34,8 @@ import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.content.pm.Signature;
import android.net.ConnectivityAnnotations.MultipathPreference;
import android.net.ConnectivityAnnotations.RestrictBackgroundStatus;
import android.net.wifi.WifiConfiguration;
import android.net.wifi.WifiInfo;
import android.os.Build;
@@ -463,6 +465,7 @@ public class NetworkPolicyManager {
     */
    @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES)
    @RequiresPermission(NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK)
    @RestrictBackgroundStatus
    public int getRestrictBackgroundStatus(int uid) {
        try {
            return mService.getRestrictBackgroundStatus(uid);
@@ -588,6 +591,7 @@ public class NetworkPolicyManager {
     */
    @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES)
    @RequiresPermission(NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK)
    @MultipathPreference
    public int getMultipathPreference(@NonNull Network network) {
        try {
            return mService.getMultipathPreference(network);
Loading