Commit Graph

20292 Commits

Author SHA1 Message Date
TreeHugger Robot
e8eaea0ef2 Merge "Documentation fix: Permission grant opt-out" into sc-dev 2021-03-11 13:26:20 +00:00
Riddle Hsu
592bdb62b8 Merge "Do not report config change to activity if nothing changed" into sc-dev 2021-03-11 12:25:03 +00:00
Kholoud Mohamed
5c88989203 Merge "Allow forceUpdateUserSetupComplete on user builds" into sc-dev 2021-03-11 11:31:42 +00:00
Jeff DeCew
269093b8d8 Merge "Fix rules for exempting notifications from the expanded state." into sc-dev 2021-03-11 01:09:20 +00:00
Jeff DeCew
364576c7e0 Merge "Flow text around the large icon." into sc-dev 2021-03-10 22:19:22 +00:00
Patrick Baumann
e673774033 Merge "Add IllegalStateException with packageName on null info" into sc-dev 2021-03-10 21:14:21 +00:00
Jeff DeCew
bbcb857d3a Merge "CallStyle notifications now include their adjusted actions in the actions list." into sc-dev 2021-03-10 21:10:19 +00:00
Todd Kennedy
8db272ff65 Merge "Null check before invoking callback" into sc-dev 2021-03-10 21:00:40 +00:00
kholoud mohamed
3c4b814189 Allow forceUpdateUserSetupComplete on user builds
This fixes some failing cts tests running on user builds.

Test: atest android.devicepolicy.cts.DevicePolicyManagerTest
Fixes: 181567444
Change-Id: I07c3a98fcbe79d41fb224967569b877eefbc593c
2021-03-10 18:15:41 +00:00
Todd Kennedy
8fd52796c4 Null check before invoking callback
Also made sure to invoke the callback on the main
handler thread, like all other callbacks.

Fixes: 182164620
Test: atest PackageManagerTests
Change-Id: Ic2abe0877a716e83a10965bf348888a53ae95db8
2021-03-10 08:57:05 -08:00
Riddle Hsu
5b9845ad38 Do not report config change to activity if nothing changed
Currently the diff only counts public fields. If only the rotation
of the window configuration is changed, the activity still receives
onConfigurationChanged which is unexpected.

Bug: 165794724
Test: AppConfigurationTests
Change-Id: Ice2db32b700493bcd47a38468ae66e91504895a6
2021-03-10 15:41:32 +00:00
Jeff DeCew
cdf6b6b4c9 Flow text around the large icon.
This is only necessary when a notification is posted without a title.

Fixes: 177976174
Test: Manual inspection of various staes.
Change-Id: I15fdc31e1557b7e5d6fb99e410f4bf37d6734ac4
2021-03-10 10:34:58 -05:00
Charles Chen
6acca0650c Merge "Fix deadlock between WMG and WMS" into sc-dev 2021-03-10 15:09:46 +00:00
Julia Reynolds
58050d1515 Merge changes I363c1670,Id16e8a0d into sc-dev
* changes:
  FGS notifs are no longer upranked
  Update comment
2021-03-10 14:42:50 +00:00
Charles Chen
ddb41ad5d5 Merge "Relaxed WallpaperManager API assertion" into sc-dev 2021-03-10 08:17:22 +00:00
Jeff DeCew
8733c51248 Fix rules for exempting notifications from the expanded state.
Bug: 175207142
Test: Post a notification with a customContentView, but not a bigCustomContentView; note that it is no longer expandable.
Change-Id: I9bf41f3313e68ddbb43485cee37911bc8cfeb012
2021-03-09 21:48:06 -05:00
Jeff Sharkey
c8faccf35a Merge changes from topic "mar8" into sc-dev
* changes:
  Refinement of ContextParams behavior.
  Relax null checks to fix tests.
2021-03-09 22:35:49 +00:00
Patrick Baumann
92a23d32a9 Add IllegalStateException with packageName on null info
This change returns the behavior of initializeJavaContextClassLoader in
LoadedApk to throw an IllegalStateException calling out the package it
attempted to fetch. This was removed when client-side caching was added
resulting in a different stack trace without this critical piece of
information that could help make sense of why this is happening.

Bug: 180418767
Bug: 140788621
Test: N/A; builds
Change-Id: Ia1ceff922f693093012eb6e3e0f6e1d90222cde7
2021-03-09 21:54:53 +00:00
Jeff DeCew
1a7ae5b90b CallStyle notifications now include their adjusted actions in the actions list.
Also, NotificationManagerService.fixNotification ensures correct actions.

Bug: 179178086
Test: Post CallStyle notification, validate actions exist.
Test: Set breakpoint inside fixNotification logic to ensure conditional is catching the style correctly.
Change-Id: I669c89d844b3e6258831543417f49efddd4cd4f2
2021-03-09 13:14:42 -05:00
Julia Reynolds
348edec283 Update comment
Test: make
Fixes: 181350653
Change-Id: Id16e8a0d36a4e3664a175f87e323179b648eed04
2021-03-09 15:01:18 +00:00
Eran Messeri
5442128882 Documentation fix: Permission grant opt-out
The documentation for EXTRA_PROVISIONING_PERMISSION_GRANT_OPT_OUT says
it should be used ACTION_PROVISION_MANAGED_DEVICE. However, that is
deprecated since it's no longer needed (and there's another way to
provision a fully-managed device).

Remove reference to the deprecated constant and simply mention device
owner provisioning.

Bug: 182180699
Test: That it compiles.
Change-Id: I8681c09fb9fa008f0e2ccf62c5dad8d37cd1b843
2021-03-09 14:23:32 +00:00
Charles Chen
045230a432 Fix deadlock between WMG and WMS
The dealock happened while WM#addView and WMS holds lock and called
onWindowTokenRemoved.

WM#addView -> WMG#addView(holds WMG lock) ->
... -> WMS#addWindow(holds WMS lock)
(holds WMS lock) ... -> WindowTokenClient#onWindowTokenRemoved
... -> WMG#closeAll(holds WMG lock)

This CL calls to WMG#closeAll asynchronously to release WMG lock

fixes: 181839758
Test: manual
Change-Id: I0cf8a505043a4def4dcf346952873b1362a92084
2021-03-09 21:39:38 +08:00
Remi NGUYEN VAN
92d9a9a796 Merge "New API for comparing two intents of PendingIntent object." into sc-dev 2021-03-09 02:45:30 +00:00
Chilun Huang
6cd1cb58f7 Merge "Introduce ConfigurationController" into sc-dev 2021-03-09 01:58:58 +00:00
Jeff Sharkey
29e882b417 Refinement of ContextParams behavior.
Since this parameters object is likely going to grow over time, we
should offer a way for callers to easily "inherit" all sub-parameters
by default, instead of making them copy the values manually.

This also gives a path for legacy apps to automatically preserve any
new sub-parameters that have been added in more modern API levels.

This change also relaxes the nullability annotations to match the
existing createAttributionContext() behavior, while also supporting
clearing of specific inherited values.

Bug: 181812281
Test: atest CtsContentTestCases:android.content.cts.ContextTest
Change-Id: Ic797e1aef578926b04ea0000ca3a1bf8684183b9
2021-03-08 18:07:00 -07:00
James O'Leary
d96ed76ddc Merge "Fix boot time regression on Wembley" into sc-dev 2021-03-08 21:33:37 +00:00
Mady Mellor
e15c6dd81a Merge changes from topic "mm_setSuppress" into sc-dev
* changes:
  SysUI changes for setSuppressBubble
  Track locusId visibility in ShellTaskOrganizer
  Add locus id to ActivityRecord / TaskInfo
  Bubble API: suppress bubble
2021-03-08 21:27:36 +00:00
Jeff DeCew
1b3157fa77 Merge "Default colored notifications use accent color for icon; System notifications use default color." into sc-dev 2021-03-08 17:28:22 +00:00
James O'Leary
bddae911fc Fix boot time regression on Wembley
After a ton of regression testing on Forrest and checking dashboards,
turns out the boot time regression due to new color code only happens
on Wembley in CI.

Wembley in CI has 1 GB of RAM, or at least, it returns true for
`ActivityManager.isLowRamDevice`

To fix the regression, when we're performing clustering
on a low RAM device, we'll use the prior clustering strategy (Kmeans,
5 colors). Net impact is speed improvement + there will be less options
for colors. Kmeans erases less common colors first, and those colors
tend to be good candidates for highly chromatic colors.

Fixes: 181348302
Fixes: 181194430
Test: Did about 50 runs on Forrest, isolated issue. Final Forrest
run showing that startservices_avg decreases to previous levels on
Wembley with this CL is here:
https://android-build.googleplex.com/builds/forrest/run/L87800000829799585
To see the improvement back to baseline (~1350 ms), open that link,
at the table of the bottom of the page, click "asit/perf/boottime_test",
then click Artifacts, then click
test_results15031410639465275315_8163110686177237845.txt, and search
for SystemUIBootTiming_startservices_avg.
Alternatively, here is a direct link to the test results text file:
https://android-build.googleplex.com/builds/I89400007809099518/git_master/P20404532/successiveboottest/inv_17043739560101466259/test_results15031410639465275315_8163110686177237845.txt

Change-Id: I53ee5b5f95e6fd54f1327005e391d428f650dbfa
2021-03-08 11:29:22 -05:00
Jeff DeCew
d6209d4e18 Merge changes I3a6b02ec,I516c44d2,I5a18f3ac,I465f7be9,I933fcc27 into sc-dev
* changes:
  Show text and progress bar for CallStyle
  The title of a notification can take 2 lines when expanded.
  Remove the line1 container for the title
  Move text to new line in big base style
  Fix dark mode progress bar background color
2021-03-08 13:53:29 +00:00
paulhu
e48076b31f New API for comparing two intents of PendingIntent object.
Bug: 174237997
Test: atest PendingIntentTest
Change-Id: Ic5eb20f94ff6fd6953315a5f848effa25b813da7
2021-03-08 11:37:18 +09:00
Jeff Sharkey
6595eabb43 Merge "Support for a Context to "renounce" permissions." into sc-dev 2021-03-07 19:05:26 +00:00
Jeff DeCew
b475069003 Show text and progress bar for CallStyle
Bug: 179178086
Test: manaul
Change-Id: I3a6b02ec3a811d36cf44a8503d9642e6fef285b9
2021-03-06 15:31:07 -05:00
Jeff DeCew
8eb955427a Remove the line1 container for the title
Bug: 181048615
Test: visual inspection
Change-Id: I5a18f3ac93f9054500d65db606ac6284281123db
2021-03-06 15:31:07 -05:00
Pavel Grafov
af9181a67d Merge changes from topics "wifi-dpm-grant", "wifi-keychain" into sc-dev
* changes:
  Allow WiFi module to request grants from KeyChain
  DPM API to grant keys to Wifi
2021-03-06 12:12:14 +00:00
Tim Van Patten
3c4b8d977b Merge "GameManager: Add Public API" into sc-dev 2021-03-06 07:17:14 +00:00
Tim Van Patten
7f2f873b59 GameManager: Add Public API
Add the public API to GameManager:
- getGameMode()

Bug: b/178860939
Test: atest CtsGameManagerTestCases
Test: atest GameManagerTests
Test: atest GameManagerServiceTests
Test: atest GameManagerServiceSettingsTests
Change-Id: Ie6030e4ec796c9ecf2c756f24f00e445572accda
2021-03-05 19:59:28 -07:00
Jeff Sharkey
ba2974c8a9 Support for a Context to "renounce" permissions.
Different logical components within an app may have no intention of
interacting with data or services that are protected by specific
permissions.

The new overload added in this change provides the initial mechanism
for a logical component to indicate a set of permissions that should
be treated as "renounced".  Interactions performed through the
returned Context will ideally be treated as if the renounced
permissions have not actually been granted to the application,
regardless of their actual grant status.

This is a low-risk change from a security standpoint, since it can
only reduce the set of permissions that might have been granted to
an app; it can never be used to expand the set of permissions.

Note that this change only provides an initial implementation which
only applies to local permission checks within the app; future
changes will begin wiring this up across process boundaries.

Bug: 181812281
Test: atest CtsContentTestCases:android.content.cts.ContextTest
Change-Id: I96439e5344c85300fb6a0f03e572746c3c96ee95
2021-03-05 18:51:20 -07:00
Jeff DeCew
4f25624502 Default colored notifications use accent color for icon;
System notifications use default color.

Bug: 181048615
Test: visual inspection
Change-Id: I98697dbcefb50256b0ac5e7a0a9a64a76681d3ec
2021-03-05 19:30:12 -05:00
Jeff DeCew
a9d3e22de1 Move text to new line in big base style
This was only used when progress was shown, did not exist for headerless, and was then hidden for all styles; this just left the big base template, where it needed more room.  Now we just only set the text with progress when using that template.

Note: The line1 container is used for margin adjustments, so removing it is non-trivial; I'll do that in a followup CL.

Bug: 181048615
Test: visual inspection
Change-Id: I465f7be95249b90ae8906b2bc951c9ff6066550a
2021-03-05 15:34:57 -05:00
Jeff DeCew
27127e1b7b Fix dark mode progress bar background color
Fixes: 178062760
Test: visual inspection
Change-Id: I933fcc27aea8731f10a0910da68c1f0c6fe035d5
2021-03-05 15:32:23 -05:00
Svet Ganov
232636b32e Add APIs for creating an attribution context
Test: Follow up CL (tracked in the bug below)

bug:158792096

Change-Id: Iecc9e5e52ce130df0fedee18050e2779c4e5eef3
2021-03-05 20:11:32 +00:00
Mady Mellor
b7ab3a7663 Add locus id to ActivityRecord / TaskInfo
- Bubbles needs to know if a task has a LocusId for the
  Suppress Bubble API
- Apps can already set a locusId on the activity, this
  occurs after the activity has been created.
- This CL adds the locusId to the ActivityRecord and
  triggers a task info change
- TaskInfo uses the top activity in the stack to populate
  the locusId

Bug: 170267239
Test: atest NotificationManagerTest (in CTS CL)
Change-Id: I33cf784e3f3f89835d91e31961b3abe7a7b68c8d
2021-03-05 10:39:23 -08:00
Pavel Grafov
bf528538f1 DPM API to grant keys to Wifi
Bug: 160457441
Test: atest com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testKeyManagement
Test: atest com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testDelegatedCertInstallerDirectly
Change-Id: I3a8be9de738ffcc7732e8a640bf42220ab340501
2021-03-05 13:04:57 +00:00
Jin Seok Park
378f7fa946 Merge "Revise PendingIntent.queryIntentComponents API" into sc-dev 2021-03-05 05:16:02 +00:00
Chilun
3dbe4cd5b2 Introduce ConfigurationController
Move configuration related logic to ConfigurationController.

Bug: 127877792
Test: atest WmTests
Change-Id: I311339da5ff5d451a4e6f5131f0e6ec3533ac763
2021-03-05 10:23:58 +08:00
Felipe Leme
d42e4a6771 Merge "Add parent check on DevicePolicyManager.isSafeOperation()" into sc-dev 2021-03-04 17:20:20 +00:00
Winson Chiu
933bea0ee8 Merge changes I28bc7390,I2b248726,Ia7b7acff,Ia81866d2,I5b0deac6, ... into sc-dev
* changes:
  Rename to DomainVerificationUserState
  Rename to DomainVerificationInternalUserState
  Expose getDomainVerificationUserSelection as public API
  Fix setDomainVerificationLinkHandlingAllowed docs
  Rename get -> queryValidVerificationPackageNames
  Make DomainVerificationManager a final class
2021-03-04 16:57:00 +00:00
Ruslan Tkhakokhov
2fd65e2d0e Merge "Support disableIfNoEncryptionCapabilities attribute" into sc-dev 2021-03-04 13:48:18 +00:00
Rajeev Kumar
2c293a43a3 Merge changes I0bd9becd,I1f2967dc into sc-dev
* changes:
  Add new component usage event (2/2)
  Add new component usage event (1/2)
2021-03-04 04:32:52 +00:00