Commit Graph

4507 Commits

Author SHA1 Message Date
Matt Pape
f31d03c9cf Merge "Add reset and list for device config flags to SettingsProvider to support command line debug tool." 2018-12-07 16:27:59 +00:00
Milo Sredkov
0b243df366 Merge "Create SMART_SUGGESTIONS_IN_NOTIFICATIONS_FLAGS" 2018-12-07 14:13:47 +00:00
Ivan Chiang
919cad6ce4 Merge "Expose @SystemApi and @Public for unbundling DocumentsUI" 2018-12-07 07:26:47 +00:00
Felipe Leme
749b889889 Yet another (major) refactoring on Content Capture and Augmented Autofill.
Bunch of changes:

- Split public SmartSuggestionsService info ContentCaptureService and
  AugmentedAutofillService
- Renamed 'intelligence' packages to either 'contentcapture' or
  'autofil.augmented'
- Renamed internal packages and classes.
- Changed permissions, resource names, etc...
- Moved Augmented Autofill logic from IntelligeceManagerService (R.I.P.) to
  Autofill.
- Optimized IPCs by passing a String instead of the InteractionSessionId
  (that also solves the view -> service dependency).

Test: atest CtsContentCaptureServiceTestCases \
            CtsAutoFillServiceTestCases \
            FrameworksCoreTests:SettingsBackupTest
Test: manual verification with Augmented Autofill Service

Bug: 119638877
Bug: 117944706

Change-Id: I787fc2a0dbd9ad53e4d5edb0d2a9242346e4652d
2018-12-06 16:56:39 -08:00
Matt Pape
6bfc62e496 Add reset and list for device config flags to SettingsProvider to
support command line debug tool.

Test: atest FrameworksCoreTests:SettingsProviderTest
      Further tested manually via command line (see ag/5613024)
Bug:109919982
Bug:113101834
Change-Id: Ib0d9e4c6d806ec3521ac49b8c05fbdad8b5b13d7
2018-12-06 14:06:37 -08:00
Milo Sredkov
d8cacd5bec Create SMART_SUGGESTIONS_IN_NOTIFICATIONS_FLAGS
Create Global.SMART_SUGGESTIONS_IN_NOTIFICATIONS_FLAGS. This will
contain flags that control the automatic generation of suggestions in
notifications (smart actions and smart replies).

Bug: 111437455
Test: atest SettingsBackupTest
Change-Id: I91252d3e0f3d51000f6115a520d7054832fda1ce
2018-12-06 15:07:39 +00:00
Jeff Sharkey
8f18e25afa Merge "Get CtsProviderTestCases targeting modern SDK." 2018-12-06 06:32:30 +00:00
Jeff Sharkey
52ba19b50b Get CtsProviderTestCases targeting modern SDK.
Grant tests the "write_settings" appop they needs to run, and test
against well-known key.

Move away from FileCopyHelper, which uses deprecated
MODE_WORLD_READABLE mode.  Define TestSRSProvider to get a valid
provider to notify against.

Bug: 120429729, 120577010
Test: atest CtsProviderTestCases
Change-Id: I5b78ee2df66562f1356aa36c3c92781c5aca5d43
2018-12-05 21:05:17 -07:00
TreeHugger Robot
797aa66e71 Merge "Add query argument QUERY_ARG_EXCLUDE_MEDIA" 2018-12-05 21:22:35 +00:00
TreeHugger Robot
0492440cd9 Merge "Changed how the Smart Suggestions service is defined." 2018-12-05 16:15:50 +00:00
Ivan Chiang
b26b09fec1 Expose @SystemApi and @Public for unbundling DocumentsUI
1. Expose @Public for query arguments and flags.
2. Expose @SystemApi for related manageMode apis and some
   related storage flag in Root.
3. Add new isChildDocument method to support ContentResolver
   parameter and expose it @Public.
4. Expose @Public for getDocumentMetadata related methods.

Bug: 117634543
Test: make, make api-stubs-docs-update-current-api,
Change-Id: Ib172d46ba9727c35277fb285d3a09380fe106697
2018-12-05 17:06:05 +08:00
TreeHugger Robot
f4764351fc Merge "Add USB_ALARM_TEMPERATURE in SettingsProvider" 2018-12-05 07:02:14 +00:00
Ivan Chiang
1edfcb2517 Add query argument QUERY_ARG_EXCLUDE_MEDIA
Use the argument to decide whether the files that have been
added to MediaStore should be excluded. If the value is true,
exclude them. Otherwise, include them.

Bug: 119390918
Test: manual
Change-Id: I245e4303a265a95b30400083841c593b66c4d960
2018-12-05 14:08:02 +08:00
Jeff Sharkey
9246fc7616 Merge "Stop indexing location metadata." 2018-12-05 05:46:18 +00:00
Edgar Wang
495b657b97 Add USB_ALARM_TEMPERATURE in SettingsProvider
In terms of the feature of USB overheat warning, SettingsProvider needs the implementation for the integration.

Bug: 118794842
Test: Build, flash and boot, verify
Change-Id: I41aacd5a7ed7ab1ce0212e7d2520e3c51d7d3bc1
2018-12-05 02:09:08 +00:00
Felipe Leme
658c8e423f Changed how the Smart Suggestions service is defined.
Initially it was defined as secure Settings, but the proper way is to let the
OEMs set it by overlaying a framework resources, which an option to temporarily
override that setting using a Shell cmd (so it can be changed on CTS tests).

This CL also changes how the service can be explicitly enabled / disabled at
the time the system starts, so it can be disabled by a server-push in case of
emergencies (and also manually enable by developers when running the CTS tests
on AOSP builds).

Bug: 119776618
Bug: 111276913
Bug: 117779333

Test: adb shell settings put global \
   smart_suggestions_service_explicitly_enabled true && \
   sleep 10s && \ adb shell stop && adb shell start \
   atest CtsContentCaptureServiceTestCases
Test: atest FrameworksCoreTests:SettingsBackupTest
Test: atest CtsAutoFillServiceTestCases # to make sure it didn't break
Test: m -j SettingsProvider

Change-Id: Ibd1bba0c0d534b4b6344516d8ff893142785a57a
2018-12-04 17:46:49 -08:00
Jackal Guo
b03bf399ee Merge "Make A11Y_DISPLAY_MAGNIFICATION_NAVBAR_ENABLED as SystemApi" 2018-12-05 01:07:58 +00:00
Jeff Sharkey
33e70bd6d2 Stop indexing location metadata.
The new ACCESS_MEDIA_LOCATION permission is designed to protect
the location metadata of items the caller doesn't own, but we can't
easily perform partial filtering of metadata from returned Cursor
objects based on per-row ownership, so we're forced to outright stop
indexing and returning location metadata via queries.

Apps can still easily obtain location metadata using ExifInterface.

Bug: 111892141
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: I4d99e6aa7d94bb0e7a50ce86eb1ab0f1ed142d4a
2018-12-04 13:17:09 -07:00
Dan Shi
86a685147a Remove TEST_MAPPING due to AJUR filter behavior
AJUR can't support mixed filters of class and package. There are 2 other
TEST_MAPPING files containing about 6 tests using filter on package.

Once b/117880789 is fixed, we can add this TEST_MAPPING file back.

Bug: 120462824
Test: None
Change-Id: Iafa0286c18f2c6fd77c5b603a72882e710cef6ee
2018-12-04 11:46:14 -08:00
Jeff Sharkey
f660c012b0 Merge "Add support for "Audiobooks"." 2018-12-04 16:58:17 +00:00
TreeHugger Robot
d380bd78bb Merge "Select closest font's style for backward compatibility" 2018-12-04 10:10:11 +00:00
Seigo Nonaka
68d1d5ae7e Select closest font's style for backward compatibility
Bug: 119425212
Test: atest CtsGraphicsTestCases
Test: atest CtsContentTestCases:android.content.res.cts.ResourcesTest
Change-Id: I796baf342f752366040b657954b0f82d358a7790
2018-12-03 20:16:26 -08:00
Jeff Sharkey
628d2e6888 Merge "Redact location Exif tags when no permission." 2018-12-04 01:28:37 +00:00
Jeff Sharkey
cb39499354 Redact location Exif tags when no permission.
When the caller doesn't hold the ACCESS_MEDIA_LOCATION permission,
any location Exif tags should be redacted for privacy reasons.  We
still allow unredacted raw file access if the media is owned by the
calling app, since they should be able to see data they contributed.

Certain backup apps really want to see the original contents without
any redaction, so provide them a setRequireOriginal() API so they
get a strong exception whenever the original bits can't be provided.

Add the ability to open a redacted file for read/write access by
stopping redaction for any ranges that have been overwritten with
new data, along with tests to verify this behavior.

Extend "content" tool to bind null values.

Bug: 111892141
Test: atest android.os.RedactingFileDescriptorTest
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: I47b220036a712d9d49547196b90e031b10760f84
2018-12-03 12:57:09 -07:00
Jackal Guo
6e0396d5b0 Make A11Y_DISPLAY_MAGNIFICATION_NAVBAR_ENABLED as SystemApi
Change this constant to @SystemApi for SUW unbundling.

Bug: 117749852
Test: a11y CTS & unit tests, and SettingsProviderTest
Change-Id: I3b88a024d009a28fa8e7c02fe2ef292c657b44be
2018-12-03 16:10:07 +08:00
Philip P. Moltmann
c9907ce3e8 New settings for testing permission controller
The settings are used to reduce the runtime of the location access
permission controller tests.

Bug: 120303361
Test: atest CtsPermissionTestCases:android.permission.cts.LocationAccessCheckTest
      atest --test-mapping frameworks/base/core/java/android/provider/:presubmit
Change-Id: I47ed218dc0a300f73a1c0308fce60b61e6a423b0
2018-12-01 17:03:31 -08:00
Jeff Sharkey
10887d5e5a Add support for "Audiobooks".
Bug: 113356944
Test: manual
Change-Id: Ifed54c41a533ed2d556dc6561ea498ec293991a6
2018-11-30 13:53:19 -07:00
Michal Karpinski
7cf71fe643 Merge "Enable the limit app icon hiding feature" 2018-11-29 15:31:28 +00:00
Sudheer Shanka
c2b3462713 Merge "Add Downloads collection in MediaProvider." 2018-11-29 02:14:24 +00:00
Michal Karpinski
958462ffe5 Merge "Add a setting for background activity starts enabled state and basic rules for enforcement" 2018-11-29 01:56:07 +00:00
Yueming Wang
3a329573f1 Merge "Add a secure settings for cross profile calendar feature." 2018-11-29 01:55:20 +00:00
Hongyi Zhang
7bde4e9abe Merge "add native_flags_health_check_enabled to Settings.Global" 2018-11-28 18:03:33 +00:00
yuemingw
4446ca6fa5 Add a secure settings for cross profile calendar feature.
A toggle will be added in Settings -> Work profile settings for user
to control this setting.

Bug: 118445542
Test: .manual
Change-Id: If8b882dd101688f35fb117d83a801b5c80aab367
2018-11-28 17:39:22 +00:00
Michal Karpinski
8596dedf18 Add a setting for background activity starts enabled state
and basic rules for enforcement

The setting is on by default. It can be switched off with
a developer option (see accompanying commit) or
"adb shell settings put global background_activity_starts_enabled 0".

The setting is wired into ActivityStarter. When it's switched
off, all unsupported background activity starts are aborted and
it's currently manifested with a toast for quick feedback.

Only basic policy rules are added for now:
0) is it one of the most important UIDs?
1) does the calling app have any foreground activity?
2) is the calling process important enough to always be able
   to start an activity?
3) does the calling uid have any visible window?

The policy rules will be extended to allow for more use cases
in forthcoming CLs.

Most notable use cases not currently covered:
1) Notifications
2) Widgets
3) Shortcuts
4) Some of the most important system apps (e.g. com.android.vending)
5) Accessibility services and similar (IMEs covered thanks to
   visible window exemption)
6) Recents button double tap to open the previous app
See bluedoc for some more.

Bug: 110956953
Test: atest WmTests:ActivityStarterTests
Manual test:
  (on)  observe all activities are started as they used to be
  (off) starts not satisfying one of the above rules are aborted,
        a toast specifying callingPackage is shown instead
Change-Id:  I1a3e14828c96f005d975ef6998f3bda678ccab29
2018-11-28 15:08:28 +00:00
Chiachang Wang
d94e7d893b Merge "Data stall detection using DNS event" am: 33fe80f927 am: 69b60f5a31
am: f720f0dbf8

Change-Id: I5c443b959a45b3a70902d5c9738a1687e16cc766
2018-11-27 20:33:20 -08:00
Chiachang Wang
f720f0dbf8 Merge "Data stall detection using DNS event" am: 33fe80f927
am: 69b60f5a31

Change-Id: I35e7e81fa0d6db6527ea6dd606d00046df3b9818
2018-11-27 20:18:54 -08:00
Chiachang Wang
33fe80f927 Merge "Data stall detection using DNS event" 2018-11-28 03:53:30 +00:00
Hongyi Zhang
a02118df54 add native_flags_health_check_enabled to Settings.Global
add native_flags_health_check_enabled to Settings.Global. It is used
to receive the corresponding experiment flag from P/H.

Bug: 119627143
Test: manual on device
Change-Id: I980f73925818a5cb6f756d78bad324bafefc3784
2018-11-27 16:52:38 -08:00
Sudheer Shanka
9b98edb2d6 Add Downloads collection in MediaProvider.
+ Added needed logic to contribute files to this
  downloads collection using MediaStore.PendingSession.

Bug: 120050687
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Test: atest MediaProviderTests

Change-Id: Ic83731e3f54908614cea13a84f717252062428dc
2018-11-27 12:07:06 -08:00
Chiachang Wang
7a70a7e0ed Data stall detection using DNS event
If dns resolver on a network get consecutively timeout then it
is a strong signal that the network is no longer usable.
Reevaluate the network once it's data stall suspected

Test: 1. runtest frameworks-net
      2. SettingsBackupTest passes
      2. Run on wifi w/o internet capability
Bug: 112653893, 113916551

Change-Id: I74287b174d933f97a91fa1529b1809856ac3b38d
2018-11-27 18:00:05 +08:00
Felipe Leme
fc8b2460c3 Merge "Initial implementation of Augmented Autofill." 2018-11-27 06:46:20 +00:00
Felipe Leme
284ad1c3e2 Initial implementation of Augmented Autofill.
Augmented Autofill is a mechanism that will let a system-provided service
provide autofill suggestions when the stardand autofill can't.

Because the Augmented Autofill service is a system app, it has less restrictions
than the standard service; in particular, this service will be responsible for
drawing the autofill UI, although the framework will provide a mechanism to host
the window. Right now, it's creating a TYPE_APPLICATION_OVERLAY window in the
service process roughly below the focused view, but in the long-term it will
use the IME suggestion window to display it.

This CL provides the initial APIs and end-to-end workflow for the simplest
scenario, but it's still full of TODO's.

Test: atest CtsAutoFillServiceTestCases # to make sure it doesn't break it
Test: atest FrameworksCoreTests:SettingsBackupTest
Test: mmm -j150 packages/experimental/FillService &&\
  adb install -r ${OUT}/data/app/FillService/FillService.apk &&\
  adb shell settings put secure intel_service foo.bar.fill/.AiaiService &&\
  adb shell settings put global autofill_smart_suggestion_emulation_flags 2 &&\
  adb shell pm grant foo.bar.fill android.permission.SYSTEM_ALERT_WINDOW

Bug: 119638877

Change-Id: I8d59b4eab3e530cd89b81456681a72fdab532756
2018-11-27 05:09:06 +00:00
Soonil Nagarkar
94749f7ad1 Deprecate location provider status callbacks
Deprecate and remove logic around location provider status.

Bug: 118885128
Test: Tested manually on device
Change-Id: I68289cb5ed22e66532847758c36155a4ce607bbc
2018-11-26 23:19:00 +00:00
Jeff Sharkey
0430c3ceef Merge "Use ALLOCATOR_SOFTWARE with ImageDecoder" 2018-11-26 16:54:52 +00:00
Abodunrinwa Toki
d531f70d30 Merge "ConversationActions Config installer." 2018-11-22 16:02:54 +00:00
Nicholas Sauer
a46113a5f0 Merge "settings command list by user" 2018-11-22 15:12:08 +00:00
Tiger Huang
7c610aaab3 Let System UI show on external displays (1/3)
Let each display have one status bar and one navigation bar. This is
so on each display, status bar and navigation bar can be laid out with
apps and produce proper insets.

Bug: 117474929
Test: atest com.android.server.wm
Test: Watch YouTube video in fullscreen mode, and see if status bar
      and navigation will be hidden as expected. Swipe on the edge
      of screen and see if status bar and navigation bar are both
      shown as expected.

Change-Id: I1550659b7cd1dd1676bf04483c5b68376ef42905
2018-11-22 17:58:06 +08:00
Nicholas Sauer
725005329a settings command list by user
bug: 119872843
Test: $ adb -e shell settings list
Bad arguments
$ adb -e shell settings list secure
$ adb -e shell settings list gl
Invalid namespace 'gl'
$ adb -e shell settings list global
...
$ adb -e shell settings list --user 10 global
...
$ adb -e shell settings list --user 0 global
...
$ adb -e shell settings put --user 10 secure zzz.test true
$ adb -e shell settings get --user 10 secure zzz.test
true
$ adb -e shell settings get --user 0 secure zzz.test
null
$ adb -e shell settings list --user 0 secure
... zzz.test not present ...
$ adb -e shell settings list --user 10 secure
...
zzz.test=true

Change-Id: I8ab3d20cbe9221a52f85151d97e0c6d92bf7bb43
2018-11-21 10:33:10 -08:00
Abodunrinwa Toki
f438e14dfd ConversationActions Config installer.
This installs model updates for smart reply/actions
aka conversation actions.

Test: none
Bug: 111437455
Bug: 111406942
Change-Id: I9cb04e7b20b565ac5d128475a90bd065c805e95e
2018-11-21 17:33:53 +00:00
Nicholas Sauer
3d87d1e525 settings command delete by user
bug: 118492733
Test: $ adb shell settings --user 10 put secure autofill_service blah
$ adb shell settings --user 10 get secure autofill_service
blah
$ adb shell settings --user 10 delete secure autofill_service
$ adb shell settings --user 10 get secure autofill_service
null

Change-Id: I771bf8e148898703332ead8162c5f9fe4863ea74
2018-11-20 09:09:58 -08:00