Commit Graph

4574 Commits

Author SHA1 Message Date
Soonil Nagarkar
48273286e5 Merge "Use LOCATION_MODE to control location" 2019-01-10 22:47:48 +00:00
Soonil Nagarkar
90da1ab3d2 Use LOCATION_MODE to control location
Completely deprecate LOCATION_PROVIDERS_ALLOWED (but still support it).
Adds additional locking and @GuardedBy annotations where appropriate,
and some minor code cleanup is copied from previous CLs.

Bug: 118885128
Test: Manual + CTS
Change-Id: I3c0b4b2354a4c2b6a120fc467af60cb3409dd671
2019-01-10 14:43:43 -08:00
Milo Sredkov
41dc4ba3c6 Make the tap-to-edit behaviour configurable
Add a new key-value pair to smart_replies_in_notifications_flags that
controls the default tap-to-edit behaviour.

Bug: 111437455
Test: atest SmartReplyConstantsTest
Test: Try "adb shell settings put global smart_replies_in_notifications_flags edit_choices_before_sending=true" and observe
Change-Id: Ida90b98c28f4183697e84a6722768d41c72dd9cf
2019-01-10 10:44:26 +00:00
Yiwei Zhang
0c9ccbe456 Merge "GUP: Update global property for the new dev opt" 2019-01-10 00:33:39 +00:00
Yiwen Chen
cf3728a302 Merge "Create a new setting in System Settings.Secure class to control whether ramping ringer is used." 2019-01-09 00:55:41 +00:00
TreeHugger Robot
7936113d7d Merge "Play vibration when non-wireless charging starts" 2019-01-08 22:34:02 +00:00
Yiwen Chen
36e40ff22c Create a new setting in System Settings.Secure class to control whether ramping ringer is used.
Bug: 120789399
Test: When finish the whole change, flash into a dev phone to test first.
Change-Id: I16956f1115dcf5a1657739ad8aa3ab9295b21474
2019-01-08 18:22:32 +00:00
Beverly
e21f4dd4d7 Play vibration when non-wireless charging starts
Test: manual
Change-Id: Icd9a3797f86403bdf5df3e48362a161d21899748
Fixes: 29737261
2019-01-08 09:35:35 -05:00
Amy
93a97b9ba9 cec: support standby features for tx/rx [1/1]
cherrypick ag/4808863

Bug: 112553298

When press power key on soundbar, CEC type is 5(audio system),
it will send command to tx and rx devices to let them go to standby mode

Test: Tested with a TV
Change-Id: I242fb1028b5ae003e6054fe9b54e10d1f433374c
2019-01-07 16:53:09 -08:00
Sudheer Shanka
fe7668ab4d Add Downloads.Impl.COLUMN_MEDIASTORE_URI & DownloadColumns.Description.
Entries from DownloadProvider are added to MediaStore Downloads
collection. COLUMN_MEDIASTORE_URI will be used to track corresponding
entries in MediaProvider. We can't re-use COLUMN_MEDIAPROVIDER_URI
for this purpose because it is updateable by apps.

Bug: 120876251
Test: atest DownloadProviderTests
Test: atest cts/tests/app/src/android/app/cts/DownloadManagerTest.java
Test: atest MediaProviderTests
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: Ifd252c54f4ee739a31be2866896efac6696a088e
2019-01-05 19:01:40 -08:00
Jeff Sharkey
8f70cac068 Merge changes from topics "trashz", "bucketz"
* changes:
  Public APIs for "trashing" media.
  Define secondary media item bucketing.
2019-01-05 02:33:26 +00:00
Jeff Sharkey
5cc407f702 Public APIs for "trashing" media.
The "delete" operation is immediate and permanent, and users may wish
to instead mark content as being "trashed", so they can recover
accidentally trashed items before they're permanently deleted.

The default trash timeout is 48 hours, which should be enough time
to recover items the user cares about.  Apps can also use a custom
timeout if desired.

This is implemented by recording an "expiration" time for trashed
items, and deleting expired items during the next idle maintenance
pass.  Also use this expiration time to clean up pending items that
haven't been published; by default apps have a day to publish
pending items.

Bug: 121227045
Test: atest MediaProviderTests
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: I2e371b308dc135ad5363709a6f5385e4456bcb96
2019-01-04 16:17:03 -07:00
Jeff Sharkey
7b148d7ae7 Define secondary media item bucketing.
The existing buckets work well for first-level clustering of related
media, but it's common for multiple media items within a directory
to form a conceptual unit.  To support this, we're creating a
second-level of bucketing which is formed using the first part of
the file name.

This supports common industry-standard patterns like:

    IMG1024.JPG
    IMG1024.CR2

While also opening the door to further flexibility in the future:

    IMG1024.JPG
    IMG1024.HDR.JPG
    IMG1024.BURST001.JPG
    IMG1024.BURST002.JPG
    IMG1024.BURST003.JPG
    IMG1024.DNG
    IMG1024.DEBUG.BIN

We're currently advocating that the default representation of one of
these secondary clusters is the shortest .JPG filename contained
inside, with length ties broken alphabetically.

Clean up database management so that upgraded schema always matches
pristine schema, with tests to verify.  Generate views using the
actual projection mappings used at runtime.

Bug: 115377970
Test: atest MediaProviderTests
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: Ic679055ab6c884d2048626f51670a5dd370281c0
2019-01-04 14:33:49 -07:00
Matt Pape
d6c1bdfe6d Merge "Update DeviceConfigService to pass Settings.AUTHORITY to IContentProvider.call invocations." 2019-01-04 17:46:09 +00:00
Matt Pape
7b1c6cda12 Update DeviceConfigService to pass Settings.AUTHORITY to IContentProvider.call invocations.
Also update SettingsProvider to resolve calling packages based on uids
when receiving calls to put or reset values in the config table. This
was necessary because the command line tool calls the DeviceConfig API,
which calls through to SettingsProvider. That was resulting in a
shell uid with an android package prior to this change.

Test: atest SettingsProviderTest:DeviceConfigServiceTest
Bug: 122304633

Change-Id: Ic80c734eb75dcaac688507c241b0995b7488a84f
2019-01-04 08:10:41 -08:00
Yiwei Zhang
51015a756b GUP: Update global property for the new dev opt
We updated the development opt in mechanism for GUP. Now we have
GUP_DEV_OPT_IN_APPS for applications selected to use GUP and
GUP_DEV_OPT_OUT_APPS for applications selected not to use GUP.

Bug: 119221883
Test: Build, flash and boot, verify with prototype
Change-Id: I52869ecf9e411a8dbdc1146f00c82023ba41bebf
2019-01-04 11:01:19 +08:00
TreeHugger Robot
a449853e6e Merge "Rename updatable graphics driver to Game Update Package." 2019-01-03 23:06:35 +00:00
Jeff Sharkey
c54ffd28f7 Merge "MediaStore should reflect state on disk." 2019-01-03 17:56:17 +00:00
Peiyong Lin
b33ffca825 Rename updatable graphics driver to Game Update Package.
We have rebranded this project to Game Update Package, and GUP for short.

BUG: 119221883
Test: Build, flash and boot. Verify by going to developer options.
Change-Id: If284bd3e0b29cb025833be29fa33179011c151d7
2019-01-02 17:00:00 -08:00
Jeff Sharkey
96afa169f7 MediaStore should reflect state on disk.
It's an index of data scanned from disk, and it's been misleading to
let people mutate that data directly in MediaStore, since those
edits aren't durable in any way.  We never updated the metadata in
the underlying files, so any changes would be lost when moving
between devices.

This change moves to always re-scan files after they've been edited,
to ensure we pick up metadata changes.  It also ignores direct edit
attempts from apps.

Bug: 120711487
Test: atest android.media.cts.MediaScannerTest
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: I4cc3ae24d6c6b5f01fe4bb47610ccf162c81ce83
2019-01-02 11:46:50 -07:00
Christine Franks
245ffd4bc6 Add ColorDisplayServiceInternal local service
For display white balance and grayscale

Bug: 111215474
Test: atest FrameworksServicesTest:ColorDisplayServiceTest
Change-Id: I5c7b6543665e520b4e167ac8e6719f337018f172
2019-01-02 10:30:54 -08:00
TreeHugger Robot
7fa78c545b Merge "Add StorageVolume#createOpenDocumentTreeIntent" 2018-12-20 15:49:11 +00:00
Michael Groover
71654bbda4 Merge "Enable device identifier check for non-priv apps" 2018-12-20 15:27:55 +00:00
Felipe Leme
6bb8a96683 Inline some Settings constants so they don't break the SettingsBackupTest.
Test: echo 'In TreeHugger we trust!'
Bug: 121153631

Change-Id: I7a1180a3446ba6a5aabb76fbe87113bf0e3096c6
2018-12-19 21:04:28 -08:00
Felipe Leme
d264c7284b Fixed how ContentCapture is kill-switched.
We provide a way for OEMs to kill-switch Content Capture, but it currently
does not work in the first boot (which uses default settings).

This CL changes the mechanism:

- If the property is not set, it assumes it's disabled (before it was only
  disabled when explicitly set to "false").
- To always enable it, it must be set to "always" (before it was "true").
- To check for the overlaid resource, it must be set to "default" (before it
  had to be unset).

Test: manual verification

Fixes: 121144410
Bug: 121153631

Change-Id: Ie669e43d9dce947a7bb31bc3b1768774f724675f
2018-12-19 14:20:29 -08:00
Matthew Fritze
16729c7cd8 Merge "Add SettingsPanel Intent Actions" 2018-12-19 19:21:46 +00:00
Michael Groover
445d1e71f2 Enable device identifier check for non-priv apps
Bug: 117781266
Test: atest CtsTelephony3TestCases
Test: atest android.telephony.cts.TelephonyManagerTest
Test: atest com.android.cts.devicepolicy.DeviceOwnerTest#testDeviceOwnerCanGetDeviceIdentifiers
Test: atest com.android.cts.devicepolicy.DeviceOwnerTest#testDeviceOwnerCannotGetDeviceIdentifiersWithoutPermission
Test: atest com.android.cts.devicepolicy.ManagedProfileTest#testProfileOwnerCanGetDeviceIdentifiers
Test: atest com.android.cts.devicepolicy.ManagedProfileTest#testProfileOwnerCannotGetDeviceIdentifiersWithoutPermission
Change-Id: Ie87b31e22de248249b206e866fb38a494923d51f
2018-12-18 16:39:28 -08:00
Jeff Sharkey
e8b3d96bc6 Merge "Improve thumbnail generation utilities." 2018-12-18 22:04:40 +00:00
Jeff Sharkey
32f6c7c097 Improve thumbnail generation utilities.
The existing APIs were pretty limited by only accepting a "kind"
value, so improve them to accept an arbitrary size, and offer a way
to cancel requests when no longer needed.

The older APIs were a mix of both public and @UnsupportedAppUsage,
so mark them all both public and deprecated so we can clearly steer
developers towards better options.  (The deprecated methods are
implemented using the new APIs internally for sanity.)

Use modern ImageDecode internally, which is more robust than
BitmapFactory.  Add CTS to confirm that we generate thumbnails of
reasonable sizes.

Bug: 119887587
Test: atest android.media.cts.ThumbnailUtilsTest
Change-Id: I4ca35569ad5c661b327a0cb24a48ebc21f6087b7
2018-12-18 10:03:10 -07:00
Amin Shaikh
305e87e6d9 Add StorageVolume#createOpenDocumentTreeIntent
Change-Id: I6894bad24fa7757dee1028a31ba0b07701baa7b3
Fixes: 119519300
Test: manually using ApiDemos Content > Storage > Documents
2018-12-18 11:44:13 -05:00
Matt Pape
101fe17781 Merge "Add the API surface for DeviceConfig." 2018-12-17 15:15:05 +00:00
Jeff Sharkey
90dcdb2177 Merge "Local and remote isolated storage feature flags." 2018-12-16 16:50:08 +00:00
Jeff Sharkey
b0c363b21e Local and remote isolated storage feature flags.
Moving forward as we start enabling isolated storage in various
dogfood groups, we'll need to maintain separate values for the
feature flag for both "local" and "remote" opinions.  Any strongly
expressed local opinion will always take precidence over any remote
opinion.

Any changes to these feature flags means that we need to invalidate
any PackageManager parsed APKs, since PackageParser changes it's
output depending on the flag state.  Since other feature flags are
likely to need this type of invalidation in the future, define the
PackageManager cache using a SHA-1 hash of a collection of values
that should invalidate the cache.

Bug: 112545973
Test: atest android.os.SystemPropertiesTest
Change-Id: Ifafcdf15e40e694eb4126e06981aeb82df51da33
2018-12-15 18:07:01 -07:00
Michael Groover
f1a5b6e0bf Merge changes from topic "SensorPrivacyMode"
* changes:
  Add SensorPrivacy constants to SettingsBackupTest
  Prototype Spaceship mode qstile
2018-12-15 18:07:26 +00:00
TreeHugger Robot
e48e378bee Merge "Add APIs to set Location History package name." 2018-12-15 05:10:30 +00:00
Matt Pape
1278d1c736 Add the API surface for DeviceConfig.
Update DeviceConfigService to call DeviceConfig API directly for get,
set, and reset. Remove the duplicated content uris from various places
in favor of the single constant exposed in DeviceConfig.

Test: atest FrameworksCoreTests:DeviceConfigTest
      atest FrameworksCoreTests:SettingsProviderTest
      atest SettingsProviderTest:DeviceConfigServiceTest
Bug:109919982
Bug:113100523
Bug:113101834

Change-Id: I46d110c4fd29a89af383629d26de4ee39ca852a6
2018-12-14 15:08:29 -08:00
Chad Brubaker
90f391fe87 Prototype Spaceship mode qstile
Initial prototype disabling location/sensors and enabling airplane mode.
Camera/Mic will come in a followup.

Test: manual
Bug: 110842805
Change-Id: I26132fcc9ffea83e3e78a0e54882d23c99ee590c
2018-12-14 20:46:04 +00:00
Tyler Gunn
d1d6911207 Merge "Add CallerIdentification to CallScreeningService API." 2018-12-14 17:44:09 +00:00
Vishwath Mohan
e533100d2e Merge "Extended Access mode for Trust Agents" 2018-12-14 03:38:20 +00:00
Vishwath Mohan
15f7dd0c29 Extended Access mode for Trust Agents
This change adds a mode that changes how trust is used by the
platform. In this mode, a trust agent that reports the device to be in
a trusted state is only able to extend how long the device stays
unlocked (before needing credentials or biometrics), but cannot
actually unlock a locked device.

The change is off by default, and comes with secure settings variables
to control the behavior. This is a temporary convenience for
dogfooding and we expect extended access mode to become the default
for Q.

Bug: 111435975
Test: Tested with SmartLock modules to confirm extend unlock behavior
works as expected.
Change-Id: Ie63a4235f5ad144d4ffb5dd308cc2cef886cb8ef
2018-12-13 09:25:02 -08:00
Jeff Sharkey
28d437142d This is a giant mess.
Bug: 120846329
Test: none
Change-Id: Ide0325d9f8e6accc961f456296125f3306aaca54
2018-12-13 10:03:06 -07:00
Matthew Fritze
2f3bd7783b Add SettingsPanel Intent Actions
A Settings Panel is a dialog that contains a fixed subset of
settings to address a particular user problem. The ultimate
goal is that users can solve problems in-app rather than going
into settings. This is limitted to to "safe" settings which do
not need the full context of the settings.

The Settings are hosted in a Settings activity, which prevents
scraping from the calling app.

Test: make -j40 RunSettingsRobotests, manual app
Test: atest SettingsPanelTest
Fixes: 117804442
Change-Id: I3afb9e235959d0e4bc889747c4518de89918674c
2018-12-12 16:55:04 -08:00
Wei Wang
980b7c20d6 Add APIs to set Location History package name.
The package name will be used by Permission Controller to properly
handle permissions for location history package.

Bug: 119226131

Test: manually tested on device
Change-Id: I522517272c132a054c44489d16626509cf2b42ee
2018-12-12 16:48:51 -08:00
Tyler Gunn
7e45b7241b Add CallerIdentification to CallScreeningService API.
Updating the CallScreeningService to support passing call identification
information for incoming/outgoing calls.
Updating call log to log call identification information.

Bug: 63966743
Test: Manual with test app.
Change-Id: Ie6c172c09007eb5f4853d36ae0a99b782bfb5ddb
2018-12-12 15:12:31 -08:00
Yueming Wang
3dc2f1ef59 Merge "Add API to view calendar events cross profile." 2018-12-12 19:07:05 +00:00
TreeHugger Robot
02e7db9b6a Merge "Updates to Settings.Config and SettingsProvider for the DeviceConfig API surface." 2018-12-12 07:39:54 +00:00
Jeff Sharkey
5d952bf4b1 Merge "People still need the old method signatures." 2018-12-12 00:01:09 +00:00
yuemingw
369f96dd98 Add API to view calendar events cross profile.
Bug: 118456236
Test: .manual by TestDPC
cts test will be added later
Change-Id: I0d36586ea6017dea446abd8e609c2712ba88e93c
2018-12-11 22:20:33 +00:00
Jeff Sharkey
f9eeca1364 Merge "Surface tree statistics through metadata." 2018-12-11 21:13:25 +00:00
Jeff Sharkey
14101c709c People still need the old method signatures.
Keep the old methods around for code that expects to find them with
the ContentResolver type.

Bug: 120846329
Test: manual
Change-Id: Id9c10525e63ecc8fbf9a249bfe7a5de755a0ceb4
2018-12-11 13:55:48 -07:00