660523 Commits

Author SHA1 Message Date
Anton Hansson
dddbdc3b15 Merge "Remove references to win_sdk" 2022-01-05 08:13:21 +00:00
Junyu Lai
92524a042c [MS33.1] Remove NetdService dependency
This change pass INetd to NetworkStatsFactory to replace
NetdService#getNetdInstance.

Test: atest FrameworksNetTests
Bug: 204830222
Change-Id: I39b278989cea06dd316f21214380b5c4b54d2d50
2022-01-05 05:29:46 +00:00
Lucas Lin
9d8001cea1 Merge "Update underlying networks if it is changed" 2022-01-05 03:21:45 +00:00
Dmitri Plotnikov
884e5d8456 Merge "Add BATTERY_STATS_OWNERS to all *Stats files" 2022-01-04 23:42:08 +00:00
Treehugger Robot
547654cab7 Merge "Don't remove SYSTEM_FIXED for intentional fixed grants to critical apps." 2022-01-04 23:34:38 +00:00
Dmitri Plotnikov
5e85751023 Add BATTERY_STATS_OWNERS to all *Stats files
Test: N/A
Change-Id: Ifb1865b2db902bf0cca1bde48a7381903dca229c
2022-01-04 15:31:01 -08:00
wescande
e178f8f635 Add SystemApi tag on getLastAudibleStreamVolume
Bug: 190422401
Tag: #refactor
Test: Build
Change-Id: I2cbb69292465b4271caeb0c563fa1db62d025dce
2022-01-04 18:52:16 +00:00
Chen Xu
ed021212d6 Merge "[MEP] eSIM API refactor to support MEP" 2022-01-04 18:50:09 +00:00
Steven Moreland
169eafcb30 Remove separate_platform_variant entries.
This no longer does anything.

Bug: 161456198
Test: build
Change-Id: I11329bd18de2f3e2f437fbcfd92e7a472be61070
2022-01-04 18:23:23 +00:00
Treehugger Robot
6a5c5e23cc Merge "Add QUERY_AUDIO_STATE permission" 2022-01-04 17:55:01 +00:00
Sarah Chin
fa2dc0b7e4 Merge "Update unthrottleApn calls to take in DataProfile" 2022-01-04 17:27:41 +00:00
Treehugger Robot
6619bac824 Merge "Fix deadlock issue." 2022-01-04 17:08:52 +00:00
Treehugger Robot
302d0925da Merge "Fix typo in Javadoc." 2022-01-04 16:39:30 +00:00
jiayongqiang
d2280b8107 Fix deadlock issue.
It might cause deadlock sometimes:

The locking order of setEventsMask is:
    registerDisplayListener -> <DMG.mLock> -> setEventsMask -> <class lock>;

The Locking order of handleMessage is:
    Looper.loop -> Looper.loopOnce -> Handler.dispatchMessage -> handleMessage -> <class lock>;

Therefore, when the registerDisplayListener is called by client,
the DisplayListenerDelegate.handleMessage also called by DMS's callback,
at this time, if the method with DMG.mLock is called in handleMessage(),
it will lead to deadlock.

Test: (For example)
Thread A:
DisplayListenerDelegate.handleMessage() -> <class lock>
DisplayListener.onDisplayChanged() -> DMG.getCompatibleDisplay() ->
DMG.getDisplayInfo() -> <DMS.mLock>

Thead B:
DMG.registerDisplayListener() -> <DMS.mLock> -> DisplayListenerDelegate.setEventsMask() -> <class lock>

Signed-off-by: jiayongqiang <jiayongqiang@xiaomi.com>
Change-Id: Ie1a8728339c16fa8f4c4f5c758821c836fa1c96b
2022-01-04 18:29:45 +08:00
Hai Zhang
cc0a80895f Don't remove SYSTEM_FIXED for intentional fixed grants to critical apps.
See b/208785537#comment11.

Bug: 208785537
Bug: 206556385
Bug: 183537857
Bug: 208785537
Test: presubmit
Change-Id: Iaf5e2a0d86259805a9ef03f8f1baa14dd8c58da0
Merged-In: Iaf5e2a0d86259805a9ef03f8f1baa14dd8c58da0
(cherry picked from commit e6f07a4fb2b5f17aefb17df8e7d04dcc57fd0be9)
2022-01-04 09:22:05 +00:00
Alan Stokes
cd0705ed49 Simplify ApexInfo classpath info
Stop differentiating between the different ways an APEX can contribute
to derive_classpath - it makes no difference for the use cases, and it
doesn't scale if new environment variables are added.

Bug: 210472252
Test: atest ComposTestCase
Change-Id: I9256a6b5cc3689a8d61d51e8eb8d8c3f475172aa
2022-01-04 09:19:00 +00:00
Anton Hansson
dd8ef67a61 Remove references to win_sdk
This goal doesn't exist anymore. The build system automatically
translates it to "sdk".

Test: m win_sdk dist && inspect out/dist/apistubs
Change-Id: Ifc4fb07ce32ef21906e8bb8eae0003b1486a525a
2022-01-04 08:57:28 +00:00
Treehugger Robot
0892c27c57 Merge "[MS31] Fix several hidden API usages" 2022-01-04 03:56:23 +00:00
Treehugger Robot
7b8430e17e Merge changes from topics "ms25-appops", "ms28-service-fix"
* changes:
  [MS25.1] Remove AppOpsManager.OP_GET_USAGE_STATS dependency
  [MS28.1] Fix several hidden API dependencies
2022-01-03 22:41:07 +00:00
William Escande
d0ad455409 Add QUERY_AUDIO_STATE permission
Due to aosp/1863058, we need to add the associated permission

Bug: 190422401
Tag: #refactor
Test: None in this CL.
Change-Id: Id1809b85aca57929cba0197ba9d35f926dfeaf1b
2022-01-03 22:49:46 +01:00
Junyu Lai
1e3e87b14a [MS31] Fix several hidden API usages
This includes:
1. Replace UserHandle.getUid(userId, appId) with public API
2. Remove Preconditions.checkArgument
3. Replace MathUtil.constrain with the one in NetworkStatsUtils
4. Remove Sets
5. Replace NetworkStack.checkNetworkStackPermission with the
   one in the PermissionUtils
6. Replace internal CollectionUtils with the one in the module
7. Inline ProtoOutputStream(fd)
8. Replace Intent.EXTRA_USER_HANDLE with Intent.EXTRA_USER

Test: atest NetworkStatsSubscriptionsMonitorTest \
      NetworkStatsServiceTest
Bug: 204830222

Change-Id: If06a27b04ad15c29052b670eefc2f6dc0d199420
2022-01-03 15:15:05 +00:00
Les Lee
d9862a4d0c Merge "wifi data usage: replaced Wi-Fi SSID with a Wi-Fi network key" 2022-01-03 12:36:49 +00:00
sandeepjs
6afa68e472 [MEP] eSIM API refactor to support MEP
Newly added UiccPortInfo and UiccSlotMapping classes and introduced
UiccPortInfo as a port list in UiccCardInfo and UiccSlotInfo,
Deprecated some constructors and updated callers.
Test: build
Bug: 159354974
Change-Id: I71e4e1ef649b7301d126dde23d53783761de940f
Merged-In: I71e4e1ef649b7301d126dde23d53783761de940f
2022-01-03 12:12:52 +00:00
Les Lee
6ca5c25bf4 wifi data usage: replaced Wi-Fi SSID with a Wi-Fi network key
1. Used SSID to be a wifi network identity can't separate wifi
data usage when there are two different network with same SSID.
Use a new usage key from WifiInfo to replace wifi SSID to solve
this issue.

2. To support to query wifi usage per configured Wifi network.
Adding matchWifiNetworkKeys in NetworkTemplate to support querying
multi networkKeys wifi data usage since each configured Wifi
network configuration might be used to connect different Wifi
network. (Replace mNetworkId with mMatchWifiNetworkKeys)

3. Updated callers who were using NetworkTemplate constructor.

4. Fixed SortedSet null order case. The null subscriberId is a
valid input for matchSubscriberIds.

5. Replaced ArrayUtils with CollectionUtils.

Bug: 197520752
Bug: 126299427
Test: atest -c NetworkTemplateTest
Test: atest -c NetworkStatsServiceTest
Test: atest -c NetworkPolicyManagerServiceTest
Test: atest -c NetworkPolicyTest
Change-Id: Ie20e7fb56597817901be4ce1d2a7afcbc9ded0c6
2022-01-03 15:13:00 +08:00
Jacinta Hu
35ecc5886c Fix typo in Javadoc.
A missing end brace was causing Javadoc to fail to parse one of the links.
Change-Id: I8e4ca3721d7d08b7094d142fef394f06a223428e
2021-12-31 00:15:50 +00:00
Treehugger Robot
8bc5344f95 Merge "[MS23] Remove UserHandle.getUserId dependencies" 2021-12-30 15:45:03 +00:00
Treehugger Robot
c938ae401e Merge "[MS26.1] Remove Process.NETWORK_STACK_UID dependency" 2021-12-30 12:43:39 +00:00
Junyu Lai
fe054b770c [MS25.1] Remove AppOpsManager.OP_GET_USAGE_STATS dependency
Replaced by public interface.

Test: TH
Bug: 204830222
Change-Id: If7d17879b0ffdb6300373bc581cb07252fccfc7a
2021-12-30 10:00:19 +00:00
Junyu Lai
5c7508e2ac [MS23] Remove UserHandle.getUserId dependencies
Replaced with SystemApi.

Test: TH
Bug: 204830222
Change-Id: Ibc834489428c2036cd4ccd3284ba06c4c9e792b7
2021-12-30 10:00:19 +00:00
Junyu Lai
94a24370f7 [MS28.1] Fix several hidden API dependencies
This includes:
1. Replace Slog with Log
2. Use android.util.IndentingPrintWriter instead of the
   deprecated internal one.
3. Replace usages of ArrayUtils with CollectionUtils.
4. Reimplement DumpUtils#checkDumpPermission in PermissionUtils.
5. Replace MathUtils.constrain with NetworkStatsUtils.constrain

Test: FrameworksNetTests
Bug: 204830222
Change-Id: I2b064fc25497288d66018584e66da98c79bd208d
2021-12-30 10:00:19 +00:00
Alice Kuo
8c0ae12d46 Merge "Group CSIP device based on CAP" 2021-12-30 01:38:04 +00:00
Treehugger Robot
ccb536b8e2 Merge "Use Common Audio Service UUID from latest assigned numbers" 2021-12-30 00:16:35 +00:00
Alice Kuo
26bb180195 Group CSIP device based on CAP
Enable device group based on CAP

Bug: 150670922
Bug: 178981521
Test: pair with the LE audio coordinated set, and make sure it works

Change-Id: Ia3d0dbe496dec822fee8ae6465b81688b9e9440c
Merged-In: Ia3d0dbe496dec822fee8ae6465b81688b9e9440c
2021-12-30 07:54:51 +08:00
Jakub Pawlowski
2b67e53442 Use Common Audio Service UUID from latest assigned numbers
Bug: 150670922
Test: compilation
Merged-In: I35684ecec50c3db757331b6384c2579f5a28a70a
Change-Id: I35684ecec50c3db757331b6384c2579f5a28a70a
2021-12-29 19:11:00 +00:00
Nathan Harold
cb861c0f76 Add Constants for UsageSetting
Bug: 210023167
Test: compilation
Merged-In: Ief078770b44719e105828bb61d3768ad24e277dd
Change-Id: Ief078770b44719e105828bb61d3768ad24e277dd
(cherry picked from commit 793736cced1db8e22032cf2f9932434ca8a23ef7)
2021-12-29 09:42:12 -08:00
Treehugger Robot
4f4060c7b4 Merge "[MS21] Remove DataUnit dependency" 2021-12-29 13:24:49 +00:00
Treehugger Robot
613e503207 Merge "[MS19.1] Fix several hidden API dependencies" 2021-12-29 05:16:58 +00:00
Junyu Lai
7c4090fdb5 [MS26.1] Remove Process.NETWORK_STACK_UID dependency
Check NetworkStack permission instead.

Test: NetworkStatsAccessTest
Bug: 204830222
Change-Id: I052a1422d145af533b036b0f017ace485b67cbfe
2021-12-29 01:43:54 +00:00
Junyu Lai
790c02d70b [MS21] Remove DataUnit dependency
DataUnit is a hidden class, remove the references to
it from files that about to be moved into the module.

Test: TH
Bug: 204830222

Change-Id: Ibfb82ab74f283686fb2af6c3a550d541440c890d
2021-12-29 01:43:53 +00:00
Sarah Chin
4036f73231 Update unthrottleApn calls to take in DataProfile
Test: atest FrameworksTelephonyTests
Bug: 208651109
Change-Id: I4e77e56296d6a9a8b1010167e260f4e9c1a40202
Merged-In: I4e77e56296d6a9a8b1010167e260f4e9c1a40202
2021-12-28 23:27:21 +00:00
Sarah Chin
a28f3d2066 Merge "Add new fields to ApnSetting/DataProfileInfo" 2021-12-28 23:06:10 +00:00
Amy Gu
6b7318e25a Merge "Fix typo." 2021-12-28 18:32:15 +00:00
Jon Eckenrode
01b57ef4f6 Merge "Removed reference to developer guide from class description. Added some missing parameter and return descriptions." 2021-12-28 14:58:24 +00:00
Junyu Lai
3c53e4c8a4 [MS19.1] Fix several hidden API dependencies
This includes:
1. Use android.util.IndentingPrintWriter instead of the
   deprecated internal one.
2. Replace usages of IntArray with CollectionUtils and ArrayList.
3. Replace usages of ArrayUtils with CollectionUtils.
4. Refactor MathUtils.constrain functions into NetworkStatsUtils.
5. Replace Maps.newHashMap and Lists.newArrayList with public
   class constructors.
6. Replace Slog with Log.

Test: FrameworksNetTests NetworkStaticLibTests
Bug: 204830222
Change-Id: If009194ad5668a6d48dd341ea6d325028ce56d42
2021-12-28 09:16:33 +00:00
Chiachang Wang
80178db312 Merge "Add configuration whether to exclude local traffic in the VPN" 2021-12-28 07:45:20 +00:00
Treehugger Robot
de62afa978 Merge "[MS18] Augment data usage by default" 2021-12-28 06:23:09 +00:00
Chiachang Wang
de8c621832 Add configuration whether to exclude local traffic in the VPN
Add a extra variable to store whether the local traffic is
exempted from the VPN.

Bug: 184750836
Test: atest FrameworksNetTests
Change-Id: I70301901c2374ded9fdf179d0ce64e7bb2d7b1ab
2021-12-28 11:14:01 +08:00
Junyu Lai
b4ac36e28d Merge changes from topic "ms16-querysummary"
* changes:
  [MS16.2] Change exception handling for Data Usage APIs
  [MS16.1] Prepare APIs for replacing getNetwork[Total|Uid]Bytes
2021-12-27 05:36:46 +00:00
Treehugger Robot
6c8544e068 Merge "Update JIT Zygote image option." 2021-12-24 15:46:57 +00:00
Jiakai Zhang
5e6fa85a96 Update JIT Zygote image option.
Bug: 203492478
Test: manual -
  1. Build a system image and flash it to a device.
  2. adb shell setprop dalvik.vm.extra-opts '-verbose:image'
  3. adb shell setprop dalvik.vm.profilebootclasspath true
  4. adb shell setprop ctl.restart zygote
  5. See the boot image extension being compiled in memory
     (http://gpaste/4688561208033280).
Change-Id: I69c11e3e41b9ab142b427ee054c2a6275ff089de
2021-12-24 11:47:39 +00:00