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
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
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
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
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
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
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
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
* 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
* 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
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
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
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
This fixes an edge case with my Maps navigation notifications where the vertical alignment was obviously wrong.
Bug: 163626038
Test: manual
Change-Id: Id2d336acca20483e578d0070151065988aea9ea8
1. Add a new permission START_FOREGROUND_SERVICES_FROM_BACKGROUND.
2. Add a new bind flag BIND_ALLOW_FOREGROUND_SERVICE_STARTS_FROM_BACKGROUND
3. BroadcastOptions.setTemporaryAppWhitelistDuration() is currently
protected with CHANGE_DEVICE_IDLE_TEMP_WHITELIST permission, also open
it for START_ACTIVITIES_FROM_BACKGROUND and
START_FOREGROUND_SERVICES_FROM_BACKGROUND permission.
4. Exempt SYSTEM_ALERT_WINDOW permission.
5. if Context.startForegroundService() or Service.startForeground() is
restricted by BG-FGS-launch restriction, and app's targetSdkVersion is S
and above, throw a IllegalStateException.
Bug: 171305836
Test: atest cts/tests/app/src/android/app/cts/ActivityManagerFgsBgStartTest.java#testFgsBindingFlagFGS
atest cts/tests/app/src/android/app/cts/ActivityManagerFgsBgStartTest.java#testFgsBindingFlagActivity
atest cts/tests/app/src/android/app/cts/ActivityManagerFgsBgStartTest.java#testFgsStartSystemAlertWindow
atest cts/tests/app/src/android/app/cts/ActivityManagerFgsBgStartTest.java#testFgsStartFromBGException
Change-Id: Iff3ed65e174a8406d4d6045cda42bdde6cecf30d
This fixes an awkward edge case where apps omit a title because they depend on the app name to contextualize the text in the notification body.
Bug: 163626038
Test: manual
Change-Id: I452bdfcfd956d195aed575ace3b9f0556bc2d6df
Previously, we never showed a title in the decorations, and
we still don't in the expanded decorations. Rather than
making devleopers deal with the discrepancy, it's easier to
just show the app name for these views. It makes them a
tad less desirable, but we could potentially give developers
a flag to opt into the title in the future.
Bug: 163626038
Bug: 173528244
Bug: 173742646
Test: manual
Change-Id: I8e5fe162c1ccdddcd39ea36f2b28fcc6aefd1f83
We forced all notifications to have an expanded
state, but the Gmail undo notification is totally
broken in that case. This check exempts an obviosuly
bad expanded state from having to exist, fixing
Gmail's undo flow in the process.
Fixes: 173774694
Bug: 163626038
Bug: 173550917
Test: manual
Change-Id: I8973907ceb06ccf06c0a685fc0f2a2d283794fe5