Commit Graph

3439 Commits

Author SHA1 Message Date
Garfield Tan
af03e5a322 Specify behavior around DocumentsProvider#openDocument().
Add supported modes and contracts on receiving unsupported modes.
Test: Builds.
Bug: 11279339

Change-Id: I8c403f6168baadb354813d4c1e630bb8662ddb34
2017-05-16 13:13:23 -07:00
Stanley Tng
873b5708d1 Add Save and Restore of BluetoothOn setting
This change will automatically save the Bluetooth On setting when
the user chooses to backup the phone settings into the cloud. This
setting is restored by the Setup Wizard (SUW) when configuring the
phone and this change will enable or disable the Bluetooth based
on this restored setting.

Bug: 35657817
Test: Manual test with Sailfish
Change-Id: Ie4518593af63f96f8c363f98941ca5260a3ec4bb
(cherry picked from commit 767f05feea)
2017-05-12 18:00:55 +00:00
Chris Wren
89aa226190 add a global control for badging
Content observer callbacks don't specify the user,
so scan all the users we know about. User switches
will also trigger an update which will explicitly
check the setting for the (now) current user.

Migrate tests to TestableContext to allow the test
to safely override secure settings.

Bug: 36021111
Test: runtest systemui-notification
Change-Id: I588068382912955da114cc351df7a1e7b4f0733f
2017-05-11 17:19:01 -04:00
TreeHugger Robot
b569eedf37 Merge "Adding a new config and Setting for WiFi Wakeup." into oc-dev 2017-05-11 00:05:52 +00:00
Makoto Onuki
09c529a9bc Reconnect to DAService after binding is dead
- When the DO/PO process crashes twice with a short interval, AM gives up
and the binding will be "died".  Once binding is in this state it'll never
be re-connected.

(Still, DO/PO can disable and re-enable their DAS to force DPMS to bind again
though.)

- Detect this and re-connect after one hour.

- Back-off time will be exponentially increased and never reset until DPMS
explicitly re-connects, which happens when:
-- the device rebooted,
-- the user stopped and re-started, or
-- the DAS is disabled and re-enabled.

Test: adb shell am instrument -e class com.android.server.am.PersistentConnectionTest -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.devicepolicy.DevicePolicyConstantsTest -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.devicepolicy.DevicePolicyManagerTest -w com.android.frameworks.servicestests
Test: cts-tradefed run cts-dev --skip-device-info --skip-preconditions --skip-system-status-check com.android.compatibility.common.tradefed.targetprep.NetworkConnectivityChecker -a armeabi-v7a -l VERBOSE -m CtsDevicePolicyManagerTestCases -t com.android.cts.devicepolicy.DeviceAdminServiceDeviceOwnerTest
Test: cts-tradefed run cts-dev --skip-device-info --skip-preconditions --skip-system-status-check com.android.compatibility.common.tradefed.targetprep.NetworkConnectivityChecker -a armeabi-v7a -l VERBOSE -m CtsDevicePolicyManagerTestCases -t com.android.cts.devicepolicy.DeviceAdminServiceProfileOwnerTest

Bug 37711907

Change-Id: Ie0b227a94e6ce85d72a969a4dea1020baf734e2f
2017-05-10 11:57:19 -07:00
Jeremy Joslin
45caa2538e Adding a new config and Setting for WiFi Wakeup.
Created a new config for WiFi Wakeup (config_wifi_wakeup_available)
and defaulted it to NOT_AVAILABLE.

Also added a new global Settings constant (WIFI_WAKEUP_AVAILABLE)
and defaulted it to the value of the new config noted above.

Bug: 37987491
Bug: 38036968
Test: Built, flashed and confirmed proper config value.
Test: runtest --path frameworks/base/core/tests/coretests/src/android/provider/SettingsProviderTest.java
Change-Id: I0cdca4262a0ef473fcbbf7da8d960c41dfafb11f
2017-05-05 15:12:26 -07:00
Ajay Panicker
4d1fb218f4 Merge "Limit btsnoop file size (3/9)" into oc-dev 2017-05-04 22:56:21 +00:00
Ajay Panicker
4d71437598 Limit btsnoop file size (3/9)
Limit btsnoop file size by rotating between snoop files. The rotation occurrs
when a fixed number of packets have been logged and will start overwriting
the older file.

Bug: 35998031
Test: Enable snoop logs from developer options and let logs get large
Change-Id: I40d5da4c1b1c9b45908e5790d130f1c5e804c773
2017-05-04 09:56:50 -07:00
TreeHugger Robot
3c0e3d8a36 Merge "Developer setting to show toast for notifications without a channel" into oc-dev 2017-05-04 14:09:03 +00:00
TreeHugger Robot
d53a71f443 Merge "Add persistent state for Bluetooth high quality audio support" into oc-dev 2017-05-04 01:37:07 +00:00
Geoffrey Pitsch
4c6eef21fd Developer setting to show toast for notifications without a channel
Bug: 37945054
Test: runtest systemui-notification
Change-Id: I264913c3d7ef6fcd83129b0692e96d3218bc7217
2017-05-03 13:41:21 -04:00
Christine Franks
e5bb03e2ea Night display status restores on reboot/user change
Fixes: 30086742
Test: runtest -c com.android.server.NightDisplayServiceTest \
      frameworks-services
Change-Id: I264be077e607baf8e19496f0c57549a907668005
2017-05-03 15:00:43 +00:00
Antony Sargent
f5772c6121 Add persistent state for Bluetooth high quality audio support
Defines the flags used in code and the Settings.Global key names for
persisting the following state for Bluetooth A2DP Sink devices:
-Whether the device supports optional codecs or not
-Whether optional codecs should be turned on for the device

For each of these two properties we model the state in the code as
yes/no/unknown, so that we can tailor the UI and behavior
accordingly.

Bug=37441685
Test: manually

Change-Id: I6bcd02fd7c95bef989575f3b13d4788dab61971a
2017-05-03 04:36:51 +00:00
Michael Dooley
4794cbf574 Merge "Adding voicemail transcription state to the database" into oc-dev 2017-05-02 22:01:18 +00:00
Dianne Hackborn
83b40f69be Work on issue #36891897: Need to ensure foreground services can't...
...hide themselves

The activity manager now keeps track of all apps that are running
foreground services and builds a notification showing them to the
user.  We ensure they are shown to the user for at least 30 seconds
(configurable).  If foreground services are executed while the
screen is off, their apps will be shown to the user for at least
30 seconds after the screen turns back on.

While doing this I am also adding a new process state to distinguish
between "important background" stuff that should bypass bg check vs.
ones that don't.  By default, these now no longer bypass bg check,
which is really the expected (and documented) behavior.  There is a
new bind flag to allow them to bypass bg check, which is currently
only used by the IME.

Also add some new job scheduler commands that will be used to
write new tests cases for jobs timing out.

Bug: 36891897

Test: manual

Change-Id: Ied3f7b56444254513fd776f06b88bc0e54704958
2017-04-29 19:41:12 -07:00
Jeff Sharkey
408ec0b463 Merge "Remove FontVariationAxis.InvalidFormatException." into oc-dev 2017-04-29 16:39:39 +00:00
Philip P. Moltmann
09d8db0381 Merge "Add constant for autofill-service-add URL" into oc-dev 2017-04-29 05:14:41 +00:00
Lifu Tang
c94ef4ddfd Throttle location update rate in proximity alert
Bug: 36197768
Test: manual
Change-Id: I2427ed7e77e9153c20e7c65e8f861de4c7ffeac6
2017-04-28 15:42:52 -07:00
Seigo Nonaka
0f07dd5b14 Remove FontVariationAxis.InvalidFormatException.
Use IllegalArgumentException instead.

Bug: 37769084
Bug: 37765945
Test: am instrument -w -e class android.widget.cts.TextViewTest
      android.widget.cts/android.support.test.runner.AndroidJUnitRunner
Test: am instrument -w -e class android.graphics.cts.TypefaceTest
      android.graphics.cts/android.support.test.runner.AndroidJUnitRunner
Test: am instrument -w -e class android.graphics.cts.PaintTest
      android.graphics.cts/android.support.test.runner.AndroidJUnitRunner
Test: am instrument -w -e class android.graphics.cts.FontVariationAxisTest
      android.graphics.cts/android.support.test.runner.AndroidJUnitRunner
Test: am instrument -w -e class android.text.VariationParserTest
      com.android.frameworks.coretests/\
      android.support.test.runner.AndroidJUnitRunner

Change-Id: I50b70e3e7e37585c937dcce2416a83353de62a5d
2017-04-28 15:24:40 -07:00
TreeHugger Robot
4108aa77e8 Merge "Expose missing accessibility settings to instant apps" into oc-dev 2017-04-28 00:41:28 +00:00
TreeHugger Robot
afd8d9e2b2 Merge "Throttle wifi scan requests from background apps (1/2)." into oc-dev 2017-04-27 23:38:28 +00:00
Philip P. Moltmann
a30d6e0d5b Add constant for autofill-service-add URL
Mimicing the behavior we have for adding a print service.

Bug: 37735998
Test: Started auto fill picker with add-service-settings set
      and unset. Only if set, the preference is added

Change-Id: Ida298afc0cbbdf13bdbeb124f73a603bd39855c1
2017-04-27 15:40:02 -07:00
Chad Brubaker
d9285b5a19 Expose missing accessibility settings to instant apps
Fixes: 37631050
Test: EphemeralTest#testWebViewLoads
Change-Id: I9c4c6d5dd4b8f2c1e27009d77f6f11035d4f1667
2017-04-27 15:31:19 -07:00
Seigo Nonaka
9610c69531 Remove FontsContract.buildTypeface with weight/italic argument.
Passing weight/italic to the family does not make sense.

Bug: 37750436
Test: N/A
Change-Id: I43a624179338c1f98aad36cfd08daa152e83944c
2017-04-27 14:15:52 -07:00
mike dooley
47ed9b0098 Adding voicemail transcription state to the database
The transcription-state column will be used to provide better visual
feedback for users when viewing voicemails.  Specifically it will
help disambiguate the cases of transcription-in-progress and
transcription-unavailable.

For now the new public API constants are marked @hide.

This database change involves 2 related cl's, one to define the new
column and one to update the database schema (ag/2129944, ag/2129909)
The cts test will be updated when the column is made public.

Test: run cts -t android.provider.cts.contacts.VoicemailContractTest -m CtsProviderTestCases
Bug: 37340510
Change-Id: I6fd5f52a81f43afda425227394f3e571c072b18f
2017-04-26 14:27:35 -07:00
Seigo Nonaka
080b054bdd Font API clean up
- Move FontRequest from android.graphics.fonts to android.provider since
  this is only used by android.provider.FontsContract and never draw
  anything.
- FontRequest is no longer being Parcelable.
- Remove FontSpec.aidl which is not necessary.

Bug: 37326126
Test: am instrument -w -e class android.provider.FontsContractTest
      com.android.frameworks.coretests/\
      android.support.test.runner.AndroidJUnitRunner
Test: am instrument -w -e class android.provider.cts.FontProviderTest
      android.provider.cts/android.support.test.runner.AndroidJUnitRunner
Test: am instrument -w -e class android.provider.cts.FontRequestTest
      android.provider.cts/android.support.test.runner.AndroidJUnitRunner

Change-Id: I0eb501844247c2f07eaa1fc7a71f72e404888b5b
2017-04-26 18:00:17 +00:00
Seigo Nonaka
1c661d1943 Merge "Load font file from remote provider synchronously." into oc-dev 2017-04-26 17:49:59 +00:00
Seigo Nonaka
57dc8328f5 Merge "Update FontsContract.requestFonts" into oc-dev 2017-04-26 17:48:42 +00:00
Seigo Nonaka
d9de8be233 Load font file from remote provider synchronously.
Since CancellationSignal is not guaranteed to be handled by remote
process, introduce threaded font loading mechanism.
At the same time, this fixes possible NPE issue in openFont.

Bug: 37552479
Test: am instrument -w -e class android.provider.FontsContractE2ETest
      com.android.frameworks.coretests/\
      android.support.test.runner.AndroidJUnitRunner

Change-Id: Ie235c5a57bd172b0882da5aa27a990d7c6686ff2
2017-04-25 21:19:22 -07:00
Seigo Nonaka
8ea62b036d Update FontsContract.requestFonts
- Change FontsContract.requestFont plural form to meet other method
naming convension.
- Change FontsContract.requestFonts to accept CancellationSignal to
be able to notify to remote.

Bug: 37326126
Test: am instrument -w -e class android.provider.FontsContractE2ETest
      com.android.frameworks.coretests/\
      android.support.test.runner.AndroidJUnitRunner

Change-Id: I154f943eb4e7c91bff8afd86be479f72e66e5cb7
2017-04-25 19:56:56 -07:00
Svetoslav Ganov
d8561a26da Make sure autofill service is backed up
Test: manual

bug:36638606

Change-Id: I3367b9eb40a542267fb5d49f9a8bb7aa97ca57fa
2017-04-26 01:57:07 +00:00
Jeff Sharkey
a00c7c0a99 Merge "Fix some issues found by new doclava linter." into oc-dev 2017-04-25 22:11:01 +00:00
Seigo Nonaka
54084b64b1 Font provider cleaning ups.
- Remove Columns.STYLE
- Decouple Context from Typeface.
- Make FontsContract constructor private since it is essentially static.
- Removed unused constants.

Bug: 37281200
Bug: 37268410
Test: am instrument -w -e class android.provider.FontsContractE2ETest
      com.android.frameworks.coretests/\
      android.support.test.runner.AndroidJUnitRunner
Test: am instrument -w -e class android.provider.FontsContractTest
      com.android.frameworks.coretests/\
      android.support.test.runner.AndroidJUnitRunner
Test: am instrument -w -e class android.graphics.cts.TypefaceTest
      android.graphics.cts/android.support.test.runner.AndroidJUnitRunner
Change-Id: Ic46c256141d27ca28f30023bcc40f4e1161d5338
2017-04-25 19:40:58 +00:00
Phil Weaver
cd68c334ba Merge "Remove a11y web flags and associated settings" into oc-dev 2017-04-25 19:25:23 +00:00
Jeff Sharkey
0f3f60b576 Fix some issues found by new doclava linter.
Add missing API annotations for permissions and SdkConstants, and
invoke doclava with new "-android" flag.

Test: make -j32 offline-sdk-docs
Bug: 37526420
Change-Id: I970bb2655eb568fd25004636f134c794663a6c33
2017-04-25 13:12:45 -06:00
TreeHugger Robot
bad4573bd4 Merge changes from topic 'experio-scoring' into oc-dev
* changes:
  Remove Settings.CURATE_SAVED_OPEN_NETWORKS
  Remove request recommendation from AIDL files.
  Remove the recommendation request impl and test code.
  Deprecate the recommendation request code.
2017-04-25 18:51:51 +00:00
Seigo Nonaka
5a09c64345 Remove Typeface.create
Test: Manually done
Bug: 37514611
Bug: 37463988
Bug: 37281200
Change-Id: Ida704af910e0ae195b96803de506fa1e1d66c9f5
2017-04-25 09:38:39 -07:00
Felipe Leme
db041188bc Added APIs that let AutofillService implementations set themselves as such.
Bug: 37576671
Test: manual verification
Test: CtsAutoFillServiceTestCases (with new tests) pass

Change-Id: I6fd61f8a2826dbf6b6fce831f3deadf6df025386
2017-04-24 18:44:09 -07:00
Phil Weaver
09d4ff8960 Remove a11y web flags and associated settings
Bug: 35707622
Bug: 28322375
Test: Ran a11y cts. Updated those tests in linked CL to
ignore this feature.

Change-Id: I1dccb3ae4e1f4d6bb832ae1b0edd4dad4a54289e
2017-04-22 01:21:03 +00:00
TreeHugger Robot
f277ccbca6 Merge "Renaming intent action for unknown sources" into oc-dev 2017-04-21 21:22:09 +00:00
Seigo Nonaka
daa8dfc690 Cache the Typeface based on the FontRequest.
Bug: 37471729
Test: FontsContractE2ETest
Change-Id: Ifb1bd2b50077471404f5f1dffc01e7697d7042e6
2017-04-21 09:11:10 -07:00
TreeHugger Robot
337be5a12f Merge "Update Typeface callback docs about error codes" into oc-dev 2017-04-21 09:44:53 +00:00
Suprabh Shukla
89aae4463a Renaming intent action for unknown sources
Renaming to maintain consistency with neighboring constants

Test: gts-tradefed run gts GtsExternalSourcesTestCases

Bug:37515311
Change-Id: I5e153d93fce01633ee69363c0725b026f1551b1e
2017-04-20 16:32:44 -07:00
TreeHugger Robot
4e45b1491a Merge "Stop fetching font data if the context is restricted." into oc-dev 2017-04-20 18:56:46 +00:00
Amin Shaikh
1321dda19f Remove Settings.CURATE_SAVED_OPEN_NETWORKS
Bug: 37356724
Test: make
Change-Id: I2763b3cfc4e1ebe38135a35e8fd36fee9750ba6b
2017-04-20 09:26:58 -07:00
Jeremy Joslin
b1a0139590 Remove the recommendation request impl and test code.
Removing most of the platform side request recommendation code and
its tests.

Test: adb shell am instrument -e class android.net.NetworkRecommendationProviderTest -w com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
Test: runtest frameworks-services -c com.android.server.NetworkScoreServiceTest
Bug: 37357264
Change-Id: I36e592c5c82c38aa2174a51cf02c6e9825ef4f11
2017-04-20 09:24:18 -07:00
Abodunrinwa Toki
06a53d4729 Merge changes from topics 'smartselectconfig', 'langidconfig' into oc-dev
* changes:
  SmartSelection Config installer.
  LangId Config installer.
2017-04-20 13:30:35 +00:00
TreeHugger Robot
1ef45a8bed Merge "Api Council: hide FontsContract.Columns constructor" into oc-dev 2017-04-20 12:52:43 +00:00
Clara Bayarri
5706a1b12d Update Typeface callback docs about error codes
As requested by API council, mention that the provider may
return its own error codes within the positive int range.

Bug: 37084803
Test: none
Change-Id: Ia8ee99432cc5025a12d43049e327605095dd2b57
2017-04-20 12:02:57 +01:00
Clara Bayarri
7fea2e264e Api Council: hide FontsContract.Columns constructor
Bug: 37515256
Test: none
Change-Id: I2a9de7ea30ffa39af5104977f6604ce3bda220fb
2017-04-20 11:56:09 +01:00