Commit Graph

17845 Commits

Author SHA1 Message Date
Soonil Nagarkar
9c5ffdacdb DO NOT MERGE Add utilities for creating AppOps listenerIds am: 4523f96ff1 am: c1f4205ca1
Change-Id: I941840c766c72e86328b56953b88289923674cc8
2020-04-15 17:51:03 +00:00
Rubin Xu
49e46f509f Merge "Improve work profile unification flow" into rvc-dev am: a042c8afd3 am: 86466e49d8
Change-Id: I39b313a95ec40acebbca2fd9fd8e6535ee50f67a
2020-04-15 17:48:22 +00:00
Stanislav Zholnin
e4d15d96ce Merge "add AppOpsTest to related frameworks TEST_MAPPINGS" into rvc-dev am: 962b13c5ee am: 7e6195fc97
Change-Id: Iadd02848c276582b067089d3f033e9945e3d7704
2020-04-15 17:47:27 +00:00
Soonil Nagarkar
c1f4205ca1 DO NOT MERGE Add utilities for creating AppOps listenerIds am: 4523f96ff1
Change-Id: I5e2b53ba04d22d8824efcf9a14e032ade4011408
2020-04-15 17:40:13 +00:00
Rubin Xu
a042c8afd3 Merge "Improve work profile unification flow" into rvc-dev 2020-04-15 11:18:06 +00:00
Stanislav Zholnin
962b13c5ee Merge "add AppOpsTest to related frameworks TEST_MAPPINGS" into rvc-dev 2020-04-15 10:10:55 +00:00
Soonil Nagarkar
4523f96ff1 DO NOT MERGE Add utilities for creating AppOps listenerIds
Use utilities to support location listenerIds.

Bug: 153687899
Test: presubmits
Change-Id: Ie138c98a5f864490c6560166b652ea9509fa8728
2020-04-14 19:04:41 -07:00
Charles Chen
993020db5c Merge "Fix WindowContextTests" into rvc-dev am: 5c984b9a09 am: a903d2fab4
Change-Id: I6328a1e25a9b5870d497f13f835d0c63aa91c1b6
2020-04-14 18:26:30 +00:00
Charles Chen
5c984b9a09 Merge "Fix WindowContextTests" into rvc-dev 2020-04-14 17:44:47 +00:00
Mady Mellor
1b484246be Make bubble settings a pref with an int rather than a bool am: a92268cd01 am: 82b58a59a9
Change-Id: I70f06051cd13f8cdbf4ee3eef2035d2448ab4ca7
2020-04-14 11:47:15 +00:00
Mady Mellor
82b58a59a9 Make bubble settings a pref with an int rather than a bool am: a92268cd01
Change-Id: Icbbfcc38f9cf065c437a7de14ab3cf94d3c05d0d
2020-04-14 11:27:42 +00:00
Julia Reynolds
c026d54cd7 Merge changes from topic "bubble_settings_wooo" into rvc-dev
* changes:
  Changes to enable bubble settings CTS
  Notification Bubble Button
  Make bubble settings a pref with an int rather than a bool
2020-04-14 11:22:14 +00:00
Charles Chen
7ba8e26c87 Fix WindowContextTests
Previously, window token assigns last config to mLastReportedConfiguration
directly, which makes it share the same reference with getConfiguration(),
and blocks all config changes request to clients.

This CL uses Configuration#setTo instead.

fixes: 152227175
Bug: 150251036
Test: atest WindowContextTests

Change-Id: I44143aa558f223eb301e28f2e9110bfd66eac636
2020-04-14 16:57:18 +08:00
Winson Chung
1a24a44553 Merge "Send task description changed though task org taskInfoChanged" into rvc-dev am: 3908fb22b6 am: 068eabcc85
Change-Id: I4a843fd5bf313c0a4babf4c26e3d92ef7e073cd9
2020-04-13 17:40:35 +00:00
Winson Chung
3908fb22b6 Merge "Send task description changed though task org taskInfoChanged" into rvc-dev 2020-04-13 16:58:07 +00:00
Julia Reynolds
db833a5d39 Merge "Add guidance on conversation notifications" into rvc-dev am: f5590f558d am: 47d9d300bf
Change-Id: I01ac7d41918117fada1884ce8d9d954ff659041c
2020-04-13 13:06:26 +00:00
Julia Reynolds
f5590f558d Merge "Add guidance on conversation notifications" into rvc-dev 2020-04-13 12:28:28 +00:00
Riddle Hsu
d01fcc5406 Merge "Do not unparcel bundle from application in LaunchActivityItem" into rvc-dev am: aec74e1a62
Change-Id: I59b3e2be49433159706168d54d0417a6487b302a
2020-04-13 10:17:01 +00:00
Riddle Hsu
aec74e1a62 Merge "Do not unparcel bundle from application in LaunchActivityItem" into rvc-dev 2020-04-13 10:12:56 +00:00
Winson Chung
1df39e2cf6 Send task description changed though task org taskInfoChanged
- This removes the need for a separate task stack listener and aligns
  with other task info change properties
- Also implement equals/hashCode for the token so we can use it in
  containers

Bug: 148977538
Test: atest TaskOrganizerTests

Signed-off-by: Winson Chung <winsonc@google.com>
Change-Id: Ie035e6389fdbdc374c1a4b4a684758efa0cb7a9e
2020-04-11 00:01:05 -07:00
Julia Reynolds
7aca3b64aa Add guidance on conversation notifications
Test: make
Fixes: 153469444
Change-Id: I3df7fcdd03418bf8fe80c531385868d1d39409d8
2020-04-10 16:00:46 -04:00
Riddle Hsu
3c3e0c659a Do not unparcel bundle from application in LaunchActivityItem
The bundle fields may contain custom Parcelables. And Bundle#size
will call unparcel that causes BadParcelableException from
LaunchActivityItem#hashCode and LaunchActivityItem#equals.

Since the bundle fields of LaunchActivityItem may not be significant
for being the accurate identity of the item, the bundle fields can
be treated roughly (empty or not) to avoid unparceling.

Fixes: 153737846
Test: atest FrameworksCoreTests:TransactionParcelTests#testLaunch

Change-Id: I7ec55bbfcffcd47cfb586ede8053ab411891902d
2020-04-11 02:21:10 +08:00
Ryan Mitchell
cca1593b23 Merge changes from topic "invalidate_idmap" into rvc-dev am: 6cb79cdfb7
Change-Id: Iec3d0e3bab28964442c5aada00c2586e284feb92
2020-04-10 15:53:05 +00:00
Ryan Mitchell
6cb79cdfb7 Merge changes from topic "invalidate_idmap" into rvc-dev
* changes:
  Fix InstallOverlayTests fail to install overlay
  Test that upgrading target apk invalidates idmap
  Invalidate idmap when target updates
2020-04-10 15:50:15 +00:00
Darryl Johnson
f1c8746e77 Merge "Temporal fix of the Android Auto orientation chaniging on phone's orientation change." into rvc-dev am: 6c6d81a121
Change-Id: Idb50c517925b64041772af2cbd35c6ff553c29cf
2020-04-10 14:26:28 +00:00
Darryl Johnson
6c6d81a121 Merge "Temporal fix of the Android Auto orientation chaniging on phone's orientation change." into rvc-dev 2020-04-10 14:07:36 +00:00
Mady Mellor
a92268cd01 Make bubble settings a pref with an int rather than a bool
This will allow us to do all/selected/none preferences for
bubbles in settings.

- Feature is on by default
- App is none by default
- Channel is off by default

Test: atest NotificationManagerServiceTest BubbleExtractorTest
Bug: 138116133
Change-Id: Ifad1c22525123354f76959c2d44392a25d56347d
2020-04-09 14:49:29 -07:00
Hui Yu
080037053c Merge "Document process capability in AppOps.md." into rvc-dev am: d0139b01dd
Change-Id: I46c7e278db9ef7749619c65b392c852f2c900b1d
2020-04-09 19:51:02 +00:00
Hui Yu
d0139b01dd Merge "Document process capability in AppOps.md." into rvc-dev 2020-04-09 19:42:09 +00:00
Selim Cinek
671d3aed9a Merge changes I7dc8f5fd,Ia5262ca7 into rvc-dev am: 279238f3c2
Change-Id: I48ea415cdf09b483b1de6009c7f4802969239084
2020-04-09 17:58:00 +00:00
Selim Cinek
279238f3c2 Merge changes I7dc8f5fd,Ia5262ca7 into rvc-dev
* changes:
  Fixed the transformation of min priority notifications
  Always use the largeIcon as avatar replacement
2020-04-09 17:55:27 +00:00
Pavel Grafov
942034fa4a Merge "Copy the remaining policies on migration." into rvc-dev am: c4adf5e87b
Change-Id: I5b21baef6cce593f42033b690bd3ea053d267fbb
2020-04-09 17:39:00 +00:00
Pavel Grafov
57c69d1e30 Copy the remaining policies on migration.
* accountTypesWithManagementDisabled
* disableScreenCapture

For security logging nothing has to be done since the state is
stored in a system property, just changed it so that the logging
will be started after the migration and only events for the
right user are logged.

Also removed the todo about hardening for power cut case, the
risk of additional complexity sees to outweight the benefit.

Bug: 149075700
Test: atest DevicePolicyManagerServiceMigrationTest
Change-Id: I3a58325f2d6f415e51998c5096c5fc123d26602d
2020-04-09 15:47:18 +01:00
Charles Chen
aac2a05518 Merge "Fix WindowContext leak" into rvc-dev am: 5c082c998f
Change-Id: I6683cb8b7dcf4aa57ff7f6d681fa41d88156abc6
2020-04-09 07:52:44 +00:00
Yvonne Jiang
c20ac39f27 Merge "Fix secondary lock screen implementation such that DevicePolicyKeyguardService calls are made on the main (UI) thread." into rvc-dev am: eb31eb5bae
Change-Id: I688c2644161c8c9aa0b375430dc67875efa1a10f
2020-04-09 07:50:45 +00:00
Charles Chen
5c082c998f Merge "Fix WindowContext leak" into rvc-dev 2020-04-09 07:39:29 +00:00
Yvonne Jiang
eb31eb5bae Merge "Fix secondary lock screen implementation such that DevicePolicyKeyguardService calls are made on the main (UI) thread." into rvc-dev 2020-04-09 07:26:48 +00:00
TreeHugger Robot
0e8486557c Merge "Make OPSTR_MANAGE_EXTERNAL_STORAGE test API" into rvc-dev am: ffce5f2b7c
Change-Id: I029689affca7a450379110651fb54f18723f10e8
2020-04-08 23:24:41 +00:00
TreeHugger Robot
ffce5f2b7c Merge "Make OPSTR_MANAGE_EXTERNAL_STORAGE test API" into rvc-dev 2020-04-08 23:21:23 +00:00
Hui Yu
3b1110b170 Document process capability in AppOps.md.
Bug: 153581565
Test: NA
Change-Id: I3c42cf5022c0e7e5b008570fdc656260bb13475f
2020-04-08 16:12:21 -07:00
Makoto Onuki
a9b85d8d08 Merge "Context.getSystemService() shouldn't return null..." into rvc-dev am: 52c24bdedf
Change-Id: Ic448d3fd5fd0a4c58c24bc4baf8b7679571ab2c9
2020-04-08 19:43:36 +00:00
Makoto Onuki
52c24bdedf Merge "Context.getSystemService() shouldn't return null..." into rvc-dev 2020-04-08 19:33:30 +00:00
shafik
2a20790621 Make OPSTR_MANAGE_EXTERNAL_STORAGE test API
We need that to enable CTS for Environment#isExternalStorageManager API

Test: build
Bug: 152478019
Change-Id: I8c24c08991558629c83a25b4bed89c817723d732
2020-04-08 17:49:47 +01:00
Rubin Xu
de633f32ea Improve work profile unification flow
Expose internal API to check if the user's password
will be sufficient after profile unification. Also
expose some other helper methods and refactor
DevicePolicyManagerService to unify a few similar
methods that gather admins from user and its profiles.

Bug: 148630506
Fix: 149682344
Test: atest com.android.server.locksettings
Test: atest FrameworksServicesTests:DevicePolicyManagerTest
Change-Id: Ic647c14d5bab7e7337185bc40b1368e42c65f738
2020-04-08 14:43:26 +01:00
Charles Chen
4bff5be1a9 Fix WindowContext leak
The root causes of this issue are:
  1. WindowTokenClient#attachContext makes WindowTokenClient has strong
     reference to WindowContext, which leads to WindowContext cannot be
     GC'd.
  2. WMS#removeWindowToken needs MANAGE_APP_TOKEN permission which
     normal apps don't hold.

This CL does following things:
  1. Use weak reference instead on WindowTokenClient#mContext.
  2. Relax WMS#removeWindowToken to check callingUid if
     MANAGE_WINDOW_TOKEN permission is not held
  3. Deliver config changes to the client side in
     WMS#addWindowTokenWithOption
  4. Some minor fixes

fixes: 150812449
Bug: 150715095
Test: atest WindowContextTest
Test: atest WindowManagerServiceTests
Test: atest WindowTokenTests
Test: atest WindowManagerPermissionTests#testMANAGE_APP_TOKENS
Test: atest
WindowManagerPermissionTests#testADD_WINDOW_TOKEN_WITH_OPTIONS

Change-Id: I9f1d73af2abb78fc9844e6d9eb25e9f0293514e7
2020-04-08 21:30:24 +08:00
Yvonne Jiang
6d34642533 Fix secondary lock screen implementation such that DevicePolicyKeyguardService calls are made on the main (UI) thread.
For implementations of DevicePolicyKeyguardService to provide a SurfacePackage via SurfaceControlViewHost, they must be running on the UI thread.
Additionally, fix dismissal logic to bypass re-checking the secondary lockscreen, and add defensive null checks.

Bug: 136085151
Bug: 151365616
Test: atest AdminSecondaryLockScreenControllerTest
Test: atest KeyguardUpdateMonitorTest
Change-Id: Ibcd7090f50831cddbf952914adf020015750afd8
2020-04-08 05:31:20 -07:00
Evan Rosky
42f14d5442 Merge "Remove some more dead-code from old split impl" into rvc-dev am: e68c8ac02b
Change-Id: I98416e5ae2a7e74ae41b0186e614ba6e44252b02
2020-04-07 22:02:09 +00:00
Makoto Onuki
a49b1e6260 Context.getSystemService() shouldn't return null...
Even when interrupted.

Fix: 153005526
Test: Manual code inspection...
Change-Id: I6747c6b5fb4956b95b43d6fcd3fd636853339b8a
2020-04-07 14:01:30 -07:00
Selim Cinek
cd274d9e5d Always use the largeIcon as avatar replacement
A few apps were targeting >P but not providing avatars yet.
Even though this was an app bug it lead to some weirdness in
our UI. We therefore always do the workaround of using
the largeicon for an avatar instead of generating one if we're
in a OneToOne conversation.

Bug: 153466270
Test: post hangouts message, observe normal person avatar
Change-Id: Ia5262ca7dfc20d265c2d0532e88932c878f38552
2020-04-07 12:24:23 -07:00
Ryan Mitchell
a90930528d Invalidate idmap when target updates
When the target package update, check if the idmap file must change.
If so, propagate the idmap changes to the targets overlay paths, and
invalidate cached overlay ApkAssets in ResourcesManager.

Bug: 147794117
Bug: 150877400
Test: OverlayRemountedTest
Test: libandroidfw_tests
Change-Id: I6115c30bae3672b188a5ff270720a0eea15b43b5
2020-04-07 12:14:51 -07:00