Commit Graph

74829 Commits

Author SHA1 Message Date
Felipe Leme
210485221c Merge "Javadoc: Added alternative to Package verification." into oc-dev am: 092349600d am: 33d476c170
am: 66e3c9aaf8

Change-Id: I07156ab1aec1415ed3c484da0fe3567896c073b7
2017-09-08 22:00:59 +00:00
Felipe Leme
66e3c9aaf8 Merge "Javadoc: Added alternative to Package verification." into oc-dev am: 092349600d
am: 33d476c170

Change-Id: I6a72e1c2399fd03cd87de61964fc07e0329a8eb9
2017-09-08 21:50:25 +00:00
Felipe Leme
33d476c170 Merge "Javadoc: Added alternative to Package verification." into oc-dev
am: 092349600d

Change-Id: Ic765df95fc660fb0df8a0f027d739ea999a36702
2017-09-08 21:41:36 +00:00
TreeHugger Robot
092349600d Merge "Javadoc: Added alternative to Package verification." into oc-dev 2017-09-08 21:28:02 +00:00
Vinay Kalia
ce784381fd Merge "Update ScanSettings documentation for scan modes" am: 8157ab2a0e am: be7ccdf6e9
am: 4b0748ffda

Change-Id: Icad06975358e4814a3f05a363a41a7a77511bd88
2017-09-08 20:26:37 +00:00
Vinay Kalia
4b0748ffda Merge "Update ScanSettings documentation for scan modes" am: 8157ab2a0e
am: be7ccdf6e9

Change-Id: Ib66ed6d6d6e9e1766fa4ed495d3d045b8a6384fe
2017-09-08 20:06:55 +00:00
Vinay Kalia
be7ccdf6e9 Merge "Update ScanSettings documentation for scan modes"
am: 8157ab2a0e

Change-Id: I15a77489072925f6e99e9a0a658910616164aef3
2017-09-08 19:58:33 +00:00
Vinay Kalia
8157ab2a0e Merge "Update ScanSettings documentation for scan modes" 2017-09-08 19:50:36 +00:00
Andrew Scull
07f6b5581a Merge "OemLockService: remove canUserAllowOemUnlock()" into oc-mr1-dev
am: 5664b30008

Change-Id: Ie38c731b4e1119e8cef707cd58e4f32ab68a7d1b
2017-09-08 19:34:42 +00:00
Felipe Leme
7f3510110c Merge "Fixed CharSequenceTransformation to use find() instead of matches()." into oc-mr1-dev
am: 48bf1ca5d4

Change-Id: Ifa0152751e37cb8032efa6a7d5f191db2834d0e5
2017-09-08 19:23:36 +00:00
TreeHugger Robot
5664b30008 Merge "OemLockService: remove canUserAllowOemUnlock()" into oc-mr1-dev 2017-09-08 19:08:47 +00:00
TreeHugger Robot
48bf1ca5d4 Merge "Fixed CharSequenceTransformation to use find() instead of matches()." into oc-mr1-dev 2017-09-08 19:08:06 +00:00
Andrew Scull
85be690734 OemLockService: remove canUserAllowOemUnlock()
No longer used by Settings as the logic was wrong.

Test: gts-tradefed run gts -m GtsOemLockServiceTestCases
Bug: 65124732
Change-Id: I44e5f697aabd2b5eefecf64060502b5c9ef5f911
(cherry picked from commit d37fe2d3e1)
2017-09-08 16:07:55 +00:00
Hugo Benichi
faf8348ad3 NetworkStats: more robust subtraction for deltas
This patch ensures that subtract() between two NetworkStats object will
return a delta with no negative entries in all cases.

When the stats delta contains some negative values, there are clamped to
0. Some logging is added when this happens.

This is what's expected by NetworkStatsHistory#recordData().

Bug: 64365917
Bug: 65439160
Test: runtest frameworks-net
Merged-In: I16e97e73f600225f80e0ce517e80c07c6f399196
Merged-In: I2ac0bc3914cb65ae8ee27921856d698dc59624b2
Merged-In: I67d5dc4b52b254748ff17fe1e16c2eeb1d03c30d
Merged-In: Ib488fb034f72c92f19916490981342a3ef2eb33b

(cherry picked from commit ad5e2827ea)

Change-Id: Ic86b65a65a2517c871221f8784088ec1de18f534
2017-09-08 13:39:44 +09:00
Sujith Ramakrishnan
399f9b83bc Merge "Make ASSIST launch VIS and add a new keycode for TV (ALL_APPS)" into oc-mr1-dev
am: 224e2daf5b

Change-Id: I190f74604641a988cd8cb6e7067abaaf624eb1df
2017-09-08 04:32:23 +00:00
Sujith Ramakrishnan
224e2daf5b Merge "Make ASSIST launch VIS and add a new keycode for TV (ALL_APPS)" into oc-mr1-dev 2017-09-08 04:25:15 +00:00
Amith Yamasani
a220790855 Merge "Javadoc update for permission requirements" into oc-mr1-dev
am: 2ce2f84999

Change-Id: I6703ab1128202f5928d574c55d0f4a9129c95b60
2017-09-08 02:39:11 +00:00
TreeHugger Robot
2ce2f84999 Merge "Javadoc update for permission requirements" into oc-mr1-dev 2017-09-08 02:26:02 +00:00
Fyodor Kupolov
ac6d9d3173 Merge "Allow using SQLiteGlobal for testing" into oc-mr1-dev
am: 347eaf21fa

Change-Id: I664b887cced9b328227c6ad053463e426c316fd8
2017-09-08 00:26:49 +00:00
Fyodor Kupolov
347eaf21fa Merge "Allow using SQLiteGlobal for testing" into oc-mr1-dev 2017-09-08 00:13:51 +00:00
Amith Yamasani
172dd5c652 Javadoc update for permission requirements
Bluetooth scanning requires holding these permissions for results
to be delivered.

Bug: 65013767
Test: N/A
Change-Id: I0b5fa9efa7fc8d5cff25319fbd7719cedee6a4aa
2017-09-07 23:42:27 +00:00
Sujith Ramakrishnan
f8942c0c88 Make ASSIST launch VIS and add a new keycode for TV (ALL_APPS)
- KEYCODE_ASSIST: Looks for default VIS in system partition
      and launches it.
    - Ensure foreground activity assist context extras are collected
      and sent to VIS.
    - KEYCODE_ALL_APPS: Sends Intent.ACTION_ALL_APPS. For TV,
      this targets default launcher package in system partition.

Test: Manual: ASSIST: adb shell input keyevent 219
Test: Manual: ALL_APPS: adb shell input keyevent 284
Test: also tested with --longpress for these keys
Test: Manual: Checked with dummy app populating overridden
      onProvideAssistData()
Test: Keypresses after overriding ALL_APPS and ASSIST
      on Nexus Remote

Bug: 37950079
Bug: 38496261
Change-Id: I96d9de67d4a442a8c6cb7feec28fc9aeb0dcbc18
2017-09-07 16:19:53 -07:00
Felipe Leme
1540bfd21d Fixed CharSequenceTransformation to use find() instead of matches().
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases -t android.autofillservice.cts.CharSequenceTransformationTest#testReplaceAllByOne
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases

Fixes: 65459117

Change-Id: Ib5ff31b6b12e5583e736a0593e941e1556ae7384
2017-09-07 15:22:22 -07:00
Felipe Leme
1c0d25fc56 Merge "Finishes the session when the service returns a null response on authentication." into oc-mr1-dev
am: a61839458f

Change-Id: Ib8eaa593b6e95b205d0d05cd07eb8fd2669ee957
2017-09-07 21:24:49 +00:00
Felipe Leme
a61839458f Merge "Finishes the session when the service returns a null response on authentication." into oc-mr1-dev 2017-09-07 21:13:18 +00:00
TreeHugger Robot
b913a1e618 Merge "Bluetooth: Thread-safe binder invocation" into oc-mr1-dev 2017-09-07 17:38:59 +00:00
Daniel Nishi
a5288e7ae6 Merge "Flag storage settings cache invalidation time." into oc-mr1-dev
am: b53b925f68

Change-Id: Ib6706048900ee19a72ad412da091a9278adb42c5
2017-09-07 15:15:04 +00:00
Rubin Xu
3721305094 Always add local subnet routes to the interface's routing table
For some networks such as mobile data connections, its LinkProperties
does not contain routes for the local subnet so no such route is added
to the interface's routing table. This can be problematic especially
if the device is in VPN lockdown mode where there exists high-priority
PROHIBIT routing rule which in turn blocks the network's default gateway
route from being added (next hop address hitting the prohibit rule).

We fix this by patching LinkProperties to always include direct connected routes
when they are received by ConnectivityService. This has the added advantage that
when apps get LinkProperties, they see the directly connected routes as well.

Bug: 63662962
Test: runtest frameworks-core -c android.net.LinkPropertiesTest
Test: runtest frameworks-services -c com.android.server.ConnectivityServiceTest
Test: Start with device with mobile data, set up ics-OpenVPN in always-on
      lockdown mode. Turn off mobile data then turn it back on, observe
      mobile data connectivity is restored and VPN successfully reconnects.

(cherry picked from commit 1bb5c0818f)

Change-Id: Ia14f88bcf49d37286519c26dff6b7180303e2cbe
2017-09-07 14:17:57 +01:00
Rubin Xu
90f104931a Merge "Always add local subnet routes to the interface's routing table" am: 981228be38 am: 5fb26a1270
am: e3469a426e

Change-Id: I21f4231c968b37cdcf1565279eedfb990dbc583b
2017-09-07 12:55:58 +00:00
Rubin Xu
e3469a426e Merge "Always add local subnet routes to the interface's routing table" am: 981228be38
am: 5fb26a1270

Change-Id: I3e0aa03b46b77bd65aa301fec28f4f6ab5de5c62
2017-09-07 12:38:56 +00:00
Rubin Xu
5fb26a1270 Merge "Always add local subnet routes to the interface's routing table"
am: 981228be38

Change-Id: I0b1728fae18c891d91fafdfbb1905c05e0fea47f
2017-09-07 12:25:05 +00:00
Rubin Xu
981228be38 Merge "Always add local subnet routes to the interface's routing table" 2017-09-07 12:12:09 +00:00
Rubin Xu
1bb5c0818f Always add local subnet routes to the interface's routing table
For some networks such as mobile data connections, its LinkProperties
does not contain routes for the local subnet so no such route is added
to the interface's routing table. This can be problematic especially
if the device is in VPN lockdown mode where there exists high-priority
PROHIBIT routing rule which in turn blocks the network's default gateway
route from being added (next hop address hitting the prohibit rule).

We fix this by patching LinkProperties to always include direct connected routes
when they are received by ConnectivityService. This has the added advantage that
when apps get LinkProperties, they see the directly connected routes as well.

Bug: 63662962
Test: runtest frameworks-core -c android.net.LinkPropertiesTest
Test: runtest frameworks-services -c com.android.server.ConnectivityServiceTest
Test: Start with device with mobile data, set up ics-OpenVPN in always-on
      lockdown mode. Turn off mobile data then turn it back on, observe
      mobile data connectivity is restored and VPN successfully reconnects.
Change-Id: I35b614eebccfd22c4a5270f40256f9be1e25abfb
2017-09-07 10:50:20 +01:00
Jack He
0146463d70 Bluetooth: Thread-safe binder invocation
* Binder object may become null between null check and actual invocation
  if using a instance private variable assignable by service connection
  callbacks
* The solution to this problem without locking is to assign existing
  binder variable to a local final variable before the null check
* Any further invocation to a disconnected binder object will result in
  RemoteException that is caught by the try-catch block
* Read and write to volatile variable is always atomic and hence thread-safe
* Removed unnecessary synchronization in BluetoothAdapter constructor
* Private mConnection objects should be final
* Simplfied several return statements where booleans can be returned
  directly
* Removed unnecessary catches for NPE since there won't be any

Bug: 64724692
Test: make, pair and use devices, no functional change
Change-Id: Ifc9d6337c0d451a01484b61243230725d5314f8e
(cherry picked from commit 16eeac356c)
2017-09-07 08:43:16 +00:00
Sujith Ramakrishnan
c07c23b1f7 Merge "Make ASSIST launch VIS and add a keycode for TV (ALL_APPS)" into oc-dev 2017-09-07 00:09:21 +00:00
Daniel Nishi
b53b925f68 Merge "Flag storage settings cache invalidation time." into oc-mr1-dev 2017-09-06 23:07:13 +00:00
Chad Brubaker
47be923fd5 Merge "Allow Instant Apps to access send_action_app_error" into oc-mr1-dev
am: 102f564165

Change-Id: Iaec41b49ab0fd6d312efc08b05b3cff0b12c4401
2017-09-06 18:30:18 +00:00
Chad Brubaker
102f564165 Merge "Allow Instant Apps to access send_action_app_error" into oc-mr1-dev 2017-09-06 18:20:46 +00:00
Rubin Xu
c17f1d412b Merge "Fix resetPasswordWithToken before user unlock" into oc-mr1-dev
am: 2e21fba2b5

Change-Id: I83688cd83cf18f37b3507ebe69d29dbc2669178b
2017-09-06 12:19:51 +00:00
Rubin Xu
2e21fba2b5 Merge "Fix resetPasswordWithToken before user unlock" into oc-mr1-dev 2017-09-06 12:12:36 +00:00
Jack He
c86e2f98a4 Merge "Bluetooth: Thread-safe binder invocation" am: 94f1fd0da2 am: a672ffa42f
am: 9a68d78b44

Change-Id: I08808aaec456fbb53126fcf0130c02afac82f29b
2017-09-06 00:53:03 +00:00
Jack He
9a68d78b44 Merge "Bluetooth: Thread-safe binder invocation" am: 94f1fd0da2
am: a672ffa42f

Change-Id: If02485ca3e3c16da3bc58532604576d577684528
2017-09-06 00:39:55 +00:00
Vinay Kalia
e4eddfd682 Merge "Update documentation for startScan" am: 7d2219d170 am: 04d061e891
am: 2ace7d5b63

Change-Id: Ia7349df7a8e06b3d91bcff2b18b50fdbe1eef66a
2017-09-06 00:34:20 +00:00
Jack He
a672ffa42f Merge "Bluetooth: Thread-safe binder invocation"
am: 94f1fd0da2

Change-Id: I8f9c76996f02c70b8d2ea21d4eb567eaa9da246a
2017-09-06 00:30:09 +00:00
Vinay Kalia
2ace7d5b63 Merge "Update documentation for startScan" am: 7d2219d170
am: 04d061e891

Change-Id: Ib88766933fef830d2613b9b92bc744aed75c6e9f
2017-09-06 00:21:37 +00:00
Jack He
16eeac356c Bluetooth: Thread-safe binder invocation
* Binder object may become null between null check and actual invocation
  if using a instance private variable assignable by service connection
  callbacks
* The solution to this problem without locking is to assign existing
  binder variable to a local final variable before the null check
* Any further invocation to a disconnected binder object will result in
  RemoteException that is caught by the try-catch block
* Read and write to volatile variable is always atomic and hence thread-safe
* Removed unnecessary synchronization in BluetoothAdapter constructor
* Private mConnection objects should be final
* Simplfied several return statements where booleans can be returned
  directly
* Removed unnecessary catches for NPE since there won't be any

Bug: 64724692
Test: make, pair and use devices, no functional change
Change-Id: Ifc9d6337c0d451a01484b61243230725d5314f8e
2017-09-06 00:09:47 +00:00
Vinay Kalia
04d061e891 Merge "Update documentation for startScan"
am: 7d2219d170

Change-Id: I5ea7a5a9b0a69168a1715986e4850276299af78a
2017-09-06 00:08:24 +00:00
Felipe Leme
b0a4057d44 Finishes the session when the service returns a null response on authentication.
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases -t android.autofillservice.cts.LoginActivityTest#testFillResponseAuthServiceHasNoData
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases

Fixes: 64985246

Change-Id: Id9a4b9f1752dcee6c67ac659b9dbd6dd1dd7b43c
2017-09-05 16:28:23 -07:00
Vinay Kalia
958154b5e2 Update ScanSettings documentation for scan modes
SCAN_MODE_LOW_POWER is enforced for applications running
in background.

Test: BLE scanning applications.
BUG: 38198694
BUG: 62491228
Change-Id: Ib2b6c297298e05f1b088411e94cfe4789dde0821
2017-09-05 13:51:58 -07:00
Vinay Kalia
875d27e45e Update documentation for startScan
With change c4a1e1, unfiltered BLE scans are stopped on screen off
and resumed when screen is turned back on. This is done to save power.
This change updates the documentation accordingly.

BUG: 62264269
Test: Documentation update.
Change-Id: I2d8e9f9f122f978c4d4f59d4139cb51cd4e4a123
2017-09-05 11:52:35 -07:00