Commit Graph

21705 Commits

Author SHA1 Message Date
TreeHugger Robot
bb93951990 Merge "Move CtsContentTestCases to group presubmit-large" into sc-dev am: a9a177e057 am: dd9121aaf6 am: 5150b2b56c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16709491

Change-Id: I7f5b843e8a7c1c944ffc088556c64889e781e84f
2022-01-27 19:05:33 +00:00
TreeHugger Robot
5150b2b56c Merge "Move CtsContentTestCases to group presubmit-large" into sc-dev am: a9a177e057 am: dd9121aaf6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16709491

Change-Id: I24513de281029178f2cdd9360ce87ed4d8eb210c
2022-01-27 18:47:46 +00:00
TreeHugger Robot
dd9121aaf6 Merge "Move CtsContentTestCases to group presubmit-large" into sc-dev am: a9a177e057
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16709491

Change-Id: I23f8aac37dde7a9390d8ff478122b13eb99275a2
2022-01-27 18:29:12 +00:00
Hans Boehm
db7bb39fb9 Merge "Prefer WeakReference.refersTo() to get()" am: 63e3c2c709 am: aca7bb4b9f am: a2e1dc8b9a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1956816

Change-Id: I449eec7c2bc21bfa5c7909a4508fbf899a59040d
2022-01-27 01:01:31 +00:00
Hans Boehm
a2e1dc8b9a Merge "Prefer WeakReference.refersTo() to get()" am: 63e3c2c709 am: aca7bb4b9f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1956816

Change-Id: I626a291208a3063b93cdd0ef1de131162cc916cb
2022-01-27 00:50:30 +00:00
Hans Boehm
63e3c2c709 Merge "Prefer WeakReference.refersTo() to get()" 2022-01-27 00:22:02 +00:00
Sooraj Sasindran
c14b38c9de Merge "Add device poliy manager support for profile network preference" am: 416fd5f440 am: 58dc5d1cb4 am: cde52bd800
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1947228

Change-Id: I9506d2612679473203977afa1aa1d47d750e21e0
2022-01-25 18:16:11 +00:00
Sooraj Sasindran
cde52bd800 Merge "Add device poliy manager support for profile network preference" am: 416fd5f440 am: 58dc5d1cb4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1947228

Change-Id: I2888c07e7a0e89f2005e13a8aab02c868587c307
2022-01-25 17:59:24 +00:00
Sooraj Sasindran
14074e8a2c Add device poliy manager support for profile network preference
Change-Id: If3f28dfdd731dddf2d2a7516d6479359a5454b83

Bug: 194332512
CTS-Coverage-Bug: 215722242
Test: unit test
Change-Id: Ibe680d47548e0f17979301ccbbac98a79c9031ac
2022-01-24 19:24:15 -08:00
Jackal Guo
7172238add Move CtsContentTestCases to group presubmit-large
The test config takes longer than 900 seconds to run. Move it to a
dedicated group for running slow presubmit Test Mapping test.

Some more context is in the referenced bug, e.g, b/174495337
The group will work exactly the same as presubmit for now.

Bug: 174654670
Bug: 174495337
Fix: 215431363
Fix: 215549069
Test: treehugger
Change-Id: Id9769bbc625b42257af603d69098ae69c0fabb80
Merged-In: Id9769bbc625b42257af603d69098ae69c0fabb80
(cherry picked from commit ccc91c4fa9)
2022-01-24 23:45:31 +08:00
Junyu Lai
0fd819f75f Merge "[MS66] Initialize TrafficStats with context" am: a411d32226 am: 71aca9af8f am: db3f98710b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1956077

Change-Id: Ide5f7ac8fb4ebafbe797e9d8d13662844d1b4bfd
2022-01-22 00:48:35 +00:00
Sharon Su
2fff06e2cf Merge "Create directories for wallpaper effects generation api and and owners files. Bug: 213238425 Test: meta file change" am: 3166def10f am: 58e37e59d1 am: 9075544cd1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1955206

Change-Id: Ie939bcf302fc7f6939e2ac84352490ba9a324fc4
2022-01-22 00:48:06 +00:00
Junyu Lai
db3f98710b Merge "[MS66] Initialize TrafficStats with context" am: a411d32226 am: 71aca9af8f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1956077

Change-Id: I6dbe1599e1eddb7cf5fc1cc396862c66c0ea0c94
2022-01-22 00:31:34 +00:00
Sharon Su
9075544cd1 Merge "Create directories for wallpaper effects generation api and and owners files. Bug: 213238425 Test: meta file change" am: 3166def10f am: 58e37e59d1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1955206

Change-Id: Ib20ed16717dca5a44c31aa1cdd7221bf17e5f9a8
2022-01-22 00:31:15 +00:00
Junyu Lai
a411d32226 Merge "[MS66] Initialize TrafficStats with context" 2022-01-22 00:06:17 +00:00
Sharon Su
3166def10f Merge "Create directories for wallpaper effects generation api and and owners files. Bug: 213238425 Test: meta file change" 2022-01-22 00:05:24 +00:00
Junyu Lai
de9cf3392d [MS66] Initialize TrafficStats with context
TrafficStats has static methods created in API level 8 that need
access to NetworkStatsManager but doesn't take a context.
Previously this was achieved by using ServiceManager, but
with TrafficStats moving to the connectivity module, this
is no longer possible.

Instead, make sure TrafficStats has an appropriate context by
the time any client code can call the relevant methods.
• In app code, this achieved by passing the application
  context from ActivityThread#handleBindApplication, before any
  app code can run.
• In the system server, this is achieved by passing the context
  right after creating service.

Test: atest TrafficStatsTest CtsWebkitTestCases
Bug: 204830222

Change-Id: I251bb8a4431ad12ff61929879ef1363cf06b9244
2022-01-22 01:01:49 +08:00
Makoto Onuki
74c9443579 Merge "*ServiceStartNotAllowedException shouldn't have a "cause"" into sc-v2-dev 2022-01-21 16:04:24 +00:00
Makoto Onuki
e098aec346 Merge changes from topic "presubmit-am-8bb7303602ce4e5599c16939f20f4126" into sc-v2-dev-plus-aosp
* changes:
  [automerge] *ServiceStartNotAllowedException shouldn't have a "cause" 2p: d4396b9a9d
  *ServiceStartNotAllowedException shouldn't have a "cause"
2022-01-21 16:04:24 +00:00
Chilun Huang
f6ed082d5a Merge "Add error handling for onConfigurationChanged" into sc-v2-dev am: bca4bd6bab
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16682144

Change-Id: I7acd8a1e3a0543faa1eab52fe030a988a76f5ac6
2022-01-21 07:00:09 +00:00
Hans Boehm
3492061b6d Prefer WeakReference.refersTo() to get()
This is an initial pass over frameworks/core to avoid WeakReference
get(), since that can cause the referent to be unnecessarily retained.
Most of these were found by searching for "get() == null".

Bug: 215259836
Test: Treehugger
Change-Id: I5227b05ca22e83b886ccf6713989961076df3f8c
2022-01-20 17:57:02 -08:00
Makoto Onuki
de8864a11e [automerge] *ServiceStartNotAllowedException shouldn't have a "cause" 2p: d4396b9a9d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16682150

Bug: 210890426
Change-Id: I6d86fd848e337e17536284dee95f628094073c89
2022-01-20 22:30:42 +00:00
Makoto Onuki
d4396b9a9d *ServiceStartNotAllowedException shouldn't have a "cause"
Bug: 210890426
Test: Manual test with a test app, received this exception and
made sure cause isn't set.
Change-Id: I94ba39c775cf95074907db6814104289a577d496
Merged-in: I94ba39c775cf95074907db6814104289a577d496
2022-01-20 22:29:52 +00:00
Dave McCloskey
527df1e011 Merge "Add OWNERS file for TrustManager et al." am: 20b5b3c157 am: c55ff91842 am: e1ba468150
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1955199

Change-Id: I439349ce0a39f69f4124008c745263d478dd470e
2022-01-20 18:24:50 +00:00
Dave McCloskey
e1ba468150 Merge "Add OWNERS file for TrustManager et al." am: 20b5b3c157 am: c55ff91842
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1955199

Change-Id: Idbc53525235c7bee9a323c1ee6e3c167cc50d7ce
2022-01-20 18:20:24 +00:00
Chilun
cca803cba8 Add error handling for onConfigurationChanged
The new config may comes before mApplication is assigned. Add the error
handling to prevent the crash.

Bug: 211031909
Test: Launch app without crash
Change-Id: Iba5d1be0e6cb182b5f503f5aa827eb2967834d52
2022-01-20 23:39:13 +08:00
Sharon Su
fd184683cb Create directories for wallpaper effects generation api and and owners
files.
Bug: 213238425
Test: meta file change

Change-Id: Ibdd21969f4cbd30c68f933ea4515358173307919
2022-01-20 01:07:27 +00:00
Dave McCloskey
b90933a1cc Add OWNERS file for TrustManager et al.
Test: m

Change-Id: I8045e9518a05d3d29811153b22c94e920e1e6335
2022-01-19 15:17:04 -08:00
Wu Ahan
dcf263a2bc Revert "DO NOT MERGE: Decode the input of both setStream and setResource calls first" am: 4c5f09cab3 am: 96c0c34fb9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16630307

Change-Id: Ic8ec587e86ec11f8d0fe8b1b4bce756c7f813d66
2022-01-19 22:34:15 +00:00
Wu Ahan
96c0c34fb9 Revert "DO NOT MERGE: Decode the input of both setStream and setResource calls first" am: 4c5f09cab3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16630307

Change-Id: If81af003f6b9c82e42076a38196787e7ba9dea6a
2022-01-19 22:15:57 +00:00
TreeHugger Robot
edb3c9e738 Merge "Revert "Decode the input of both setStream and setResource calls first"" into sc-v2-dev am: 613dfbf465
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16630306

Change-Id: I8776eeb1756d32d748596c6d1da914c21c559ece
2022-01-19 22:14:13 +00:00
TreeHugger Robot
613dfbf465 Merge "Revert "Decode the input of both setStream and setResource calls first"" into sc-v2-dev 2022-01-19 21:26:40 +00:00
TreeHugger Robot
9edf1a7140 Merge "Revert "DO NOT MERGE: Decode the input of both setStream and setResource calls first"" into sc-dev 2022-01-19 21:26:30 +00:00
TreeHugger Robot
4b30a3ee91 Merge "Fix IME shrunk by WindowTokenClient mis-detach" into sc-v2-dev am: ff6577fd10
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16598426

Change-Id: I2e7b34abfe7769160c383a0774cf3bb9635c46e2
2022-01-15 04:39:36 +00:00
TreeHugger Robot
ff6577fd10 Merge "Fix IME shrunk by WindowTokenClient mis-detach" into sc-v2-dev 2022-01-15 04:27:54 +00:00
Ming-Shin Lu
29de30597b Fix IME shrunk by WindowTokenClient mis-detach
As CL[1] introduced WindowTokenClient for WindowProviderService (aka the
parent class of InputMethodService starts from CL[2]) as a token that
IME context can associate with the windowContainer of
the InputMethod window in server side. Like the activity context,
IME context can adopt configuration/resources update when the IME
window changed by display/window changes.

And, the IME context caller can also create another type of context
with wrapping IME context (i.e. calling createDisplayContext to create
a display context), that makes this context can be mixed the window
token of WindowProviderService since it's the base context.

However, the finalization of the context mixed WindowTokenClient
will detach the token when the attached context type is non-window
context, this action will mis-detach the token when it managed by
WindowProviderService.

So like SoftKeyboard previously using
createDisplayContext in CL[3] to workaround context resources issues,
will in-directly expose this mis-detach token issue as the above.

Beside, the handling of WindowTokenClient#{onConfigurationChange,
onWindowTokenRemoved} does not thread-safe since this is called from
IPC.

As the result, the fix is to ignore the check in ContextImpl#finalize
to not detach the token when it managed by WindowProviderService,
also make sure to post to the main handler when received
onConfigurationChanged/onWindowTokenRemoved in WindowTokenClient.

Note that this fix could help to resolve "The Window Context should
have been attached to a DisplayArea." exception if the token has been
detached as the above case that happens before the next
WindowProviderService#attachToWindowToken invoked.

[1]: I64a1614f32d097785915f6105b1813a929e0fe32
[2]: Ie565e30ed5dd3f2cfe27355a6dded76dc3adc14b
[3]: Ic592a1d2fb2da149220c8b503b522b3e864bcc77

Bug: 213118079
Bug: 211062619
Test: manual as steps:
1) adb install -r EditTextVariations.apk
2) adb install -r SoftKeyboard.apk
3) adb shell ime enable com.example.android.softkeyboard/.SoftKeyboard
4) adb shell ime set com.example.android.softkeyboard/.SoftKeyboard5
5) Enable screen auto-rotation
6) Launch EditTextVariations from launcher's shortcut
7) Tap the first EditText field to show IME
8) Rotate the device to the landscape mode
9) Expect the IME should not be shrunk

Change-Id: I7beb7a122af93e596239a36db62073233cea0726
2022-01-14 12:49:13 +00:00
Mariia Sandrikova
a274e1a7d4 DO NOT MERGE Revert "[2/n] Camera Compat UI: Add interfaces for client-server..." am: 7617679a61
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16571392

Change-Id: I0adf2bf45c5f7d7349e9c0f180aea9d10f70645d
2022-01-13 22:55:51 +00:00
Mariia Sandrikova
7617679a61 DO NOT MERGE Revert "[2/n] Camera Compat UI: Add interfaces for client-server..."
Revert submission 16468379

Reason for revert: Feature development is moving to T.

Reverted Changes:
Id9b9a8930:[3/n] Camera Compat UI: Add a camera compat contro...
Id6be4a954:Enable a camera app compat control on Large screen...
I083aa6718:[2/n] Camera Compat UI: Add interfaces for client-...

Bug: 206602997

Change-Id: I9ad876043fd61f708a8f468fffd1ef371bfa0866
2022-01-13 15:21:38 +00:00
Wu Ahan
4c5f09cab3 Revert "DO NOT MERGE: Decode the input of both setStream and setResource calls first"
This reverts commit 51b874f628.

Reason for revert: will deliver a better fix for that, ag/16580245.

Change-Id: Icf2d0a656512e6b6bb46dd7ffef3e3cd71ac1a37
2022-01-13 14:39:56 +00:00
Wu Ahan
aba1d77ff7 Revert "Decode the input of both setStream and setResource calls first"
This reverts commit f6a946bbcd.

Reason for revert: will deliver a better fix for that, ag/16580245.

Change-Id: I9c401b4cbded8753fc89df25a2c4f88a2fe72087
2022-01-13 14:30:26 +00:00
Wei Sheng Shih
494706d9c2 Merge "Fix transfer splash screen view been called twice from onDraw" into sc-v2-dev am: 0c6450141f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16561482

Change-Id: If8a3b2bddc7583da65673258ae2fe1c64ab840a2
2022-01-10 17:02:47 +00:00
wilsonshih
4ee97aa498 Fix transfer splash screen view been called twice from onDraw
postOnAnimation is not robust enough from remove the onDrawListener
before next traversal, add a flag to to ensure that transfer splash
screen view only been called once.

Bug: 204125440
Test: atest SplashscreenTests
Test: verify SplashScreenTests and SplashscreenParametrizedTest pass
Change-Id: Id0e6d57b901b2dae45f5aa77e5571f9cf81b6e29
2022-01-10 18:23:20 +08:00
Bill Yi
6042a19c72 Merge sc-qpr1 to aosp-master - DO NOT MERGE
Merged-In: I90ca5ccbf686a975f479c2488ff34f82af12946a
Merged-In: I128f5ed6c1bad350ea449bba5da21123de3ea31b
Change-Id: Ib18c8042f735dceeee5e6ab9f1c963cf630913a6
2022-01-06 18:38:32 -08:00
Josh Tsuji
52d5d43afc Merge "Merge "Don't allow background apps to change theme" into sc-dev am: d47e6d84d1" into sc-qpr1-dev am: df4bc3589e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16517186

Change-Id: I7dc5a52f84fb1a45d539390bfcf525618edf2fc2
2021-12-22 20:24:08 +00:00
TreeHugger Robot
a5e9066c27 Merge "Don't allow background apps to change theme" into sc-dev am: d47e6d84d1
Fixing imports conflict

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16241430

Test: build
Fixes: 211693294
Merged-In: I2086b29ef9bf3bb6fb7d9ebba6e7b8db9392e459
Change-Id: I3039403e7400a141f58f4589ef0fdae3f97b9a40
2021-12-22 18:15:35 +00:00
TreeHugger Robot
d47e6d84d1 Merge "Don't allow background apps to change theme" into sc-dev 2021-12-21 23:23:06 +00:00
Mariia Sandrikova
02a17e7b1f Merge changes from topic "camera-compat" into sc-v2-dev am: 3486eacda3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16468379

Change-Id: I1e56abcef9715a3dd6a00d70cb815c4d9260175a
2021-12-18 21:59:31 +00:00
Mariia Sandrikova
3486eacda3 Merge changes from topic "camera-compat" into sc-v2-dev
* changes:
  [3/n] Camera Compat UI: Add a camera compat control.
  [2/n] Camera Compat UI: Add interfaces for client-server communication.
2021-12-18 21:39:13 +00:00
TreeHugger Robot
09ff886960 Merge "Workaround to dump error log instead of exception" into sc-v2-dev am: 0eeab2b04d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16489361

Change-Id: I110dce293d0dae9088b9ba3826d0a3421bb50beb
2021-12-17 16:19:27 +00:00
Mariia Sandrikova
24f4d8a952 [2/n] Camera Compat UI: Add interfaces for client-server communication.
Changes:
- Listens to changes from the client coming through IActivityClientController#requestCompatCameraControl to ActivityRecord#updateCameraCompatState
- ActivityRecord#updateCameraCompatState sends updated state via TaskInfo to WM Shell
- ITaskOrganizerController#updateCameraCompatControlState to dispatch the user interactions with the control from WM Shell triggers callback to ActivityRecord#updateCameraCompatStateFromUser
- ActivityRecord#updateCameraCompatStateFromUser remembers the user's choice and asks client to apply treatment through ICompatCameraControlCallback

Feature is guarded with config_isCameraCompatControlForStretchedIssuesEnabled

Test: atest WMShellUnitTests:ShellTaskOrganizerTests, atest WmTests:ActivityRecordTests
Bug: 206602997
Change-Id: I083aa6718bd67456bedd9444e9b78740c041f870
2021-12-17 00:18:57 +00:00