Commit Graph

19521 Commits

Author SHA1 Message Date
Kweku Adams
b6a9683439 Merge "First version of HPJs." 2020-12-03 17:57:15 +00:00
Joanne Chung
45b88d5001 Merge "Update TEST_MAPPINGs for autofill test in Activity path" 2020-12-03 04:33:03 +00:00
TreeHugger Robot
29bca68828 Merge "Move activity client operations to a separate interface" 2020-12-03 02:25:01 +00:00
TreeHugger Robot
6095771fe5 Merge "Don't use serialized system font map if disabled." 2020-12-02 23:06:16 +00:00
TreeHugger Robot
1d2102b503 Merge "Expose UwbManager through Context.getSystemService" 2020-12-02 21:58:01 +00:00
Kohsuke Yatoh
a9248444ac Don't use serialized system font map if disabled.
Bug: 174672300
Test: device boots
Change-Id: I6ec96f6d2629b082a87997e86960234fac65ca57
2020-12-02 12:39:14 -08:00
Lucas Dupin
485e78b4cb Merge "1/N The road to Material NEXT (bouncer and shade)" 2020-12-02 15:59:55 +00:00
Riddle Hsu
6d0979e211 Move activity client operations to a separate interface
This CL focuses on the methods used by Activity and ActivityThread.

Also remove getUriPermissionOwnerForActivity, notifyActivityDrawn
notifyLaunchTaskBehindComplete notifyEnterAnimationComplete
because they are only used between ATMS and WMS.

Bug: 174041144
Bug: 174040691
Test: CtsWindowManagerDeviceTestCases

Change-Id: I5a30ec30cf6acd9ae4c908e524141fd17a4e54ff
2020-12-02 23:14:09 +08:00
Kohsuke Yatoh
ef091d3ff7 Merge "Prepare switching font loading to system server." 2020-12-02 07:14:27 +00:00
Brian Stack
7d47f2c4d8 Expose UwbManager through Context.getSystemService
Bug: 170323306
Test: atest UwbManagerTests
Change-Id: I04c1263a191fcfeee5824be5d6d1944354819d02
2020-12-01 20:10:01 -08:00
Joanne Chung
9a81afc907 Update TEST_MAPPINGs for autofill test in Activity path
Bug: 154961272
Test: atest --test-mapping frameworks/base/core/java/android/app/
Test: TreeHugger
Change-Id: I1a94438cdf475b8b24308f02d40e104edcbbbf32
2020-12-02 11:55:40 +08:00
Kohsuke Yatoh
b11b963ed1 Prepare switching font loading to system server.
Currently, fonts are loaded in Zygote.
This CL adds a preparation to switch it to system server and
bindApplication(), so that system server will be able to update font map
at runtime.

(1) Zygote will be initialized without fonts.
(2) System server will maintain a serialized font map in ashmem.
(3) Apps will load font map from the ashmem in bindApplication().

The change is guarded by Typeface.ENABLE_LAZY_TYPEFACE_INITIALIZATION,
and the new behavior is disabled by default.
I tested with ENABLE_LAZY_TYPEFACE_INITIALIZATION = true.

Bug: 172891184
Test: atest FrameworksCoreTests:TypefaceTest
Test: atest CtsGraphicsTestCases
Test: atest CtsTextTestCases
Test: atest CtsWidgetTestCases
Change-Id: I40832962a4b27f6160c4dc6268689c52f6a4dd33
2020-12-01 16:05:33 -08:00
Alex Johnston
3e36d7cb8b Merge "Add credential management app access control DPM" 2020-12-01 22:29:47 +00:00
Lucas Dupin
7b8636fdb0 1/N The road to Material NEXT (bouncer and shade)
Styling bouncer and shade so they have solid backgrounds and read colors
from themes instead of named resources.

Scrim now fetches colorBackgroundFloating, and views get their background
from colorBackground.
Switching from light to dark theme will make bouncer colors update without
re-inflating any views.

Bug: 173561906
Bug: 173561901
Test: atest ScrimControllerTest
Test: atest KeyguardSecurityContainerControllerTest
Test: manual, switching to dark theme annd showing notif guts
Change-Id: I372e8b688d7bbddd698381accd074b7655788cd0
2020-12-01 14:23:16 -08:00
TreeHugger Robot
e2cb02d5e8 Merge "AppOp modes ain't flags" 2020-12-01 21:58:46 +00:00
Sunny Goyal
648d4e5e00 Merge "Fixing support for shared element transitions from a window" 2020-12-01 21:19:16 +00:00
TreeHugger Robot
1303f11c5e Merge "Added support to more @DevicePolicyOperation operations." 2020-12-01 21:15:45 +00:00
Alex Johnston
dfdbd2e905 Add credential management app access control DPM
Background
* This is part of the work to support
  a credential management app on
  unmanaged devices.

Changes
* Add isCredentialManagementApp access
  control check to the following DPM API
  methods:
   - installKeyPair
   - removeKeyPair
   - generateKeyPair
   - setKeyPairCertificate

Bug: 165641221
Test: Manual testing with TestDPC
Change-Id: Ib88f077ee1f26c08e648ab8b4bb3544b42078d57
2020-12-01 20:25:33 +00:00
Flavio Fiszman
c36d7b0fb4 Merge "Substitute ShortcutInfo for PeopleSpaceTile." 2020-12-01 20:10:06 +00:00
Philip P. Moltmann
e0241424fe AppOp modes ain't flags
hence, remove incorrect annotation.

Test: built
Fixes: 174237124
Change-Id: Ie90cbd050f32f76bd0b9b01537e39d094352b0d1
2020-12-01 11:52:41 -08:00
TreeHugger Robot
c7a983079f Merge "Make WPMS look for DOs and POs in the correct calling user" 2020-12-01 19:19:13 +00:00
Eran Messeri
613c93b98b Merge "Log setting of password complexity." 2020-12-01 18:38:15 +00:00
Felipe Leme
22f9645b61 Added support to more @DevicePolicyOperation operations.
Also removed wrong permission check on lockNow()- it was only
allowing non-admin apps with the LOCK_NOW permission when the
device doesn't support the feature.

Test: manual verification trying to switch user when car is moving
Bug: 172376923

Change-Id: Icd1bde3a6f27e08c00d8851d16c1a072f7441f32
2020-12-01 10:34:22 -08:00
Flavio Fiszman
e3d7a74db9 Substitute ShortcutInfo for PeopleSpaceTile.
Change-Id: I35570d8ef47822598450e958c1bcbd0d298a1371
Test: Build and run.
2020-12-01 17:14:06 +00:00
Alex Kershaw
5b36ee3f1d Make WPMS look for DOs and POs in the correct calling user
Currently, it will always look in user 0 since it uses the DPM from
mContext, which will always be from user 0 as WPMS is in the system
server process.

Extend DPMI to provide the necessary external helper API. This is
preferable to just using createContextAsUser before getting the DPM
instance since it avoids a second binding.

Fixes: 144048540
Fixes: 172682826
Bug: 153995973
Test: atest com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testSetWallpaper_disallowed
Change-Id: I52b71000fac31ff6725ddded58206f69b263ae33
2020-12-01 16:26:23 +00:00
TreeHugger Robot
e7080f41df Merge "Add DPM.hasKeyPair()" 2020-12-01 15:28:56 +00:00
Eran Messeri
40431abf25 Log setting of password complexity.
Log a security event when the password complexity is set using the new
setRequiredPasswordComplexity API.

Test: atest com.android.cts.devicepolicy.MixedDeviceOwnerTest
Bug: 165573442
Change-Id: Ide337ff1f18d1ab0a34bba44004f4bd8b74474c4
2020-12-01 15:27:07 +00:00
Pavel Grafov
b73e15249b Add DPM.hasKeyPair()
The method returns true if a private key and a user certifiate are
present in KeyChain under this alias.

Bug: 160457441
Test: atest com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testKeyManagement
Test: atest com.android.cts.devicepolicy.MixedDeviceOwnerTest#testDelegatedCertInstallerDirectly
Test: atest android.admin.cts.DevicePolicyManagerTest
Change-Id: I15ca6190db1ef4dbf0caabe9d46008d92f758df5
2020-12-01 12:57:45 +00:00
Eran Messeri
6aa9b789e4 Merge "DPMS: Enforce password complexity in lockscreen setting" 2020-12-01 09:53:08 +00:00
TreeHugger Robot
2200250bf8 Merge "Promote Context related tests to presubmit" 2020-12-01 07:59:24 +00:00
TreeHugger Robot
e935342b74 Merge changes I682a8054,I71a820a1
* changes:
  Header population cleanup
  Fix NPE that can occur on uiMode change if a group has a single child.
2020-12-01 01:58:02 +00:00
Treehugger Robot
0f662842f8 Merge "Update link for Permissions samples in Javadoc" am: a7564ec175 am: fd9c04868e am: 7078bd5162
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1513929

Change-Id: If7f4fe0469df8d81c97a38b5a9c991e8fad4f02b
2020-12-01 00:06:47 +00:00
Treehugger Robot
7078bd5162 Merge "Update link for Permissions samples in Javadoc" am: a7564ec175 am: fd9c04868e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1513929

Change-Id: I9ca103a83da51c4553b192df6520737cd0936c9b
2020-11-30 23:50:08 +00:00
TreeHugger Robot
8b819c0a03 Merge "Show largeIcon on the left when grouped." 2020-11-30 23:32:06 +00:00
TreeHugger Robot
1f6275fdde Merge "Switch some recent tasks calls from IATM to ATM" 2020-11-30 23:01:21 +00:00
Eran Messeri
9afde363cc DPMS: Enforce password complexity in lockscreen setting
Enforce a lock screen that adheres with the required complexity set by
the admin.

To do this, provide a method to let the Settings code query the
DevicePolicyManager for the effective password complexities that applies
to a user.

Bug: 165573442
Test: Manually, set complexity using TestDPC.
Test: m RunSettingsRoboTests
Change-Id: Ia03aebb725cacc7104d7fd765ae6ab53456e33e0
2020-11-30 22:28:06 +00:00
Jon Miranda
7b5abdcd7d Fixing support for shared element transitions from a window
Previously animation from window always ran in exit mode
causing the animation to play in the calling window surface
instead of the launching activity surface. This causes
flicker on transition end when the rendering switches to
the new activity surface.

Test: Verified with demo app
Change-Id: I07f5aa4e390fd9dab9883894ba7b780170c0e212
2020-11-30 12:54:29 -08:00
Jeff DeCew
6ab1c6488e Header population cleanup
* Show the app name for minimized notifications without titles.
* Don't show the summary separator when the summary text is an empty string.
* Use TextUtils.isEmpty for clarity & add comment.
* Make visibility reset of app_name_text consistent with others.

Bug: 163626038
Test: manual
Change-Id: I682a8054abb80f24044a2a9c204dfadd5e940860
2020-11-30 15:41:36 -05:00
Jeff DeCew
b00728fd4a Show largeIcon on the left when grouped.
* The icon is smaller when shown on the left.
* This only happens when grouping logic hides the notification icon (same icon/color for all children in the group).
* Does not apply to messaging layouts.

Bug: 163626038
Test: manual
Change-Id: I4c7db076db11ccc69f2907bbb441ff3bc06078f2
2020-11-30 15:24:35 -05:00
Kweku Adams
64345146b9 First version of HPJs.
This is the base implementation for HPJs. It allows scheduling and
running of HPJs with their own quota. Quota is regained when previous
sessions expire and when certain events take place.

A few things still aren't implemented yet. They'll be done in a separate
CL:
1. Free temp-allowlist jobs
2. Dedicated JobServiceContexts for HPJs
3. Additional quota for system-critical roles

Bug: 171305774
Test: atest --rerun-until-failure 5 com.android.server.job.controllers.QuotaControllerTest
Test: atest CtsJobSchedulerTestCases
Change-Id: I4b704cb0b406769f6de8b60bf762dd1f4eb10c68
2020-11-30 11:30:40 -08:00
Garfield Tan
42767054cc Add task visibility to TaskInfo.
Bug: 165794880
Test: Task visibility is pushed to WM shell.
Change-Id: If518a72c658ffe55b60c82afadfc92b1e7bd2738
2020-11-30 11:23:28 -08:00
Tiem Song
eff0b0673c Update link for Permissions samples in Javadoc
Bug: 158042826
Change-Id: I71ab17b21b31ff6584facd023e4c4818b0ab1b55
Test: N/A
2020-11-30 18:17:43 +00:00
Wale Ogunwale
071e95e8af Switch some recent tasks calls from IATM to ATM
The aidl IActivityTaskManager interface doesn't allow for method
overloading with the same name. Switching some of these calls to use
ActivityTaskManager class instead makes it easier to have overloads in
upcoming CLs.

Test: they pass!
Bug: 172776536
Change-Id: Ic4895ccf7dc1207cc6b14004cfcf6ee7b4b76cc1
2020-11-30 06:57:29 -08:00
Almaz Mingaleev
c7a7943a2a Merge "Make manual suggestions synchronous/return result" am: 08466f6151 am: 413f8199da
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1252169

Change-Id: I8d41c4ab3688a5e1cc2a7d2b52d25e52c059c808
2020-11-25 12:18:38 +00:00
Neil Fuller
1395dffdb1 Make manual suggestions synchronous/return result
Modify the suggestManual...() methods on TimeDetector and
TimeZoneDetector to be synchronous, and have them return true/false to
indicate if the call "succeeded". This is being done before adding more
calls that will be used by apps like SettingsUI; generally all calls
that are user facing and could conceivably fail should return
success/failure information and therefore need to happen synchronously.

Test: atest services/tests/servicestests/src/com/android/server/timedetector/
Test: atest services/tests/servicestests/src/com/android/server/timezonedetector/
Bug: 140712361
Merged-In: I5b6b7fb5af2ffe88392b2ca8d1e8fff2a187521b
Change-Id: I5b6b7fb5af2ffe88392b2ca8d1e8fff2a187521b
2020-11-25 09:57:07 +00:00
Rubin Xu
5834f23224 Merge "Remove some getCallerIdentity variants in DevicePolicyManagerService" 2020-11-24 22:17:28 +00:00
Rubin Xu
750185ba76 Remove some getCallerIdentity variants in DevicePolicyManagerService
CallerIdentity object should only wrap around caller-provided and
authenticated (uid, ComponentName, PackageName) tuple. In some
instances the caller does not provide ComponentName or PackageName,
and CallerIdentity should keep track of this instead of trying to
infer the associated ComponentName or PackageName. This is because
there is one-many mapping from uid to package name, so the inference
can be imprecise as well as losing information of what the caller
supplied originally. Instead all the isXX() access control methods
should handle the case that ComponentName or PackageName might
be missing.

Bug: 167960209
Test: atest OrgOwnedProfileOwnerTest
Test: atest MixedDeviceOwnerTest
Test: atest MixedManagedProfileOwnerTest
Test: atest MixedProfileOwnerTest
Test: atest FrameworksServicesTests:DevicePolicyManagerTest
Change-Id: I8d2dfeb2e5137ea06f941855d2e5608998a86912
2020-11-24 14:56:17 +00:00
TreeHugger Robot
5f430b6a4a Merge "Empty text treated like null text" 2020-11-24 00:30:06 +00:00
Hui Yu
3357e7f9f4 Merge "BG-FGS-launch restriction exemptions." 2020-11-24 00:26:36 +00:00
Jeff DeCew
4346696937 Empty text treated like null text
This fixes an edge case with my Maps navigation notifications where the vertical alignment was obviously wrong.

Bug: 163626038
Test: manual
Change-Id: Id2d336acca20483e578d0070151065988aea9ea8
2020-11-23 15:23:21 -05:00