Commit Graph

5055 Commits

Author SHA1 Message Date
Svetoslav Ganov
9dfc48d06e Merge "Restricted permission mechanism - framework" into qt-dev 2019-04-08 14:54:03 +00:00
Anthony Tripaldi
8c1ebec4f1 Remove OPTED_OUT Secure Setting based on API Council feedback.
Bug:129768185
Test: manual
Change-Id: I51d47142cfb2abeb17d6ad5e99b8f7d1ea585fc7
2019-04-08 08:35:38 +00:00
Svet Ganov
d8eb8b2690 Restricted permission mechanism - framework
This change adds a mechanism for restricting permissions (only runtime
for now), so that an app cannot hold the permission if it is not white
listed. The whitelisting can happen at install or at any later point.

There are three whitelists: system: OS managed with default grants
and role holders being on it; upgrade: only OS puts on this list
apps when upgrading from a pre to post restriction permission database
version and OS and installer on record can remove; installer: only
the installer on record can add and remove (and the system of course).

Added a permission policy service that sits on top of permissions
and app ops and is responsible to sync between permissions and app
ops when there is an interdependecy in any direction.

Added versioning to the runtime permissions database to allow operations
that need to be done once on upgrade such as adding all permissions held
by apps pre upgrade to the upgrade whitelist if the new permisison version
inctroduces a new restricted permission. The upgrade logic is in the
permission controller and we will eventually put the default grants there.

NOTE: This change is reacting to a VP feedback for how we would handle
SMS/CallLog restriction as we pivoted from role based approach to roles
for things the user would understand plus whitelist for everything else.
This would also help us roll out softly the storage permisison as there
is too much churm coming from developer feedback.

Exempt-From-Owner-Approval: trivial change due to APi adjustment

Test: atest CtsAppSecurityHostTestCases:android.appsecurity.cts.PermissionsHostTest
Test: atest CtsPermissionTestCases
Test: atest CtsPermission2TestCases
Test: atest RoleManagerTestCases

bug:124769181

Change-Id: Ic48e3c728387ecf02f89d517ba1fe785ab9c75fd
2019-04-07 22:39:54 -07:00
Makoto Onuki
cf457b2459 Merge "Add DeviceConfig namespace for contacts provider" into qt-dev 2019-04-05 20:49:54 +00:00
Kevin Chyn
b6d2d91f2d Add secure setting to cache attention
Fixes: 129912479

Test: Builds
Change-Id: I48979c65fc33bb5d70198f549a0ea863257e0247
2019-04-04 17:31:25 -07:00
Makoto Onuki
87d3964203 Add DeviceConfig namespace for contacts provider
Bug: 129980402
Test: dumpsys-activity provider com.android.providers.contacts/.ContactsProvider2
Before and after:
$ adb shell device_config put contacts_provider use_strict_phone_number_comparison true

Change-Id: I3b1d8c9ca0c17eb11c6db4c3f2a46660b3cb0819
2019-04-04 14:42:23 -07:00
Tyler Gunn
6b9102d88b Merge "Remove call identification APIs." 2019-04-03 17:18:10 +00:00
Amin Shaikh
bb58879ddb Change theme setting to JSONObject format.
Add JSON_OBJECT_VALIDATOR to Settings and add unit tests.

Fixes: 129543539
Test: atest coretests
Change-Id: I4fa7a1357d442c1fa04a7eee815d5c3a48cc5115
2019-04-03 09:05:17 -04:00
Cody Northrop
236b283b4e Merge "ANGLE: Allow libs from debug package" 2019-04-02 13:47:30 +00:00
Alan Stokes
aa07312d8d Merge "Allow background activity starts to be controlled by DeviceConfig." 2019-04-02 12:57:50 +00:00
Tyler Gunn
a842e76231 Remove call identification APIs.
Removing the CallIdentification API surface.

Test: Build, run tests.
Bug: 129531123
Change-Id: I5f1451ffba04ee438df739a17472c028c44f19b2
2019-04-01 17:27:12 -07:00
TreeHugger Robot
817d9b671f Merge "Add a "More" item for the new default apps list." 2019-04-01 22:07:07 +00:00
Shuo Qian
4fb4320a5e Merge "Clean up Call redirection setting" 2019-04-01 20:16:22 +00:00
Alan Stokes
fb227077b8 Allow background activity starts to be controlled by DeviceConfig.
If the global setting has been explicitly set to 1 or 0 (e.g. via
developer settings) then that takes precedence - so we don't interfere
with what the user has set. Otherwise the default value from
DeviceConfig is used.

Also migrate the associated (not yet used) package whitelist to
DeviceConfig, so we can set both at the same time. The whitelist is
ignored if the user has explicitly enabled or disabled background
starts.

Bug: 129533810
Test: atest WmTests:ActivityStarterTests

Change-Id: I2856edb5cb8c99a8cfef4712732d9dc9c5d7cdb7
2019-04-01 12:10:32 +01:00
Hai Zhang
113441e661 Add a "More" item for the new default apps list.
If Settings handles the new intent action, a "More" item will appear
in the new default apps list, and clicking it will launch that intent.

Bug: 124452117
Bug: 127745414
Test: build
Change-Id: I4bb08489b77de12fd20d85260edba9e58252712a
2019-03-31 16:19:31 -07:00
Jeff Sharkey
f5e3d6a735 DATA is deprecated, but some apps really want it.
The DATA column points at raw filesystem locations, which aren't
always valid when an app is placed into a sandbox, so apps need to
move away from using them.

We had hoped to block this access based on an app targeting Q, but
we've received feedback that it's too painful for apps to transition,
so we'll continue returning paths that can be translated.

Also reduce CPU usage by skipping permission checks when not
processing an IPC, such as when called by ModernMediaScanner.

Bug: 128452447, 125725916
Test: atest --test-mapping packages/providers/MediaProvider
Change-Id: Ibd41d8ddedfaf9807333560b2d8e64e42ea7a1ba
2019-03-31 12:03:50 -06:00
Jeff Sharkey
a1189dcf68 Merge changes from topic "permz"
* changes:
  Flesh out remaining CR.wrap() methods.
  Apps using storage must have runtime permission.
2019-03-31 16:36:05 +00:00
Jeff Sharkey
448c1ea84d Apps using storage must have runtime permission.
A major goal of the Q release is to promote user transparency around
permission usage, and to also give user controls over those
permissions.  To further this goal, all apps requesting the
internal WRITE_MEDIA_STORAGE permission must also request (and be
granted) the "Storage" runtime permission in order to gain the
associated access.

If the user revokes the "Storage" runtime permission, then the app
must lose all access granted to it via WRITE_MEDIA_STORAGE.

Bug: 129144016
Test: atest android.permission.cts.ProviderPermissionTest#testWriteMediaStorage
Change-Id: I7e747de0107cf9364a0ff2401686906340d31995
2019-03-29 19:46:20 -06:00
sqian
fa9460a6f0 Clean up Call redirection setting
Test: Treehugger
Fixes: 123038126
Change-Id: I9cb569bfd1ef5fba7958bb2e5f42f05e300e3358
2019-03-29 18:14:08 -07:00
Cody Northrop
dc2fd94628 ANGLE: Allow libs from debug package
Add a new setting that allows a developer to specify where
to load ANGLE libraries from, rather than the default location.
This is only allowed for apps that are dumpable, i.e. can have
libraries injected.  That includes debuggable, profileable,
and root.

To use the new setting:

  adb shell settings put global angle_debug_package <package>

This allows a developer to build an APK directly from Chromium
and use it with a production build of Android. It will override
pre-installed system packages and updates.

Note: Use of ANGLE Developer Options UI will cease to function
until the debug package is uninstalled.

Bug: 80239516
Test: Apply setting, see new ANGLE used
Test: cts-tradefed run singleCommand cts -m CtsAngleIntegrationHostTestCases

Change-Id: Ib3b1fb52c0eb669e7ea931959a73aba2bd15bedf
2019-03-29 15:50:06 -06:00
TreeHugger Robot
11ed72c546 Merge "Remove TODO which was already completed." 2019-03-29 16:41:32 +00:00
Stanislav Zholnin
6ba9801a84 Remove TODO which was already completed.
Test: trivial change
Change-Id: I1cdb6d87e20d08dc17ea1f85da9490f27cdf7249
2019-03-29 14:36:14 +00:00
Matt Pape
d08df8bd9f Merge "Remove interface for Telephony." 2019-03-28 14:48:37 +00:00
Julia Reynolds
3bdcce76cd Add link for bubble settings.
Test: cts
Bug: 129068779
Change-Id: I61613e023e20bc807d04cfc3ab91074249d7f3b7
2019-03-27 12:25:03 -04:00
Andrei-Valentin Onea
9cd1d069d6 Merge "Add app_compat flags for hidden api logging" 2019-03-27 15:31:16 +00:00
TreeHugger Robot
b494421edb Merge "Add ability to take on demand system heap dumps." 2019-03-27 12:05:16 +00:00
Kweku Adams
a3513f0598 Add ability to take on demand system heap dumps.
With this, users with userdebug/eng builds will be able to initiate a
system heap dump from developer options.

Bug: 77490269
Test: manual
Change-Id: I0f4efec621e0d63b87c2d655a5f0434572cb92ac
2019-03-26 17:12:23 -07:00
Jeff Sharkey
fb0756fa40 Merge "Clean up scan calls used for testing." 2019-03-25 20:57:22 +00:00
Matt Pape
d9f057558b Remove interface for Telephony.
Per API council feedback, we are making changes to include only the
namespace in the system API defined in DeviceConfig.java. Strings which
define property names should be defined in code local to the feature
instead.

Bug: 126411407
Test: atest FrameworksCoreTests:DeviceConfigTest
Change-Id: I2a7f22296f73ea6a27e7b430a619fbf150acb58c
2019-03-25 11:06:36 -07:00
Winson Chung
30115c998c Merge changes from topic "nav-bar-mode-fw-overlay"
* changes:
  Overlaying the nav bar frame dimens
  Check the overlay state for updating sysui
  Removing old resources
  Remove the swipe up setting from system
2019-03-25 16:58:11 +00:00
Jeff Sharkey
4b457c3915 Clean up scan calls used for testing.
We've converged on explicit scanVolume() and scanFile() methods
which tests should be calling.  These are more robust than the
previous broadcast-based events, which could hang for a long time.

Bug: 127323913
Test: atest --test-mapping packages/apps/MediaProvider
Change-Id: I4f7918c70a67bcafab69ae2a71ee8e4bdaff01eb
2019-03-25 10:55:18 -06:00
Stanislav Zholnin
5579950a80 Add READ_DEVICE_CONFIG permission check to DeviceConfig API.
Test: atest FrameworksCoreTests:DeviceConfigTest
      atest FrameworksCoreTests:SettingsProviderTest
      atest SettingsProviderTest:DeviceConfigServiceTest

Bug:117663715
Change-Id: I04226876ddf910945bf343d25fa3dd04ba8eab31
2019-03-25 11:14:07 +00:00
Jeff Sharkey
ff200957fd Query specific collections for properties.
We're now enforcing the public API schema, so clients like MTP need
to query specific collections when asking for properties that are
specific to those media types.

Also refactor MediaScanner calls to go through MediaProvider, so
they can be handled by ModernMediaScanner.  We no longer directly
try inserting items, and instead rely completely on the scanner.

Bug: 127625964, 122263824
Test: atest MediaProviderTests
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: Ic86982766606a619afafe725f9c60013a5671840
2019-03-24 14:21:01 -06:00
Winson Chung
85e745929f Remove the swipe up setting from system
Bug: 127366543
Test: adb shell dumpsys setting

Change-Id: I3a1a716a73d91048886b67444b574abdfc61323e
2019-03-23 22:28:22 -07:00
Jeff Sharkey
788f9d3847 Merge "Helper methods for constructing MediaStore Uris." 2019-03-23 19:31:56 +00:00
Jeff Sharkey
f9ebfc9af0 Helper methods for constructing MediaStore Uris.
Bug: 128787096
Test: atest MediaProviderTests
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: I2848feb616df1c4df0b1bb71544769f61b9d84e8
2019-03-23 11:54:45 -06:00
TreeHugger Robot
f09c91b279 Merge "Converting EXTRA_PACKAGE_NAME to a link tag" 2019-03-23 06:19:42 +00:00
Salvador Martinez
13bfe4a789 Merge "Update names of dynamic power saver mode APIs" 2019-03-22 20:52:13 +00:00
Salvador Martinez
b85a9f8db4 Update names of dynamic power saver mode APIs
There was some confusion caused by the names so this CL
changes them to make the differentiation more clear hopefully.

Test: robotests pass, build runs, functionality of clients intact
Bug: 126944845
Change-Id: I626dd8e38c59fb5c061e4d0fdcf8c81701c459a3
2019-03-22 10:12:42 -07:00
Jeff Sharkey
310ad26a82 Merge "Respond to API feedback on DIRECTORY columns." 2019-03-22 15:28:17 +00:00
Jeff Sharkey
40a5092b46 Merge "Documentation based on API council feedback." 2019-03-22 15:04:50 +00:00
TreeHugger Robot
6e7a60c85c Merge "Add intent action constant to zen access setting page" 2019-03-22 06:37:36 +00:00
Michael Groover
c640422ad5 Merge "Add Sensors Off QS tile and display status bar icon when active" 2019-03-22 00:34:22 +00:00
Jeff Sharkey
e1a39c173a Documentation based on API council feedback.
Bug: 128414269
Test: none
Change-Id: I5c72dbb9bfb626d1a26aea88fcd6b5fc38cb6f01
2019-03-21 14:34:11 -06:00
Fan Zhang
a9b145de21 Add intent action constant to zen access setting page
Bug: 128547723
Test: build
Change-Id: Ifa918f2c532e60eced27621d802d56bc0e680c25
2019-03-21 12:33:06 -07:00
Jeff Sharkey
f998670075 Respond to API feedback on DIRECTORY columns.
Internal feedback asked for more documentation, and feedback from
external teams (at least Photos and Camera) was the ability to store
files at arbitrary directory depths.

We now offer a single PATH column, which gives callers more precise
control over file placement.  The old DIRECTORY columns remain
intact for now, and are temporarily accepted to support apps
developing against the preview SDKs.

Bug: 127657692, 123967243
Test: atest MediaProviderTests
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: Icd90d7c89d066d4ab68aa2f543ccc6fbc3b4f596
2019-03-21 11:52:01 -06:00
Matt Pape
48d81faf16 Merge "Remove DeviceConfig.Telephony interface from System API." 2019-03-21 05:28:16 +00:00
danielle cohen
b67cb62204 Add ODI_CAPTIONS_OPTED_OUT to secure settings.
Test: none
Bug: 128978908
Change-Id: I3d49ea4e071ace0e457f29fc1a19ef0a279e51f9
2019-03-21 04:05:37 +00:00
Matt Pape
38ed4e7f31 Remove DeviceConfig.Telephony interface from System API.
Per API council feedback, we are making changes to include only the
namespace in the system API defined in DeviceConfig.java. Strings which
define property names should be defined in code local to the feature
instead.

Bug: 126411407
Test: atest FrameworksCoreTests:DeviceConfigTest

Change-Id: I8d5b1f2dab84a1fe1f645cad508bebbc86f2c9c5
2019-03-20 15:04:02 -07:00
TreeHugger Robot
be1d460a88 Merge "Revive the old behavior of unsupported filed in public APIs" 2019-03-20 20:11:14 +00:00