Loading apex/blobstore/service/java/com/android/server/blob/BlobStoreManagerService.java +20 −7 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import static android.app.blob.XmlTags.TAG_SESSIONS; import static android.content.pm.PackageManager.MATCH_DIRECT_BOOT_AWARE; import static android.content.pm.PackageManager.MATCH_DIRECT_BOOT_UNAWARE; import static android.content.pm.PackageManager.MATCH_UNINSTALLED_PACKAGES; import static android.os.UserHandle.USER_CURRENT; import static android.os.UserHandle.USER_NULL; import static com.android.server.blob.BlobStoreConfig.LOGV; Loading @@ -46,6 +47,8 @@ import android.annotation.IntRange; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.UserIdInt; import android.app.ActivityManager; import android.app.ActivityManagerInternal; import android.app.blob.BlobHandle; import android.app.blob.BlobInfo; import android.app.blob.IBlobStoreManager; Loading Loading @@ -1378,7 +1381,14 @@ public class BlobStoreManagerService extends SystemService { + "queryBlobsForUser()"); } return queryBlobsForUserInternal(userId); final int resolvedUserId = userId == USER_CURRENT ? ActivityManager.getCurrentUser() : userId; // Don't allow any other special user ids apart from USER_CURRENT final ActivityManagerInternal amInternal = LocalServices.getService( ActivityManagerInternal.class); amInternal.ensureNotSpecialUser(resolvedUserId); return queryBlobsForUserInternal(resolvedUserId); } @Override Loading Loading @@ -1479,12 +1489,13 @@ public class BlobStoreManagerService extends SystemService { private static final int FLAG_DUMP_CONFIG = 1 << 2; private int mSelectedSectionFlags; private boolean mDumpFull; private boolean mDumpUnredacted; private final ArrayList<String> mDumpPackages = new ArrayList<>(); private final ArrayList<Integer> mDumpUids = new ArrayList<>(); private final ArrayList<Integer> mDumpUserIds = new ArrayList<>(); private final ArrayList<Long> mDumpBlobIds = new ArrayList<>(); private boolean mDumpHelp; private boolean mDumpAll; public boolean shouldDumpSession(String packageName, int uid, long blobId) { if (!CollectionUtils.isEmpty(mDumpPackages) Loading @@ -1503,7 +1514,7 @@ public class BlobStoreManagerService extends SystemService { } public boolean shouldDumpAllSections() { return mSelectedSectionFlags == 0; return mDumpAll || (mSelectedSectionFlags == 0); } public void allowDumpSessions() { Loading Loading @@ -1545,7 +1556,7 @@ public class BlobStoreManagerService extends SystemService { } public boolean shouldDumpFull() { return mDumpFull; return mDumpUnredacted; } public boolean shouldDumpUser(int userId) { Loading @@ -1567,10 +1578,12 @@ public class BlobStoreManagerService extends SystemService { for (int i = 0; i < args.length; ++i) { final String opt = args[i]; if ("--full".equals(opt) || "-f".equals(opt)) { if ("--all".equals(opt) || "-a".equals(opt)) { dumpArgs.mDumpAll = true; } else if ("--unredacted".equals(opt) || "-u".equals(opt)) { final int callingUid = Binder.getCallingUid(); if (callingUid == Process.SHELL_UID || callingUid == Process.ROOT_UID) { dumpArgs.mDumpFull = true; dumpArgs.mDumpUnredacted = true; } } else if ("--sessions".equals(opt)) { dumpArgs.allowDumpSessions(); Loading @@ -1580,7 +1593,7 @@ public class BlobStoreManagerService extends SystemService { dumpArgs.allowDumpConfig(); } else if ("--package".equals(opt) || "-p".equals(opt)) { dumpArgs.mDumpPackages.add(getStringArgRequired(args, ++i, "packageName")); } else if ("--uid".equals(opt) || "-u".equals(opt)) { } else if ("--uid".equals(opt)) { dumpArgs.mDumpUids.add(getIntArgRequired(args, ++i, "uid")); } else if ("--user".equals(opt)) { dumpArgs.mDumpUserIds.add(getIntArgRequired(args, ++i, "userId")); Loading apex/permission/framework/Android.bp +9 −89 Original line number Diff line number Diff line Loading @@ -21,12 +21,18 @@ filegroup { path: "java", } java_library { java_sdk_library { name: "framework-permission", defaults: ["framework-module-defaults"], srcs: [ ":framework-permission-sources", ], sdk_version: "module_current", // TODO(b/155480189) - Remove naming_scheme once references have been resolved. // Temporary java_sdk_library component naming scheme to use to ease the transition from separate // modules to java_sdk_library. naming_scheme: "framework-modules", apex_available: [ "com.android.permission", "test_com.android.permission", Loading @@ -40,91 +46,5 @@ java_library { visibility: [ "//frameworks/base/apex/permission:__subpackages__", ], } stubs_defaults { name: "framework-permission-stubs-defaults", srcs: [ ":framework-permission-sources" ], libs: [ "framework-annotations-lib" ], dist: { dest: "framework-permission.txt" }, } droidstubs { name: "framework-permission-stubs-srcs-publicapi", defaults: [ "framework-module-stubs-defaults-publicapi", "framework-permission-stubs-defaults", ], check_api: { last_released: { api_file: ":framework-permission.api.public.latest", removed_api_file: ":framework-permission-removed.api.public.latest", }, api_lint: { new_since: ":framework-permission.api.public.latest", }, }, } droidstubs { name: "framework-permission-stubs-srcs-systemapi", defaults: [ "framework-module-stubs-defaults-systemapi", "framework-permission-stubs-defaults", ], check_api: { last_released: { api_file: ":framework-permission.api.system.latest", removed_api_file: ":framework-permission-removed.api.system.latest", }, api_lint: { new_since: ":framework-permission.api.system.latest", }, }, } droidstubs { name: "framework-permission-api-module_libs_api", defaults: [ "framework-module-api-defaults-module_libs_api", "framework-permission-stubs-defaults", ], check_api: { last_released: { api_file: ":framework-permission.api.module-lib.latest", removed_api_file: ":framework-permission-removed.api.module-lib.latest", }, api_lint: { new_since: ":framework-permission.api.module-lib.latest", }, }, } droidstubs { name: "framework-permission-stubs-srcs-module_libs_api", defaults: [ "framework-module-stubs-defaults-module_libs_api", "framework-permission-stubs-defaults", ], } java_library { name: "framework-permission-stubs-publicapi", srcs: [ ":framework-permission-stubs-srcs-publicapi" ], defaults: ["framework-module-stubs-lib-defaults-publicapi"], dist: { dest: "framework-permission.jar" }, } java_library { name: "framework-permission-stubs-systemapi", srcs: [ ":framework-permission-stubs-srcs-systemapi" ], defaults: ["framework-module-stubs-lib-defaults-systemapi"], dist: { dest: "framework-permission.jar" }, } java_library { name: "framework-permission-stubs-module_libs_api", srcs: [ ":framework-permission-stubs-srcs-module_libs_api" ], defaults: ["framework-module-stubs-lib-defaults-module_libs_api"], dist: { dest: "framework-permission.jar" }, stubs_library_visibility: ["//visibility:public"], } cmds/statsd/src/atoms.proto +14 −6 Original line number Diff line number Diff line Loading @@ -4945,9 +4945,12 @@ message MobileBytesTransferByFgBg { /** * Used for pull network statistics via mobile|wifi networks, and sliced by interesting dimensions. * Note that data is expected to be sliced into more dimensions in future. In other words, * the caller must not assume the data is unique when filtering with a set of matching conditions. * Thus, as the dimension grows, the caller will not be affected. * Note that the data is expected to be sliced into more dimensions in future. In other words, * the caller must not assume any row of data is one full report when filtering with a set of * matching conditions, because future data may represent with multiple rows what is currently * represented by one. * To avoid being broken by future slicing, callers must take care to aggregate rows even if they * query all the existing columns. * * Pulled from: * StatsPullAtomService (using NetworkStatsService to get NetworkStats) Loading @@ -4972,21 +4975,26 @@ message DataUsageBytesTransfer { optional int32 rat_type = 6; // Mcc/Mnc read from sim if the record is for a specific subscription, null indicates the // record is combined regardless of subscription. // record is combined across subscriptions. optional string sim_mcc = 7; optional string sim_mnc = 8; // Allows mobile virtual network operators (MVNOs) to be identified with individual IDs. // See TelephonyManager#getSimCarrierId. optional int32 carrier_id = 9; // Enumeration of opportunistic states with an additional ALL state indicates the record is // combined regardless of the boolean value in its field. enum DataSubscriptionState { UNKNOWN = 0; // For server side backward compatibility. ALL = 1; OPPORTUNISTIC = 2; NOT_OPPORTUNISTIC = 3; } // Mark whether the subscription is an opportunistic data subscription, and ALL indicates the // record is combined regardless of opportunistic data subscription. // record is combined across opportunistic data subscriptions. // See {@link SubscriptionManager#setOpportunistic}. optional DataSubscriptionState opportunistic_data_sub = 9; optional DataSubscriptionState opportunistic_data_sub = 10; } /** Loading core/java/android/hardware/camera2/CameraManager.java +15 −0 Original line number Diff line number Diff line Loading @@ -138,10 +138,25 @@ public final class CameraManager { * client camera application. Using these camera devices concurrently by two different * applications is not guaranteed to be supported, however.</p> * * <p>For concurrent operation, in chronological order : * - Applications must first close any open cameras that have sessions configured, using * {@link CameraDevice#close}. * - All camera devices intended to be operated concurrently, must be opened using * {@link #openCamera}, before configuring sessions on any of the camera devices.</p> * * <p>Each device in a combination, is guaranteed to support stream combinations which may be * obtained by querying {@link #getCameraCharacteristics} for the key * {@link android.hardware.camera2.CameraCharacteristics#SCALER_MANDATORY_CONCURRENT_STREAM_COMBINATIONS}.</p> * * <p>For concurrent operation, if a camera device has a non null zoom ratio range as specified * by * {@link android.hardware.camera2.CameraCharacteristics#CONTROL_ZOOM_RATIO_RANGE}, * its complete zoom ratio range may not apply. Applications can use * {@link android.hardware.camera2.CaptureRequest#CONTROL_ZOOM_RATIO} >=1 and <= * {@link android.hardware.camera2.CameraCharacteristics#SCALER_AVAILABLE_MAX_DIGITAL_ZOOM} * during concurrent operation. * <p> * * <p>The set of combinations may include camera devices that may be in use by other camera API * clients.</p> * Loading core/java/android/os/storage/StorageManager.java +3 −6 Original line number Diff line number Diff line Loading @@ -162,12 +162,9 @@ public class StorageManager { /** {@hide} */ public static final String PROP_SETTINGS_FUSE = FeatureFlagUtils.PERSIST_PREFIX + FeatureFlagUtils.SETTINGS_FUSE_FLAG; /** * Property that determines whether {@link OP_LEGACY_STORAGE} is sticky for * legacy apps. * @hide */ public static final String PROP_LEGACY_OP_STICKY = "persist.sys.legacy_storage_sticky"; /** {@hide} */ public static final String PROP_FORCED_SCOPED_STORAGE_WHITELIST = "forced_scoped_storage_whitelist"; /** {@hide} */ public static final String UUID_PRIVATE_INTERNAL = null; Loading Loading
apex/blobstore/service/java/com/android/server/blob/BlobStoreManagerService.java +20 −7 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import static android.app.blob.XmlTags.TAG_SESSIONS; import static android.content.pm.PackageManager.MATCH_DIRECT_BOOT_AWARE; import static android.content.pm.PackageManager.MATCH_DIRECT_BOOT_UNAWARE; import static android.content.pm.PackageManager.MATCH_UNINSTALLED_PACKAGES; import static android.os.UserHandle.USER_CURRENT; import static android.os.UserHandle.USER_NULL; import static com.android.server.blob.BlobStoreConfig.LOGV; Loading @@ -46,6 +47,8 @@ import android.annotation.IntRange; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.UserIdInt; import android.app.ActivityManager; import android.app.ActivityManagerInternal; import android.app.blob.BlobHandle; import android.app.blob.BlobInfo; import android.app.blob.IBlobStoreManager; Loading Loading @@ -1378,7 +1381,14 @@ public class BlobStoreManagerService extends SystemService { + "queryBlobsForUser()"); } return queryBlobsForUserInternal(userId); final int resolvedUserId = userId == USER_CURRENT ? ActivityManager.getCurrentUser() : userId; // Don't allow any other special user ids apart from USER_CURRENT final ActivityManagerInternal amInternal = LocalServices.getService( ActivityManagerInternal.class); amInternal.ensureNotSpecialUser(resolvedUserId); return queryBlobsForUserInternal(resolvedUserId); } @Override Loading Loading @@ -1479,12 +1489,13 @@ public class BlobStoreManagerService extends SystemService { private static final int FLAG_DUMP_CONFIG = 1 << 2; private int mSelectedSectionFlags; private boolean mDumpFull; private boolean mDumpUnredacted; private final ArrayList<String> mDumpPackages = new ArrayList<>(); private final ArrayList<Integer> mDumpUids = new ArrayList<>(); private final ArrayList<Integer> mDumpUserIds = new ArrayList<>(); private final ArrayList<Long> mDumpBlobIds = new ArrayList<>(); private boolean mDumpHelp; private boolean mDumpAll; public boolean shouldDumpSession(String packageName, int uid, long blobId) { if (!CollectionUtils.isEmpty(mDumpPackages) Loading @@ -1503,7 +1514,7 @@ public class BlobStoreManagerService extends SystemService { } public boolean shouldDumpAllSections() { return mSelectedSectionFlags == 0; return mDumpAll || (mSelectedSectionFlags == 0); } public void allowDumpSessions() { Loading Loading @@ -1545,7 +1556,7 @@ public class BlobStoreManagerService extends SystemService { } public boolean shouldDumpFull() { return mDumpFull; return mDumpUnredacted; } public boolean shouldDumpUser(int userId) { Loading @@ -1567,10 +1578,12 @@ public class BlobStoreManagerService extends SystemService { for (int i = 0; i < args.length; ++i) { final String opt = args[i]; if ("--full".equals(opt) || "-f".equals(opt)) { if ("--all".equals(opt) || "-a".equals(opt)) { dumpArgs.mDumpAll = true; } else if ("--unredacted".equals(opt) || "-u".equals(opt)) { final int callingUid = Binder.getCallingUid(); if (callingUid == Process.SHELL_UID || callingUid == Process.ROOT_UID) { dumpArgs.mDumpFull = true; dumpArgs.mDumpUnredacted = true; } } else if ("--sessions".equals(opt)) { dumpArgs.allowDumpSessions(); Loading @@ -1580,7 +1593,7 @@ public class BlobStoreManagerService extends SystemService { dumpArgs.allowDumpConfig(); } else if ("--package".equals(opt) || "-p".equals(opt)) { dumpArgs.mDumpPackages.add(getStringArgRequired(args, ++i, "packageName")); } else if ("--uid".equals(opt) || "-u".equals(opt)) { } else if ("--uid".equals(opt)) { dumpArgs.mDumpUids.add(getIntArgRequired(args, ++i, "uid")); } else if ("--user".equals(opt)) { dumpArgs.mDumpUserIds.add(getIntArgRequired(args, ++i, "userId")); Loading
apex/permission/framework/Android.bp +9 −89 Original line number Diff line number Diff line Loading @@ -21,12 +21,18 @@ filegroup { path: "java", } java_library { java_sdk_library { name: "framework-permission", defaults: ["framework-module-defaults"], srcs: [ ":framework-permission-sources", ], sdk_version: "module_current", // TODO(b/155480189) - Remove naming_scheme once references have been resolved. // Temporary java_sdk_library component naming scheme to use to ease the transition from separate // modules to java_sdk_library. naming_scheme: "framework-modules", apex_available: [ "com.android.permission", "test_com.android.permission", Loading @@ -40,91 +46,5 @@ java_library { visibility: [ "//frameworks/base/apex/permission:__subpackages__", ], } stubs_defaults { name: "framework-permission-stubs-defaults", srcs: [ ":framework-permission-sources" ], libs: [ "framework-annotations-lib" ], dist: { dest: "framework-permission.txt" }, } droidstubs { name: "framework-permission-stubs-srcs-publicapi", defaults: [ "framework-module-stubs-defaults-publicapi", "framework-permission-stubs-defaults", ], check_api: { last_released: { api_file: ":framework-permission.api.public.latest", removed_api_file: ":framework-permission-removed.api.public.latest", }, api_lint: { new_since: ":framework-permission.api.public.latest", }, }, } droidstubs { name: "framework-permission-stubs-srcs-systemapi", defaults: [ "framework-module-stubs-defaults-systemapi", "framework-permission-stubs-defaults", ], check_api: { last_released: { api_file: ":framework-permission.api.system.latest", removed_api_file: ":framework-permission-removed.api.system.latest", }, api_lint: { new_since: ":framework-permission.api.system.latest", }, }, } droidstubs { name: "framework-permission-api-module_libs_api", defaults: [ "framework-module-api-defaults-module_libs_api", "framework-permission-stubs-defaults", ], check_api: { last_released: { api_file: ":framework-permission.api.module-lib.latest", removed_api_file: ":framework-permission-removed.api.module-lib.latest", }, api_lint: { new_since: ":framework-permission.api.module-lib.latest", }, }, } droidstubs { name: "framework-permission-stubs-srcs-module_libs_api", defaults: [ "framework-module-stubs-defaults-module_libs_api", "framework-permission-stubs-defaults", ], } java_library { name: "framework-permission-stubs-publicapi", srcs: [ ":framework-permission-stubs-srcs-publicapi" ], defaults: ["framework-module-stubs-lib-defaults-publicapi"], dist: { dest: "framework-permission.jar" }, } java_library { name: "framework-permission-stubs-systemapi", srcs: [ ":framework-permission-stubs-srcs-systemapi" ], defaults: ["framework-module-stubs-lib-defaults-systemapi"], dist: { dest: "framework-permission.jar" }, } java_library { name: "framework-permission-stubs-module_libs_api", srcs: [ ":framework-permission-stubs-srcs-module_libs_api" ], defaults: ["framework-module-stubs-lib-defaults-module_libs_api"], dist: { dest: "framework-permission.jar" }, stubs_library_visibility: ["//visibility:public"], }
cmds/statsd/src/atoms.proto +14 −6 Original line number Diff line number Diff line Loading @@ -4945,9 +4945,12 @@ message MobileBytesTransferByFgBg { /** * Used for pull network statistics via mobile|wifi networks, and sliced by interesting dimensions. * Note that data is expected to be sliced into more dimensions in future. In other words, * the caller must not assume the data is unique when filtering with a set of matching conditions. * Thus, as the dimension grows, the caller will not be affected. * Note that the data is expected to be sliced into more dimensions in future. In other words, * the caller must not assume any row of data is one full report when filtering with a set of * matching conditions, because future data may represent with multiple rows what is currently * represented by one. * To avoid being broken by future slicing, callers must take care to aggregate rows even if they * query all the existing columns. * * Pulled from: * StatsPullAtomService (using NetworkStatsService to get NetworkStats) Loading @@ -4972,21 +4975,26 @@ message DataUsageBytesTransfer { optional int32 rat_type = 6; // Mcc/Mnc read from sim if the record is for a specific subscription, null indicates the // record is combined regardless of subscription. // record is combined across subscriptions. optional string sim_mcc = 7; optional string sim_mnc = 8; // Allows mobile virtual network operators (MVNOs) to be identified with individual IDs. // See TelephonyManager#getSimCarrierId. optional int32 carrier_id = 9; // Enumeration of opportunistic states with an additional ALL state indicates the record is // combined regardless of the boolean value in its field. enum DataSubscriptionState { UNKNOWN = 0; // For server side backward compatibility. ALL = 1; OPPORTUNISTIC = 2; NOT_OPPORTUNISTIC = 3; } // Mark whether the subscription is an opportunistic data subscription, and ALL indicates the // record is combined regardless of opportunistic data subscription. // record is combined across opportunistic data subscriptions. // See {@link SubscriptionManager#setOpportunistic}. optional DataSubscriptionState opportunistic_data_sub = 9; optional DataSubscriptionState opportunistic_data_sub = 10; } /** Loading
core/java/android/hardware/camera2/CameraManager.java +15 −0 Original line number Diff line number Diff line Loading @@ -138,10 +138,25 @@ public final class CameraManager { * client camera application. Using these camera devices concurrently by two different * applications is not guaranteed to be supported, however.</p> * * <p>For concurrent operation, in chronological order : * - Applications must first close any open cameras that have sessions configured, using * {@link CameraDevice#close}. * - All camera devices intended to be operated concurrently, must be opened using * {@link #openCamera}, before configuring sessions on any of the camera devices.</p> * * <p>Each device in a combination, is guaranteed to support stream combinations which may be * obtained by querying {@link #getCameraCharacteristics} for the key * {@link android.hardware.camera2.CameraCharacteristics#SCALER_MANDATORY_CONCURRENT_STREAM_COMBINATIONS}.</p> * * <p>For concurrent operation, if a camera device has a non null zoom ratio range as specified * by * {@link android.hardware.camera2.CameraCharacteristics#CONTROL_ZOOM_RATIO_RANGE}, * its complete zoom ratio range may not apply. Applications can use * {@link android.hardware.camera2.CaptureRequest#CONTROL_ZOOM_RATIO} >=1 and <= * {@link android.hardware.camera2.CameraCharacteristics#SCALER_AVAILABLE_MAX_DIGITAL_ZOOM} * during concurrent operation. * <p> * * <p>The set of combinations may include camera devices that may be in use by other camera API * clients.</p> * Loading
core/java/android/os/storage/StorageManager.java +3 −6 Original line number Diff line number Diff line Loading @@ -162,12 +162,9 @@ public class StorageManager { /** {@hide} */ public static final String PROP_SETTINGS_FUSE = FeatureFlagUtils.PERSIST_PREFIX + FeatureFlagUtils.SETTINGS_FUSE_FLAG; /** * Property that determines whether {@link OP_LEGACY_STORAGE} is sticky for * legacy apps. * @hide */ public static final String PROP_LEGACY_OP_STICKY = "persist.sys.legacy_storage_sticky"; /** {@hide} */ public static final String PROP_FORCED_SCOPED_STORAGE_WHITELIST = "forced_scoped_storage_whitelist"; /** {@hide} */ public static final String UUID_PRIVATE_INTERNAL = null; Loading