17267 Commits

Author SHA1 Message Date
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
Junyu Lai
ed26feb95c [MS15.1] Remove get/setSubscriberIdMatchRule dependencies
Subscriber Id Match Rule won't be exposed as system Api.
Callers should use Builder#setSubscriberIds or
NetworkTemplate#getSubscriberIds to set/get the Subscriber
Ids filter. An empty set in the paremter or return value
represents the intention of matching any Subscriber Ids.

Test: atest NetworkPolicyManagerServiceTest \
      FrameworksNetTests
Bug: 204830222

Change-Id: I12c54280b44c71e4737e82859dfe869794cc9c29
2021-12-22 09:50:44 +00:00
Treehugger Robot
d1d210762b Merge "Change the wakeup alarms for "light-doze-maintenance step" to non-wakeup alarms" 2021-12-15 23:51:19 +00:00
Ady Abraham
744da388db Merge "RefreshRatePolicy: set both min and max refresh rate when camera is used" 2021-12-14 23:12:44 +00:00
Ady Abraham
3e7b0969ab RefreshRatePolicy: set both min and max refresh rate when camera is used
If app is using Camera, we set both the min and max refresh rate to the camera's
preferred refresh rate to make sure we don't end up with a refresh rate lower
than the camera capture rate, which will lead to dropping camera frames.

Bug: 206056272
Change-Id: I5b6c49242fb6b87d662d26a29b2f159c052d386c
Test: android.hardware.cts.CameraGLTest
2021-12-13 23:55:04 +00:00
Joe Bolinger
cccdedcb69 Merge "Update biometrics OWNERS." am: a18ff150bd
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1901191

Change-Id: I0032bc24f9c71a844dfdc29987efdd5c06dc4aa1
2021-12-08 18:37:58 +00:00
Joe Bolinger
a18ff150bd Merge "Update biometrics OWNERS." 2021-12-08 18:30:44 +00:00
Raj M
b9d7d27ede Change the wakeup alarms for "light-doze-maintenance step" to non-wakeup alarms
The wakeup alarms for doze-light-maintenance steps are causing battery drain in idle state. In terms of idle state battery optimization, Doze light maintenance step alarms can be changed to non-wakeup alarms as verified it is not critical as well as there is no user impact during our tests over a 50 days of Samsung's internal testing including User Trial.

Once it's changed to a non-wakeup alarm, the time gap between maintenance can be increased. But from our real test data, the gap has not increased as much as we worried, so doze-maintenance is working well.

Merged-In: Ib9bf9e120c806e61eced99fbfb84cdb19d844e69

Bug: b/197216833, b/185466339
Change-Id: Ida62842bdf8019563466fbf79326bc4d52ff3a99
Test: run `atest FrameworksMockingServicesTests:DeviceIdleControllerTest`
2021-12-06 21:02:24 +00:00
Paul Hu
9238a7c49e Merge "Centralize nsd associated files" am: 32942299d3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1895244

Change-Id: I15a6d3eaca8b0244258d08b1dc5e46f0394609cb
2021-12-02 03:26:56 +00:00
paulhu
4e690dd40d Centralize nsd associated files
Move all nsd associated files include framework, service and test
to package/Nsd first. After clear all hidden API dependencies, we
can easily migrate these files into connectivity mainline module.

Bug: 206893064
Test: atest FrameworksNetTests CtsNetTestCases
Change-Id: Id26f471a10fe7882e31ccc2dbb73219461f00dbd
2021-11-29 23:08:06 +08:00
Joe Bolinger
2e42433bda Update biometrics OWNERS.
Test: N/A
Change-Id: I1e72d25b3986cff4c16f2d4cb7d78cf22dc1eb2b
2021-11-23 15:34:56 -08:00
Alice Kuo
2b008972b8 Merge "As airplane mode turn on, keep BT on if LE audio profile connected" am: f393f17f55
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1899075

Change-Id: Id5092286703bf52300e33ae45e6d154d630ebc9f
2021-11-23 17:33:33 +00:00
Alice Kuo
4021e9e54f As airplane mode turn on, keep BT on if LE audio profile connected
Bug: 207464971
Test: w/o LE audio device, and turn on/off airplane mode
Change-Id: I1865c5ff7e8c04a4188dc7c379223e48c8b29ad9
2021-11-23 20:47:27 +08:00
Xin Li
10d9972786 Merge sc-qpr1-dev-plus-aosp-without-vendor@7810918
Bug: 205056467
Merged-In: I13199bc39e9445929195f3d15579cbffe94e92b0
Change-Id: I35fa3c6c2abf679c51033f1395a08d511ed8739f
2021-11-18 17:00:37 +00:00
Treehugger Robot
104adeeb75 Merge "health: BatteryService etc. use health AIDL HAL" 2021-11-18 06:20:40 +00:00
Yifan Hong
999f26ca03 health: BatteryService etc. use health AIDL HAL
Also add tests to ensure that HealthServiceWrapper.create
prioritize using the AIDL HAL, and service callbacks are
working.

Test: frameworks test
Test: install HAL on cuttlefish then boot
Bug: 177269435

Change-Id: Ic667a49528c63343fe602f193c0958f2ee57c04e
2021-11-18 04:48:07 +00:00
Neil Fuller
a1afeb6910 Merge "Reverse ReferenceWithHistory.dump() order" 2021-11-16 09:30:11 +00:00
Neil Fuller
1a5a874401 Reverse ReferenceWithHistory.dump() order
This commit switches the ordering of ReferenceWithHistory.dump() so the oldest
entries are output first followed by newer ones, i.e. traditional log ordering.

Tests are updated to confirm ReferenceWithHistory dump output.

Bug: 204855374
Test: atest services/tests/servicestests/src/com/android/server/timedetector/ReferenceWithHistoryTest.java
Test: adb shell dumpsys time_zone_detector
Change-Id: Ia098492fc6056fdbb8ef9d8ca1128bf0f51d113b
2021-11-15 17:29:38 +00:00
Roopa Sattiraju
5f91507b2b Merge "A2DP switch device refactor" 2021-11-15 00:08:39 +00:00
Makoto Onuki
2c8647da7e Merge "Making the AM team owner of some tests" 2021-11-12 19:07:53 +00:00
Makoto Onuki
ebbe751713 Making the AM team owner of some tests
Bug: N/A
Test: treehugger
Change-Id: I07452fb368cef58f52b49dfe5df8d566bf0c665a
2021-11-11 11:45:17 -08:00
wescande
3fe5af4890 A2DP switch device refactor
Bluetooth mainline effort to reduce AudioManager API

Test: Manual
Tag: #refactor
Bug: 190422401
Fix: 197715842
Fix: 197932292
Merged-In: I65c6561969d443e80f0a49256770279cd0959352
Change-Id: I65c6561969d443e80f0a49256770279cd0959352
2021-11-11 15:22:20 +01:00
Treehugger Robot
6057fe80f1 Merge changes from topic "health-service-wrapper-test"
* changes:
  health: Drop HealthServiceWrapperHidl.init.
  BatteryService: remove HIDL-ness
  Move BatteryServiceTest to HealthServiceWrapperTest.
2021-11-09 21:34:38 +00:00
Riddle Hsu
6cdf0bbec7 Fix flakiness of testTransferLaunchCookie
The count down latch is triggered too early that the value
to be verified may not have been set.

Fixes: 194183975
Test: atest ActivityOptionsTest#testTransferLaunchCookie
Change-Id: I3b78db921a178e2df970a85496ae5238b5bd6fb3
(cherry picked from commit c10eb7b18d5d55bf26d39c47f7452fefb30da838)
2021-11-09 14:21:28 +08:00
Yifan Hong
8902c87ea9 BatteryService: remove HIDL-ness
Move HIDL-specifics of BatteryService to a list of classes
under com.android.server.health, so that we can replace
with the AIDL HAL easily.

HealthInfo types are kept as HIDL types. This will be
transformed to AIDL types in the next CL.

Also move BatteryServiceTest to HealthServiceWrapperTest,
since it essentially test just HealthServiceWrapper. Moving
the test to the proper package allows us to make things
package private.

Also make HealthServiceWrapperTest JUnit 4, since AndroidTestCase
is deprecated.

Test: builds
Test: atest FrameworksServicesTests
Bug: 177269435

Change-Id: Ie4dff341594fe9185a188ad963f29ade5d199e85
2021-11-08 12:13:15 -08:00
Yifan Hong
e68179028d Move BatteryServiceTest to HealthServiceWrapperTest.
Moving the file in this commit so that git recognizes
that the file is moved, not deleted then created.

Test: none (note: this cannot be built. See next CL that
      correctly fix this.)
Bug: 177269435
Change-Id: I3c41ba1571c30a912b558dac4f1aaf8f1b5c5b61
2021-11-08 12:13:15 -08:00
Treehugger Robot
e9c20518f7 Merge "Add OWNERS for the health package (servicestests)." 2021-11-08 16:13:57 +00:00
Yifan Hong
06d8d3de90 Add OWNERS for the health package (servicestests).
Test: pass
Bug: 177269435
Change-Id: I71bceb1bb6d1797cdc744ae939b0d4e694a7c8e6
2021-11-05 23:49:08 -07:00
Bill Yi
ba584f1fa1 Merge SP1A.211105.004 to aosp-master - DO NOT MERGE
Merged-In: I7e267e3c046d726750180efa81806cbbefb17b68
Merged-In: I5ff5973c95868bee2b7444ecded7443d6e6429c9
Change-Id: Ic3cd62083de4219dbf52f568ca4f34bdc7a08516
2021-11-02 21:07:53 -07:00
Treehugger Robot
1978bd15ca Merge "Remove usage of healthd." 2021-10-27 08:35:34 +00:00
Treehugger Robot
75e0091067 Merge "Consolidating PM owner definition and adding new owners." 2021-10-26 18:39:51 +00:00
Yifan Hong
27c03c7f68 Merge "Add OWNERS for BatteryService" 2021-10-22 05:40:22 +00:00
Yifan Hong
7e5913e73e Remove usage of healthd.
Healthd is no longer installed on the device. Drop
usages of it.

Test: pass
Bug: 203245871
Change-Id: Iaafb75ee413bd579e5d0264b5a383ce442659c4b
2021-10-21 01:57:06 +00:00
Yifan Hong
99bc2d42a2 Add OWNERS for BatteryService
... to point to owners of health HAL. BatteryService
contains large usage of the health HAL.

Test: pass
Bug: 177269435
Change-Id: I38e7ec9e2ab25dec67ab674e9f169360f4690f1e
2021-10-20 12:53:53 -07:00
Patrick Baumann
8255f5f4c0 Consolidating PM owner definition and adding new owners.
Change-Id: If4b080755701452c53d55f26380e887dc3944dbf
2021-10-19 21:06:56 +00:00
Neil Fuller
e26bbeb94a Adjust OWNERS to reflect new ownership
This changes owners files based on latest org changes and changes
links to improve maintainability.

Changes:
+ It removes a specific owner from most to reduce future maintenance.
+ It adds indirection so android/app references the associated service
code, tests reference the OWNERS of the code under test.
+ services/core/java/com/android/server/timezonedetector/OWNERS is the
single list of time / time zone detector maintainers.
+ Code associated with time zone rules moved to libcore/ ownership
+ It adds one new file for an upcoming commit.
+ Added documentation around API purpose to API OWNERS files, since
there are multiple similar-looking package names with different purposes
/ clients.

Test: None
Bug: 189810551
Change-Id: I948d4b8eff59f3cd5ff63018949e49679795a5c0
2021-10-13 13:57:42 +01:00
Ben Miles
3cbdcf1c48 Merge "Add empty package for critical event log with OWNERS" am: 53e8b03bae am: 297e52a036 am: 88ab377c71
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1843420

Change-Id: Iedb0a6b43af60d727928a0108a618a32611f99c8
2021-10-08 12:57:02 +00:00
Ben Miles
88ab377c71 Merge "Add empty package for critical event log with OWNERS" am: 53e8b03bae am: 297e52a036
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1843420

Change-Id: I94ab829d74294d9e1e33c00b44e9ccb5b3c597c6
2021-10-08 12:44:25 +00:00
Ben Miles
53e8b03bae Merge "Add empty package for critical event log with OWNERS" 2021-10-08 12:13:23 +00:00
Ben Miles
77b236e715 Add empty package for critical event log with OWNERS
Bug: 200263868
Test: Untested
Change-Id: Ib99594481754f2ebf48dc2adaa139f7d913b944d
2021-10-07 17:18:46 +01:00
Evan Severson
77251b3ec4 Merge "Fix setting camera op restriction on reboot" into sc-qpr1-dev am: 395f43dd6f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15983492

Change-Id: I80d0fd520600ec9e027df3b7d00a90cdb09091af
2021-10-07 03:09:37 +00:00
Evan Severson
395f43dd6f Merge "Fix setting camera op restriction on reboot" into sc-qpr1-dev 2021-10-07 02:57:27 +00:00
TreeHugger Robot
3b80e6bfd6 Merge "Ensure pkg uid matches provided uid for device phone number check" into sc-qpr1-dev am: e2ba264dd0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15926751

Change-Id: Id34577e8237072757ebd832283cb9a39ee725011
2021-10-07 00:10:03 +00:00
TreeHugger Robot
e2ba264dd0 Merge "Ensure pkg uid matches provided uid for device phone number check" into sc-qpr1-dev 2021-10-06 23:57:16 +00:00
TreeHugger Robot
4286421eb5 Merge "Fix bug unregistering stationary listener" into sc-qpr1-dev am: eeff412d87
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15984062

Change-Id: Ia8f77c2193a3d6f6bfbc023c7064690c0fd1cfe2
2021-10-06 03:31:11 +00:00
TreeHugger Robot
eeff412d87 Merge "Fix bug unregistering stationary listener" into sc-qpr1-dev 2021-10-06 03:17:04 +00:00
Daniel Solomon
7cd1097495 Merge changes from topic "b200851199" into sc-qpr1-dev am: 250448c0bc
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15909960

Change-Id: Ifd26b07f419a1a810415373348728b570bd32737
2021-10-05 23:00:43 +00:00
Daniel Solomon
250448c0bc Merge changes from topic "b200851199" into sc-qpr1-dev
* changes:
  Make DisplayModeDirector aware of whether HBM is active
  Change DisplayModeDirector's brightness source to DisplayListener
2021-10-05 22:44:18 +00:00
Soonil Nagarkar
08f91a61d0 Fix bug unregistering stationary listener
Bug: 196997374
Test: manual + presubmit
Change-Id: I1b2a9c7d36c23db0814d5d8a69726c7763facf5d
2021-10-05 11:32:38 -07:00
Evan Severson
2e4241337d Fix setting camera op restriction on reboot
In SensorPrivacyService we set the camera state to what was read on the
microphone's persisted value.

Test: atest SensorPrivacyServiceMockingTest
Fixes: 201793410
Change-Id: If5cbd2b6cd2c8e155b8a56e0692a0379d188ffce
2021-10-05 09:33:25 -07:00