Commit Graph

7323 Commits

Author SHA1 Message Date
Aurimas Liutikas
feccee99fa Merge "Remove old private constant from ResourceId." 2019-01-18 16:53:46 +00:00
Ricky Wai
8b45da9025 Suppress injected launcher activity for apps that are vouched
Test: atest com.android.server.pm.LauncherAppsServiceTest
Bug: 120904599
Change-Id: Iad66a69113d077604f108786d57c9252d2beb8a2
2019-01-18 14:16:37 +00:00
Mehdi Alizadeh
b4367b7bab Merge changes from topic "shortcuts-for-sharing"
* changes:
  Disable the use of new share target API in ShareSheet
  Loads direct share targets from ShortcutManager in ShareSheet
2019-01-18 02:42:32 +00:00
Mehdi Alizadeh
fd4055bb0c Merge "Adds API to set persons and isLongLived in ShortcutInfo" 2019-01-18 01:12:01 +00:00
Aurimas Liutikas
d8ebfefcee Remove old private constant from ResourceId.
Bug: 122967079
Test: make -j builds
Change-Id: I3e999044df02549e84208d38bb77d2ce1d1bd73b
2019-01-17 12:51:58 -08:00
Aurimas Liutikas
01c7237439 Merge "Add ID_NULL constant to Resources." 2019-01-17 20:47:59 +00:00
Mehdi Alizadeh
406e8b36a1 Loads direct share targets from ShortcutManager in ShareSheet
Bug: 111698461
Test: Manual test using test app
Change-Id: I4f315d186363cc76578ee551cc55349e3e266593
2019-01-17 11:52:39 -08:00
Aurimas Liutikas
8338623a70 Add ID_NULL constant to Resources.
Bug: 122967079
Test: cts in same topic
Change-Id: Ic6e2da137554a967b379b30c0d2d37341941a117
2019-01-17 18:20:27 +00:00
Stanislav Zholnin
2452709418 Merge "Added a new set of permissions for DeviceConfig API." 2019-01-17 10:16:25 +00:00
TreeHugger Robot
9ab55d9a14 Merge "Fix default of extractNativeLibs in parseBaseApplication" 2019-01-16 23:26:46 +00:00
Aurimas Liutikas
428ddacfa4 Merge "Add source style for each TypedValue." 2019-01-16 21:48:46 +00:00
TreeHugger Robot
8e0e5722f8 Merge "Pre-grant location permisson to location extra packages." 2019-01-16 21:17:40 +00:00
Stanislav Zholnin
596437fd4e Added a new set of permissions for DeviceConfig API.
Permissions READ_DEVICE_CONFIG and WRITE_DEVICE_CONFIG are required to
use DeviceConfig API. Actual checks for new permissions are not added
as we are waiting for gmscore to include them into manifest.

Also added "configurator" protection flag.

Test: atest FrameworksCoreTests:DeviceConfigTest
      atest FrameworksCoreTests:SettingsProviderTest
      atest SettingsProviderTest:DeviceConfigServiceTest
Bug:109919982
Bug:113100523
Bug:113101834
Bug:117663715
Change-Id: I66c256b57c5491201c6c7834620a287b6c81c23c
2019-01-16 10:50:51 +00:00
Aurimas Liutikas
ce7c99c661 Add source style for each TypedValue.
This API will be used by Android Studio layout inspector to
query where a given resource attribute originated from to allow
developers to have an easier way to find what needs to be changed
to affect a given resource attribute.

Test: CTS added in the topic
Bug: 111439551
Change-Id: Ifbb52b39912ed0444030a86164290a1cd4155250
2019-01-15 16:11:23 -08:00
TreeHugger Robot
ac729c48e9 Merge "PackageParser: Add support for parsing codeNames with fingerprints." 2019-01-15 22:42:52 +00:00
Nikita Dubrovsky
c834fd1133 Merge "Update deprecation javadocs of APIs related to preferred activities" 2019-01-15 21:50:44 +00:00
Narayan Kamath
71fcc14e3f PackageParser: Add support for parsing codeNames with fingerprints.
In addition to supporting manifest declared codenames of the form
"[codename]", also support codenames of the form "[codename].[fingerprint]".

Also makes cosmetic changes to PackageParserTest to produce better
failure messages when the test fails.

Test: PackageParserTest

Change-Id: If5e38614a1a3aa04035f14acfda41d0c1cd86e15
2019-01-15 20:13:48 +00:00
Winson Chiu
55d9a6042b Merge "Add function to return path for last resolved resource" 2019-01-15 18:38:17 +00:00
Nikita Dubrovsky
7e9d5e1ed7 Update deprecation javadocs of APIs related to preferred activities
Bug: 121324615
Test: build (javadoc-only change)
Change-Id: Ibe0ef25a9186f371ae7f8bf769abb6c9d09bec60
2019-01-15 08:09:22 -08:00
Michal Karpinski
a9002d56be Merge "Make PermissionInfo.PROTECTION_FLAG_OEM @TestApi" 2019-01-15 14:36:41 +00:00
Michal Karpinski
517959e484 Make PermissionInfo.PROTECTION_FLAG_OEM @TestApi
So it can be used in CTS.

Bug: 110956953
Test: atest PermissionPolicyTest#testPlatformPermissionPolicyUnaltered
Change-Id: I1682376845dfa390f01b0e869444c307e6c3d3be
2019-01-15 11:26:36 +00:00
Victor Hsieh
12dd9cd46c Fix default of extractNativeLibs in parseBaseApplication
This is a missed change in 4e54b521bc.

Test: adb install, check that libs are really not extracted.
Bug: 112037137
Change-Id: I0b819d656eb427c4b7b35e027808b87f3aad3c15
2019-01-14 20:56:40 -08:00
TreeHugger Robot
1efe5f627a Merge "Add intent action and extra for managing a single default app." 2019-01-15 00:47:40 +00:00
TreeHugger Robot
09203ca2be Merge "Adding an api to mark a package as distracting" 2019-01-14 23:53:02 +00:00
Winson
2f3669b767 Add function to return path for last resolved resource
After an AssetManager.FindEntry call is made, either directly or from any of the resource entry calls, a stack of the steps taken to resolve the resource is saved. Those steps can be retrieved as a log later on by calling AssetManager.GetLastResourceResolution, which returns a formatted string of the resource ID/name and path taken, including the configs and package names of each step.

Logging and the saving of the steps to memory can be enabled/disabled with the @hide .setResourceResolutionLoggingEnabled() method on AssetManager.

Bug: 122374289

Test: cases for single and multi ApkAssets loaded
Test: case for no resolution made
Test: made test app to display log on device
Test: added debugging call to source and ran through on-device apps

Change-Id: I6a32b8d4020c3f8510032ff7f431510089fff43f
2019-01-14 14:52:00 -08:00
Wei Wang
ffb94e69c3 Pre-grant location permisson to location extra packages.
Grant location permission to extra packages configurated in xml config
file. This is necessary as pre-grant happens right after system starts,
before location provider sets the *real* location extra package.

Bug: 119225658
Test: Manual, atest GtsPermissionTestCases:com.google.android.permission.gts.DefaultPermissionGrantPolicyTest

Change-Id: Ibbfbfb78aa062fa6dc013a1001ea3486d62f4331
2019-01-14 22:34:52 +00:00
Hai Zhang
3a21289896 Add intent action and extra for managing a single default app.
This change adds Intent.ACTION_MANAGE_DEFAULT_APP and
Intent.EXTRA_ROLE_NAME for managing a single default app, which will
be launched from Settings' App info page. The new
Intent.EXTRA_ROLE_NAME also replaces RoleManager.REQUEST_ROLE_NAME.

Bug: 110557011
Test: build
Change-Id: Ice81150b0e960d050d24d963ade04254852a4ee4
2019-01-14 10:41:08 -08:00
Hyunyoung Song
9114be68cd Merge "Add @SystemApi to OverlayManager that ThemePicker needs" 2019-01-14 17:53:17 +00:00
Issei Suzuki
9178eee8b1 Merge "Add inheritShowWhenLocked System API to activity." 2019-01-14 14:34:45 +00:00
Issei Suzuki
74e1eb2220 Add inheritShowWhenLocked System API to activity.
Let an activity show on top of the lock screen if the activity behind
this can be shown on top of the screen. This is pre-requisite for
showing permission dialog on top of the lock screen only when it makes
sence.

Bug: 109754623
Test: atest server.am.KeyguardTests
Change-Id: Ideaa2b77519649a70c682bc95277e451e149adad
2019-01-14 13:42:24 +01:00
TreeHugger Robot
fd1e036205 Merge "Add EXTRA_PERMISSION_GROUP_NAME" 2019-01-12 04:29:33 +00:00
Hyunyoung Song
880a9510c2 Add @SystemApi to OverlayManager that ThemePicker needs
Test: builds and tested in local theme picker

Bug: 121328713

Commands executed:
$ make system-api-stubs-docs-update-current-api
$ make api-stubs-docs-update-current-api

Cts tests to follow

Change-Id: Id26d32f482c1bbab3497b517b7a553d145a1e3df
Signed-off-by: Hyunyoung Song <hyunyoungs@google.com>
2019-01-11 15:02:24 -08:00
Eugene Susla
40335c1be9 Merge "Mirgate default SMS app handling to RoleManager" 2019-01-11 21:23:34 +00:00
Winson Chung
fb922e9bac Merge changes from topic "prediction_suggestion_services"
* changes:
  Initial commit of Content Suggestions (overview long press) Manager.
  Adding initial implementation of Prediction client/service API
2019-01-11 20:21:19 +00:00
TreeHugger Robot
e433ab6ee8 Merge "Add ApplicationInfo.isEncrpytionAware() as a system API." 2019-01-11 19:57:48 +00:00
Dianne Hackborn
5d55a4c907 Merge "Fix issue #122615120: Add bind flag to require associations" 2019-01-11 17:09:10 +00:00
Zhi An Ng
a8f68e24b1 Merge "Do not load xml metadata for unchanged packages in RegisteredServicesCache" 2019-01-11 17:05:47 +00:00
TreeHugger Robot
cbdbc4d9c6 Merge "Add a privileged API for capturing and consuming bugreports" 2019-01-11 12:37:33 +00:00
Chalard Jean
fc758be231 Merge changes from topic "IPMS1" am: 3627deac88 am: 54d91e605c
am: 2304c7c508

Change-Id: I6908f68b1b9e7079384c4cc9f11c4e46cce694ce
2019-01-11 04:13:38 -08:00
Chalard Jean
2304c7c508 Merge changes from topic "IPMS1" am: 3627deac88
am: 54d91e605c

Change-Id: I2541996b9bfe338acabac858fdea0ad89d55df5b
2019-01-11 03:53:57 -08:00
Chalard Jean
8c141bdb8f [MS01] Add the IP memory store service.
Bug: 116512211
Test: Added initial tests
Change-Id: I9d9af4097e3e2d7afd9956b9cbfa29a9f9558ae0
2019-01-11 15:00:36 +09:00
Hai Zhang
14ea9efdfe Add ApplicationInfo.isEncrpytionAware() as a system API.
applicationInfo.isDirectBootAware() ||
applicationInfo.isPartiallyDirectBootAware() was used by Settings
to determine whether to show a confirmation message for setting a
direct boot unaware app to be some default app (e.g. SMS). Since
we are moving default app into roles in PermissionController, we
need this as a system API.

Bug: 110557011
Bug: 122270890
Test: build
Change-Id: I8bfc2b4e07239b6b9b1b9948dede3748b6ae974c
2019-01-11 02:02:11 +00:00
Dianne Hackborn
c390aa8d3c Fix issue #122615120: Add bind flag to require associations
Add the bind flag, use it for the text classifier.

Bug: 122615120
Test: manual
Change-Id: I20f066cab0cbe34e9afe22303eaf04f831aa5f79
2019-01-10 16:47:11 -08:00
Winson Chung
3fb0f258d3 Initial commit of Content Suggestions (overview long press) Manager.
Test: compile
Bug: 120865921
Change-Id: I9f8310112bedc883406f0f50a99041f542036fd9
2019-01-10 16:35:13 -08:00
Sunny Goyal
54e91344e2 Adding initial implementation of Prediction client/service API
Test: Build sample app, ensure that app prediction service gets client
      requests
Bug: 111701043
Change-Id: I33aceb2de31552b2d740dc333559d68728753e40
Signed-off-by: Winson Chung <winsonc@google.com>
2019-01-10 15:53:25 -08:00
Suprabh Shukla
7900049212 Adding an api to mark a package as distracting
Adding a package manager api to mark packages as distracting to the
user. While doing this, some restrictions can be imposed on these
packages to enable the user to refrain from using them often.

Test: Unit tests:
atest com.android.server.pm.PackageManagerSettingsTests\
com.android.server.pm.PackageUserStateTest

GTS test: atest GtsSuspendAppsTestCases

Bug: 117407613
Change-Id: I5d0606b3c6c1edcaba001852d10f1a9e140b8028
2019-01-10 15:38:18 -08:00
Eugene Susla
4ab9511993 Mirgate default SMS app handling to RoleManager
This includes laying down some groundwork to make the remaining migrations
more straightforward

Bug: 110557011
Test: atest RoleManagerTest && atest SmsManagerTest
Change-Id: Ie96abd73751d10f521756c9dcdab2a5710ca2045
2019-01-10 10:41:10 -08:00
Nandana Dutt
d11850cd44 Add a privileged API for capturing and consuming bugreports
The API is mostly implemented; except for hooking up the listener
and handling an already running bugreport.

BugreportManager is the handle to the new API exposed to apps.

Generating bugreports requires root privileges. To limit the footprint
of the root access, the actual bugreport generation in Dumpstate binary,
is accessed as a oneshot service and dies after it finishes
running.

System server accesses Dumpstate via a binder interface since it does
not have root privileges.

Starting a oneshot service is done via setting a system property, which
needs to be done from system server. BugreportManagerService is the
new system server service that does this. BugreportManager calls into
BugreportManagerService via a binder interface, since the former is in
the app's process.

Both app to system server as well as system server to native service
calls are via implementations of IDumpstate binder interface.

Bug: 111441001
Test: builds. Flashed & verified it boots.
Test: wrote a test client (not included) and verified invoking
startBugreport works.

Change-Id: I4abeb753388c055c36ae0dd916af1ec8d40b7bf0
2019-01-10 17:33:58 +00:00
TreeHugger Robot
6f5717ccf7 Merge "Flip default of extractNativeLibs if targets Q+" 2019-01-10 17:32:18 +00:00
Mehdi Alizadeh
14242afe91 Adds API to set persons and isLongLived in ShortcutInfo
Test: atest com.android.server.pm.ShortcutManagerTest1
Test: atest com.android.server.pm.ShortcutManagerTest2
Test: atest com.android.server.pm.ShortcutManagerTest3
Test: atest com.android.server.pm.ShortcutManagerTest4
Test: atest com.android.server.pm.ShortcutManagerTest5
Test: atest com.android.server.pm.ShortcutManagerTest6
Test: atest com.android.server.pm.ShortcutManagerTest7
Test: atest com.android.server.pm.ShortcutManagerTest8
Test: atest com.android.server.pm.ShortcutManagerTest9
Test: atest com.android.server.pm.ShortcutManagerTest10
Test: atest CtsShortcutHostTestCases CtsShortcutManagerTestCases

Bug: 111698461
Change-Id: I92f27c81913ba6dfa57477e9c8df3e4e04b8664f
2019-01-09 17:03:34 -08:00