Commit Graph

4361 Commits

Author SHA1 Message Date
JW Wang
244bbadcfe Merge "Expose ROLLBACK_DATA_POLICY_* as system api" 2021-08-09 08:30:30 +00:00
Suren Baghdasaryan
fb5194e63f Adding native flag namespace for lmkd.
For experiment flag testing, adding lmkd flag in DeviceConfig.

Bug: 194316048
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I1f13d6bbb4a9a7fd8825d7e5acde416750271df4
2021-08-06 20:31:18 +00:00
Yohei Yukawa
a5f1829af2 Merge "Clarify how Handler is used in IC#getHandler()" 2021-08-06 16:37:19 +00:00
Tingting Wang
28f101c707 Merge "Add defaultAccount related API to ContactsContract." 2021-08-06 05:15:46 +00:00
JW Wang
dabef7a8de Expose ROLLBACK_DATA_POLICY_* as system api
The constants will be used by phonesky and CTS
to replace hardcoded values.

Bug: 194981157
Test: m
Change-Id: I4567334be554055ef2a5c20ef7160d991674cb9e
2021-08-06 10:58:06 +08:00
Kweku Adams
0ba8fca9e6 Merge "Open up PM.isLightDeviceIdleMode()." 2021-08-06 00:14:48 +00:00
Hyundo Moon
a05a1d3a49 Merge changes from topic "public_media_key_session_changed_listener"
* changes:
  Add public getMediaKeyEventSession(PackageName)
  Add public add/removeOnMediaKeyEventSessionChangedListener
2021-08-05 10:17:49 +00:00
Hyundo Moon
33f8af14c4 Add public getMediaKeyEventSession(PackageName)
The MediaSessionManager has two system APIs
 - getMediaKeyEventSession
 - getMediaKeyEventSessionPackageName
which get the current the media key session and its package name.

Since the APIs require MEDIA_CONTENT_CONTROL permission,
non-system apps could not use the APIs.

This CL adds an overloaded version of those APIs so that apps with
enabled notification listener can use the functionality.

Bug: 187483932
Test: Passed MediaSessionManager(Host)Test
Change-Id: I18904fb68ad175a668f79deb77ced507b7fc800b
2021-08-04 12:16:43 +09:00
Yohei Yukawa
bebf16c494 Clarify how Handler is used in IC#getHandler()
Since its beginning [1] the system has been using

  InputConnection#getHandler()

only for retrieving Looper associated with it.  Although it has been
intentional, it'd be probably helpful for app developers if we can
clarify a bit more on this, because most likely the current behavior
is not going to change.

This CL also annotates the API with @Nullable as it should have been.

 [1]: Id9e579bb3e2966986cdcb1c34bc8cacfeca2e1a9
      612cce92ad

Bug: 26945674
Fix: 195434171
Test: presubmit
Change-Id: I14910c6f0cc43feec505b2951625d0c00203ac92
2021-08-03 18:32:03 -07:00
Tingting
8fd17c67ce Add defaultAccount related API to ContactsContract.
Add columns in ContactsContract.Settings to indicate
the default account for new contacts.

Test: ran m update-api to generate current.txt change.

Bug: 188347310
Change-Id: I4333455e36079561b6bfcdd07375aa56659bb4db
2021-08-02 22:30:58 +00:00
Hongguang
956e635430 Use tuner AIDL HAL in Java codes.
This CL also updates the values of some tuner System API constants.
Those values generated by the HIDL HAL were duplicated, and should be
fixed.

Bug: 191825295
Bug: 194426536
Fix: 194426536
Test: atest android.media.tv.tuner.cts
Change-Id: Ife35bd0000b3aa864d6d0a7842536cad07f5ab9c
2021-08-02 12:02:25 -07:00
Kweku Adams
25650826d0 Open up PM.isLightDeviceIdleMode().
Bug: 159413914
Bug: 170611680
Test: atest DeviceIdleTest
Test: atest FrameworksMockingServicesTests:DeviceIdleControllerTest
Change-Id: Ie4f4148350fde8a8372433271bf00f8e1b804d52
2021-07-30 11:15:20 -07:00
Hyundo Moon
27c9c79f81 Add public add/removeOnMediaKeyEventSessionChangedListener
The MediaSessionManager has two system APIs
 - addOnMediaKeyEventSessionChangedListener
 - removeOnMediaKeyEventSessionChangedListener
which listen the media key session updates.

Since the APIs require MEDIA_CONTENT_CONTROL permission,
non-system apps could not use the APIs.

This CL adds an overloaded version of those APIs so that apps with
enabled notification listener can use the functionality.

Bug: 187483932
Test: Passed MediaSessionManager(Host)Test
Change-Id: Ic13353983e23f557afaa13eb11a48e48d24d4358
2021-07-30 12:18:20 +09:00
Lucas Dupin
8a9cb5d1ab Merge "Mark parameter as nullable" 2021-07-28 02:42:24 +00:00
Vadim Caen
31c434c4c4 Merge "Do not draw icon background if it shouldn't be seen" into sc-dev am: ee08a68fd4 am: f8c126c59f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15175437

Change-Id: I4854e54cfde40c6f50a27e8d481c7e025d692b5f
2021-07-27 10:37:47 +00:00
Charles Chen
8f89f04da3 Merge "Promote TaskFragment APIs to TestAPi" into sc-v2-dev am: a2dd624950 am: ccf4f90295
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15255747

Change-Id: I47eef271f9afc5b9b099a248380bb8af46388a0c
2021-07-27 06:48:05 +00:00
Charles Chen
ccf4f90295 Merge "Promote TaskFragment APIs to TestAPi" into sc-v2-dev am: a2dd624950
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15255747

Change-Id: I6f63fdf388550a15ab8ae69fc0c5dc93cf65ffca
2021-07-27 06:33:04 +00:00
Tianjie Xu
36bf6a2e8c Merge "Add a system API UpdateEngine to switch the slot back and forth" am: 4eaa49eeb6 am: 7c7696cd47 am: 547296b419 am: ee4e466a09
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1698090

Change-Id: I20516865284f9c4c2fc24e5b28a40a38dcd1a9a0
2021-07-27 03:16:50 +00:00
Tianjie Xu
ee4e466a09 Merge "Add a system API UpdateEngine to switch the slot back and forth" am: 4eaa49eeb6 am: 7c7696cd47 am: 547296b419
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1698090

Change-Id: Ic218ff3aeed857379ef69026f7f29206df70560b
2021-07-27 03:03:22 +00:00
Tianjie Xu
547296b419 Merge "Add a system API UpdateEngine to switch the slot back and forth" am: 4eaa49eeb6 am: 7c7696cd47
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1698090

Change-Id: Iea96fe5411794ca3a95031661edea581c3334b6b
2021-07-27 02:42:21 +00:00
Tianjie Xu
4eaa49eeb6 Merge "Add a system API UpdateEngine to switch the slot back and forth" 2021-07-27 02:03:10 +00:00
Charles Chen
9dfcf46ab9 Promote TaskFragment APIs to TestAPi
... to verify their behaviors in CTS
Also wraps ITaskFragmentOrganizer to TaskFragmentOrganizerToken
because we cannot make .aidl a TestApi.

Test: presubmit
Bug: 192442647

Change-Id: I848a33340449189af7d9d66a6468a9e397a0f53a
2021-07-26 16:13:20 +08:00
Vadim Caen
496b4cbb86 Do not draw icon background if it shouldn't be seen
Test: atest CtsWindowManagerDeviceTestCases:SplashscreenTests
Bug: 193608336
Change-Id: I824137e67eaa0133337fcaf55c44fca46bac8010
2021-07-23 13:27:11 +02:00
Kweku Adams
5f49564deb Merge "Improve forEach." 2021-07-21 18:36:16 +00:00
Pablo Soëtard
54b4ad9923 Merge "Deprecating ACTION_STATE_USER_SETUP_COMPLETE" 2021-07-21 11:53:53 +00:00
Tianjie
fdf7b58a43 Add a system API UpdateEngine to switch the slot back and forth
In some cases, the OTA update want to flip the slot to source
without cancelling the entire update. The functionality was
achieved by ResetStatus(). However ResetStatus() will clean up
the update progress and free up space to support virtual A/B.

Details in http://go/no-virtual-ab-switch-off

Test: build
Bug: 187321613
Change-Id: I2abcf8289f5fd573d2b55fa7004ab4dcd175252f
2021-07-20 15:29:37 -07:00
SongFerngWang
4a66d8e542 Changing DEVICE_NR_CAPABILITY type and renaming getMaxActiveInternetData
DEVICE_NR_CAPABILITY_*: Using int array instead of bitmask
Rename getMaxActiveInternetData and remove SystemAPI
Rename getMaxActivePacketSwitchedVoiceCalls

Bug: 180419672
Test: atest CtsTelephonyTestCases:android.telephony.cts.TelephonyManagerTest#testGetPhoneCapabilityAndVerify
atest CellularNetworkValidatorTest
atest PhoneCapabilityTest
atest PhoneSwitcherTest
atest TelephonyRegistryTest

Change-Id: Ia394537ec57900a410b283ddffdcead017e6d9c6
Merged-In: Ia394537ec57900a410b283ddffdcead017e6d9c6
2021-07-21 01:37:58 +08:00
SongFerngWang
0c13fd19ec Add getPhoneCapability function in TelephonyManager
- Add a resource for Device's Nr information.
- Expose below as systemApi
  - getDeviceNrCapabilityBitmask()
  - getMaxActiveInternetData()
  - getMaxActivePacketSwitchedVoiceCalls()
Bug: 175711587
Test: atest TelephonyManager#testGetPhoneCapability
atest PhoneCapabilityTest
atest PhoneConfigurationManagerTest
atest CellularNetworkValidatorTest
atest PhoneSwitcherTest
atest TelephonyRegistryTest
atest PhoneCapabilityTest

Change-Id: Ide25344787c15b3a57a9e6621766ad02a906f12e
Merged-In: Ide25344787c15b3a57a9e6621766ad02a906f12e
2021-07-20 23:59:19 +08:00
Pablo Soëtard
89475fb3e5 Deprecating ACTION_STATE_USER_SETUP_COMPLETE
Deprecating ACTION_STATE_USER_SETUP_COMPLETE that was previously used in the NFC provisioning flow, now the NFC provisioning flow uses the admin integrated flow and no longer launches an intent with this action when user provisioning completes.

Test: No tests needed
Bug: 192228539
Change-Id: I6849b9de72f13735995156e1a02a778cf66cf208
2021-07-20 10:22:01 +00:00
TreeHugger Robot
58a70958aa Merge "Remove LOCATION_HARDWARE from ContextHubManager/Client APIs" 2021-07-20 01:30:51 +00:00
Arthur Ishiguro
bef1b62ac0 Remove LOCATION_HARDWARE from ContextHubManager/Client APIs
Fixes: 191483162
Test: Run PTS tests on existing CHRE devices
Test: Flash on device, verify no security exception is observed
Change-Id: I405423c0981ae2618faa35fd2df9c068d6ead94a
2021-07-19 23:55:37 +00:00
TreeHugger Robot
1f862b0ac0 Merge "Expose ADAS APIs" 2021-07-19 23:08:10 +00:00
Kweku Adams
14bbb8a744 Improve forEach.
The default implementation of Collection.forEach() uses the
iterator(). Switch to straight iterating through the array since the
iterator is an inefficient way to access the array contents.

Benchmark results:

Before:

android.util.ArraySetPerfTest#testForEach_Large:
	forEach_Large_median (ns): 398480
	forEach_Large_min (ns): 395758
	forEach_Large_mean (ns): 400957
	forEach_Large_standardDeviation: 5457
android.util.ArraySetPerfTest#testForEach_Small:
	forEach_Small_min (ns): 82768
	forEach_Small_median (ns): 83884
	forEach_Small_standardDeviation: 896
	forEach_Small_mean (ns): 83724

After:

android.util.ArraySetPerfTest#testForEach_Large:
	forEach_Large_median (ns): 319481
	forEach_Large_min (ns): 316166
	forEach_Large_mean (ns): 339865
	forEach_Large_standardDeviation: 44201
android.util.ArraySetPerfTest#testForEach_Small:
	forEach_Small_min (ns): 58736
	forEach_Small_median (ns): 60648
	forEach_Small_standardDeviation: 1375
	forEach_Small_mean (ns): 60622

Bug: 194098491
Test: atest CorePerfTests:ArraySetPerfTest (see results above)
Test: atest CtsUtilTestCases:ArraySetTest
Test: atest FrameworksCoreTests:ArraySetTest
Change-Id: Ib14b96f095203e1f5811132f2a21be0452645f7e
2021-07-19 13:10:23 -07:00
Treehugger Robot
54c9ff981e Merge "Added Ble scan APIs to BatteryStatsManager" 2021-07-19 15:32:41 +00:00
Remi NGUYEN VAN
8608d0626e Merge "Rename FIRST_SDK_INT to DEVICE_INITIAL_SDK_INT" 2021-07-19 09:47:21 +00:00
Colin Cross
e2907e5906 Merge "Rename VERSION_CODES.T to VERSION_CODES.TIRAMISU" into sc-dev-plus-aosp am: 3a873acfec am: 98f6af0e19
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15304989

Change-Id: Id39862a791e67c9c47c33b9aca5adefd08d428a5
2021-07-16 19:30:25 +00:00
Colin Cross
98f6af0e19 Merge "Rename VERSION_CODES.T to VERSION_CODES.TIRAMISU" into sc-dev-plus-aosp am: 3a873acfec
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15304989

Change-Id: I71bd32519b13efa53456ef1839f5ccb03dc25229
2021-07-16 19:12:15 +00:00
Colin Cross
3a873acfec Merge "Rename VERSION_CODES.T to VERSION_CODES.TIRAMISU" into sc-dev-plus-aosp 2021-07-16 19:02:01 +00:00
Antoan Angelov
3294ddb241 Merge "Transform NFC Intent to provisioning Intent" 2021-07-16 11:39:24 +00:00
Kriti Dang
832742e028 Merge "Make AudioManager.getReportedSurroundFormats a TestApi" into sc-dev am: 0077afd88a am: b4630c8743
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14840460

Change-Id: I5b2506d77e9d481fa698b5f710007b861127b4dd
2021-07-16 08:33:48 +00:00
Kriti Dang
b4630c8743 Merge "Make AudioManager.getReportedSurroundFormats a TestApi" into sc-dev am: 0077afd88a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14840460

Change-Id: Ie9d1c4e039ce547eca7f3e427fa80a6fc08a963d
2021-07-16 08:16:33 +00:00
Kriti Dang
4559e5b9d5 Merge "Make AudioManager.getReportedSurroundFormats a TestApi" into sc-dev am: 0077afd88a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14840460

Change-Id: I9ae1460e47528ffb38d00ed85a259d9e2e5077b6
2021-07-16 08:15:41 +00:00
Chris Li
0f958f85f1 Merge "Allow TaskFragmentOrganizer to apply WCT without permission" into sc-v2-dev am: 5849a2b5e3 am: b33c498d7d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15264526

Change-Id: I1736e89cc0b6a6b82dda877725f5481107d56136
2021-07-16 07:21:24 +00:00
Chris Li
b33c498d7d Merge "Allow TaskFragmentOrganizer to apply WCT without permission" into sc-v2-dev am: 5849a2b5e3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15264526

Change-Id: I8a431df7d6fb2004df6e32571fb08ce474a9cd92
2021-07-16 07:03:22 +00:00
Chris Li
5849a2b5e3 Merge "Allow TaskFragmentOrganizer to apply WCT without permission" into sc-v2-dev 2021-07-16 06:50:53 +00:00
Chris Li
d5555da37a Allow TaskFragmentOrganizer to apply WCT without permission
TaskFragmentOrganizer will be used by regular apps without the
permission to manage Task. We are allow it to apply transactions if it
is operating on TaskFragment that is organized by itself.

Bug: 193191599
Test: atest WmTests:TaskFragmentOrganizerControllerTest
Change-Id: I82e5d49260680bd496ff184c6795ec817c65d858
2021-07-15 13:07:14 -07:00
Kriti Dang
c9243c5948 Merge "Make AudioManager.getReportedSurroundFormats a TestApi" 2021-07-15 19:27:36 +00:00
Colin Cross
936833de0e Rename VERSION_CODES.T to VERSION_CODES.TIRAMISU
Bug: 186121492
Test: m checkbuild
Change-Id: Ic3e542206ae75626fa361333f00de2937ef18a5f
2021-07-15 11:54:37 -07:00
Lucas Dupin
482fbc3490 Mark parameter as nullable
This parameter has been nullable since when the API was introduced, but
it was not properly annotated like everywher else.

Fixes: 193225087
Test: m -j
Change-Id: I49e3d840f0cc7b5974059189a1e3eac201e8a5df
2021-07-15 10:49:12 -07:00
Colin Cross
92380ef500 Merge "Add android.os.Build.VERSION_CODES.T" into sc-dev-plus-aosp am: 3e1311a4b4 am: adb28d6357
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15286710

Change-Id: I4c55061aacf62269c985eef6623545986ffd1461
2021-07-15 17:26:01 +00:00