Commit Graph

5094 Commits

Author SHA1 Message Date
Julia Reynolds
5b655c3915 Add setting for silent notifs on lockscreen
Test: atest
Bug: 128445911
Change-Id: If07b593aa0588f494691c7399e471a142fb585c6
2019-04-25 10:05:15 -04:00
Sudheer Shanka
cbfe50d70c Merge "Update behavior of some DownloadManager APIs." into qt-dev 2019-04-25 00:51:59 +00:00
TreeHugger Robot
c84e33b3f1 Merge "Remove Settings constants for NetworkStack" into qt-dev 2019-04-24 11:46:25 +00:00
Sudheer Shanka
25f1c6ebeb Update behavior of some DownloadManager APIs.
-- Update behavior of DownloadManager.setDestinationUri(),
   DownloadManager.setDestinationInExternalPublicDir() and
   DownloadManager.addCompletedDownload() based on the latest
   storage re-design. Essentially, going forward these APIs
   will only allow downloading files into package owned dirs
   or the top-level Download dir.
-- Allow some system components to specify
   MediaColumns.OWNER_PACKAGE_NAME when inserting items into
   MediaProvider.
-- Don't copy DownloadManager.COLUMN_TITLE to MediaProvider.
   DownloadProvider and MediaProvider have different constraints
   around "title" and there isn't really a need to keep these
   in sync.
-- Sanity check file download paths hinted by apps.
-- Remove sandbox related logic in DownloadProvider.

Bug: 120879208
Bug: 128630262
Bug: 130797842

Test: manual
Test: atest DownloadProviderTests
Test: atest cts/tests/app/src/android/app/cts/DownloadManagerTest.java
Test: atest cts/tests/app/DownloadManagerLegacyTest/src/android/app/cts/DownloadManagerLegacyTest.java
Test: atest cts/tests/app/DownloadManagerApi28Test/src/android/app/cts/DownloadManagerApi28Test.java
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*

Change-Id: If48bc9ecf9ed94412c6c62ce4e5e6a55fff9b789
2019-04-23 18:55:51 -07:00
Santos Cordon
623526b4b3 Add delay to power-button power-off after gesture wakeup.
Adds a small delay to avoid turning off the device if the user
hits the power button right after the device wakes up via a gesture.

Bug: 126560003
Test: Manual
Change-Id: I3116ce98f244e5660573d5fa764a77083aee7fc5
2019-04-23 11:55:29 +01:00
Chiachang Wang
4dd1b47b0b Remove Settings constants for NetworkStack
The definitions reference of these constants are moved from
Settings to DeviceConfig. These definitions are @hide and the
usage in the Settings are removed. Thus, remove the definitions
from API level.

Bug: 123167629
Test: make system-api-stubs-docs-update-current-api \
      test-api-stubs-docs-update-current-api
Test: atest NetworkStackTests
Change-Id: I28c4bf2c0b72e154cea91d11007a9497c7f21570
2019-04-23 09:32:14 +08:00
Steve Elliott
2c570c179a Merge "Power key behavior tweaks." into qt-dev 2019-04-19 23:02:08 +00:00
Salvador Martinez
d6aa4d3e8e Merge "Make Settings and SysUI estimates use same data class" into qt-dev 2019-04-19 22:00:27 +00:00
Lei Yu
622d628fa8 Merge "Add DeviceConfig namespace for settings ui" into qt-dev 2019-04-19 19:44:53 +00:00
Salvador Martinez
580098fe44 Make Settings and SysUI estimates use same data class
This moves everything over to using a shared data class
for Estimates in SettingsLib which will facilitate a cl
that will help ensure greater consistency across
surfaces where battery estimates are shown.

Test: Tests pass
Bug: 124030091
Change-Id: I0b7f1f3a806255ff4804a00e6d90a7846c484484
2019-04-19 17:35:20 +00:00
Dan Sandler
b458f4eee8 Power key behavior tweaks.
- Added a new value for config_longPressOnPowerBehavior:
    "5" means "launch assist intent"
  - Added global settings for power key longpress and "very
    long press" (3.5 sec), allowing these functions to be
    tweaked at runtime by privileged code

Bug: 130415373
Test: adb shell settings put global power_long_press 5
      # ^ set longpress to assist
      adb shell settings put global power_very_long_press 1
      # ^ set vlongpress to globalactions (so you can still
      # power off the device)
Test: atest frameworks/base/core/tests/coretests
Change-Id: Ic611b2850dc98fddd7662d32b0a60ca1e8231efb
2019-04-19 16:46:44 +00:00
Jeff Sharkey
285f6ffff9 Merge "Remove GROUP_ID; not actively being used by apps." into qt-dev 2019-04-18 03:39:26 +00:00
TreeHugger Robot
5ed91dd1cd Merge "Revert "Add android.settings.ACTION_APP_BATTERY_SETTINGS to public API"" into qt-dev 2019-04-17 22:16:24 +00:00
Michael Wright
665fa7a8d6 Revert "Add android.settings.ACTION_APP_BATTERY_SETTINGS to public API"
This reverts commit c568477004.

Reason for revert: API concerns.
Bug: 129901520

Change-Id: I658de3933353ac93b13ce1f6f6616fd653663152
2019-04-17 20:32:44 +00:00
Jeff Sharkey
5e1ca0e889 Remove GROUP_ID; not actively being used by apps.
Bug: 130744218
Test: none
Change-Id: I2917b84ffcc698d3cbffe7dfbd49c76b21c46515
2019-04-17 13:35:16 -06:00
TreeHugger Robot
f4fc729acd Merge "Add custom title for settings dialogs" into qt-dev 2019-04-16 18:16:54 +00:00
Salvador Martinez
bca4564516 Add custom title for settings dialogs
This is a generic version of the custom title that will
be used in settings dialogs soon. Adding it to settings
lib since others will need to make use of it as well.

Test: robotests pass
Bug: 130251804
Change-Id: I48f8e24a2b2a117e5a8054c5bc0b240ba68fe1ad
2019-04-16 09:42:01 -07:00
TreeHugger Robot
4bf8532689 Merge "Add more documentation for ACTION_MANAGE_MORE_DEFAULT_APPS_SETTINGS." into qt-dev 2019-04-16 16:41:03 +00:00
Sean Stout
a0d852907d Merge "Add android.settings.ACTION_APP_BATTERY_SETTINGS to public API" into qt-dev 2019-04-16 05:50:30 +00:00
Hai Zhang
770a29bf72 Add more documentation for ACTION_MANAGE_MORE_DEFAULT_APPS_SETTINGS.
Bug: 130351486
Test: build
Change-Id: If15aa04a3a3ebe717718ae99157e845acbccf6ae
2019-04-16 13:16:16 +08:00
Kevin Chyn
12154d85a4 Merge "Cache and log enrollment settings" into qt-dev 2019-04-16 04:43:32 +00:00
Sean Stout
c568477004 Add android.settings.ACTION_APP_BATTERY_SETTINGS to public API
Test: cts-tradefed run cts -m CtsSystemIntentTestCases -t \
android.systemintents.cts.TestSystemIntents
Bug: 129901520

Change-Id: I710867f6d6fffb86d7f3991f39bde4bf9d62e5f7
2019-04-15 17:15:44 -07:00
Matt Pape
1220c347a2 Annotate single property listener from DeviceConfig as removed.
Will remove entirely after all references (esp. Play Services) are cleaned up.

Test: atest FrameworksCoreTests:DeviceConfigTest
Bug: 128902955
Change-Id: I1ab11fa2a2bbdb673841364c36b87a7356ba1e28
2019-04-15 21:52:26 +00:00
Kevin Chyn
c78071f29a Cache and log enrollment settings
Bug: 130370995

Test: Builds
Change-Id: Id23b6befe62cf5ea3a4468169f36da191ae97cc9
2019-04-15 14:34:30 -07:00
Sudheer Shanka
3c60d28729 Deprecate MediaStore.DownloadColumns.DESCRIPTION.
Bug: 130226648
Test: manual
Change-Id: I020d681e988eaa37871994860bea5ae2ab81d10e
2019-04-12 15:29:05 -07:00
Lei Yu
5d3461b1f6 Add DeviceConfig namespace for settings ui
Fixes: 130302238
Test: RunSettingsRoboTests
Change-Id: Idb20718165a598bfe73734fc06ef12d4f8d8d8e5
2019-04-12 13:56:02 -07:00
Jeff Sharkey
fc24615213 Promote generic columns up to MediaColumns.
Based on feedback from developers, they need to query these columns
on the general "Files" table, so we need to promote them to the
general "MediaColumns" common interface to make them available.

Bug: 130254706
Test: atest --test-mapping packages/providers/MediaProvider
Change-Id: I66afa14799ae42deea519d121177b2c8469889ab
2019-04-12 11:52:18 -06:00
Kevin Chyn
a0d2d2021d Merge changes from topic "face-logging" into qt-dev
* changes:
  Populate debug value for biometric atoms
  Adding debug value to Biometric atoms.
2019-04-12 00:14:36 +00:00
Kevin Chyn
4858da4aa6 Populate debug value for biometric atoms
Fixes: 130363518

Test: Builds
Change-Id: I73e8bbb6d9f310ee025bce271bf9470b47626ecc
2019-04-11 16:41:44 -07:00
TreeHugger Robot
3d6d6f0085 Merge "Changed intents for data and saver tiles" into qt-dev 2019-04-11 22:20:13 +00:00
Fabian Kozynski
2594b932c0 Changed intents for data and saver tiles
Changed the intents to point to the right settings. The intent in
CellularTile will point to the carrier selected as default for data if
there is one.

Test: manual, using DSDS
Fixes: 122676059
Change-Id: I71a8eac1754eaadda156209315a3a469e7e4f6d0
2019-04-11 12:34:13 -04:00
Sean Stout
783bdb0dec Merge "Add android.settings.VIEW_ADVANCED_POWER_USAGE_DETAIL" into qt-dev 2019-04-10 22:02:40 +00:00
Jeff Sharkey
586d3c013a Split VOLUME_EXTERNAL and VOLUME_PRIMARY.
To let developers focus on specific concrete storage devices in Q,
we need a volume name that can be used to point at the primary
external storage device.  We had been using VOLUME_EXTERNAL for that,
but we've heard that certain apps are making deep assumptions that
media item IDs are globally unique across all volumes.

Thus these changes merge all volumes back into a single underlying
database, and VOLUME_EXTERNAL works with all of the currently
attached volumes.  The new VOLUME_PRIMARY name can be used to focus
on the primary storage device when desired.

When developers try inserting items directly into VOLUME_EXTERNAL,
we gracefully assume they meant VOLUME_PRIMARY.

Bug: 128451765
Test: atest --test-mapping packages/providers/MediaProvider
Change-Id: I682ff6e9aaab4f5315a46c9825313a438548c7e6
2019-04-10 09:35:14 -06:00
Jeff Sharkey
9cbf23f121 Merge "Add AlbumColumns.ARTIST_ID." into qt-dev 2019-04-10 02:13:26 +00:00
Jeff Sharkey
56c021ffd8 Add AlbumColumns.ARTIST_ID.
As pointed out by developers, we already have ARTIST, so we should
also have ARTIST_ID.

Bug: 130193406
Test: atest --test-mapping packages/providers/MediaProvider
Change-Id: I46b4de38a08a1ebb6951d8329070438d142888ad
2019-04-09 10:11:28 -06:00
Chiachang Wang
0b98441205 Move data stall definitions out from Setting
From mainline perspective, we should use android flag api
instead of using Settings. Thus, move the definitions into
NetworkStack.

Bug:120013793
Test: atest NetworkStackTests SettingsBackupTest
Change-Id: I8e1fb5b47fff3bf624131ba1f5732daabd991e6d
2019-04-09 08:32:55 +00:00
TreeHugger Robot
b7cbb87e90 Merge "Adds annotations in response to API feedback." into qt-dev 2019-04-09 03:10:37 +00:00
Andrew Sapperstein
1bde3e7473 Adds annotations in response to API feedback.
Fixes: 126699535
Test: is annotation change
Change-Id: Iba61b36386db78e568a5dfc5720646904c75b989
2019-04-08 16:58:04 -07:00
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
Sean Stout
aeb8c50660 Add android.settings.VIEW_ADVANCED_POWER_USAGE_DETAIL
This intent action opens the advanced power usage details screen for
a provided application.

Test: adb shell am start -a \
"android.settings.VIEW_ADVANCED_POWER_USAGE_DETAIL" -d \
"package:com.google.android.deskclock" --ez \
"request_ignore_background_restriction" 1
Bug: 129901520
Change-Id: Ib5ee1376610acdec119c75944b3774d83a784288
2019-04-05 14:47:11 -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