Commit Graph

22372 Commits

Author SHA1 Message Date
Jim Blackler
4e59b1968c Merge "Game Loading Time improvement by boosting CPU via ADPF" 2021-12-15 16:07:37 +00:00
TreeHugger Robot
45a04a6165 Merge "Add "millis" to API names." 2021-12-15 02:24:47 +00:00
Oscar Shu
93a619cf6f Merge "Configure allowed/excluded permission list with BroadcastOptions" 2021-12-14 23:28:15 +00:00
Kweku Adams
2f43ce5ab5 Add "millis" to API names.
Improve API naming by specifying units in the name.

Bug: 210622514
Test: Android builds
Change-Id: Id42bd8f826e7928c744b5175db3e99cb7bcd468f
2021-12-14 10:18:49 -08:00
Makoto Onuki
6bef72dbfe Merge changes from topic "per-process-app-class-2"
* changes:
  Support per-process Application class (AM and client side)
  Support per-process Application class (package parser)
  Support per-process Application class in <process> tag
2021-12-14 17:55:58 +00:00
Christian Göllner
ca3f277231 Merge "Enables the rotation suggestion button during setup wizard" 2021-12-14 14:05:31 +00:00
Makoto Onuki
19f22d590d Support per-process Application class (AM and client side)
Now the <process> tag supports `android:name`, which takes a custom
Application class name. If omitted, the system defaults to the
class set in the <application> tag, or the default class which is
`android.app.Application`.

Bug: 197264681
Test: atest CtsProcessTest
Change-Id: I0650a4a7c75dc37c00875e4f0ac53656f1cbeac9
2021-12-13 16:28:32 -08:00
Jeff DeCew
c5177c18af Fix expanded fully custom view showing wrong chevron state am: 3b3e39f627 am: 4ec4414a08
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16445238

Change-Id: I82c728f54ef12e35bfe00b90877007688851961c
2021-12-13 18:33:17 +00:00
Jeff DeCew
4ec4414a08 Fix expanded fully custom view showing wrong chevron state am: 3b3e39f627
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16445238

Change-Id: Idbbbb6a66a2d3a30e73f81c6c48cea072d82b94f
2021-12-13 18:16:31 +00:00
Treehugger Robot
208d820e96 Merge "Register NSD service from ConnectivityFrameworkInitializerTiramisu" am: 6a8b9f3964 am: f9ed5725da am: 2755887938
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1899035

Change-Id: I7605f8332f30f88036be92af0fcb7aa986a7dfb8
2021-12-13 16:07:03 +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
Christian Göllner
be7d8b2859 Enables the rotation suggestion button during setup wizard
Fixes: 204945507
Bug: 204945507
Test: StatusBarManagerTest in a separate CL + Manually
Change-Id: If73caa69b8f923b01e60472a33ba034c2f682075
2021-12-13 15:45:06 +00:00
Jeff DeCew
3b3e39f627 Fix expanded fully custom view showing wrong chevron state
Fixes: 206045893
Test: post fully custom notification from Notify2-SC and check expanded chevron
Change-Id: I97db4f9a5cb207d03d1370fa267f630f355c1bf4
2021-12-13 15:30:33 +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
TreeHugger Robot
a7cc168d0e Merge "Add cheap aidl tracing suitable for always-on-tracing (1/3)" 2021-12-13 13:55:32 +00:00
Riddle Hsu
9c310ef902 Reduce cost of WindowTokenClient config change am: 778c95ce7c am: b6a1d36a9a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16439833

Change-Id: I419e9c42305f3ad271fcb3f774e12474cdf3baaf
2021-12-13 13:51:18 +00:00
Riddle Hsu
b6a1d36a9a Reduce cost of WindowTokenClient config change am: 778c95ce7c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16439833

Change-Id: I61df558230334d1fb9279c69ac91a106f3daec25
2021-12-13 13:29:17 +00:00
Riddle Hsu
778c95ce7c Reduce cost of WindowTokenClient config change
The SizeConfigurationBuckets was used to avoid activity relaunch
by insignificant configuration change. Because WindowTokenClient
doesn't have relaunch operation, it is unnecessary to use it.
Especially Resources#getSizeConfigurations() is a heavy invocation,
which may create hundreds of temporal Configuration when calling it
in system server.

Also fix leakage of SystemUiContext if it is detached, e.g. the
associated display is removed.

Bug: 207620458
Test: atest WindowContextControllerTest
Change-Id: I8388a2ab25f3deed2e29eb5636c4b2130f4f1b87
2021-12-13 18:52:54 +08: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
paulhu
eb3dd7939f 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
Change-Id: Ibf89ab9a35e35dac4978ba70c7ab306b6155a4a3
2021-12-12 16:34:01 +00:00
Treehugger Robot
79779fcb69 Merge changes from topic "ms07-movestats" am: 942c713c9d am: 6d0a6803c9 am: f626e66561 am: 4e59f54c9e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1895044

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

Change-Id: I05affe3c40f5d41e5c6e0bdab8f6d0581c90209e
2021-12-10 19:35:43 +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
Jeremy Meyer
85c6cf1646 Merge "Don't update cached ApplicationInfo with old information" 2021-12-10 18:41:07 +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
Songchun Fan
5e303008b4 Merge "[pm] new APIs for ApplictaionInfo/PackageInfo/ComponentInfo/ResolveInfo flags" 2021-12-10 16:08:09 +00:00
Jorim Jaggi
794720fbd2 Add cheap aidl tracing suitable for always-on-tracing (1/3)
Instead of having only one switch to enable all binder tracing,
we seperate between stack tracking and tracing. Stack tracking
still works as before. However, the more lightweight option,
tracing using android.os.Trace, is toggleable separately and will
work on the receiver side without dumping the entire stack trace.

We also make the tracing more efficient by caching
getTransactionName and concatting the class name.

Also, enable this selectively for SysUI+Launcher, which is
currently the focus of always-on-tracing effort to figure out
what kind of binder calls these processes are calling which seems
to contribute a huge amount of jank (long binder calls are in
>= 50% of janky traces).

Test: external/perfetto/tools/record_android_trace gfx view freq sched wm am aidl
Test: atest aidl_unittests
Bug: 202278427
Change-Id: I4d803d073cc4b69d07fa433bfef7e1c7f45132b7
2021-12-10 17:03:24 +01:00
Riddle Hsu
589cdb9eea Merge "Reduce unnecessary overhead of SystemUiContext" into sc-v2-dev am: 7b7568a112 am: 36a3e25ada
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16426618

Change-Id: I9da31244a433a47f0870e3483a894a3e19f9747f
2021-12-10 03:21:15 +00:00
Riddle Hsu
36a3e25ada Merge "Reduce unnecessary overhead of SystemUiContext" into sc-v2-dev am: 7b7568a112
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16426618

Change-Id: Ie3ff5a436caa8e6512382cee237f14795d4bc8ce
2021-12-10 03:18:41 +00:00
Jeremy Meyer
99a2847acb Don't update cached ApplicationInfo with old information
This adds a created timestamp to ApplicationInfo so that when an
instance is passed in to getPackageInfo() we can determine whether or
not we should update the cached version

Bug: 188059515
Test: Installed locally to verify behavior and appropriate log messages
Change-Id: Ie87781a9272ee89c5333f56d28da8c1d88feb78b
2021-12-10 00:16:33 +00:00
Riddle Hsu
45e4bcf994 Reduce unnecessary overhead of SystemUiContext
- Do not report change when initializing DisplayContent
  (DisplayContent#isReady() is false).
  This reduces boot time by dozen of milliseconds
  (RootWindowContainer#setWindowManager).
- Only create SystemUiContext if needed. Most of processes don't
  use it. This reduces many registrations (e.g. according to the
  number of processes, it maybe from ~60 to ~10), which involve
  binder/listener creation/invocation, especially the extra cost
  of dispatching configuration to the context which no one uses.
- Store token as IWindowToken to avoid object creation every time
  by asInterface.

Bug: 207620458
Test: atest InputMethodMenuControllerTest WindowContextControllerTest
Change-Id: I867e9f81116796c42048195406d74feccf4772d3
2021-12-09 16:51:28 +08: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
Xiaowen Lei
a676d9b3df Add callback registration mechanism for listening to communal state changes.
Design: go/communal-manager-api.

Note: this CL also removed "_MANAGER" from the communal service
constant, and "_manager" from the communal service name. When these
became unhidden, ApiLint.kt suggested the changes.
  - http://cs/android/tools/metalava/src/main/java/com/android/tools/metalava/ApiLint.kt;l=2369-2386;rcl=0ef26a465a89c45fcfd24d648883208cd0161fd2

Ignore-AOSP-First: tied to launch of new upcoming hardware.

Test: atest CtsAppTestCases:CommunalManagerTest
Test: atest FrameworksMockingServicesTests:CommunalManagerServiceTest

Bug: 206054365
Change-Id: I6d225d6ddb482d9cffb16d1f9a25a98abd0cc382
2021-12-08 23:45:42 +00:00
Xiaowen Lei
ef06f6dbaa Add isCommunalMode() to CommunalManager SystemApi.
Design: go/communal-manager-api.

Test: atest CtsAppTestCases:CommunalManagerTest
Test: atest FrameworksMockingServicesTests:CommunalManagerServiceTest

Bug: 206054365
Change-Id: Ib1b964b17a7742b4e337862efa2b4e0562322fd0
2021-12-08 23:27:48 +00:00
Julia Reynolds
589987ce20 Omit notification small icons from history parcel
They aren't shown in the UI, so we can save some work

Test: load notification history page
Fixes: 206973316
Change-Id: Ia5089bd2f051e40f242f9f72528cbb8251ad9684
2021-12-08 16:30:50 +00:00
Kholoud Mohamed
b3f9a846ec Merge "Expose some hidden APIs in DevicePolicyManager as SystemAPIs" 2021-12-08 16:30:01 +00:00
Fabian Kozynski
8f3255ae3b Merge changes from topic "208671346"
* changes:
  Auto-deny requests after some user denials
  Add tests for StatusBarManagerService
2021-12-08 14:17:39 +00:00
xshu
a2a4482c8d Configure allowed/excluded permission list with BroadcastOptions
Add new BroadcastOptions to allow configuring the allowed permission
list and excluded permission list.

Bug: 197776854
Test: compile
Change-Id: I20bca985eb39e199edbbae99cd54f1472dfaf399
2021-12-07 20:01:41 -08:00
Wei Sheng Shih
356f80679e Merge "Provide default splash screen style for Launcher and SystemUI." into sc-v2-dev am: 611d320a39
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16338744

Change-Id: I238f0b674486f75dce539047b671c0e827289168
2021-12-08 04:01:07 +00:00
Wei Sheng Shih
611d320a39 Merge "Provide default splash screen style for Launcher and SystemUI." into sc-v2-dev 2021-12-08 03:55:35 +00:00
Fabian Kozynski
3a738b180e Auto-deny requests after some user denials
After the user denies the request to add a tile (a particular
ComponentName) a certain number of times, auto deny further requests for
that user,component pair. Cancelling the dialog (by going back/click
outside) don't count against.

This information is reset when the package is uninstalled or data is
cleared for the package.

In the future, this information will be persisted across restarts.

Fixes: 208671346
Test: manual
Test: atest com.android.server.statusbar

Change-Id: I1828d1d3e462fc9b4af94c4350df895994d02b6c
2021-12-07 14:59:38 -05:00
Wu Ahan
9dd966fb0f Merge "Decode the input of both setStream and setResource calls first" into sc-v2-dev am: c262621e01 am: 360a31df34
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16375868

Change-Id: Ib4fae153fa420ad892c60f55bff247e1d3a618ae
2021-12-07 03:40:11 +00:00
Wu Ahan
360a31df34 Merge "Decode the input of both setStream and setResource calls first" into sc-v2-dev am: c262621e01
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16375868

Change-Id: I416db0a66902af55c3086b44f1366c07d6c3f4bf
2021-12-07 03:17:04 +00:00
John Wu
04c77943cf Merge "Update SlicePermissionActivity component in manifest" 2021-12-06 23:35:17 +00:00
kholoud mohamed
8b100eb307 Expose some hidden APIs in DevicePolicyManager as SystemAPIs
Exposed setUserProvisioningState and checkProvisioningPreCondition as
SystemAPIs

Bug: 208634589
Bug: 188410712
Test: atest android.devicepolicy.cts.DevicePolicyManagerTest
Change-Id: I0b186a36793a1fca6066905892131f06454acc71
2021-12-06 22:05:47 +00:00
Christopher Tate
4482010d2b stopForeground(boolean) deprecation & docs
Tidy up the reference docs and the deprecated API discussion

Bug: 196934059
Test: m offline-sdk-docs
Change-Id: Iea9461d6b07207e7e136d59c9b896e4e7343d76c
2021-12-06 10:22:51 -08: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
Wu Ahan
f6a946bbcd 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 02:51:18 +00:00