Commit Graph

21259 Commits

Author SHA1 Message Date
TreeHugger Robot
a325e1bd17 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: Ibb755f0f754c230678d3bfecc41b6aa36f834c6b
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
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
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
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
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
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
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
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
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
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
Hui Wu
8c7f2f8695 Merge "Adding owners in cloudsearch packages" am: d628edb425 am: f921b4b76d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1925161

Change-Id: I60c619f8c1275b22e069aa256b1569c1efe9eebe
2021-12-16 20:44:09 +00:00
Hui Wu
d628edb425 Merge "Adding owners in cloudsearch packages" 2021-12-16 19:33:49 +00:00
Junyu Lai
a562604531 Merge "[MS03] Remove ServiceNotFoundException hidden API usage" am: 7fee9dd710 am: c270bbf232
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1878043

Change-Id: I8d973c5e74e72621b4083b7389c5c5ca6f37de60
2021-12-16 11:17:15 +00:00
Junyu Lai
7fee9dd710 Merge "[MS03] Remove ServiceNotFoundException hidden API usage" 2021-12-16 10:42:15 +00:00
Hui Wu
fa11d35357 Adding owners in cloudsearch packages
Bug: 210528288
Test: not needed as this is a meta file change
Change-Id: I6bbf9f350639ed53edb1643c937c8c55702ff254
2021-12-16 00:03:19 +00:00
Treehugger Robot
2755887938 Merge "Register NSD service from ConnectivityFrameworkInitializerTiramisu" am: 6a8b9f3964 am: f9ed5725da
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1899035

Change-Id: I70d0ad84b306d15e890cca70ac31eb711ebba198
2021-12-13 15:52:37 +00:00
Treehugger Robot
f9ed5725da Merge "Register NSD service from ConnectivityFrameworkInitializerTiramisu" am: 6a8b9f3964
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1899035

Change-Id: I658096512da1c4eaa6b60691f6f226b86adb44fe
2021-12-13 15:29:43 +00:00
paulhu
474a8aaffc Register NSD service from ConnectivityFrameworkInitializerTiramisu
INsdManager is going to move into connectivity mainline module
and it will be not visible to SystemServiceRegistry after
migration done. Thus, use ConnectivityFrameworkInitializerTiramisu
to register NSD service instead.

ConnectivityFrameworkInitializerTiramisu will be implemented in
the framework-connectivity-tiramisu bootclasspath JAR, which need
to be separated from the S+ framework-connectivity bootclasspath
JAR to be only loaded by the module on T+. So its methods cannot
be in the same class as ConnectivityFrameworkInitializer.

Bug: 206702844
Test: atest FrameworksNetTests CtsNetTestCases
Merged-In: Ibf89ab9a35e35dac4978ba70c7ab306b6155a4a3
Change-Id: Ibf89ab9a35e35dac4978ba70c7ab306b6155a4a3
2021-12-13 15:33:03 +08:00
Junyu Lai
9d08a3ff2a [MS03] Remove ServiceNotFoundException hidden API usage
Since ServiceNotFoundException is not a system API. Remove
the unsupported interface which uses this exception.
This is safe since the method annotated with maxTargetSdk = R
and from dashboard it is not using by anybody.

Test: TH
Bug: 204830222
Change-Id: Ib8c0ce7b165732d24929851792d35371b90a5dfc
2021-12-13 06:26:07 +00:00
Treehugger Robot
f626e66561 Merge changes from topic "ms07-movestats" am: 942c713c9d am: 6d0a6803c9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1895044

Change-Id: Ieac82283e7f0a3cfdaceaff44bdabb3b21587c03
2021-12-10 19:20:32 +00:00
Treehugger Robot
6d0a6803c9 Merge changes from topic "ms07-movestats" am: 942c713c9d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1895044

Change-Id: I85d704b09dac07e91b8400a2bbd15867e2b80d6d
2021-12-10 18:57:08 +00:00
Junyu Lai
d82296cf33 [MS08] Move NetworkStats files to f/b/package/ConnectivityT
NetworkStatsService is going to be moved into ConnectivityService
module. Move all related files to packages/ConnectivityT so that
it can be easily migrate these files to connectivity module
after clearing the hidden API usages.

Bug: 197717846
Test: TH
Change-Id: Iead00832b5eb7b1dc40a92027c5a14ae8316b16c
2021-12-10 16:11:08 +00:00
Wu Ahan
21df742dd4 DO NOT MERGE: Decode the input of both setStream and setResource calls first am: 51b874f628 am: f374966fd9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16375906

Change-Id: I6d9e94362504d6c8cf58c66c6729a19b28d5cead
2021-12-09 02:01:15 +00:00
Wu Ahan
f374966fd9 DO NOT MERGE: Decode the input of both setStream and setResource calls first am: 51b874f628
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16375906

Change-Id: I181af4dcc8c850c9f610736e8fb0fab0f60b6012
2021-12-09 01:45:15 +00:00
Wu Ahan
51b874f628 DO NOT MERGE: Decode the input of both setStream and setResource calls first
The size of the input of both setStream and setResource may very big
that system server got oom while handling it, so we try to decode it
first before copying it to the wallpaper path, if the decoding fails, we
treat the input as an invalid input.

Bug: 204087139
Test: Manually set wallpaper, no PDoS observed.
Change-Id: I014cf461954992782b3dfa0dde67c98a572cc770
2021-12-06 03:11:47 +00:00
Varun Shah
a70c46b8a5 Update deletion conditions for a package's UsageStats.
If a profile owner is defined for a specific user, do not delete usage
stats for a package on package deletion.

Bug: 197399948
Test: atest UserUsageStatsServiceTest
Test: atest UsageStatsTest [all]
Change-Id: I94a8e3dfca8ef4c7616f77944d61726e06043b85
Merged-In: I94a8e3dfca8ef4c7616f77944d61726e06043b85
(cherry picked from commit 157fbcfbe4)
Merged-In:I94a8e3dfca8ef4c7616f77944d61726e06043b85
2021-11-24 23:22:06 +00:00
wilsonshih
bc506448b9 setTurnScreenOn can only used as wakeup
setTurnScreenOn shouldn't dismiss keyguard automatically even when the
keyguard is insecure.
The keyguard state should only be affected by requestDismissKeyguard
and/or setShowWhenLocked, and for either case setTurnScreenOn can be
used to wakeup device if the activity is going to be resumed and
visible.

Bug: 201103497
Test: atest ActivityVisibilityTests KeyguardTests KeyguardLockedTests
Change-Id: I283dea469a33286fc9cf835e39ee5a3be2444739
(cherry picked from commit f3a1274a38)
(cherry picked from commit 966a61366e)
Merged-In:I283dea469a33286fc9cf835e39ee5a3be2444739
2021-11-24 23:21:56 +00:00
Peiyong Lin
9e526c1d91 Merge "Add owners for GameManager and GameManagerService" am: 6e9b910de2 am: 3afdacc87b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1896952

Change-Id: Ic5c758c011bf2a98db0d6393b288d058f71dfba8
2021-11-18 23:04:05 +00:00
Peiyong Lin
3afdacc87b Merge "Add owners for GameManager and GameManagerService" am: 6e9b910de2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1896952

Change-Id: I743b627784dd5b39cfd645fe41eb67bd5587acf0
2021-11-18 22:47:30 +00:00
Peiyong Lin
ab0ae6b571 Add owners for GameManager and GameManagerService
Bug: N/A
Test: N/A
Change-Id: I48f986e1ca5eadc6c23ca693143f122e415eeefd
2021-11-18 18:25:14 +00: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
Lucas Dupin
efaa814a99 Don't allow background apps to change theme
A background app that changes the wallpaper, was able to change the
device theme.

This change will apply the theme if the app is on the foreground, like
WallpaperPicker would be, but would defer the event until the next power
button cycles, like we do with Live Wallpapers, to avoid the same type
of DoS.

Test: manual
Test: atest ThemeOverlayControllerTest
Fixes: 205140487
Change-Id: I2086b29ef9bf3bb6fb7d9ebba6e7b8db9392e459
Merged-In: I2086b29ef9bf3bb6fb7d9ebba6e7b8db9392e459
2021-11-11 19:10:41 +00:00
Varun Shah
41e23753cc Merge "Update deletion conditions for a package's UsageStats." into sc-dev am: 2a14be36ff am: 837f58f7fa
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16222839

Change-Id: I483fcba4ada48dcb8be415063f101d523def3a8b
2021-11-11 01:37:09 +00:00
Varun Shah
e1a38189da Merge "Update deletion conditions for a package's UsageStats." into sc-dev am: 2a14be36ff
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16222839

Change-Id: Ic05768dc4213e00f93829ace282fd847dc2e5fed
2021-11-11 01:19:38 +00:00
Varun Shah
837f58f7fa Merge "Update deletion conditions for a package's UsageStats." into sc-dev am: 2a14be36ff
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16222839

Change-Id: I4eabd7f3cafc5e95399e7265c56c937c04d5992d
2021-11-11 01:18:16 +00:00
Varun Shah
157fbcfbe4 Update deletion conditions for a package's UsageStats.
If a profile owner is defined for a specific user, do not delete usage
stats for a package on package deletion.

Bug: 197399948
Test: atest UserUsageStatsServiceTest
Test: atest UsageStatsTest [all]
Change-Id: I94a8e3dfca8ef4c7616f77944d61726e06043b85
Merged-In: I94a8e3dfca8ef4c7616f77944d61726e06043b85
2021-11-10 17:11:32 +00:00