Commit Graph

71530 Commits

Author SHA1 Message Date
Hugo Benichi
2c856480a0 Merge changes I90c211dc,I4455f272
am: a0ff4efc8b

Change-Id: I502d978ff636a00979d2083c39381bf600d3d6da
2017-07-04 09:35:51 +00:00
Treehugger Robot
a0ff4efc8b Merge changes I90c211dc,I4455f272
* changes:
  ConnectivityServiceTest: more informative assert failures
  ConnectivityManager: allow usage of TYPE_NONE
2017-07-04 09:22:07 +00:00
Hugo Benichi
726931ebf4 ConnectivityManager: allow usage of TYPE_NONE
This patch allows to use TYPE_NONE for the legacy network type variable
of NetworkInfo. This usage is "safe" with respect to legacy APIs using
network types as most of them already returns null or do nothing for
TYPE_NONE.

Of the existing APIs in ConnectivityManager that accept a network type
argument, those which were already returning null or doing nothing for
TYPE_NONE are:
  getNetworkInfo(int)
  getNetworkForType(int)
  stopUsingNetworkFeature(int, String)
  networkCapabilitiesForType(int)
  requestRouteToHostAddress(int, InetAddress)
  reportInetCondition(int, int)
  isNetworkSupported(int)
  getLinkProperties(int)

Only setProvisioningNotificationVisible needs an additional guard
against TYPE_NONE.

Bug: 30088447
Bug: 62844794
Test: runtest frameworks-net
Change-Id: I4455f2726d06406047086368628c1f253d854d8d
2017-07-04 16:22:59 +09:00
Neil Fuller
06c2f8e346 Merge "Add dumpsys support to RulesManagerService"
am: 348a1d635d

Change-Id: Ib1b44ce174b625f2223dff72081ccfc7b2a9b390
2017-07-03 09:41:47 +00:00
Neil Fuller
87b1128ddc Add dumpsys support to RulesManagerService
Override the dump method so RuleManagerService can dump its state
into logs. Crude argument support has been added for dumping
specific fields in an easy to process way (for test scripts to use).

Tested with:
make -j30 FrameworksServicesTests
adb install -r -g \
  "out/target/product/angler/data/app/FrameworksServicesTests/FrameworksServicesTests.apk"
adb shell am instrument -e package com.android.server.timezone -w \
  com.android.frameworks.servicestests \
  "com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner"

Test: See above.
Test: Manual; adb shell dumpsys timezone [-format_state piscotz]
Bug: 31008728
Change-Id: I0ad83aa245232ed0b983ceacd8accfb876824d6f
2017-06-30 18:18:07 +01:00
Jack He
9fd5d0da1e Merge "Support battery level reporting via Apple VSC (1/2)"
am: 874af710b7

Change-Id: Id65e6e11308c66893cb701af8909df9fee3a131f
2017-06-29 17:53:10 +00:00
Jack He
679d0bc8f9 Support battery level reporting via Apple VSC (1/2)
* Add related constants to BluetoothHeadset

Bug: 35874078
Test: make, test with supporting headsets
Change-Id: I9f49ea28efdf6de0e751a377d879fe13a47655d5
2017-06-29 17:43:32 +00:00
Jack He
c286110c1a Merge "Support battery level reporting via Plantronics XEVENT (1/2)"
am: c79c4240ec

Change-Id: I6aa50e541763adfa9ebe738d98d86152cf0cd1d5
2017-06-29 17:25:26 +00:00
Jack He
0fcbba25b7 Support battery level reporting via Plantronics XEVENT (1/2)
* Add related constants to BluetoothHeadset

Bug: 35874078
Test: make, test with supporting headsets
Change-Id: Ied089a065bf9caa0d03f681950fefa2ea990bb3e
2017-06-29 17:17:14 +00:00
Neil Fuller
93b232db41 Merge "Use sendBroadcastAsUser rather than sendBroadcast"
am: d129a14647

Change-Id: I76324b2d983887dbdac4b26e518a68d8c4035a47
2017-06-29 11:37:13 +00:00
Treehugger Robot
d129a14647 Merge "Use sendBroadcastAsUser rather than sendBroadcast" 2017-06-29 11:29:37 +00:00
Andre Eisenbach
df1831d2ee Merge "HFP: Modify comments for ACTION_HF_INDICATORS_VALUE_CHANGED (1/2)"
am: 5790bae2f4

Change-Id: I480ef38d5aa61aa153ee53d325e8b249c1eab222
2017-06-29 08:39:40 +00:00
Jack He
73795440a5 HFP: Modify comments for ACTION_HF_INDICATORS_VALUE_CHANGED (1/2)
* Per HFP 1.7.1 spec page 102 of 144
  EXTRA_HF_INDICATORS_IND_ID should be int
  EXTRA_HF_INDICATORS_IND_VALUE should be int

Bug: 35874078
Test: make, PTS test, unit tests
runtest -c com.android.bluetooth.btservice.RemoteDevicesTest bluetooth

Change-Id: Idd316a82bab164b6ea1701bb261b1cc3dee196f1
2017-06-29 08:30:37 +00:00
Jack He
96f98f255b Merge "Add APIs to get remote device's battery level (1/2)"
am: ceaccbfe70

Change-Id: Ic3253ef666632aaaffe8e1547dc563cd3bca9e37
2017-06-28 08:32:54 +00:00
Jack He
1d312bfa78 Add APIs to get remote device's battery level (1/2)
* Add BluetoothDevice.getBatteryLevel() API to retreive battery level
  information of remote device
* Add BluetoothDevice.ACTION_BATTERY_LEVEL_CHANGED intent to notify user
  that remote device's battery level has changed

Bug: 35874078
Test: make, pair with devices and use them
Change-Id: I41051ee25383f5f3a1e505aef6f8c526385f58bd
2017-06-27 16:53:09 -07:00
Neil Fuller
23eb3a19b8 Use sendBroadcastAsUser rather than sendBroadcast
According to messages in the logcat sendBroadcastAsUser
is the better option.

Test: Manual
Bug: 31008728
Change-Id: I06bcd3c53878fc2b1b817337ea8719fcc4975501
2017-06-27 19:04:50 +01:00
Hugo Benichi
c729ff8253 Merge changes I193297e0,I43beb966
* changes:
  NetworkCapabilities: Added support for TRANSPORT_LOWPAN
  Connectivity metrics: serialize networkId, transports, ifname
2017-06-24 00:01:24 +00:00
Vladimir Marko
17bb92fe14 Merge "Rename Binder.destroy() to Binder.destroyBinder()." am: a634b38c8e
am: 1b4b326128

Change-Id: I165243924444f89ee880072c55eba012ccf1d149
2017-06-23 10:55:48 +00:00
Vladimir Marko
a634b38c8e Merge "Rename Binder.destroy() to Binder.destroyBinder()." 2017-06-23 10:36:02 +00:00
Robert Quattlebaum
5f9157651e NetworkCapabilities: Added support for TRANSPORT_LOWPAN
This change simply adds a new constant, `TRANSPORT_LOWPAN`, for
identifying low-power wireless networks like Thread.

Bug: b/33073713
Merged-In: Ie4aa77496f8ff466fa1a5fbc556e9c029457a689

(cherry pick from commit 557e0c38b9)

Change-Id: I21f9b41b8b31c63ceeb1bc9c965f6da2614c356a

Test: runtest frameworks-net (not in original commit message)
2017-06-23 16:08:45 +09:00
Hugo Benichi
6a9bb8e84a Connectivity metrics: serialize networkId, transports, ifname
This patch adds translation from ConnectivityMetricsEvent to
IpConnectivityEvent of recently added fields:
 - top-level network id
 - top-level ifname
 - transports

Also adds inference of link layer from transports or ifname.

At the moment these new fields are not populated in
ConnectivityMetricsEvent. Follow-up patches will fill this gap for
the events of the android.net.metrics package.

Test: new unit tests, $ runtest frameworks-net passes
Bug: 34901696
Merged-In: I563a6a3183470bdfaabb7c781a1beaf6b1058bf0

(partial cherry pick from commit 73fd4d1faf)

Change-Id: I6a00270e73a1bd07f23c367f2394d90a43ced47a

Test: runtest frameworks-net (not in original commit message)
2017-06-23 16:07:38 +09:00
Seigo Nonaka
ba12631bba Merge "Stop loading other package's font by default." into oc-dev
am: 824d75e0e1

Change-Id: I5518dbd8b5d8a4548ea00bbfca0e3aee87880ee7
2017-06-23 04:23:44 +00:00
Marie Janssen
f71b0bedcf Merge "Bluetooth: minor documentation fix to de-confuse" am: 5a56873612
am: 3205ff1331

Change-Id: I0cd44ad8d22da154d0bf666b9075a3fcbc655439
2017-06-23 03:38:17 +00:00
Marie Janssen
5a56873612 Merge "Bluetooth: minor documentation fix to de-confuse" 2017-06-23 03:17:37 +00:00
Seigo Nonaka
80f6a985c3 Stop loading other package's font by default.
Since CONTEXT_RESTRICTED is not a default flag of createPackageContext,
we can't rely on it for preventing unexpected font injections.
To protect developers and existing apps from a risk of font injection,
stop loading font from other package's resouce unless the developer
explicitly set CONTEXT_IGNORE_SECURITY.

This CL contains Iac2a6fb3d82ef23d5ca6ee33f4aaa9ed28455271 by manual
merging to handle repository split.

Bug: 62813533
Bug: 62879353
Test: Manually done
Merged-In: I4442ddc48dadb5c968b444be86038b602074d301
Change-Id: I4442ddc48dadb5c968b444be86038b602074d301
2017-06-22 19:07:17 -07:00
Felipe Leme
472b4c834f Improved documentation for AutofillService package:
am: 2ef19c1d73

Change-Id: Iac283d34da149829a25313d0910f2564b347e332
2017-06-23 00:36:37 +00:00
Felipe Leme
2ef19c1d73 Improved documentation for AutofillService package:
- Moved (and expanded) overall documentation from FillResponse to
  AutofillService.
- Improved SaveInfo documentation.
- Improved FillRequest documentation.
- Improved Dataset documentation.

Bug: 37567048
Test: ran 'm -j doc-comment-check-docs' and checked resulting HTML

Change-Id: I157893deac06a5ed5e1cb7fd082da485f227b9ee
2017-06-22 15:25:31 -07:00
Rob Carr
874b6402af Merge "ListPopupWindow: Wrap new bounds checking in targetSdk check." into oc-dev
am: 82b41e460c

Change-Id: I14f6fe76b3a24266432a8bc7286d1ae5da8f719d
2017-06-22 22:19:45 +00:00
Rob Carr
82b41e460c Merge "ListPopupWindow: Wrap new bounds checking in targetSdk check." into oc-dev 2017-06-22 22:08:10 +00:00
Neil Fuller
af32c3d234 Merge "Fix code and test related to rules version check" am: a3579d4b84
am: c506ade205

Change-Id: Ia72b94700d1a65de769beace27e699e62aedcd9f
2017-06-22 21:49:28 +00:00
Treehugger Robot
a3579d4b84 Merge "Fix code and test related to rules version check" 2017-06-22 21:23:54 +00:00
Marie Janssen
553c8c7753 Bluetooth: minor documentation fix to de-confuse
It was somewhat unclear which is the preferred method of retrieving a
BluetoothAdapter.  Make it clear that using BluetoothManager is
preferred, and remove references to the old method in BluetoothManager
docs since it is only avaialable in API 18 or higher.

Test: recompile, check that documentation is updated
Fix: 33355430
Change-Id: Ia20b4e45dca03bc2f13c2ab477799b89c5e14f45
2017-06-22 20:49:55 +00:00
Neil Fuller
0153481a22 Fix code and test related to rules version check
Fix code and test related to an incorrectly implemented
rules version check.

This meant that a device could not return the rules version
it shipped with.

Another unused (and also confusing) method and
associated test is being deleted here.

To run tests:
make -j30 FrameworksServicesTests
adb install -r -g \
  "out/target/product/angler/data/app/FrameworksServicesTests/FrameworksServicesTests.apk"
adb shell am instrument -e package com.android.server.timezone -w \
  com.android.frameworks.servicestests \
  "com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner"

Test: See above.
Bug: 31008728
Change-Id: I31b55e88072dd73055cb3d8cf252be6eac920322
2017-06-22 21:24:54 +01:00
Robert Carr
c1fdd2aa32 ListPopupWindow: Wrap new bounds checking in targetSdk check.
While a negative height is pretty silly, crashing apps on
the new version of android makes them sad.

Test: Existing CTS passes.
Bug: 62434804
Change-Id: I5fc3fc50fb6ccfa9e96f38ded4fb8e338f263f09
2017-06-22 11:54:45 -07:00
Vladimir Marko
b25a532358 Rename Binder.destroy() to Binder.destroyBinder().
There are a few AIDL-generated stubs that perform "destroy"
transactions and call "this.destroy()". Previously, this
resolved to the "destroy()" method from their interface on
ART while resolving to Binder.destroy() on the RI, though
this is a subject of a bug report against the JDK,
    http://bugs.java.com/bugdatabase/view_bug.do?bug_id=8021581 .
Resolving to the private Binder.destroy, inaccessible to
the Stub, would lead to throwing IllegalAccessErrror.

As we're changing the method lookup to be closer to RI, see
    https://android-review.googlesource.com/413119 ,
we should stay clear of the problematic cases whether we
make a decision to follow the RI precisely or not. Therefore
we rename the Binder.destroy() to Binder.destroyBinder().

Test: Nexus 6P boots.
Bug: 62855082
Change-Id: I43baf76b6f3c681d93b411cecf2bc00fccafecac
2017-06-22 14:38:23 +01:00
Hugo Benichi
ec7447b291 Merge "ConnectivityManager: fix style issue" am: e74f3adba5
am: ec54a40339

Change-Id: I5a420534268a0daec19f1f0677dcfe7abd8faf73
2017-06-22 08:03:46 +00:00
Treehugger Robot
e74f3adba5 Merge "ConnectivityManager: fix style issue" 2017-06-22 07:46:34 +00:00
Joel Scherpelz
8a4667b911 Merge "Use RFC 7217 stable privacy addresses" am: a88b12ce5e
am: 4c4d5477d4

Change-Id: I7f286484a31c7209e48e93a94d2a16849af6dace
2017-06-22 06:48:09 +00:00
Joel Scherpelz
2db1074e4f Use RFC 7217 stable privacy addresses
Ask Netd to setup WiFi interfaces to use stable privacy addresses. This
should fail benignly on devices with kernels lacking RFC 7217 support.

Test: as follows
    - built
    - flashed
    - booted
    - Manually observed persistent stable secret
    - Manually observed randomized IPv6 addresses (with flags = 800)
Bug: 17613910

Change-Id: I9465de16685b1eb0fd842446a530cf98d77a0c28
2017-06-22 13:31:06 +09:00
Amith Yamasani
5d45ac6e68 Merge "Clarify startScan API on how to get results" into oc-dev
am: 78f3a0f722

Change-Id: Ib58abc3ef4eb3c525af9ec2bb6f66e794b659030
2017-06-22 01:20:36 +00:00
TreeHugger Robot
78f3a0f722 Merge "Clarify startScan API on how to get results" into oc-dev 2017-06-22 01:14:18 +00:00
Amith Yamasani
9622137f3f Clarify startScan API on how to get results
Make it clear in BluetoothLeScanner on how to get results
when starting a scan for a PendingIntent.

Bug: 38365430
Test: make offline-sdk-docs
Change-Id: I0bf88d751c89a8a478db985713357e153ac08595
2017-06-21 14:06:44 -07:00
Felipe Leme
5fd9dd2e74 Merge changes from topics 'bug_62802026_take_2', 'bug_62802026' into oc-dev
am: 4f7fd183eb

Change-Id: Id26a5cdd53035eb94d4de3c0acf4378268b24c2e
2017-06-21 04:02:25 +00:00
Felipe Leme
605f633995 Fixed how FillEventHistory is reset and clarified javadoc.
am: 2e30c6f371

Change-Id: Ib4722f448f977e79d6d9dd8e3132db7167e91b03
2017-06-21 04:00:28 +00:00
TreeHugger Robot
4f7fd183eb Merge changes from topics 'bug_62802026_take_2', 'bug_62802026' into oc-dev
* changes:
  Don't add FillEventHistory events to the wrong session.
  Fixed how FillEventHistory is reset and clarified javadoc.
2017-06-21 03:45:50 +00:00
Dianne Hackborn
e06356904f Merge "Small doc fix." into oc-dev
am: 0f98ddaa01

Change-Id: Ib0da1db5f79b054f3826e0b3b3d0d3e4716530f2
2017-06-21 02:02:48 +00:00
TreeHugger Robot
0f98ddaa01 Merge "Small doc fix." into oc-dev 2017-06-21 01:59:02 +00:00
Rob Carr
bf78acda44 Merge "SurfaceView: Fix positioning issue when toggling visibility." into oc-dev
am: 70f1565b55

Change-Id: Id6fa287aa7c7edb2fd59a3bcbeef2aade35961e7
2017-06-21 01:56:41 +00:00
Rob Carr
70f1565b55 Merge "SurfaceView: Fix positioning issue when toggling visibility." into oc-dev 2017-06-21 01:47:58 +00:00
Svetoslav Ganov
d46d0386e2 Merge "[DO NOT MERGE] Support native shared libs" into oc-dev
am: 324c41ba89

Change-Id: Ia774a4f3bd1af7c334b2844f87fa8850de48f2f7
2017-06-21 01:19:42 +00:00