10184 Commits

Author SHA1 Message Date
Ling Ma
8827b92855 Merge changes from topic "truncate operator name" am: ffa0f982b6 am: 9cf73e369d am: eb897b1d85
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2004810

Change-Id: Ie1a67a1a9fae4dbbc321755f7ec9bde8bb84613f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-01 22:54:46 +00:00
Ling Ma
eb897b1d85 Merge changes from topic "truncate operator name" am: ffa0f982b6 am: 9cf73e369d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2004810

Change-Id: Ic3985aab30f06ce02ec01e43ce8a6c05abd419a2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-01 22:36:38 +00:00
Ling Ma
ffa0f982b6 Merge changes from topic "truncate operator name"
* changes:
  Truncate operator name to fit into SystemProp size
  Add truncateStringForUtf8Storage()
2022-04-01 21:43:23 +00:00
Vadim Caen
d0923a2197 Merge "Split animation methods out of OnBackInvokedCallback" into tm-dev 2022-04-01 20:13:30 +00:00
Vadim Caen
c627777dda Split animation methods out of OnBackInvokedCallback
This makes OnBackInvokedCallback SAM compatible

Bug: 227789359
Test: atest \
        CtsWindowManagerDeviceTestCases:android.server.wm.BackNavigationLegacyTest \
        CtsWindowManagerDeviceTestCases:android.server.wm.BackNavigationTests \
        WmTests:com.android.server.wm.BackNavigationControllerTests \
        FrameworksCoreTests:android.window.BackNavigationTest \
        FrameworksCoreTests:android.window.WindowOnBackInvokedDispatcherTest \
        CtsViewTestCases:android.view.cts.OnBackInvokedDispatcherTest
Change-Id: Iab86b0488f1b3048eb02042191acaeb6a645a0bc
2022-04-01 20:09:26 +00:00
Ling Ma
58d9786a64 Add truncateStringForUtf8Storage()
Test: manual
Bug: 210502588
Change-Id: I5d4ded0cb30151bc567cfedcdb1bbbdb9abdca9b
2022-03-31 18:57:05 -07:00
Jernej Virag
6ad5af88f2 Merge "Add code OWNERS to test OWNERS for internal widgets" am: c207bdcf5f am: 04c7193fb1 am: 789701fb45
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2051242

Change-Id: I803f5aabf39fb36d4f1f975de75b22a1789c0df0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-31 20:36:15 +00:00
Jernej Virag
789701fb45 Merge "Add code OWNERS to test OWNERS for internal widgets" am: c207bdcf5f am: 04c7193fb1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2051242

Change-Id: Id7458a889e8b084a260b18f56db315ee1317b3a6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-31 19:59:30 +00:00
Treehugger Robot
f8adc1692b Merge "[DeviceConfig] cherry-pick deleteProperty SystemApi" am: 6ff14106fc am: ab9e828a43
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2040764

Change-Id: Id0b7cb4f43df62a2a900fc0eab016aeb1a08c89c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-31 19:22:46 +00:00
Jernej Virag
c207bdcf5f Merge "Add code OWNERS to test OWNERS for internal widgets" 2022-03-31 19:11:07 +00:00
Treehugger Robot
6ff14106fc Merge "[DeviceConfig] cherry-pick deleteProperty SystemApi" 2022-03-31 18:39:09 +00:00
Jernej Virag
ba5392ca14 Add code OWNERS to test OWNERS for internal widgets
This should prevent long review times because test ownership doesn't match code ownership.

Test: n/a
Change-Id: I59812d77db671ee39906df009a918f2881259eab
2022-03-31 15:10:53 +00:00
Adrian Roos
fe61c9af90 VirtualDisplayTest: Rethrow runOnUiThread exceptions on test thread
Catches and rethrows exceptions on the test thread to
avoid taking down the entire instrumentation test when
tests fail.

Bug: 223843046
Test: atest VirtualDisplayTest
Change-Id: I78b6777ff3cabc532cd73390cc5b4c23f64ae127
2022-03-31 15:40:23 +02:00
Jernej Virag
0c36369480 Merge "Fix handling of negative size request for Bitmaps in LocalImageResolver" into tm-dev 2022-03-31 11:29:01 +00:00
TreeHugger Robot
9519e3c94a Merge "Fix VirtualDisplayTest failures" into tm-dev 2022-03-31 08:57:14 +00:00
Hiroki Sato
2c06ff3da8 Merge changes from topics "presubmit-am-166ca8e59ac8499bb6b4f4cad6aae045", "presubmit-am-1a825bf4d182432b91541a8629e0e351" into tm-dev
* changes:
  Add private API InputMethodManager#reportVirtualDisplayGeometry
  Reland CursorAnchorInfo#createForAdditionalParentMatrix()
2022-03-31 00:15:59 +00:00
Jorim Jaggi
cd106a5aa7 Merge "Fix overcounting after end in case of incomplete callbacks" into tm-dev 2022-03-31 00:07:42 +00:00
TreeHugger Robot
c80324f62a Merge "Add method PrintManager#isPrintServiceEnabled(ComponentName)" into tm-dev 2022-03-30 22:41:09 +00:00
Jernej Virag
26e492cc4b Fix handling of negative size request for Bitmaps in LocalImageResolver
Requesting negative sized bitmap should mean "no restrictions" and not "please resize to -1x-1". This fixes the corner case for pure bitmaps.
Also reduce severity of logging when we're falling back to non-ImageDecoder load since that's not a catastrophic failure.

Bug:227103943
Bug:227008805

Test: tested on device with Notify1.apk while reproducing the issue
      atest LocalImageResolver with new tests
Change-Id: I581d3e637fcafaba68856738f90cc72c42442d60
2022-03-30 14:44:55 +00:00
yuanjiahsu
ad1bf17965 Don't register playback/recording change if caller doesn't care it
When calling VirtualDeviceManager#createVirtualAudioDevice(), if the
caller pass null AudioConfigurationChangeCallback parameter, it means
the caller doesn't care the audio playback/recording change in virtual
display, and we should not register it with AudioManager for
optimization.

Bug: 218528439
Test: atest CtsVirtualDevicesTestCases
Change-Id: I00120f2506f593100ef8c523a4f6addffe46597b
2022-03-30 04:10:17 +00:00
Erik Wolsheimer
b7b880315a Add method PrintManager#isPrintServiceEnabled(ComponentName)
Bug: 180582919
Test: atest FrameworksCoreTests
Change-Id: I2f7e87d9e56f3abc22c04eee3e0863d5de48a9f9
2022-03-29 21:38:35 +00:00
TreeHugger Robot
93ac91554a Merge "Fix mobile radio battery consumption double counting" into sc-v2-dev am: f709e34b90 am: 9d9976b68f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17206575

Change-Id: I9c301bd9e347fedaa1a04ce8f2e50fda402ece4d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-29 20:54:57 +00:00
TreeHugger Robot
9d9976b68f Merge "Fix mobile radio battery consumption double counting" into sc-v2-dev am: f709e34b90
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17206575

Change-Id: I472e4dc6a9b0ae0f8f76e2b620ec59e53aba0b3a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-29 20:39:43 +00:00
TreeHugger Robot
f709e34b90 Merge "Fix mobile radio battery consumption double counting" into sc-v2-dev 2022-03-29 20:19:40 +00:00
Hiroki Sato
62af809a65 Reland CursorAnchorInfo#createForAdditionalParentMatrix()
This logically relands the CL [1], which added an @hide method
CursorAnchorInfo#createForAdditionalParentMatrix().
The corresponding change was once removed in [2].
This is a preparation to reland a change that supports
InputMethodManager#reportActivityView() again.

[1] Ic7f9057623ffc61ec7a6121735dc39adecf4649d
[2] I0a05453eeed863db5bfe4b965ab4bcbad67f2783

Bug: 224424149
Test: CursorAnchorInfoTest
Change-Id: I0a411453c7c26795d28e913a96be8eb8fa3684d7
2022-03-28 20:03:15 +09:00
Jorim Jaggi
7e9b844f52 Fix overcounting after end in case of incomplete callbacks
The original intent of the code was to wait until we get one frame
with end vsync id or beyond end vsync id with both HWUI and SF
callbacks being reported such that we can ensure that our data
collection is complete.

However, the logic unintentionally started janky frames after the
end in case there were callbacks missing on the end vsync id,
leading to skewed metrics.

Also expand unit tests to verify jank number results.

Test: FrameTrackerTest
Fixes: 223787365
Change-Id: I90948d9ab2d44bf805e78f5611e072a7cc9ae0cd
2022-03-25 23:02:58 +00:00
Charles Chen
25704b6ac3 Fix VirtualDisplayTest failures
The failures are due to legacy behaviors in the test, which includes:
1. Use Toast without managed token
2. Show presentation on the default display

Currently, we need a managed window token for toast, and also the
display to show preentation should be a presentation display.
A built-in display isn't a presentation display by default.

In this CL, we
1. Use the default window type for Presentation
2. Use fullscreen overlay dialog on the default display
to fix this test

Bug: 223843046
Test: atest VirtualDisplayTest

Change-Id: Ifa790a3436ed487f4af79296e47a900d62cea375
2022-03-25 14:58:48 +08:00
Mark Renouf
fe4b81853e Merge "Remove permission token from startActivityAsCaller" into tm-dev 2022-03-25 02:32:08 +00:00
Muhammad Qureshi
bbc750f010 [DeviceConfig] cherry-pick deleteProperty SystemApi
This is a cherry-pick of deleteProperty SystemApi that is already added
in internal branches.

Currently there is only a shell command to delete a property.
Adding an API to do the same.

Bug: 184001163
Bug: 226423598
Test: atest android.provider.DeviceConfigTest
Change-Id: I43d7177c509501efd65e32ab3ad000d17d6ffb6c
Merged-In: I43d7177c509501efd65e32ab3ad000d17d6ffb6c
2022-03-24 11:50:37 -07:00
Michael Wachenschwanz
adfc51a554 Utilize specific info provided by the Modem HAL
ModemActivityInfo can now include Radio Access Technology specific information, if the HAL supports it.
If available, utilize the information.

Bug: 207697945
Test: atest BatteryStatsNoteTest
Change-Id: Ifbd3c8cca7baa35cbccf64883ae5ce87ae39ab74
2022-03-23 18:37:50 -07:00
Michael Wachenschwanz
7dd534b98a Merge "Ref count isolated uid use for long partial wakelocks" into tm-dev 2022-03-23 20:25:44 +00:00
Mark Renouf
05a2ef2647 Remove permission token from startActivityAsCaller
The call is protected by the signature permission
START_ACTIVITY_AS_CALLER. This will remove the need for additional data
to be passed from system server.

Bug: 222082547
Bug: 226354782
Test: atest ActivityTaskManagerServiceTests, atest ChooserActivityTest,
      manual testing
Change-Id: I94f34a68e390569ec14dfebb1902a7c30558864f
2022-03-23 14:55:01 +00:00
Jernej Virag
d27d7fe051 Merge changes from topic "revert-17199637-revert-17083643-large-icons-tm-XHQQYXZDHH-KIGUXQGTHZ" into tm-dev
* changes:
  Size restrict right notification icon size
  Downscale large bitmaps in CachingIconView
  Support downscaling of Drawable icons in LocalImageResolver
2022-03-22 20:07:04 +00:00
Jigar Thakkar
15d9e17074 Merge "Fix BatteryStatsHistoryTest for low ram devices" into tm-dev 2022-03-22 11:10:28 +00:00
Michael Wachenschwanz
7589e541d1 Ref count isolated uid use for long partial wakelocks
The isolated uids need to be kept in the map while it is holding a long
partial wakelock.

Bug: 218298973
Test: atest BatteryStatsNoteTest
Change-Id: I86456137e6d6ad47f9974da281defc04d20fb32f
(cherry picked from commit fd48aa6fa6a87e0e159aca7ca8a429c47905291b)
Merged-In: I86456137e6d6ad47f9974da281defc04d20fb32f
2022-03-22 00:31:53 +00:00
Michael Wachenschwanz
05dcf05246 Fix mobile radio battery consumption double counting
On ODPM enabled devices, the total mobile radio power consumption was
being used when reporting the idle/suspended power. This means app
mobile radio power consumption was effectively being double counted.

Bug: 209525694
Test: atest MobileRadioPowerCalculatorTest
Change-Id: Ibc1a504014ac10c285b71273ba50493ba237f6a9
Merged-In: Ibc1a504014ac10c285b71273ba50493ba237f6a9
2022-03-21 23:45:31 +00:00
Presubmit Automerger Backend
67266c9682 [automerge] Ref count isolated uid use for long partial wakelocks 2p: f548942f3f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17229945

Bug: 218298973
Change-Id: I1f7c23a58c725917cf27a85a4ec3b02e8a44af19
Merged-In: I86456137e6d6ad47f9974da281defc04d20fb32f
2022-03-21 23:00:19 +00:00
Michael Wachenschwanz
f548942f3f Ref count isolated uid use for long partial wakelocks
The isolated uids need to be kept in the map while it is holding a long
partial wakelock.

Bug: 218298973
Test: atest BatteryStatsNoteTest
Change-Id: I86456137e6d6ad47f9974da281defc04d20fb32f
(cherry picked from commit fd48aa6fa6a87e0e159aca7ca8a429c47905291b)
Merged-In: I86456137e6d6ad47f9974da281defc04d20fb32f
2022-03-21 15:48:23 -07:00
Jernej Virag
6f2b34baf8 Downscale large bitmaps in CachingIconView
CachingIconView is used to displayed (smallish) icons in Notifications. Those can accidentally be made very large if big resources are used.
This makes CachingIconView use LocalImageResolver to load those images with limited size. This fixes large memory use of notification header icons.

Bug: 210690571
Bug: 218845090

Test: atest CachingIconViewTest
      atest NotificationManagerTest
      Verified with notification test APK on a Pixel

Change-Id: Ia37c1fd31a7720e6ec2fd20d7466d8dcaffa6507
2022-03-21 13:39:08 +00:00
Jernej Virag
698325914e Support downscaling of Drawable icons in LocalImageResolver
LocalImageResolver only enforced downscaling for Uri-based Icons at this point. This still allowed app developers to provide large bitmaps as a resource or as a bitmap payload itself. This change also verifies these new types of bitmaps.
Also adds an external size parameter to image resolver so different widgets can use it - right now the upper limit was hardcoded in pixels.

This also updates error handling - in some cases ImageDecoder would throw NullPointerException or NotFoundException except for promised IOException. This wraps those cases into more consistent API.

Bug:218845090
Bug:210690571
Bug:224768026

Test: Manually on device - tested on Raven and new Pixel with multiple
                       notification sizes via notification test apk.
      atest LocalImageResolver
      atest NotificationManagerTest

Change-Id: I4701d58ac3335d11a93355a39cee9f5c998eb830
2022-03-21 13:38:50 +00:00
Charles Chen
8c1fad0d74 Merge "Fix #testChangeFontScaleNoRelaunch flaky" into tm-dev 2022-03-21 08:51:45 +00:00
Kholoud Mohamed
a8e9aa390d Merge changes from topic "apiFeedback" into tm-dev
* changes:
  RESTRICT AUTOMERGE Refactor device policy resource APIs to a separate class
  RESTRICT AUTOMERGE move device policy resource APIs to a separate class
  RESTRICT AUTOMERGE hide device policy resources constants
2022-03-19 06:30:43 +00:00
Treehugger Robot
00b739940f Merge "Make testMultipleMessagesDispatched slightly less overspecified." am: b9787b1ea7 am: 8b8ff9f5f6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2030263

Change-Id: If9992846179a9dc3725cfb9d3443a6985460e71e
2022-03-19 02:05:13 +00:00
Treehugger Robot
b9787b1ea7 Merge "Make testMultipleMessagesDispatched slightly less overspecified." 2022-03-19 01:31:51 +00:00
kholoud mohamed
b7aedc6f3d RESTRICT AUTOMERGE Refactor device policy resource APIs to a separate class
Bug: 217388602
Bug: 218875965
Test: atest EnterpriseResourcesTests
Test: manual
Change-Id: I8af03136e67057d171e97cb5a43187aa6c7f4fe7
2022-03-19 00:22:17 +00:00
TreeHugger Robot
1b58550351 Merge changes from topics "presubmit-am-859dd3744ae243f9a8cb2f6234a9ef1e", "register_api" into tm-dev
* changes:
  Change parameter order to make it SAM compatible
  Fix a problem that Dialog does not close in new dispatch.
2022-03-18 17:04:05 +00:00
Neil Fuller
ad7b8429d0 Merge "Add the ability to configure NTP port for tests" am: 72e04a7dc2 am: 53d21a8591 am: 0fa758c3b8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2030083

Change-Id: Ib22fde6cf8bfba028d286647b10b1d2885d78c9d
2022-03-18 12:49:40 +00:00
Neil Fuller
0fa758c3b8 Merge "Add the ability to configure NTP port for tests" am: 72e04a7dc2 am: 53d21a8591
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2030083

Change-Id: Ia24fc0a73f74756a8b764961f5ac6023f478f327
2022-03-18 12:28:29 +00:00
Neil Fuller
72e04a7dc2 Merge "Add the ability to configure NTP port for tests" 2022-03-18 11:48:29 +00:00
Lorenzo Colitti
59df852062 Merge "Make testMultipleMessagesDispatched slightly less overspecified." into tm-dev 2022-03-17 22:15:31 +00:00