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

Commit 956d06c2 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 7380537 from a2a52c1f to sc-release

Change-Id: Ie1e3661aaddd58243739590b27ff62f6eca0170c
parents d233e772 a2a52c1f
Loading
Loading
Loading
Loading
+15 −2
Original line number Diff line number Diff line
@@ -141,6 +141,7 @@ package android {
    field public static final String REORDER_TASKS = "android.permission.REORDER_TASKS";
    field public static final String REQUEST_COMPANION_PROFILE_WATCH = "android.permission.REQUEST_COMPANION_PROFILE_WATCH";
    field public static final String REQUEST_COMPANION_RUN_IN_BACKGROUND = "android.permission.REQUEST_COMPANION_RUN_IN_BACKGROUND";
    field public static final String REQUEST_COMPANION_START_FOREGROUND_SERVICES_FROM_BACKGROUND = "android.permission.REQUEST_COMPANION_START_FOREGROUND_SERVICES_FROM_BACKGROUND";
    field public static final String REQUEST_COMPANION_USE_DATA_IN_BACKGROUND = "android.permission.REQUEST_COMPANION_USE_DATA_IN_BACKGROUND";
    field public static final String REQUEST_DELETE_PACKAGES = "android.permission.REQUEST_DELETE_PACKAGES";
    field public static final String REQUEST_IGNORE_BATTERY_OPTIMIZATIONS = "android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS";
@@ -9039,7 +9040,7 @@ package android.bluetooth {
    method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public String getName();
    method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public int getType();
    method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public android.os.ParcelUuid[] getUuids();
    method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean setAlias(@NonNull String);
    method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public int setAlias(@Nullable String);
    method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public boolean setPairingConfirmation(boolean);
    method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean setPin(byte[]);
    method public void writeToParcel(android.os.Parcel, int);
@@ -9487,6 +9488,15 @@ package android.bluetooth {
    field public static final int TYPE_SCO = 2; // 0x2
  }
  public final class BluetoothStatusCodes {
    field public static final int ERROR_BLUETOOTH_NOT_ALLOWED = 2; // 0x2
    field public static final int ERROR_BLUETOOTH_NOT_ENABLED = 1; // 0x1
    field public static final int ERROR_DEVICE_NOT_BONDED = 3; // 0x3
    field public static final int ERROR_MISSING_BLUETOOTH_CONNECT_PERMISSION = 6; // 0x6
    field public static final int ERROR_UNKNOWN = 2147483647; // 0x7fffffff
    field public static final int SUCCESS = 0; // 0x0
  }
}
package android.bluetooth.le {
@@ -31980,6 +31990,7 @@ package android.os {
    field public static final String DISALLOW_AUTOFILL = "no_autofill";
    field public static final String DISALLOW_BLUETOOTH = "no_bluetooth";
    field public static final String DISALLOW_BLUETOOTH_SHARING = "no_bluetooth_sharing";
    field public static final String DISALLOW_CAMERA_TOGGLE = "disallow_camera_toggle";
    field public static final String DISALLOW_CONFIG_BLUETOOTH = "no_config_bluetooth";
    field public static final String DISALLOW_CONFIG_BRIGHTNESS = "no_config_brightness";
    field public static final String DISALLOW_CONFIG_CELL_BROADCASTS = "no_config_cell_broadcasts";
@@ -32004,6 +32015,7 @@ package android.os {
    field public static final String DISALLOW_INSTALL_APPS = "no_install_apps";
    field public static final String DISALLOW_INSTALL_UNKNOWN_SOURCES = "no_install_unknown_sources";
    field public static final String DISALLOW_INSTALL_UNKNOWN_SOURCES_GLOBALLY = "no_install_unknown_sources_globally";
    field public static final String DISALLOW_MICROPHONE_TOGGLE = "disallow_microphone_toggle";
    field public static final String DISALLOW_MODIFY_ACCOUNTS = "no_modify_accounts";
    field public static final String DISALLOW_MOUNT_PHYSICAL_MEDIA = "no_physical_media";
    field public static final String DISALLOW_NETWORK_RESET = "no_network_reset";
@@ -39223,7 +39235,8 @@ package android.speech {
    method @MainThread public static android.speech.SpeechRecognizer createSpeechRecognizer(android.content.Context);
    method @MainThread public static android.speech.SpeechRecognizer createSpeechRecognizer(android.content.Context, android.content.ComponentName);
    method public void destroy();
    method public static boolean isRecognitionAvailable(android.content.Context);
    method public static boolean isOnDeviceRecognitionAvailable(@NonNull android.content.Context);
    method public static boolean isRecognitionAvailable(@NonNull android.content.Context);
    method @MainThread public void setRecognitionListener(android.speech.RecognitionListener);
    method @MainThread public void startListening(android.content.Intent);
    method @MainThread public void stopListening();
+6 −5
Original line number Diff line number Diff line
@@ -1950,9 +1950,6 @@ package android.bluetooth {
    field public static final int ACTIVE_DEVICE_ALL = 2; // 0x2
    field public static final int ACTIVE_DEVICE_AUDIO = 0; // 0x0
    field public static final int ACTIVE_DEVICE_PHONE_CALL = 1; // 0x1
    field public static final int OOB_ERROR_ADAPTER_DISABLED = 2; // 0x2
    field public static final int OOB_ERROR_ANOTHER_ACTIVE_REQUEST = 1; // 0x1
    field public static final int OOB_ERROR_UNKNOWN = 0; // 0x0
  }
  public static interface BluetoothAdapter.OnMetadataChangedListener {
@@ -2090,6 +2087,10 @@ package android.bluetooth {
    field @Deprecated public static final int PRIORITY_ON = 100; // 0x64
  }
  public final class BluetoothStatusCodes {
    field public static final int ERROR_ANOTHER_ACTIVE_OOB_REQUEST = 1000; // 0x3e8
  }
  public final class BluetoothUuid {
    method public static boolean containsAnyUuid(@Nullable android.os.ParcelUuid[], @Nullable android.os.ParcelUuid[]);
    method @NonNull public static android.os.ParcelUuid parseUuidFrom(@Nullable byte[]);
@@ -2245,7 +2246,7 @@ package android.companion {
  public final class CompanionDeviceManager {
    method @RequiresPermission(android.Manifest.permission.ASSOCIATE_COMPANION_DEVICES) public void associate(@NonNull String, @NonNull android.net.MacAddress);
    method @RequiresPermission("android.permission.MANAGE_COMPANION_DEVICES") public boolean canPairWithoutPrompt(@NonNull String, @NonNull String, int);
    method @RequiresPermission("android.permission.MANAGE_COMPANION_DEVICES") public boolean canPairWithoutPrompt(@NonNull String, @NonNull String, @NonNull android.os.UserHandle);
    method @RequiresPermission("android.permission.MANAGE_COMPANION_DEVICES") public boolean isDeviceAssociatedForWifiConnection(@NonNull String, @NonNull android.net.MacAddress, @NonNull android.os.UserHandle);
  }
@@ -12061,10 +12062,10 @@ package android.telephony {
    field public static final int CALL_WAITING_STATUS_ENABLED = 1; // 0x1
    field public static final int CALL_WAITING_STATUS_NOT_SUPPORTED = 4; // 0x4
    field public static final int CALL_WAITING_STATUS_UNKNOWN_ERROR = 3; // 0x3
    field public static final String CAPABILITY_ALLOWED_NETWORK_TYPES_USED = "CAPABILITY_ALLOWED_NETWORK_TYPES_USED";
    field public static final String CAPABILITY_NR_DUAL_CONNECTIVITY_CONFIGURATION_AVAILABLE = "CAPABILITY_NR_DUAL_CONNECTIVITY_CONFIGURATION_AVAILABLE";
    field public static final String CAPABILITY_SECONDARY_LINK_BANDWIDTH_VISIBLE = "CAPABILITY_SECONDARY_LINK_BANDWIDTH_VISIBLE";
    field public static final String CAPABILITY_THERMAL_MITIGATION_DATA_THROTTLING = "CAPABILITY_THERMAL_MITIGATION_DATA_THROTTLING";
    field public static final String CAPABILITY_USES_ALLOWED_NETWORK_TYPES_BITMASK = "CAPABILITY_USES_ALLOWED_NETWORK_TYPES_BITMASK";
    field public static final int CARRIER_PRIVILEGE_STATUS_ERROR_LOADING_RULES = -2; // 0xfffffffe
    field public static final int CARRIER_PRIVILEGE_STATUS_HAS_ACCESS = 1; // 0x1
    field public static final int CARRIER_PRIVILEGE_STATUS_NO_ACCESS = 0; // 0x0
+13 −4
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ import static com.android.internal.annotations.VisibleForTesting.Visibility.PACK

import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.UserIdInt;
import android.app.assist.AssistContent;
import android.app.assist.AssistStructure;
import android.app.backup.BackupAgent;
@@ -61,6 +62,7 @@ import android.content.ContentCaptureOptions;
import android.content.ContentProvider;
import android.content.ContentResolver;
import android.content.Context;
import android.content.Context.CreatePackageOptions;
import android.content.IContentProvider;
import android.content.IIntentReceiver;
import android.content.Intent;
@@ -72,6 +74,7 @@ import android.content.pm.InstrumentationInfo;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.content.pm.PackageManager.ApplicationInfoFlags;
import android.content.pm.ParceledListSlice;
import android.content.pm.PermissionInfo;
import android.content.pm.ProviderInfo;
@@ -2367,16 +2370,22 @@ public final class ActivityThread extends ClientTransactionHandler

    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023)
    public final LoadedApk getPackageInfo(String packageName, CompatibilityInfo compatInfo,
            int flags) {
            @CreatePackageOptions int flags) {
        return getPackageInfo(packageName, compatInfo, flags, UserHandle.myUserId());
    }

    public final LoadedApk getPackageInfo(String packageName, CompatibilityInfo compatInfo,
            int flags, int userId) {
            @CreatePackageOptions int flags, @UserIdInt int userId) {
        return getPackageInfo(packageName, compatInfo, flags, userId, 0 /* packageFlags */);
    }

    public final LoadedApk getPackageInfo(String packageName, CompatibilityInfo compatInfo,
            @CreatePackageOptions int flags, @UserIdInt int userId,
            @ApplicationInfoFlags int packageFlags) {
        final boolean differentUser = (UserHandle.myUserId() != userId);
        ApplicationInfo ai = PackageManager.getApplicationInfoAsUserCached(
                packageName,
                PackageManager.GET_SHARED_LIBRARY_FILES
                packageFlags | PackageManager.GET_SHARED_LIBRARY_FILES
                | PackageManager.MATCH_DEBUG_TRIAGED_MISSING,
                (userId < 0) ? UserHandle.myUserId() : userId);
        synchronized (mResourcesManager) {
@@ -2419,7 +2428,7 @@ public final class ActivityThread extends ClientTransactionHandler

    @UnsupportedAppUsage(trackingBug = 171933273)
    public final LoadedApk getPackageInfo(ApplicationInfo ai, CompatibilityInfo compatInfo,
            int flags) {
            @CreatePackageOptions int flags) {
        boolean includeCode = (flags&Context.CONTEXT_INCLUDE_CODE) != 0;
        boolean securityViolation = includeCode && ai.uid != 0
                && ai.uid != Process.SYSTEM_UID && (mBoundApplication != null
+11 −1
Original line number Diff line number Diff line
@@ -7413,8 +7413,18 @@ public class AppOpsManager {
     */
    public void setUserRestrictionForUser(int code, boolean restricted, IBinder token,
            @Nullable Map<String, String[]> excludedPackageTags, int userId) {
        setUserRestrictionForUser(code, restricted, token, excludedPackageTags, userId, false);
    }

    /**
     * An empty array of attribution tags means exclude all tags under that package.
     * @hide
     */
    public void setUserRestrictionForUser(int code, boolean restricted, IBinder token,
            @Nullable Map<String, String[]> excludedPackageTags, int userId, boolean rejectBypass) {
        try {
            mService.setUserRestriction(code, restricted, token, userId, excludedPackageTags);
            mService.setUserRestriction(code, restricted, token, userId, excludedPackageTags,
                    rejectBypass);
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
        }
+10 −2
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.UiContext;
import android.compat.annotation.UnsupportedAppUsage;
import android.content.AttributionSource;
import android.content.AutofillOptions;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
@@ -47,6 +48,7 @@ import android.content.pm.ActivityInfo;
import android.content.pm.ApplicationInfo;
import android.content.pm.IPackageManager;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.ApplicationInfoFlags;
import android.content.pm.PackageManager.NameNotFoundException;
import android.content.res.AssetManager;
import android.content.res.CompatResources;
@@ -60,7 +62,6 @@ import android.database.sqlite.SQLiteDatabase.CursorFactory;
import android.graphics.Bitmap;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.content.AttributionSource;
import android.os.Binder;
import android.os.Build;
import android.os.Bundle;
@@ -2493,6 +2494,13 @@ class ContextImpl extends Context {
    @Override
    public Context createPackageContextAsUser(String packageName, int flags, UserHandle user)
            throws NameNotFoundException {
        return createPackageContextAsUser(packageName, flags, user, 0 /* packageFlags */);
    }

    @Override
    public Context createPackageContextAsUser(
            @NonNull String packageName, @CreatePackageOptions int flags, @NonNull UserHandle user,
            @ApplicationInfoFlags int packageFlags) throws PackageManager.NameNotFoundException {
        if (packageName.equals("system") || packageName.equals("android")) {
            // The system resources are loaded in every application, so we can safely copy
            // the context without reloading Resources.
@@ -2503,7 +2511,7 @@ class ContextImpl extends Context {
        }

        LoadedApk pi = mMainThread.getPackageInfo(packageName, mResources.getCompatibilityInfo(),
                flags | CONTEXT_REGISTER_PACKAGE, user.getIdentifier());
                flags | CONTEXT_REGISTER_PACKAGE, user.getIdentifier(), packageFlags);
        if (pi != null) {
            ContextImpl c = new ContextImpl(this, mMainThread, pi, mParams,
                    mAttributionSource.getAttributionTag(),
Loading