Commit Graph

10255 Commits

Author SHA1 Message Date
Treehugger Robot
eb03672631 Merge "Expose a setter for install scenarios" am: 29ec0b24c7 am: 34312d2173 am: 04422ecae9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1587776

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I1ef7bdd1b1b1c3153613740e64dab458697f84fd
2021-02-17 19:48:02 +00:00
Treehugger Robot
04422ecae9 Merge "Expose a setter for install scenarios" am: 29ec0b24c7 am: 34312d2173
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1587776

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I72aaba3a7214c8cb3a2d25293f175ce27e0da50e
2021-02-17 18:53:43 +00:00
Flavio Fiszman
44a79fa3f3 Merge "Cache shortcuts on People Tile creation" into sc-dev 2021-02-17 13:26:44 +00:00
Alex Agranovich
7c064eb586 Merge " Add a system TextToSpeech implementation that initiates the connection through the system server." into sc-dev 2021-02-17 09:16:48 +00:00
Gavin Corkery
37dbb4e5d5 Merge "Initialize RebootReadinessManagerService" into sc-dev 2021-02-17 07:43:18 +00:00
Abhijeet Kaur
6f6bdfd287 Merge "Add new API to check a collection of URIs at once" into sc-dev 2021-02-16 19:43:50 +00:00
Winson Chiu
766326b69a Merge changes I5e258e23,I72323430 into sc-dev
* changes:
  Update isLinkHandlingAllowed to mean all or nothing
  Update intent resolution logic with new rules
2021-02-16 19:12:22 +00:00
TreeHugger Robot
9c28f9708a Merge "pm: Require manifest.json for .dm (dex-metadata) files." into sc-dev 2021-02-16 18:59:42 +00:00
Chris Wailes
8c2a706895 Expose a setter for install scenarios
This CL adds a setter for the install scenario data of the SessionParams
object in PackageInstaller.

Test: atest InstallSessionParamsUnitTest
Bug: 179841918
Change-Id: I9260d58285a5d0a051d2bdafa6ba6b23a739de01
2021-02-16 09:01:24 -08:00
Gavin Corkery
1d94eb9ea5 Initialize RebootReadinessManagerService
Initialize reboot readiness service from the
system server. This service is started
by calling into service-scheduling.jar
directly.

Test: Manual, add logs to check that service
      is correctly started.
Bug: 161353402

Change-Id: I06d55ee6ee5c3dde7524cf508324fd408fb81d22
2021-02-15 21:30:23 +00:00
Abhijeet Kaur
a0d5569c89 Add new API to check a collection of URIs at once
Optimizes the workflow to check multiple URI permissions, which
currently need to be checked one URI at a time.

New APIs are logically similar to existing APIs: checkUriPermission,
checkCallingUriPermission and checkCallingOrSelfUriPermission. The
new APIs would take input of a collection of URIs instead of just one
URI.

Bug: 179362563
Test: atest ContextTest.java
Test: atest ExternalStorageHostTest#testMediaEscalation_RequestWriteFilePathSupport

Change-Id: I9cd6278f9b865c0532afc337b089771df6aea8c5
2021-02-15 18:23:53 +00:00
Vadim Caen
24764efd19 Merge changes from topics "splash_api_sc_a2", "splash_api_sc_a3", "splash_api_sc_a4", "splash_api_sc_a5", "splash_api_sc_a6", "splash_exit_sc_a1" into sc-dev
* changes:
  Add two more Api for SplashScreenView(7/N)
  Support persist night mode for application(6/N)
  Allow ShortcutInfo to specify a theme for splash screen.(5/N)
  Add API for show branding image on splash screen.(4/N)
  Provide new APIs for customize splash screen window.(3/N)
  Customizable exit splash screen animation.(2/N)
2021-02-15 17:22:01 +00:00
Oli Lan
0e588cc322 Merge "Add ClipDescription method to determine if the clip is styled text." into sc-dev 2021-02-15 16:14:15 +00:00
wilsonshih
cf05d92650 Allow ShortcutInfo to specify a theme for splash screen.(5/N)
Provides new APIs so that shortcuts can preset the theme of the splash
screen window.
- Static way: android:splashScreenTheme
  Preset the splash screen theme from xml.
- Dynamic way: ShortcutInfo.Builder#setStartingTheme
  Preset the splash screen theme when construct the ShortcutInfo
  programmatically.

Bug: 73289295
Test: build/flash
Test: atest AppWindowTokenTests ActivityRecordTests
Change-Id: Ie5e73f9b22fea22659e496c12198c942f4bc93cd
2021-02-15 15:27:03 +01:00
Flavio Fiszman
2cec2e96ba Cache shortcuts on People Tile creation
Change-Id: Ie85dd4bf48657ab080caed6fbcbf5982a5c9e6da
Test: manual
Bug: 177348950
2021-02-15 12:32:11 +00:00
Winson
ebf59827ee Update isLinkHandlingAllowed to mean all or nothing
This toggle is actually used to toggle whether or not the app can open
app links at all, not just verified app links.

Updates the persistence/data classes to be in line with the new default
behavior.

Also makes it so that unverified apps cannot be enabled if another
approved package already exists.

Bug: 178525735

Test: atest DomainVerificationPersistenceTest

Change-Id: I5e258e230e6d6b5de79aab32838496f2126f8451
2021-02-12 15:09:33 -08:00
Michael Groover
87d49d2f27 Merge "Include knownCerts in Parcels for PermissionInfo and ParsedPermission" into sc-dev 2021-02-12 17:31:45 +00:00
TreeHugger Robot
6516885e88 Merge "Add a new feature to store IncFs version." into sc-dev 2021-02-12 16:37:01 +00:00
Michael Groover
7c001ed2f3 Include knownCerts in Parcels for PermissionInfo and ParsedPermission
Android 12 adds support for a new knownSigner permission protection
flag that allows one or more trusted signing certificates to be
specified with the permission declaration; a requesting app signed
by any of these certificates will be granted the permission. This
commits adds the new knownCerts Set to the Parcels for
PermissionInfo and ParsedPermission instances.

Bug: 172970984
Test: atest PkgInstallSignatureVerificationTest
Test: atest PermissionInfoTest
Change-Id: I07e415c0d3df6fe352ec5b04a29d986a2647fa19
2021-02-11 19:04:28 -08:00
Alex Buynytskyy
50bc17cdaa Add a new feature to store IncFs version.
And deprecating the old feature which didn't have versioning support.

V2 means that the new features are either required if the device
was shipped with S, or available if device updated kernel to S.

Bug: 180010901
Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest IncrementalServiceTest PackageManagerServiceTest ChecksumsTest
Change-Id: If037f0eb23260f354b0929ff7afaf1af9627e5fa
2021-02-11 19:01:00 -08:00
Philip P. Moltmann
8d6a0cb6af Merge "Remove me from OWNERS files" am: 25ee5a7fb7 am: bf8de269cb am: 39198ddd84
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1573324

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I429557a8537fb6417fcb9539978964ade75c8dee
2021-02-11 23:15:42 +00:00
Philip P. Moltmann
39198ddd84 Merge "Remove me from OWNERS files" am: 25ee5a7fb7 am: bf8de269cb
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1573324

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ibe2c5fd92070b1aebdc46755c8667b3ed22348ab
2021-02-11 22:57:48 +00:00
Philip P. Moltmann
25ee5a7fb7 Merge "Remove me from OWNERS files" 2021-02-11 22:29:07 +00:00
Philip P. Moltmann
a8eb3d3e69 Remove me from OWNERS files
Test: n/a
Change-Id: I6113011e6ab0997285d5b7a86303fc60a3b98a2b
Exempt-From-Owner-Approval: Previously approved
2021-02-11 22:28:43 +00:00
Winson
68c83e6346 Parcel queriesProviders in ParsingPackageImpl am: 985d71551d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13554511

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I346dbe05f1319f24af7b8fd36ebc26eee1e379bc
2021-02-11 19:42:12 +00:00
Winson
985d71551d Parcel queriesProviders in ParsingPackageImpl
This was broken in the original migration, causing this field to be
dropped on reboot.

Bug: 178209505

Test: TODO, separate change will include comprehensive parceling test

Change-Id: I67219fe00c7b92677391fd46305bf0424d74e5f3
(cherry picked from commit 00f69942be)
2021-02-11 16:57:08 +00:00
TreeHugger Robot
40ad781251 Merge "Fix screen size with compatibility override scale" into sc-dev 2021-02-11 16:39:15 +00:00
Kholoud Mohamed
bf3934e0af Merge "Expose PM#setKeepUninstalledPackages as TestAPI" into sc-dev 2021-02-11 13:56:46 +00:00
TreeHugger Robot
ba4fa60b35 Merge "Introduce SystemVibratorManager" into sc-dev 2021-02-11 13:12:18 +00:00
Daulet Zhanguzin
be67bbad65 Use public android.system.Int64Ref instead of Int32Ref which is hidden (CorePlatformApi) type of am: 3f22cb1106 am: 612b33fa9a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1582887

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Id8fbbbc5f4f25998fb2ae8c42c5e0392c18f9510
2021-02-11 13:06:03 +00:00
Lais Andrade
55a0aebe7f Introduce SystemVibratorManager
Add default system implementation of vibrator manager service that uses
IVibratorManagerService to access the device vibrators.

Change implementation of SystemVibrator to use VibratorManagerService
and delete local service VibratorService.

Introduce missing public APIs for VibratorManager and Vibrator.getId.

Bug: 167946816
Test: VibratorManagerServiceTest, VibratorTest, VibrationEffectTest
Change-Id: I55cdeb72c7ca39ccf0c7b2fda60b16de1031801e
2021-02-11 09:26:21 +00:00
Alex Buynytskyy
b19ee3ebd8 DataLoader lifecycle.
- restarting DataLoaders for not fully downloaded mounts,
- exponential backoff retry on DataLoader restart.

Bug: 173223115
Bug: 160634487
Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest IncrementalServiceTest PackageManagerServiceTest ChecksumsTest
Change-Id: I5a93fd515ef0fec09452ce7bb4cd79fbd283d45f
2021-02-11 08:47:27 +00:00
TreeHugger Robot
08ca0311b5 Merge "Add support for knownSigner permission protection flag" into sc-dev 2021-02-11 01:48:45 +00:00
Mady Mellor
b91377962d Merge "Bubble API: intent extra for bubbled activities" into sc-dev 2021-02-11 00:35:56 +00:00
Michael Groover
27eef5cfcd Add support for knownSigner permission protection flag
This commit adds support for a new permission protection flag that
allows a permission declaration to also include an array resource of
trusted signing certificate digests. A permission declared with this
new knownSigner permission flag will be granted to a requesting app
if that app's current signer, or any of the previous signers in its
lineage, are in the declared trusted signing certificate set.

Bug: 172970984
Test: atest SigningDetailsTest
Test: atest PkgInstallSignatureVerificationTest
Change-Id: I54ff2ac720c3a1828d0606426197f7f0e0d0d4b5
2021-02-10 14:49:17 -08:00
Roland Levillain
a7f6e5ea40 Merge changes from topic "cherrypick-android_util-a0ae5zk4cb" into sc-dev
* changes:
  [Mainline] android.system package APIs migration
  Use public android.system.Int64Ref instead of Int32Ref which is hidden (CorePlatformApi) type of libcore
2021-02-10 18:23:48 +00:00
kholoud mohamed
a0e1d714f2 Expose PM#setKeepUninstalledPackages as TestAPI
This is needed to enable the new testing infrastructure to
reinstall removed packages between test runs as part of state
resetting.

Bug: 179682115
Test: confirmed that cts tests can call the API
Change-Id: Idc093fb387694096b0bf81472dd71387d3c85e85
2021-02-10 17:35:16 +00:00
Riddle Hsu
4fe90c0fe9 Fix screen size with compatibility override scale
The values in dp shouldn't be changed because the density is
already scaled.

Also add unit tests to ensure that the override scale from
CompatModePackages applies to window and surface.

Bug: 168419799
Test: atest DisplayContentTeasts#testCompatOverrideScale
Change-Id: I4b99b123d4beb33cc3d97eb07e506d8a60fcc5e3
2021-02-11 00:57:34 +08:00
Daulet Zhanguzin
3f22cb1106 Use public android.system.Int64Ref instead of Int32Ref which is hidden (CorePlatformApi) type of
libcore

Bug: 154796679
Bug: 179703584
Test: Treehugger
Change-Id: I06aa9df929abb94f1d9354f57087a973be597a43
Merged-In: I06aa9df929abb94f1d9354f57087a973be597a43
(cherry picked from commit 734ab4902b)
2021-02-10 12:34:02 +00:00
Daulet Zhanguzin
af3da459b7 Use public android.system.Int64Ref instead of Int32Ref which is hidden (CorePlatformApi) type of
libcore

Bug: 154796679
Bug: 179703584
Test: Treehugger
Change-Id: I06aa9df929abb94f1d9354f57087a973be597a43
Merged-In: I06aa9df929abb94f1d9354f57087a973be597a43
(cherry picked from commit 734ab4902b)
2021-02-10 12:24:06 +00:00
Oli Lan
4d5c48d988 Add ClipDescription method to determine if the clip is styled text.
This adds a new method to ClipDescription to allow callers to
determine if the associated ClipData is styled text, without
accessing the ClipData directly.

This information is used by editors such as TextView or WebView
when they show a selection toolbar, in order to determine if a
"Paste as plain text" option should be shown. Currently, ClipData
must be accessed in order to do this, so a clipboard access
occurs whenever text is selected.

Avoiding these clipboard accesses is desirable because a user-visible
message may in future be shown whenever ClipData is accessed
(see b/167676460), which may cause user confusion.

Bug: 167660455
Test: new tests added to ClipDescriptionTest in CTS
Change-Id: I48bea4d11a68b198d60016b364a3cfa0b0bf277e
2021-02-10 10:06:05 +00:00
Ryan Mitchell
6a2ca782d4 OverlayManager Fabricated RROs
Adds registering and unregistering of FabricatedOverlay to the OMS.
The process that creates the fabricated overlays owns it and is the
only process allowed to unregister it.

When a fabricated overlay is registered, overlay settings for it are
initialized in all users. When a fabricated overlay is unregistered,
it is disabled and removed from all users. When a new user is created,
it will be able to use the fabricated overlay as well.

On boot, fabricated overlays that are not referenced in overlay
settings will be deleted.

When the package that created the fabricated overlay is uninstalled,
its fabricated overlays are also unregistered.

Bug: 172471315
Test: atest OverlayDeviceTests
Change-Id: I0539656f4c919246b13129579b0286c08a398dc2
2021-02-09 20:13:50 -08:00
Ryan Mitchell
5c8ba79373 Query overlays using package and name
Fabricated RROs identifiers are made using package name and overlay name
combinations. In the future, packages with multiple <overlay> tags will
use overlay name to distinguish between the tags.

This changes the OMS to manage overlays through OverlayIdentifiers.
The identifier is a overlay package and name combination. The name field
is optional so overlays without an overlay name can be managed.

This change simplifies the logic required to update the set of target
packages affected by overlay changes.

Bug: 172471315
Test: OverlayDeviceTests
Test: OverlayImpl tests
Change-Id: Iac679828d7480e5c7a2c1fe4ea8b73401d8d487f
2021-02-09 20:13:47 -08:00
Igor Murashkin
12af11d6f5 pm: Require manifest.json for .dm (dex-metadata) files.
Example file:
  $> unzip CtsApkVerityTestAppPrebuilt.dm manifest.json ; cat manifest.json
  {
    "packageName": "android.appsecurity.cts.apkveritytestapp",
    "versionCode": 30
  }

Test: adb install-multiple -r foo.apk foo.dm
Test: atest FrameworksServicesTests:com.android.server.pm.dex.DexMetadataHelperTest
Bug: 179295368
Change-Id: I7a3c442bb27da5948bc9ead146c77213de6b56cc
2021-02-09 13:07:45 -08:00
TreeHugger Robot
419f4eeb6c Merge "Add overlayPaths to ApplicationInfo" into sc-dev 2021-02-09 17:05:34 +00:00
Mady Mellor
1ecb1ccb9a Bubble API: intent extra for bubbled activities
Apps need a better way to check if their shortcut or
pending intent is bubbled, to do this we'll add an intent
extra on the bubbled activity that they may check.

- updated doc around bubbles for how to check the extra
- applied flag on activity for intent & shortcut

Bug: 171220648
Test: atest NotificationManagerTest (see CTS CL)
Change-Id: Iba97a0058e1e4fc33c4df32a3f258ff350ad04e2
2021-02-08 14:04:18 -08:00
Alex Agranovich
290d1119ee Add a system TextToSpeech implementation that initiates the connection through the system server.
This change includes the new System Service that allows the supervised binding to the TextToSpeech service provider. It proxies the binding process from the client instead of the direct client -> texttospeech connection.

Bug: 178112052
Test: atest CtsSpeechTestCases
Change-Id: Ie17800bae7a84bfd6e63633f5c914ddbe2c29e9d
2021-02-08 17:25:40 +02:00
Ryan Mitchell
da9ee1406e Add overlayPaths to ApplicationInfo
RROs have historically been APK packages. We now have the ability to
generate RROs on-the-fly. These "fabricated" RROs are not APKs.
ApplicationInfo#resourceDirs documentation states that it only contains
paths to packages. To prevent changing the behavior of resourceDirs
until we can deprecate and remove it, a new overlayPaths field has been
added to ApplicationInfo. This new field contains APK overlay paths as
well as non-APK overlay paths.

Bug: 172471315
Test: boot enable/disable overlays and examine overlays working as well
      as package manager dumpsys
Change-Id: I78c5eeef73b7d8bada61edc0f64a12a3cdc1ce16
2021-02-08 00:28:58 -08:00
TreeHugger Robot
ead7d81ed4 Merge "Add MEDIA_COMMUNICATION_SERVICE in Context.ServiceName" into sc-dev 2021-02-08 08:15:46 +00:00
Hyundo Moon
05766bfb98 Add MEDIA_COMMUNICATION_SERVICE in Context.ServiceName
Bug: 175511943
Test: Builds successfully
Change-Id: I3065e3fa57339bd81e5e5f5ade1493edd12324c5
2021-02-08 11:12:18 +09:00