Commit Graph

4653 Commits

Author SHA1 Message Date
Ivan Chiang
035808eea0 Merge "Add new column into Root to get the supported query args" 2019-01-23 02:56:02 +00:00
Ivan Chiang
ad4ba486b9 Merge "Fix CTS test fail for isTreeUri check in findDocumentPath method" 2019-01-23 02:54:33 +00:00
Varun Shah
359263d17c Merge "Optimize service restart logic." 2019-01-23 02:30:19 +00:00
TreeHugger Robot
f749198d19 Merge "Add exp flag for min number of sys gen smart replies in notifications" 2019-01-22 22:36:37 +00:00
TreeHugger Robot
9b90262605 Merge "Add a DeviceConfig namespace for the NOTIFICATION_ASSITANT package." 2019-01-22 22:35:52 +00:00
Jeff Sharkey
5199727294 Merge "Add nullability annotations for some apis and update java doc" 2019-01-22 21:37:50 +00:00
Varun Shah
16522412eb Optimize service restart logic.
If a non-persistent service is being restarted and it was killed due to
low memory previously, instead of restarting the service in one second,
we now restart it based on its last known oom_adj value. The backoff
logic of consistent restarts remains the same.

Additionally, when the service is due to restart, if the memory pressure
is still considered to be critical, the new logic will further delay the
service restart.

Initial test results: # of restarts dropped by 40-50% on average with
the optimized logic when the memory pressure was gradually increased.

Tested manually via memeater. Increased the memory pressure by 500 mb
at a time via the following command: adb shell memeater 500
On a 4gb device, no significant restarts were noticed when memory
pressure was increased by 2gb in total. When increased by 3gb in total,
services started to restart and the above results were observed via
the logged output over a 5 min period.

Bug: 79848281
Test: manually (steps listed above)
Change-Id: Idcd1300882321c6033e569736150a8bf7889678b
2019-01-22 12:24:59 -08:00
Gustav Sennton
1aebc9b561 Add a DeviceConfig namespace for the NOTIFICATION_ASSITANT package.
The notification_assistant package will contain flags controling the
default Android Platform implementation of the Notification Assistant
(named ExtServices).
The flags will be read in
android.ext.services.notification.AssistantSettings.

Bug: 120792826
Test: build
Change-Id: Ib57ca8bb707e1582f315390d5d2eb833033b7d25
2019-01-22 19:31:06 +00:00
Alex Salo
1e84afbac2 Merge "Add ADAPTIVE_SLEEP setting" 2019-01-22 18:10:44 +00:00
Ivan Chiang
857a2221ec Add nullability annotations for some apis and update java doc
- Add nullability annotations for some methods
- Update the java doc of isRootsUri to make it more clear

Change-Id: I8b065d526e11fe8d71bb1aec223918e7559967e0
Fix: 122549058
Test: make
2019-01-22 18:59:54 +08:00
TreeHugger Robot
a2eeced7b7 Merge "Adding native flag namespace(netd)." 2019-01-22 04:36:25 +00:00
Svetoslav Ganov
4188aeb5d6 Merge "Use proper API to get op name" 2019-01-22 03:51:14 +00:00
Remi NGUYEN VAN
b0d60c4cf8 Merge "Add NetworkMonitor constants to SystemApi" 2019-01-22 01:46:12 +00:00
Ajay Panicker
454e59d5a1 Merge "Add Filtering for snoop logs based on L2CAP and RFCOMM Channels (2/4)" 2019-01-22 00:00:12 +00:00
Alex Salo
1dea1e6503 Add ADAPTIVE_SLEEP setting
Test: make RunSettingsRoboTests
Bug: 111939367
Change-Id: I92f78cd8730d94444024cdce24ddadee24f79176
2019-01-21 14:39:29 -08:00
Gustav Sennton
a31f6aede1 Add exp flag for min number of sys gen smart replies in notifications
For system (assistant) generated smart replies we want to ensure the
replies don't seem biased (see example [1]). Therefore we here add an
experiment flag that determines the minimum number of replies N to show
in a notification. If we can't fit N replies into the notification we
remove all replies from that notification (i.e. we show zero replies).

[1] Example of biased replies:
Message: "Hi, how are you?"
Replies: "Good", "Great!", "Bad"
using only one reply here ("Good") might be seen as biased.

Bug: 120779592
Test: atest SystemUITests
Test: call "adb shell settings put global
smart_replies_in_notifications_flags enabled=true,min_num_replies=X" for
different values of X and ensure the behaviour is correct.
Change-Id: I898850f7895d0fd43ec6788095162f3138cd62cb
2019-01-21 15:03:26 +00:00
Remi NGUYEN VAN
d0a933476c Add NetworkMonitor constants to SystemApi
NetworkMonitor lives in the NetworkStack which must only use system
APIs. This includes constants used by NetworkMonitor and captive portal
login.

Bug: 112869080
Test: m
(Cherry-pick of aosp I4879568d3fbf9435767c8d4d0ab5198d421a2f4f)

Change-Id: I8b5f0bb61c3ef0d2f33af7dd67b72ac6c5a1d1b5
2019-01-21 21:07:10 +09:00
chenbruce
db279e8b39 Adding native flag namespace(netd).
For experiment flag testing, adding netd flag in DeviceConfig.

Test: add sepolicy, m -j, check GetServerConfigurableFlag function in netd
Bug:122050512
Change-Id: Ie24cdd145d955b1d6d6bae8e4b5c20740eb8ed95
2019-01-21 18:10:49 +08:00
Ivan Chiang
c26d3c28c2 Add new column into Root to get the supported query args
DocumentsContract:
- Add @Public column Root#COLUMN_QUERY_ARGS
- Update java doc

DocumentsProvider:
- Update java doc

FileSystemProvider & ExternalStorageProvider
- Add supported query args into Roots

Bug: 121234248
Test: manual
Change-Id: Ia944200ee1a44d75c9ad683564218e3d0dcef885
2019-01-21 15:44:53 +08:00
Ivan Chiang
c60c80a7f2 Fix CTS test fail for isTreeUri check in findDocumentPath method
Remove the isTreeUri check

Test: atest DocumentsTest
Change-Id: I19108a3dfac4963e8c700bb15273ce3051cabae8
Fix: 121342931
2019-01-21 11:26:43 +08:00
Jeff Sharkey
4260098e02 Merge "Filter volumes to only those the caller can see." 2019-01-21 00:54:31 +00:00
Jeff Sharkey
3036089cfa Filter volumes to only those the caller can see.
Don't return volumes that caller can't actually use.  Also add feature
to indicate that device supports "virtual disk" feature to verify
secondary external storage behaviors.

Bug: 117932814
Test: atest MediaProviderTests
Test: atest cts/tests/tests/media/src/android/media/cts/MediaScanner*
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: I66091c532ab5dac5032a82b136c590ac5a2a983a
2019-01-20 14:57:38 -07:00
Jeff Sharkey
ef033dada9 Merge "Better volume name argument checking." 2019-01-20 21:52:00 +00:00
Svet Ganov
65f1b9ef44 Use proper API to get op name
Test: atest CtsAppOpstTestCases

Change-Id: Ibc5d9775092e6d82e7beb7163d91c1f9ea87e1be
2019-01-20 13:42:57 -08:00
Jeff Sharkey
8559e65694 Better volume name argument checking.
Bug: 117932814
Test: atest MediaProviderTests
Test: atest cts/tests/tests/media/src/android/media/cts/MediaScanner*
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: I799d04a30e5328c1b9266357f192a3e65e24a28d
2019-01-20 11:37:03 -07:00
Jeff Sharkey
f4246a1c17 Merge "Better scanning of secondary storage volumes." 2019-01-20 17:55:05 +00:00
Jeff Sharkey
1eda2caa98 Better scanning of secondary storage volumes.
There's been a long-standing bug where secondary external storage
volumes were being scanned into a single "external" database.  We've
had the logic in MediaProvider for a long time to support individual
databases on a per-UUID basis, but that regressed at some point.

This change revives that logic, which has the benefit of greatly
speeding up media scanning of secondary storage devices, since we can
preserve those databases instead of churning the primary "external"
database whenever they're ejected and reinserted.

Future work will clean up stale databases in the recently added idle
maintenance service.

Bug: 117932814, 122060093
Test: atest MediaProviderTests
Test: atest cts/tests/tests/media/src/android/media/cts/MediaScanner*
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: Ib48577a2146758acd882db0b1767e88f3a70247f
2019-01-19 17:27:16 -07:00
Jeff Sharkey
f81494a161 Return valid path for secondary storage devices.
Bug: 122900949
Test: manual
Change-Id: I3ce5ca49720dc1854dd5207d29f59fa85821f23e
2019-01-19 13:26:20 -07:00
Jayachandran Chinnakkannu
a09c7737aa Merge "Cellular data stall recovery based on networkStatus" am: 44631dfc26 am: e9dc415e2b
am: 58a61cc734

Change-Id: I0196a9f1da64efd6a811139bb9d2de7e39defe11
2019-01-18 16:18:57 -08:00
Jayachandran Chinnakkannu
58a61cc734 Merge "Cellular data stall recovery based on networkStatus" am: 44631dfc26
am: e9dc415e2b

Change-Id: I2e381e9215a2d8f036a0de4f021573688250c142
2019-01-18 15:43:03 -08:00
Jayachandran C
8ef41bf34f Cellular data stall recovery based on networkStatus
This CL introduces cellular data stall recovery based on
network validation result. It still re-uses the existing
recovery steps but the triggers are based on networkStatus
from NetworkMonitor when the network is bad. Each recovery
step is spaced by a configurable grace period (default 3 mins)
to avoid back to back recovery.

This feature is controlled by the following settings. If this
feature is enabled then the legacy data stall detection based
on TrafficStats will automatically be disabled.

Settings.Global.DATA_STALL_RECOVERY_ON_BAD_NETWORK
1 => Enabled (default)
0 => Disabled

Settings.Global.MIN_DURATION_BETWEEN_RECOVERY_STEPS_IN_MS
3 minutes is default value

Bug: 113916551
Test: atest FrameworksTelephonyTests:com.android.internal.telephony.dataconnection.DcTrackerTest

Change-Id: I738fc7ed08803de1114f7a3d79bf278449e94ea8
2019-01-18 22:52:16 +00:00
Perumaal Shanmugam
b1882925b5 Merge "Add content_capture and autofill experiment namespaces" 2019-01-18 22:45:09 +00:00
Perumaal S
5c016dacb7 Add content_capture and autofill experiment namespaces
No functional changes, just @hide api changes.

Test: m update-api
Change-Id: I4e92c7dd3393edf3526ccd94dfd617fb225aa09a
Bug: 121037717
2019-01-18 12:07:38 -08:00
TreeHugger Robot
793f1a793c Merge "Add secure setting for custom clock face shown while docked." 2019-01-18 17:45:29 +00:00
Robert Snoeberger
6e5edde45c Add secure setting for custom clock face shown while docked.
Bug: 120772327
Test: build completed successfully
Change-Id: If643adc24502c6e8b13a4d225bf9c1f09fe200ca
2019-01-18 10:34:34 -05:00
Peiyong Lin
2893700ed9 Merge "Add DeviceConfig namespace for Game Driver." 2019-01-18 00:14:12 +00:00
TreeHugger Robot
68f90d0ecc Merge "Suppress IllegalArgumentException on API 28 or before" 2019-01-17 21:59:36 +00:00
Peiyong Lin
31fa8ac94d Add DeviceConfig namespace for Game Driver.
Add namespace to allow us to receive feature control values of Game Driver.

BUG: 121350991
Test: Build, flash and boot
Change-Id: I395c66c76eb8a0079f71bac1a2218e5e8d22391c
2019-01-17 13:12:10 -08:00
Stanislav Zholnin
2452709418 Merge "Added a new set of permissions for DeviceConfig API." 2019-01-17 10:16:25 +00:00
Shubang Lu
7e355f522e Merge changes Ibcebfcc2,Ic2e63185,I90def978,I30031fc9,I0cfa1989
* changes:
  Fix hdmi framework tests.
  Use the Short Audio Descriptor xml parser to get config when receive request short audio descriptor message.
  Add parser for Short Audio Descriptor xml config
  Add an API for clients to know if a target device is connected to the current device.
  Add TV_INPUT_ALLOW_3RD_PARTY_INPUTS to settings
2019-01-17 03:19:05 +00:00
Lucas Dupin
842af1ecd6 Merge "Add support to SLPI tap gestures" 2019-01-17 02:38:09 +00:00
Yiwei Zhang
c631eeadd6 Merge "GUP: Add a global property for genreal preference" 2019-01-17 02:02:44 +00:00
TreeHugger Robot
c810ff0157 Merge "Defer sending of ACTION_CHARGING" 2019-01-16 23:53:58 +00:00
Zhi An Ng
11b63629de Defer sending of ACTION_CHARGING
ACTION_CHARGING is sent when the device is in a good enough charging
state for power-heavy work to be done. It was sent immediately when this
determination was done:
1. plugged in and level >= 90
2. plugged in and level is increasing
However this lead to many jobs being ungated when this happen, and
defeats the purpose of plugging in your device to get a quick boost.

In the case of 2. we defer the sending of ACTION_CHARGING by a
configurable time, defaulting to 15minutes, after said determination.

The adb command to play with this is:

adb shell settings put global battery_stats_constants battery_charged_delay_ms=90000

Bug: 111360323
Test: Set the delay to 15s, then cmd battery unplug and reset,
verify that broadcast is sent in dumpsys activity broadcasts
Change-Id: I71f8d06604041efeba12fbdfd0374aaff2f04807
2019-01-16 23:53:17 +00:00
Lucas Dupin
d43bf70c58 Add support to SLPI tap gestures
This CL introduces a new configurable sensor type: config_dozeTapSensorType

Test: atest SystemUITests
Test: set config_dozeTapSensorType to double tap gesture on overlay
Bug: 121198822
Bug: 111414690
Change-Id: I54f3c20473a6d97c860ee02f324edbcf89ba85d1
2019-01-16 11:45:40 -08:00
shubang
3e32f59039 Add TV_INPUT_ALLOW_3RD_PARTY_INPUTS to settings
ag/5642255

Bug: 117782538
Test: make
Change-Id: I0cfa1989abf3e32162685871b3325b7593a78b41
2019-01-16 10:01:29 -08:00
Stanislav Zholnin
596437fd4e Added a new set of permissions for DeviceConfig API.
Permissions READ_DEVICE_CONFIG and WRITE_DEVICE_CONFIG are required to
use DeviceConfig API. Actual checks for new permissions are not added
as we are waiting for gmscore to include them into manifest.

Also added "configurator" protection flag.

Test: atest FrameworksCoreTests:DeviceConfigTest
      atest FrameworksCoreTests:SettingsProviderTest
      atest SettingsProviderTest:DeviceConfigServiceTest
Bug:109919982
Bug:113100523
Bug:113101834
Bug:117663715
Change-Id: I66c256b57c5491201c6c7834620a287b6c81c23c
2019-01-16 10:50:51 +00:00
Allen Su
86c7e98c17 Merge "Add new intent ACTION_REPORT_RADIO_BUG and setting for radio error" 2019-01-16 02:43:40 +00:00
Shubang Lu
a6c9e20c26 Merge changes I97f97167,I4bf51c47,I8d3193e0,I224a1616,Ie774b0eb, ...
* changes:
  Adding HDMI_CEC_SWITCH_ENABLE Global property to enable/disable Routing Control feature.
  Fix spelling errors in HdmiCecMessage.toString
  More skeleton code for <RequestShortAuidoDescriptor>
  Add a getPhysicalAddress api to hdmicontrolservice.
  Set System Audio Mode on when switch to Audio Only source
  Call HdmiCecLocalDeviceAudioSystem to report audio status.
  Add a delay state into DeviceDiscoveryAction.
2019-01-16 01:40:24 +00:00
TreeHugger Robot
d526cb9019 Merge "Add skip and silence gestures" 2019-01-15 22:11:24 +00:00