Commit Graph

18340 Commits

Author SHA1 Message Date
TreeHugger Robot
4c4380b8af Merge "Fix the issue provider can be wrong when requesting slice permission" into rvc-qpr-dev am: e205d8d04f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12339573

Change-Id: I05cbcd288482db9617b4fe1d3914ab32925a819a
2020-10-05 23:41:06 +00:00
TreeHugger Robot
e205d8d04f Merge "Fix the issue provider can be wrong when requesting slice permission" into rvc-qpr-dev 2020-10-05 23:12:06 +00:00
Charles Chen
018f36d04b [RESTRICT AUTOMERGE] Revert "Require permission to create trusted displays" am: ae03031efe am: 6c079ef0b5 am: fb1170dc82
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12716107

Change-Id: I2063abae809ec23db3faf6aa849e071c53863732
2020-09-29 06:54:04 +00:00
Charles Chen
f0daa2119f [RESTRICT AUTOMERGE] Revert "Require permission to create trusted displays" am: ae03031efe am: 6c079ef0b5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12716107

Change-Id: I306a382fa9ae3b9abc096c343316365c6a6ce8dd
2020-09-29 06:36:04 +00:00
Charles Chen
fb1170dc82 [RESTRICT AUTOMERGE] Revert "Require permission to create trusted displays" am: ae03031efe am: 6c079ef0b5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12716107

Change-Id: If160b7e93e79cd73468cbbdb2df614ccb7ab45c8
2020-09-29 06:35:44 +00:00
Charles Chen
6c079ef0b5 [RESTRICT AUTOMERGE] Revert "Require permission to create trusted displays" am: ae03031efe
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12716107

Change-Id: If1a42b8cd7cab0c97f45fc3f452dbe4bc054cf41
2020-09-29 06:17:52 +00:00
Charles Chen
ae03031efe [RESTRICT AUTOMERGE] Revert "Require permission to create trusted displays"
This reverts commit f21c885ca7.

Reason for revert: Have regression b/168268396.
Needs to pull out from Nov. builds.

Bug: 162627132

Change-Id: I29fa3937d1655a0cc7591abcfa2067f4fb2b2bcb
2020-09-29 03:21:52 +00:00
TreeHugger Robot
97c1d214fb Merge "Revert "Allow package verifier to hide specific fgs notifications."" into rvc-qpr-dev am: f7741b10f3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12652691

Change-Id: I3290012f9a62af93b6633f8f8f3c69773e6ecdb6
2020-09-25 17:23:16 +00:00
TreeHugger Robot
f7741b10f3 Merge "Revert "Allow package verifier to hide specific fgs notifications."" into rvc-qpr-dev 2020-09-25 17:16:49 +00:00
TreeHugger Robot
33d7e9308e Merge "Make process level rotated config and display metrics consistent" into rvc-qpr-dev am: d6af5b5d1e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12670488

Change-Id: I1ca8add8df59a72e35ced7d0f888c662e01d7dc2
2020-09-25 05:28:24 +00:00
TreeHugger Robot
d6af5b5d1e Merge "Make process level rotated config and display metrics consistent" into rvc-qpr-dev 2020-09-25 03:54:37 +00:00
Pinyao Ting
4344e63295 Fix the issue provider can be wrong when requesting slice permission
SlicePermissionActivity reads provider_pkg from intent, which can be
modified at will. As a result user might see incorrect package name in
the dialog granting slice permission.

Bug: 159145361
Test: manual
Merged-In: I8b66c02786df4096dad74b7e76255d5ddd1d609d
Change-Id: I8b66c02786df4096dad74b7e76255d5ddd1d609d
2020-09-24 19:10:45 +00:00
Ryan Mitchell
030e4702d0 Merge "Reduce RM createResources lock contention" into rvc-qpr-dev 2020-09-24 15:26:25 +00:00
Riddle Hsu
6bb2b9c716 Make process level rotated config and display metrics consistent
The application may get Resources instance from Resources.getSystem()
and context.getApplicationContext().getResources(). Since fixed
rotation is introduced that allows an activity to start in a different
rotation than the current display, when using getConfiguration() and
getDisplayMetrics() of these Resources instances, the orientation
and metrics need to be the same as current display is rotated.
Otherwise the app may show unexpected UI layout.

Although it is not recommended to use global resources/config for
activity. One of the goal of fixed rotation transform is to simulate
the app is started in a rotated environment, so this CL makes the
configuration and display metrics of system resources are consistent
with application and activity for compatibility.

About WindowProcessController and ActivityStackSupervisor:
 The process configuration passed to LaunchActivityItem may be
 associated from activity. if the sequence number of configuration
 is overridden by activity, the configuration may be ignored when
 launching the activity because the sequence number isn't larger
 than the previous process configuration. Although there will be a
 ConfigurationChangeItem later to update correct state, the app may
 get the intermediate state with old configuration and metrics.

About ResourcesManager and DisplayAdjustments:
 There are 2 new fields appWidth and appHeight added to
 DisplayAdjustments#FixedRotationAdjustments because the display
 metrics from Resources.getSystem() is independent from activity
 configuration. Only window manager knows the rotated size, so
 the values need to send to client and then ResourcesManager takes
 the adjustment to change the global display metrics.

About WindowToken:
 When fixed rotation is applied on the token, send the
 FixedRotationAdjustmentsItem first so the later configuration
 change can pick the adjustment at ActivityThread. And because the
 registration of activity configuration only occurs on add/remove
 activity, if it is only switching to another existing activity in
 different orientation, the process configuration still needs to
 be updated.

About ActivityThread:
 The code flow for a rotated activity (DA = display adjustments):
 - Launch new activity
    handleLaunchActivity: override app DA
     handleConfigurationChanged: adjust global display metrics by DA
     performLaunchActivity
      createBaseContextForActivity: override activity DA
 - Resume existing activity
    handleFixedRotationAdjustments: override app and activity DA
    handleConfigurationChanged: adjust global display metrics by DA
    handleResumeActivity

Also some minor corrections:
- Fix wrong display metrics adjustment that xdpi and ydpi should
  not be swapped because they are physical attributes.

Bug: 167564038
Test: atest DisplayAdjustmentsTests
      AppConfigurationTests#testRotatedInfoWithFixedRotationTransform
      WindowProcessControllerTests#testProcessLevelConfiguration
      DisplayContentTests#testApplyTopFixedRotationTransform

Change-Id: I60bedc7e09f54683d5e857ccc51402d5d144cd9e
Merged-In: I60bedc7e09f54683d5e857ccc51402d5d144cd9e
2020-09-24 15:09:51 +08:00
Kweku Adams
44baf28ffd Revert "Allow package verifier to hide specific fgs notifications."
This reverts commit e49aa726f0.

Reason for revert: We've decided not to have this in the QPR.

Bug: 164440539
Change-Id: I72ca946f1a5be937b3f3bed746e4251fa9257891
Merged-In: I72ca946f1a5be937b3f3bed746e4251fa9257891
2020-09-23 21:42:14 +00:00
Jay Aliomer
f93d05d2e6 Merge "DarkMode Tile affects all users + security bug" into rvc-qpr-dev am: d40a7cf8ae
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12664215

Change-Id: I4e5f2ed90182863c3b1e18c0b71e8f4a6d1bf650
2020-09-23 20:12:59 +00:00
Jay Aliomer
3e605760ed DarkMode Tile affects all users + security bug
When setNightModeActivated is called, the change affects the current logged in user
Also, permission checks are made before changing dark theme
Test: manual
Bug: 168039904
Merged-In: I7786d9dde10f7547f5dd9fb00661fb89fde9f05c
Change-Id: I7786d9dde10f7547f5dd9fb00661fb89fde9f05c
(cherry picked from commit f16e87a992)
2020-09-23 18:03:16 +00:00
Ryan Mitchell
07ef074c6a Reduce RM createResources lock contention
Reduce lock contention for processes that use
ResourcesManager#createResources on background threads by preloading
the apk assets into a temporary cache while the RM lock is not held.

As a result, multiple threads may be performing I/O opening the same
apk assets since multiple threads could be preloading the same apk
at once.

Bug: 111966000
Test: observe significantly less monitor contention with owner bg
      threads calling android.app.ResourcesManager.createResources

Merged-In: Iccf383cb8e1a358af4f71ac242e2216dc5a19ff2
Change-Id: Iccf383cb8e1a358af4f71ac242e2216dc5a19ff2
(cherry picked from commit fb9a011b1d)
2020-09-22 22:34:55 +00:00
TreeHugger Robot
83bf7e05e5 Merge "Reduce RM createResources lock contention" into rvc-qpr-dev-plus-aosp 2020-09-22 16:26:52 +00:00
Julia Reynolds
125d1725cd DO NOT MERGE Revert "Remove app ops indicators from notifications" am: 8ec5bcb3d0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12615554

Change-Id: Ib5170725586b432972ab4b29129c1cadb53d50e1
2020-09-16 16:32:48 +00:00
Julia Reynolds
71f51c54cd Merge "DO NOT MERGE Revert "Remove app ops indicators from notifications"" into rvc-qpr-dev 2020-09-16 15:09:31 +00:00
Julia Reynolds
8ec5bcb3d0 DO NOT MERGE Revert "Remove app ops indicators from notifications"
This reverts commit 2778b62f1d.

Reason for revert: these icons are still needed

Change-Id: I219af393f3d4cd08e431f38a3b66408e12f258bb
Bug: 163076432
2020-09-16 15:09:03 +00:00
Jeff Sharkey
487d394296 Merge changes from topic "sep11" am: c0b288133a am: 69e6f07347 am: 741c0a78cc am: da7478b570
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1426195

Change-Id: I79488866c538bf9e76d0a6429e30262978f6fdab
2020-09-15 00:13:08 +00:00
Jeff Sharkey
741c0a78cc Merge changes from topic "sep11" am: c0b288133a am: 69e6f07347
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1426195

Change-Id: I7da537200efe31e803234bd1a0236843064186c8
2020-09-14 23:10:42 +00:00
Treehugger Robot
bc93881957 Merge "Replace 'whitelist' with 'allowlist'" am: 8ac6819c0e am: 3563eeb4ae am: 1d3e694b97 am: e022945d69
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1427048

Change-Id: I5725049a13c30e122e1f8b5e4e772b7431a4e32d
2020-09-14 22:44:28 +00:00
Jeff Sharkey
c0b288133a Merge changes from topic "sep11"
* changes:
  Update language to comply with Android's inclusive language guidance
  Update language to comply with Android's inclusive language guidance
  Update language to comply with Android's inclusive language guidance
  Update language to comply with Android's inclusive language guidance
  Update language to comply with Android's inclusive language guidance
  Update language to comply with Android's inclusive language guidance
  Update language to comply with Android's inclusive language guidance
  Update language to comply with Android's inclusive language guidance
2020-09-14 21:52:13 +00:00
Treehugger Robot
1d3e694b97 Merge "Replace 'whitelist' with 'allowlist'" am: 8ac6819c0e am: 3563eeb4ae
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1427048

Change-Id: I70eb21c1ea9411974a1c07f6aaaf611760110c34
2020-09-14 21:27:14 +00:00
Julia Reynolds
71c18d2afc Replace 'whitelist' with 'allowlist'
Change-Id: If7422064e59e6c055c9dae092ead298b81cf41e8
Test: atest
Bug: 161889253
Merged-In: I94a43c1c995052b034d8a5377786e1a15e4c9c59
2020-09-14 18:29:23 +00:00
Jeff Sharkey
a8cec413b6 Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

Test: none
Bug: 168334533
Exempt-From-Owner-Approval: docs updates
Change-Id: I245b8d9cac722da76ea67983738a3cbb9deb68df
2020-09-14 10:00:07 -06:00
Jeff Sharkey
16dd960d6f Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

Test: none
Bug: 168334533
Exempt-From-Owner-Approval: docs updates
Change-Id: Id1a0f2a38e41badee3a34bd71af240511f273a7b
2020-09-14 10:00:05 -06:00
Jeff Sharkey
6516a83886 Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

Test: none
Bug: 168334533
Exempt-From-Owner-Approval: docs updates
Change-Id: Ifce5239991e3b78dd4757712e3b88093ad7161f0
2020-09-14 10:00:02 -06:00
Jeff Sharkey
705f6bec2d Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

Test: none
Bug: 168334533
Exempt-From-Owner-Approval: docs updates
Change-Id: I53003332717baf57dc088b2f6b969cdb1863f65e
2020-09-14 09:59:01 -06:00
TreeHugger Robot
ae95e2a448 Merge "Sanitize more of the notification text fields" into rvc-dev am: ceb7aefd6f am: 1ed53ed94e am: 089f82deb6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12512483

Change-Id: I42bada5cf24216465486fe8b4a3c97c5f6c2edae
2020-09-10 00:54:48 +00:00
TreeHugger Robot
d3d22be572 Merge "Sanitize more of the notification text fields" into rvc-dev am: ceb7aefd6f am: 6367b4800e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12512483

Change-Id: I227eebd3d4e88a07398a0ca6d140692af7dea3fb
2020-09-10 00:37:54 +00:00
TreeHugger Robot
1ed53ed94e Merge "Sanitize more of the notification text fields" into rvc-dev am: ceb7aefd6f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12512483

Change-Id: Ief6065688eb49cd0d795dbd892ea9bfa76290f2b
2020-09-10 00:20:15 +00:00
TreeHugger Robot
ceb7aefd6f Merge "Sanitize more of the notification text fields" into rvc-dev 2020-09-09 23:55:10 +00:00
TreeHugger Robot
c0f911ce35 Merge "Require permission to create trusted displays" into rvc-dev am: 2c0137794d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12287404

Change-Id: Ifeaf09fda00fe2622ead045dc4f6f93c5129e5fc
2020-09-04 10:40:39 +00:00
TreeHugger Robot
3df1e7787a Merge "Require permission to create trusted displays" into rvc-qpr-dev am: c2b395c713
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12400348

Change-Id: If006d013954518b763cc010fe50a54b97d29eb3e
2020-09-04 10:33:12 +00:00
Julia Reynolds
a19f9ed2b1 Sanitize more of the notification text fields
Test: manual; monitor SystemUI performance when an app tries to
post a messaging style notification with messages with long text
Bug: 158304295
Bug: 147358092

Merged-In: c953fdf6bc
Change-Id: I0e2ea12fc3351b1a56645b556720ea2306f5422a
(cherry picked from commit c953fdf6bc)
2020-09-03 19:42:23 +00:00
Xin Li
c8c8e8e8be Merge RP1A.200720.011
Bug: 167588565
Merged-In: Iec7a26ecd68aca9c7a38cc8f441197a8237b0c8c
Change-Id: Ia8f5f008bc1f77115b644ab996aedc892fab68e7
2020-09-02 12:34:37 -07:00
Andrii Kulian
ef7b1333f0 Require permission to create trusted displays
Bug: 162627132
Test: atest VirtualDisplayTest#testTrustedVirtualDisplay
Test: atest
frameworks/base/packages/SystemUI/tests/src/com/android/systemui/bubbles
Test: atest DisplayTest
Test: atest VirtualDisplayTest#testTrustedVirtualDisplay
Test: atest VirtualDisplayTest#testUntrustedSysDecorVirtualDisplay
Test: adb logcat -b events

Change-Id: Id06b2013ef5fdeadf321f14f8b611c733031d54d
Merged-In: Id06b2013ef5fdeadf321f14f8b611c733031d54d
2020-09-01 05:24:41 +00:00
Andrii Kulian
f21c885ca7 Require permission to create trusted displays
Bug: 162627132
Test: atest VirtualDisplayTest#testTrustedVirtualDisplay
Test: atest
frameworks/base/packages/SystemUI/tests/src/com/android/systemui/bubbles
Test: atest DisplayTest
Test: atest VirtualDisplayTest#testTrustedVirtualDisplay
Test: atest VirtualDisplayTest#testUntrustedSysDecorVirtualDisplay
Test: adb logcat -b events

Change-Id: Id06b2013ef5fdeadf321f14f8b611c733031d54d
Merged-In: Id06b2013ef5fdeadf321f14f8b611c733031d54d
2020-09-01 13:22:29 +08:00
Xin Li
628590d7ec Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)
Bug: 166295507
Merged-In: I3d92a6de21a938f6b352ec26dc23420c0fe02b27
Change-Id: Ifdb80563ef042738778ebb8a7581a97c4e3d96e2
2020-08-31 21:21:38 -07:00
Marco Ballesio
bf61b8c858 Merge changes from topic "cgroup v2 freezer frameworks" into rvc-qpr-dev am: 7176835583
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12392113

Change-Id: I2f87b8c3fb60848bf8e9266116ddccbf0eb68f30
2020-08-28 18:16:01 +00:00
Marco Ballesio
7176835583 Merge changes from topic "cgroup v2 freezer frameworks" into rvc-qpr-dev
* changes:
  freezer: reentrant enable/disable method
  freezer: switch to cgroup v2 freezer
2020-08-28 17:49:06 +00:00
Marco Ballesio
12f3e8d6d4 freezer: reentrant enable/disable method
the app freezer state can be toggled in multiple situations when a
debugging tool like heapdump is invoked, or when system_server dumps its
binder connections. All these uses are potentially concurrent and a
robust method to handle reentrancy is necessary to avoid leaving the
freezer in a state incompatible with a specific operation.

This patch moves freezer enable and disable operations from Process to
CachedAppOptimizer (ActivityManager), introduces a new ActivityManager API
to centralize all freezer state changes to ActivityManager and modifies
client code accordingly.

Bug: 151225245
Test: manually verified that no regression are introduced on freezer
behavior, verified that concurrent behavior is handled properly

Change-Id: I7d588cc6e0499012dce64ed4e42ff2adb336062d
Merged-In: I7d588cc6e0499012dce64ed4e42ff2adb336062d
2020-08-27 16:05:57 -07:00
Charles Chen
9959c3349f [RESTRICT AUTOMERGE] Make a context dervied from an UI context as an UI context am: b2444cbef5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12432005

Change-Id: Ie5a1f6808654d80fb54bed9665c1c95c4a0245d4
2020-08-27 17:11:45 +00:00
Charles Chen
b699ff316b Merge "[RESTRICT AUTOMERGE] Make a context dervied from an UI context as an UI context" into rvc-qpr-dev 2020-08-27 16:53:29 +00:00
Charles Chen
117b9ab1d8 Merge "Respect UI Context for getDisplay" into rvc-qpr-dev am: c5ba62307c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12313930

Change-Id: I7d9bfc3f9e1854a3d86a26f905125c71fd9e854c
2020-08-27 03:05:15 +00:00
Charles Chen
c5ba62307c Merge "Respect UI Context for getDisplay" into rvc-qpr-dev 2020-08-27 02:52:05 +00:00