OSDN Git Service

android-x86/frameworks-base.git
6 years agoMerge changes from topic "vpn-dialog"
Charles He [Tue, 19 Sep 2017 07:56:44 +0000 (07:56 +0000)]
Merge changes from topic "vpn-dialog"

* changes:
  Unbreak VPN unit tests.
  Add alert dialog when always-on VPN disconnects.

6 years agoUnbreak VPN unit tests.
Charles He [Wed, 16 Aug 2017 12:14:13 +0000 (13:14 +0100)]
Unbreak VPN unit tests.

VpnTest was broken earlier due to a change to always-on VPN
notifications. This CL adds the corresponding mocks to the unit test to
fix it.

Bug: 36650087
Bug: 65439160
Test: runtest frameworks-net
Change-Id: Icff57c7e927c135d75a7d70ff347a579c5d45134
Merged-In: Icff57c7e927c135d75a7d70ff347a579c5d45134
(cherry picked from commit 3da6a1fc82b7e0c7adc88b92e50cceec8173672e)

6 years agoMerge changes from topic "always-on-vpn"
Charles He [Tue, 19 Sep 2017 07:50:13 +0000 (07:50 +0000)]
Merge changes from topic "always-on-vpn"

* changes:
  Opt-out for always-on VPN: rename API.
  Opt-out for always-on VPN

6 years agoMerge "Wakeup packet events: addressing a few comments"
Hugo Benichi [Tue, 19 Sep 2017 07:12:03 +0000 (07:12 +0000)]
Merge "Wakeup packet events: addressing a few comments"

6 years agoMerge "Fix LinkPropertiesTest.testCompareResult"
Treehugger Robot [Tue, 19 Sep 2017 06:28:21 +0000 (06:28 +0000)]
Merge "Fix LinkPropertiesTest.testCompareResult"

6 years agoWakeup packet events: addressing a few comments
Hugo Benichi [Tue, 19 Sep 2017 04:15:26 +0000 (13:15 +0900)]
Wakeup packet events: addressing a few comments

This patch addresses a few post-submit comment for
commits f562ac34a51dc and 60c9f63b66921.

Bug: 34901696
Bug: 62179647
Test: runtest frameworks-net
Change-Id: I4abec57e0c6bc869dc57b5eb54582dd977b64c30

6 years agoMerge "Remove unused variable from screencap."
Treehugger Robot [Tue, 19 Sep 2017 03:12:18 +0000 (03:12 +0000)]
Merge "Remove unused variable from screencap."

6 years agoMerge "Incorrect decoding when TP-OA contains non-integer information"
Pengquan Meng [Tue, 19 Sep 2017 01:14:34 +0000 (01:14 +0000)]
Merge "Incorrect decoding when TP-OA contains non-integer information"

6 years agoIncorrect decoding when TP-OA contains non-integer information
Erika Avenberg [Sat, 30 Aug 2014 10:00:47 +0000 (12:00 +0200)]
Incorrect decoding when TP-OA contains non-integer information

When receiving a GSM SMS message where the TP-Originating-Address
(TP-OA) field contains non-integer information, it is currently
decoded incorrectly.

This CL adds support for decoding BCD according to spec:
ETSI TS 123 040 V9.3.0

Section: 9.1.2.3 Semi-octet representation
"If a mobile receives an address field containing non-integer
 information in the semi-octets other than "1111" (e.g. 1110)
 it shall display the semi-octet as the representation given
 in GSM 44.008 [12] under "called BCD number", viz 1010="*",
 1011="#", 1100="a", 1101="b", 1110="c"."

Bug: 65042708
Test: runtest --path frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/GsmSmsTest.java --test-method testAddressing
Change-Id: Ied2d6ca4d84d5c3ca6cc5c4d9875d2ff2a8e5df9

6 years agoMerge "Fix extracting 32-bit uuid error via calling method uuidToBytes"
Treehugger Robot [Mon, 18 Sep 2017 17:37:26 +0000 (17:37 +0000)]
Merge "Fix extracting 32-bit uuid error via calling method uuidToBytes"

6 years agoFix extracting 32-bit uuid error via calling method uuidToBytes
Ruina Liu [Sat, 22 Jul 2017 10:41:48 +0000 (18:41 +0800)]
Fix extracting 32-bit uuid error via calling method uuidToBytes

A new defined method of uuidToBytes is used to convert
Bluetooth uuid to bytes in the case of BLE advertising.
But the most significant 16 bits of a 32-bit uuid
will be cleared after the and operations with
0X0000FFFF00000000L in the function of
getServiceIdentifierFromParcelUuid.
0XFFFFFFFF00000000L should be used as bit mask.

Change-Id: I83e22ffbecd718540e644289fee12bf9c3b66305
Test: Advertise with payload contains 32-bit uuid

6 years agoMerge "Fix a no-op uninstall being treated as a failure"
Treehugger Robot [Fri, 15 Sep 2017 16:38:38 +0000 (16:38 +0000)]
Merge "Fix a no-op uninstall being treated as a failure"

6 years agoFix a no-op uninstall being treated as a failure
Neil Fuller [Thu, 14 Sep 2017 08:34:56 +0000 (09:34 +0100)]
Fix a no-op uninstall being treated as a failure

Treat a stageUninstall() doing nothing as a success, not a
failure. This prevents the system retrying the uninstall
later.

Unit tests run with:

make -j30 FrameworksServicesTests
adb install -r -g \
  "out/target/product/marlin/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 testing, adb dumpsys timezone
Test: PTS: run pts -m PtsTimeZoneTestCases
Bug: 65657176
Merged-in: Ifd205da90e848552711ac3f4207cd22ad2c2747b
Change-Id: Ifd205da90e848552711ac3f4207cd22ad2c2747b
(cherry picked from commit 8e27c9226b82f41279ee6c108d2b06bb6f1cef5e)

6 years agoFix LinkPropertiesTest.testCompareResult
Rubin Xu [Fri, 15 Sep 2017 10:51:39 +0000 (11:51 +0100)]
Fix LinkPropertiesTest.testCompareResult

Test: runtest frameworks-core -c android.net.LinkPropertiesTest
Change-Id: Ie97b7a7a1557b14296d7c33e98991cdede8463b0

6 years agoMerge "API council suggested edits, part 3"
Hall Liu [Fri, 15 Sep 2017 00:21:58 +0000 (00:21 +0000)]
Merge "API council suggested edits, part 3"

6 years agoMerge "Apply suggested edits to the file-download API"
Hall Liu [Fri, 15 Sep 2017 00:21:13 +0000 (00:21 +0000)]
Merge "Apply suggested edits to the file-download API"

6 years agoMerge changes Id931d441,I83faf974
Treehugger Robot [Thu, 14 Sep 2017 23:41:34 +0000 (23:41 +0000)]
Merge changes Id931d441,I83faf974

* changes:
  Zygote: Improve logging and error handling during connections.
  Zygote: Fix race condition on package preloads.

6 years agoMerge changes from topic "incl_svc_parsing_fix"
Treehugger Robot [Thu, 14 Sep 2017 22:59:37 +0000 (22:59 +0000)]
Merge changes from topic "incl_svc_parsing_fix"

* changes:
  Fix included service parsing (3/3)
  Bluetooth: fix typo in comment

6 years agoAPI council suggested edits, part 3
Hall Liu [Sat, 9 Sep 2017 01:02:38 +0000 (18:02 -0700)]
API council suggested edits, part 3

* MbmsException no longer thrown from the common methods, and the error
codes are now containined in MbmsError.
* In order to avoid ANRs while processing download-done broadcasts,
don't perform arbitrary moves when a download is done. Instead, move
into a staging directory and let the app handle it.

Bug: 30981736
Test: testapps
Change-Id: I9416f28b4f24f89af1da6f56a93ea0f0e4ea3878

6 years agoApply suggested edits to the file-download API
Hall Liu [Sat, 2 Sep 2017 00:59:15 +0000 (17:59 -0700)]
Apply suggested edits to the file-download API

* Rename Manager -> Session
* Add Handler for callbacks in download flow
* Separate out registering a state callback into another method
* Rename dispose -> close, implement AutoClosable
* No more thrown MbmsExceptions
* Add sanity check for temp file root
* Remove the getNames method, replace with getNameForLocale

Bug: 30981736
Test: testapps
Change-Id: I1a2054d79c934bc4929464de4a644b6960db47e9

6 years agoFix included service parsing (3/3)
Jakub Pawlowski [Thu, 14 Sep 2017 18:54:59 +0000 (11:54 -0700)]
Fix included service parsing (3/3)

Bug: 65637368
Test: sl4a GattIncludedServiceTest
Change-Id: Idb967df9d5064b0532db7f5c250f677d1dbbc54c

6 years agoMerge "Make changes to MBMS Streaming APIs per recommendations"
Hall Liu [Thu, 14 Sep 2017 19:34:11 +0000 (19:34 +0000)]
Merge "Make changes to MBMS Streaming APIs per recommendations"

6 years agoBluetooth: fix typo in comment
Jakub Pawlowski [Thu, 14 Sep 2017 15:51:44 +0000 (08:51 -0700)]
Bluetooth: fix typo in comment

Test: none
Change-Id: I48c674049df88285268145d4140870eb4ab79a62

6 years agoMerge "Bluetooth: fix parameter name in onConnectionUpdated"
Jakub Pawlowski [Thu, 14 Sep 2017 19:24:06 +0000 (19:24 +0000)]
Merge "Bluetooth: fix parameter name in onConnectionUpdated"

6 years agoBluetooth: fix parameter name in onConnectionUpdated
Jakub Pawlowski [Thu, 14 Sep 2017 15:24:15 +0000 (08:24 -0700)]
Bluetooth: fix parameter name in onConnectionUpdated

Test: compilation
Change-Id: I625e4ca63477b795310ebb42ca5e9a0549523cc5

6 years agoMerge "Finalize package intents used to trigger tz update"
Neil Fuller [Thu, 14 Sep 2017 14:07:59 +0000 (14:07 +0000)]
Merge "Finalize package intents used to trigger tz update"

6 years agoFinalize package intents used to trigger tz update
Neil Fuller [Wed, 13 Sep 2017 15:01:58 +0000 (16:01 +0100)]
Finalize package intents used to trigger tz update

Finalize the package intents used to trigger tz update and
improve the documentation.

Bug: 64018084
Test: PTS: run pts -m PtsTimeZoneTestCases
Change-Id: Ifba9dea1d6d8818f875d4c7efba09d77c8e6d66a
Merged-In: Ifba9dea1d6d8818f875d4c7efba09d77c8e6d66a
(cherry picked from commit 228dc6cfefd06936657fa39848f7ee73162def8f)

6 years agoMerge changes I4719b4dc,I0308cdf4,I38db1bb7
Hugo Benichi [Thu, 14 Sep 2017 11:59:58 +0000 (11:59 +0000)]
Merge changes I4719b4dc,I0308cdf4,I38db1bb7

* changes:
  IpManagerTest: fix flaky test
  Fix flaky NsdManagerTest
  Boostrap test for NetworkMonitor

6 years agoMerge changes Ie2676b20,Ie8db6f85
Hugo Benichi [Thu, 14 Sep 2017 11:53:02 +0000 (11:53 +0000)]
Merge changes Ie2676b20,Ie8db6f85

* changes:
  Connectivity metrics: add WakeupStats events
  Connectivity metrics: collect NFLOG wakeup events

6 years agoConnectivity metrics: add WakeupStats events
Hugo Benichi [Tue, 5 Sep 2017 04:34:48 +0000 (13:34 +0900)]
Connectivity metrics: add WakeupStats events

This patch defines a new WakeupStats event in ipconnectivity.proto and
populates these events from the NFLOG wakeup events stored in
NetdEventListenerService.

There is one WakeupStats object per known interface on which ingress
packets arrive and may wake the system up.

Example from $ adb shell dumpsys connmetrics list:

UPDATEME
...
WakeupStats(wlan0, total: 58, root: 0, system: 3, apps: 38, non-apps: 0, unrouted: 17, 6111s)
WakeupEvent(13:36:31.686, iface wlan0, uid -1)
WakeupEvent(13:38:50.846, iface wlan0, uid -1)
WakeupEvent(13:39:16.676, iface wlan0, uid 10065)
WakeupEvent(13:40:32.144, iface wlan0, uid 1000)
WakeupEvent(13:40:35.827, iface wlan0, uid 1000)
WakeupEvent(13:40:47.913, iface wlan0, uid 10004)
WakeupEvent(13:40:52.622, iface wlan0, uid 10014)
WakeupEvent(13:41:06.036, iface wlan0, uid 10004)
...

Bug: 34901696
Bug: 62179647
Test: runtest frameworks-net
Change-Id: Ie2676b20bfb411a1902f4942643df0c20e268d99

6 years agoZygote: Improve logging and error handling during connections.
Narayan Kamath [Wed, 5 Jul 2017 13:45:38 +0000 (14:45 +0100)]
Zygote: Improve logging and error handling during connections.

Before this change, we were throwing a checked exception on success
and returning on failure. This made it hard to figure out where / when
something was going wrong. This change switches things around to throw
a RuntimeException when something goes wrong and to return a Runnable
on success. This lets us make stronger assertions in both the parent
and the child process about their state and expected return values.

This change also upgrades the severity of several errors that we would
earlier just ignore. We will now reject the command and terminate the
connection to the client when we encounter these errors such as:

- Malformed arguments
- Any ZygoteSecurityException, such as thown thrown by
  applyUidSecurityPolicy and applyInvokeWithSecurityPolicy.
- Any error in setting up pipes etc. to facilitate communication
  with child processes.

(cherry picked from commit bf99d06003e76469a99269816babe16a22d83b89)

Bug: 13618569
Test: Manual
Merged-In: Id931d44135ae2e4ede1bbac6a4b187f6c139e1fd
Change-Id: Id931d44135ae2e4ede1bbac6a4b187f6c139e1fd

6 years agoZygote: Fix race condition on package preloads.
Narayan Kamath [Mon, 3 Jul 2017 13:12:26 +0000 (14:12 +0100)]
Zygote: Fix race condition on package preloads.

Before this change, ZygoteProcess.preloadPackageForAbi returned
as soon as the command was written to the zygote socket and not
after the preload completed. This meant that there was a small
window of time before the server side of the socket polled its FDs
where a second command could be written to the zygote socket. This
would lead to only one of the commands being processed and the
other being dropped. The client side of that socket would then wait
forever for a response and bring down the system once the watchdog
timeout was hit.

Example failure case :
--------------
system_server:send command(preloadPackage)
system_server:send command(fork)
zygote:poll & process command(preloadPackage)  // the fork command is dropped.

Example of normal operation :
------------------
system_server:send command(preloadPackage)
zygote:poll & process command(preloadPackage)
system_server:send command(fork)
zygote:poll & process command(fork)

This change makes preloadPackageForAbi synchronous, which ensures
that each POLLIN event corresponds to precisely one command.

(cherry picked from commit 24a3306c32aa3860184025638f3abaab96cc9153)

Bug: 62886909
Bug: 13618569
Test: Manual
Contributed-By: yuqianyu@huawei.com
Merged-In: I83faf974c9a70a6ab18323f692c1981784e4c56a
Change-Id: I83faf974c9a70a6ab18323f692c1981784e4c56a

6 years agoMerge "Abort connecting to native daemon during shutdown"
Treehugger Robot [Wed, 13 Sep 2017 22:09:54 +0000 (22:09 +0000)]
Merge "Abort connecting to native daemon during shutdown"

6 years agoMerge "Unhide EMBMS download API"
Hall Liu [Wed, 13 Sep 2017 20:40:34 +0000 (20:40 +0000)]
Merge "Unhide EMBMS download API"

6 years agoMerge changes from topics "embms-0804-adjustments", "prepare-download-unhide"
Hall Liu [Wed, 13 Sep 2017 19:55:58 +0000 (19:55 +0000)]
Merge changes from topics "embms-0804-adjustments", "prepare-download-unhide"

* changes:
  Make EMBMS adjustments for 08/04
  Prepare EMBMS apis for un-hiding

6 years agoMerge "Bluetooth: thread-safe callback invocation"
Treehugger Robot [Wed, 13 Sep 2017 19:03:47 +0000 (19:03 +0000)]
Merge "Bluetooth: thread-safe callback invocation"

6 years agoBluetooth: thread-safe callback invocation
Jakub Pawlowski [Wed, 13 Sep 2017 16:33:34 +0000 (09:33 -0700)]
Bluetooth: thread-safe callback invocation

Bug: 65596701
Test: manual
Change-Id: I92a436328a3070ea842e8e652891e485406c2ed7

6 years agoMerge "Bluetooth: fix GATT race conditions when using Handler"
Treehugger Robot [Wed, 13 Sep 2017 17:31:30 +0000 (17:31 +0000)]
Merge "Bluetooth: fix GATT race conditions when using Handler"

6 years agoBluetooth: fix GATT race conditions when using Handler
Jakub Pawlowski [Tue, 12 Sep 2017 21:48:30 +0000 (14:48 -0700)]
Bluetooth: fix GATT race conditions when using Handler

Bug: 65596701
Test: manual
Change-Id: Id703cea0543626bdd5a583da95615b650bbcc331

6 years agoIpManagerTest: fix flaky test
Hugo Benichi [Thu, 7 Sep 2017 05:18:33 +0000 (14:18 +0900)]
IpManagerTest: fix flaky test

Reset the callback mock for every onLinkPropertiesChange expected when
pushing address updates on the BaseNetworkObserver.

Bug: 32561414
Bug: 62918393
Test: runtest frameworks-net, IpManagerTest passes 200 times in a row
Change-Id: I4719b4dc86044438243887634191c2d21686b80f

6 years agoFix flaky NsdManagerTest
Hugo Benichi [Fri, 8 Sep 2017 00:03:54 +0000 (09:03 +0900)]
Fix flaky NsdManagerTest

Bad synchronization between the mock handler and the test assertions
were causing testDiscoverService() to sometime fails (1/50 ~ 1/100 repro
rate).

Bug: 32561414
Bug: 62918393
Test: runtest frameworks-net, NsdManager#testDiscoverService now passes
      1000 times without errors.
Change-Id: I0308cdf48fc6bdc2fc9b4e8f7d5241a1cf2ea443

6 years agoMerge "Refactor CompareResult<> class and its call sites"
Rubin Xu [Wed, 13 Sep 2017 09:35:04 +0000 (09:35 +0000)]
Merge "Refactor CompareResult<> class and its call sites"

6 years agoMerge "Rename debugFlags to runtimeFlags."
Nicolas Geoffray [Wed, 13 Sep 2017 08:08:47 +0000 (08:08 +0000)]
Merge "Rename debugFlags to runtimeFlags."

6 years agoBoostrap test for NetworkMonitor
Hugo Benichi [Mon, 31 Jul 2017 03:58:20 +0000 (12:58 +0900)]
Boostrap test for NetworkMonitor

This will finally allow to write captive portal detection unit tests.

Bug: 32561414
Bug: 62918393
Test: runtest frameworks-net
Change-Id: I38db1bb79ae80a82b4199dc9cb1b56257e0cf222

6 years agoRename debugFlags to runtimeFlags.
Nicolas Geoffray [Thu, 7 Sep 2017 13:13:29 +0000 (14:13 +0100)]
Rename debugFlags to runtimeFlags.

Also now pass the flags to the forked process through --runtime-flags instead
of converting to command line arguments and converting back to an integer.

bug: 30972906
bug: 63920015

Test: builds

Change-Id: I7f10c43dd916ca2d3b9b5141f17261eb7b64f49a

6 years agoMerge "Patch incoming LinkProperties before it's visible to the outside"
Treehugger Robot [Tue, 12 Sep 2017 11:12:53 +0000 (11:12 +0000)]
Merge "Patch incoming LinkProperties before it's visible to the outside"

6 years agoPatch incoming LinkProperties before it's visible to the outside
Rubin Xu [Mon, 11 Sep 2017 14:21:10 +0000 (15:21 +0100)]
Patch incoming LinkProperties before it's visible to the outside

Otherwise we risk a race condition when we are fixing the LinkProperties
routes, other parts of ConnectivityService is reading the field at the
same time.

Test: runtest frameworks-net -c com.android.server.ConnectivityServiceTest
Test: runtest frameworks-core -c android.net.LinkPropertiesTest
Bug: 65529483
Bug: 35995111
Change-Id: I539578703570a901e0a5dff0155422ca78c52401

6 years agoMerge "Check for IControllOffload.getServer() returning null"
Treehugger Robot [Tue, 12 Sep 2017 06:10:45 +0000 (06:10 +0000)]
Merge "Check for IControllOffload.getServer() returning null"

6 years agoCheck for IControllOffload.getServer() returning null
Erik Kline [Mon, 11 Sep 2017 07:33:27 +0000 (16:33 +0900)]
Check for IControllOffload.getServer() returning null

Test: as follows
    - built
    - flashed
    - booted
    - runtest frameworks-net passes
Bug: 29337859
Bug: 65529504

Merged-In: I5a57a9fd14dc53eaf1722fbc9a972f4f73280497
Merged-In: Ib2d1862367145260ac83f14d181646eb827538f8
Change-Id: I671487344000f1f2db92b8e4a693c096b680830c
(cherry picked from commit 87b3bfd5f2d3d0ccfc3ee1279b496d4ff289e38f)

6 years agoConnectivity metrics: collect NFLOG wakeup events
Hugo Benichi [Mon, 4 Sep 2017 04:24:43 +0000 (13:24 +0900)]
Connectivity metrics: collect NFLOG wakeup events

This patch stores NFLOG packet wakeup events sent by Netd to the system
server into a ring buffer inside NetdEventListenerService. The content
of this buffer is accessible by $ dumpsys connmetrics or $ dumpsys
connmetrics list, and is added to bug reports.

The wakeup event buffer stores currently uid and timestamps.

Bug: 34901696
Bug: 62179647
Test: runtest frameworks-net, new unit tests
Change-Id: Ie8db6f8572b1a929a20398d8dc03e189bc488382

6 years agoMerge "Show 3G data icon for TD-SCDMA network type"
Jordan Liu [Mon, 11 Sep 2017 22:52:20 +0000 (22:52 +0000)]
Merge "Show 3G data icon for TD-SCDMA network type"

6 years agoMerge "AAPT2: Fix processing of quotes in XML"
Treehugger Robot [Mon, 11 Sep 2017 21:34:53 +0000 (21:34 +0000)]
Merge "AAPT2: Fix processing of quotes in XML"

6 years agoMerge "Revert "OMS: fix listener callbacks triggered by changes to target package""
Treehugger Robot [Mon, 11 Sep 2017 21:10:12 +0000 (21:10 +0000)]
Merge "Revert "OMS: fix listener callbacks triggered by changes to target package""

6 years agoShow 3G data icon for TD-SCDMA network type
Wileen Chiu [Fri, 18 Sep 2015 22:17:54 +0000 (15:17 -0700)]
Show 3G data icon for TD-SCDMA network type

- The data annunciator on the UI shows up as
"G" instead of "3G"
- Map the 3G telephony icon to network type
TD-SCDMA

Bug: 36802489
Test: manual
Change-Id: I63a0e54aab7fda2bcc6f098bb0b43799aad2f6c2

6 years agoAAPT2: Fix processing of quotes in XML
Adam Lesinski [Fri, 30 Jun 2017 00:53:36 +0000 (17:53 -0700)]
AAPT2: Fix processing of quotes in XML

When processing attributes in XML, quotes can't be used to mark a
section as whitespace preserving, so the assumption should be that the
entire string is whitespace preserving, which makes quote characters
literals.

Bug: 62840718
Bug: 62840406
Test: make aapt2_tests
Change-Id: I4afff02148b5b8e78833abf1f323c2f5325d6155

6 years agoMerge "Add ims registration status"
Treehugger Robot [Mon, 11 Sep 2017 19:44:31 +0000 (19:44 +0000)]
Merge "Add ims registration status"

6 years agoRevert "OMS: fix listener callbacks triggered by changes to target package"
Adam Lesinski [Mon, 11 Sep 2017 19:05:04 +0000 (19:05 +0000)]
Revert "OMS: fix listener callbacks triggered by changes to target package"

Some internal tests broke due to this. Revert for now to unblock, and investigate why this occurred.

This reverts commit f08ad98acbb83abf7d30b6583bdfc188145a4215.

Bug: 65319218
Change-Id: I1bfb2d4937708441eac2ee5909717abec10f4971

6 years agoMerge "Un-hide TelephonyManager.getSignalStrength()"
nharold [Mon, 11 Sep 2017 17:44:34 +0000 (17:44 +0000)]
Merge "Un-hide TelephonyManager.getSignalStrength()"

6 years agoMerge "Remove config_tether_apndata for Telstra."
Treehugger Robot [Mon, 11 Sep 2017 17:19:35 +0000 (17:19 +0000)]
Merge "Remove config_tether_apndata for Telstra."

6 years agoRemove config_tether_apndata for Telstra.
Amit Mahajan [Thu, 31 Aug 2017 20:49:28 +0000 (13:49 -0700)]
Remove config_tether_apndata for Telstra.

Test: manual
Bug: 63564491
Change-Id: Iaca29bfd474b7df6489b1daeaeea182ebf8d81ae

6 years agoMerge "Deprecate TelephonyManager APIs which are present in TelecomManager."
Sanket Padawe [Mon, 11 Sep 2017 03:31:18 +0000 (03:31 +0000)]
Merge "Deprecate TelephonyManager APIs which are present in TelecomManager."

6 years agoMerge "tests: remove LOCAL_CLANG"
Treehugger Robot [Sun, 10 Sep 2017 17:31:20 +0000 (17:31 +0000)]
Merge "tests: remove LOCAL_CLANG"

6 years agotests: remove LOCAL_CLANG
Lennart Wieboldt [Mon, 24 Jul 2017 22:20:24 +0000 (00:20 +0200)]
tests: remove LOCAL_CLANG

clang is the default compiler since Android nougat

Test: mma & verified it´s still build with clang
Change-Id: I9bfe0668eddf51dd56174fefc650a11002d38196
Signed-off-by: Lennart Wieboldt <lennart.1997@gmx.de>
6 years agoMerge changes I93cf24d4,I32e438ef
Treehugger Robot [Sun, 10 Sep 2017 01:29:21 +0000 (01:29 +0000)]
Merge changes I93cf24d4,I32e438ef

* changes:
  Convert host tools to Android.bp
  Rename aapt_defaults to aapt2_defaults

6 years agoMerge "Convert libhidcommand_jni to Android.bp"
Treehugger Robot [Sun, 10 Sep 2017 01:18:28 +0000 (01:18 +0000)]
Merge "Convert libhidcommand_jni to Android.bp"

6 years agoMerge "Convert incident_report and incident-section-gen to Android.bp"
Treehugger Robot [Sat, 9 Sep 2017 22:00:33 +0000 (22:00 +0000)]
Merge "Convert incident_report and incident-section-gen to Android.bp"

6 years agoConvert incident_report and incident-section-gen to Android.bp
Dan Willemsen [Sat, 9 Sep 2017 06:24:49 +0000 (23:24 -0700)]
Convert incident_report and incident-section-gen to Android.bp

See build/soong/README.md for more information.

Test: m incident_report incident-section-gen
Test: mmma frameworks/base
Change-Id: If1a930b40196139d29e63f6558bc4a75faca1967
Merged-In: If1a930b40196139d29e63f6558bc4a75faca1967

6 years agoConvert libhidcommand_jni to Android.bp
Dan Willemsen [Sat, 9 Sep 2017 06:23:59 +0000 (23:23 -0700)]
Convert libhidcommand_jni to Android.bp

See build/soong/README.md for more information.

Test: m libhidcommand_jni
Change-Id: Ica144979a2f89e0a9ed8eb4a816024aa318043e6
Merged-In: Ica144979a2f89e0a9ed8eb4a816024aa318043e6

6 years agoMerge changes Ia3bcece1,Icd26dc1e
Dan Willemsen [Sat, 9 Sep 2017 19:21:16 +0000 (19:21 +0000)]
Merge changes Ia3bcece1,Icd26dc1e

* changes:
  Don't compile libaapt with the build number
  aapt: Always use our libz

6 years agoAdd alert dialog when always-on VPN disconnects.
Charles He [Wed, 12 Jul 2017 14:30:00 +0000 (15:30 +0100)]
Add alert dialog when always-on VPN disconnects.

As part of the improvement to always-on VPN, we're adding this dialog
which is shown when the user taps the "Always-on VPN disconnected"
notification. This dialog shows a relatively detailed explanation of the
situation and offers two actions: 1) to attempt to reconnect, and 2) to
open the VpnSettings page in Settings. As a result, we expect the users
to be more aware of the consequences of a disconnected VPN, and offer
them more actionable options.

Bug: 36650087
Bug: 65439160
Test: manual

Change-Id: I5ae3ff5d25740ea52357012b75d7eb1776dfdc5e
Merged-In: I5ae3ff5d25740ea52357012b75d7eb1776dfdc5e
(cherry picked from commit 7376f6c16873e4c8f7c3f7fa27d4be6ea7894014)

6 years agoConvert host tools to Android.bp
Dan Willemsen [Sat, 9 Sep 2017 05:47:47 +0000 (22:47 -0700)]
Convert host tools to Android.bp

See build/soong/README.md for more information.

Test: m libinstrumentation interrupter accessorychat accessorytest bit obbtool pbkdf2gen libsplit-select_tests split-select protoc-gen-javastream validatekeymaps libaapt_tests aapt
Test: mmma frameworks/base
Test: out/host/linux-x86/nativetest64/libaapt_tests/libaapt_tests
Test: out/host/linux-x86/nativetest64/libsplit-select_tests/libsplit-select_tests
Change-Id: I93cf24d4b232353a52d53be8ed85781b8f4a3877

6 years agoRename aapt_defaults to aapt2_defaults
Dan Willemsen [Sat, 9 Sep 2017 05:44:51 +0000 (22:44 -0700)]
Rename aapt_defaults to aapt2_defaults

So that tools/aapt/Android.bp can have aapt_defaults.

Test: m aapt2
Change-Id: I32e438efb3516d73b347e67297aa09bee91520b1
Merged-In: I32e438efb3516d73b347e67297aa09bee91520b1

6 years agoDon't compile libaapt with the build number
Dan Willemsen [Sat, 9 Sep 2017 05:02:41 +0000 (22:02 -0700)]
Don't compile libaapt with the build number

Only do that for the aapt binary itself. This will allow libaapt to be
converted to Soong.

Also remove a few lines that weren't doing anything: aaptCppflags was
never set, LOCAL_C_INCLUDES := $(LOCAL_PATH) is implied.

Test: m aapt
Test: aapt version
Change-Id: Ia3bcece14921417e1bfd3406630961c013bd497c

6 years agoaapt: Always use our libz
Dan Willemsen [Sat, 9 Sep 2017 04:26:31 +0000 (21:26 -0700)]
aapt: Always use our libz

Instead of using the system libz (-lz), include our copy as a static
library. This is safer in case the system version isn't compatible.

Also removes references to -ldl -lrt -lpthread, which are now implied.

Test: m -j
Test: out/host/linux-x86/nativetest64/libaapt_tests/libaapt_tests
Test: out/host/linux-x86/nativetest64/aapt2_tests/aapt2_tests
Test: out/host/linux-x86/nativetest64/libsplit-select_tests/libsplit-select_tests
Change-Id: Icd26dc1e0d011e5b5f158e562640533c5ac34e33

6 years agoMake changes to MBMS Streaming APIs per recommendations
Hall Liu [Mon, 28 Aug 2017 21:10:46 +0000 (14:10 -0700)]
Make changes to MBMS Streaming APIs per recommendations

* Rename MbmsStreamingManager -> MbmsStreamingSession
* MbmsStreamingSession now implements AutoClosable instead of using
dispose()
* No longer throw checked MbmsExceptions from any methods. All such
errors will be reported via the async callback.
* null arguments no longer accepted for Handlers
* Guarantee that no further callbacks will get enqueued after closing.

Test: run testapps
Bug: 30981736
Change-Id: I85e98850759c6c7fe7b883ffffa5b1f4e362770d

6 years agoUnhide EMBMS download API
Hall Liu [Tue, 15 Aug 2017 20:46:10 +0000 (13:46 -0700)]
Unhide EMBMS download API

Make changes to the download API so that it passes the linter, remove
@hide tags.

Test: manual
Bug: 30981736
Change-Id: Ifa0d36896338b0108fbaad4b1e9b8d857a43d491

6 years agoMerge "Update ScanSettings documentation for scan modes"
Vinay Kalia [Fri, 8 Sep 2017 19:50:36 +0000 (19:50 +0000)]
Merge "Update ScanSettings documentation for scan modes"

6 years agoMerge "CachedBluetoothDevice: Simplify ProfleConnectionState check"
Treehugger Robot [Fri, 8 Sep 2017 19:26:37 +0000 (19:26 +0000)]
Merge "CachedBluetoothDevice: Simplify ProfleConnectionState check"

6 years agoMerge "support chinese character for ota package's path"
Elliott Hughes [Fri, 8 Sep 2017 18:07:01 +0000 (18:07 +0000)]
Merge "support chinese character for ota package's path"

6 years agoMerge "Avoid race condition during grayscale animation of QS tile"
Treehugger Robot [Fri, 8 Sep 2017 14:38:31 +0000 (14:38 +0000)]
Merge "Avoid race condition during grayscale animation of QS tile"

6 years agoDeprecate TelephonyManager APIs which are present in TelecomManager.
Sanket Padawe [Fri, 1 Sep 2017 10:31:20 +0000 (03:31 -0700)]
Deprecate TelephonyManager APIs which are present in TelecomManager.

Bug: 62346128
Test: Build
Change-Id: I4c3b4652f5d22215572d64b764bcd42bb7295ebe
Merged-in: I4c3b4652f5d22215572d64b764bcd42bb7295ebe

6 years agoRefactor CompareResult<> class and its call sites
Rubin Xu [Tue, 22 Aug 2017 15:35:52 +0000 (16:35 +0100)]
Refactor CompareResult<> class and its call sites

Move all corner case logic from call sites to CompareResult's implementation,
add a constructor to directly do the comparison.

Test: runtest frameworks-core -c android.net.LinkPropertiesTest
Change-Id: I95bba82ec38d295b18c49c025dffab5f17271cbd

6 years agoOpt-out for always-on VPN: rename API.
Charles He [Tue, 15 Aug 2017 14:30:22 +0000 (15:30 +0100)]
Opt-out for always-on VPN: rename API.

Rename the opt-out flag in AndroidManifest to
SERVICE_META_DATA_SUPPORTS_ALWAYS_ON
as directed by the API Council.

Bug: 64331776
Bug: 36650087
Test: runtest --path java/com/android/server/connectivity/VpnTest.java
Change-Id: I24326fad7a89083a2409134640bda81ee0359d08
Merged-In: I24326fad7a89083a2409134640bda81ee0359d08
(cherry picked from commit c57a01c16616f938eaa84ae5349a53efdec6e4cc)

6 years agoOpt-out for always-on VPN
Charles He [Mon, 15 May 2017 16:07:18 +0000 (17:07 +0100)]
Opt-out for always-on VPN

Always-on VPN is a feature introduced in N. Since then, all VPN apps
targeting N+ are assumed to support the feature, and the user or the DPC
can turn on / off always-on for any such VPN app. However, a few VPN
apps are not designed to support the always-on feature. Enabling
always-on for these apps will result in undefined behavior and confusing
"Always-on VPN disconnected" notification.

This feature provides a new manifest meta-data field through which a VPN
app can opt out of the always-on feature explicitly. This will stop the
always-on feature from being enabled for the app, both by the user and
by the DPC, and will clear its existing always-on state.

A @hide API is provided to check whether an app supports always-on VPN.
Documentation is updated to reflect the behavior change.

Bug: 36650087
Test: runtest --path java/com/android/server/connectivity/VpnTest.java
Test: cts-tradefed run cts --module CtsDevicePolicyManagerTestCases --test 'com.android.cts.devicepolicy.MixedDeviceOwnerTest#testAlwaysOnVpnUnsupportedPackage'
Test: cts-tradefed run cts --module CtsDevicePolicyManagerTestCases --test 'com.android.cts.devicepolicy.MixedDeviceOwnerTest#testAlwaysOnVpnUnsupportedPackageReplaced'
Test: cts-tradefed run cts --module CtsDevicePolicyManagerTestCases --test 'com.android.cts.devicepolicy.MixedProfileOwnerTest#testAlwaysOnVpnUnsupportedPackage'
Test: cts-tradefed run cts --module CtsDevicePolicyManagerTestCases --test 'com.android.cts.devicepolicy.MixedProfileOwnerTest#testAlwaysOnVpnUnsupportedPackageReplaced'
Test: cts-tradefed run cts --module CtsDevicePolicyManagerTestCases --test 'com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testAlwaysOnVpnUnsupportedPackage'
Test: cts-tradefed run cts --module CtsDevicePolicyManagerTestCases --test 'com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testAlwaysOnVpnUnsupportedPackageReplaced'

Change-Id: I477897a29175e3994d4ecf8ec546e26043c90f13
Merged-In: I477897a29175e3994d4ecf8ec546e26043c90f13
(cherry picked from commit 3673863f3b2ec692201b7fb3089a1c05973e08e4)

6 years agoMerge "Shorten the log in the netpolicy dump."
Treehugger Robot [Fri, 8 Sep 2017 08:33:58 +0000 (08:33 +0000)]
Merge "Shorten the log in the netpolicy dump."

6 years agoShorten the log in the netpolicy dump.
Sudheer Shanka [Tue, 20 Jun 2017 02:05:31 +0000 (19:05 -0700)]
Shorten the log in the netpolicy dump.

Bug: 65439160
Test: bit FrameworksServicesTests:com.android.server.NetworkPolicyManagerServiceTest
Merged-In: I105326e733f2498e68b0552b45fec1ed0e8e3179

(cherry picked from commit db9aaf0322044786a27d85aeb97c39b768f89a49)

Change-Id: Ia1fa5476db4eee4cf39e438ec6aa456c60332c5c

6 years agoMerge "NetworkStats: more robust subtraction for deltas"
Hugo Benichi [Fri, 8 Sep 2017 07:13:37 +0000 (07:13 +0000)]
Merge "NetworkStats: more robust subtraction for deltas"

6 years agoCachedBluetoothDevice: Simplify ProfleConnectionState check
xutianguo [Wed, 22 Jun 2016 03:32:00 +0000 (11:32 +0800)]
CachedBluetoothDevice: Simplify ProfleConnectionState check

Check whether ProfileConnectionState is empty instead of checking
whether it is null.

BUG: N/A

Change-Id: I553e7b8b0c1b3ae967dcc0ecd482b7ff19f3c1f6
Signed-off-by: xutianguo <xutianguo@xiaomi.com>
6 years agoNetworkStats: more robust subtraction for deltas
Hugo Benichi [Mon, 7 Aug 2017 06:47:35 +0000 (15:47 +0900)]
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 ad5e2827ead7fa8ebafc291ceb6b4672e70c1775)

Change-Id: Ic86b65a65a2517c871221f8784088ec1de18f534

6 years agoMerge "Support NAT keepalives"
Treehugger Robot [Fri, 8 Sep 2017 04:13:14 +0000 (04:13 +0000)]
Merge "Support NAT keepalives"

6 years agoSupport NAT keepalives
Erik Kline [Mon, 19 Jun 2017 02:33:59 +0000 (11:33 +0900)]
Support NAT keepalives

Test: as follows
    - built
    - flashed
    - booted
    - "runtest frameworks-net" passes
    - turned on debugging and walked around watching IpReachabilityMonitor
      force neighbors into NUD_PROBE state without error
    - observed NAT callbacks happening without any reported errors
    - watched:
        adb shell cat /proc/net/nf_conntrack | egrep '192[.]168[.]43[.]' | sort -n -k5
      for correct timeout updates

Bug: 29337859
Bug: 32163131

Merged-In: I82ac60e5ad79ec64a13df6ec56b5b51b223f8dde
Merged-In: I09bc685e821ec5e871576a54c4290edea4c5160b
Merged-In: I4d180369a8f64ee494b016656988252d98a09ba4
Change-Id: Icb23da64cfaa3a19f7bc75fba426a52b0994fb0f
(cherry picked from commit 7a65bc62fbe0391f88834ab27b32033d6b957c8b)

6 years agoMerge changes Ic92b6d5c,I98b23b22,I0fb40d7b
Hugo Benichi [Fri, 8 Sep 2017 01:25:30 +0000 (01:25 +0000)]
Merge changes Ic92b6d5c,I98b23b22,I0fb40d7b

* changes:
  IP metrics: update link layer mapping
  IP connectivity metrics: fix tests after proto update
  Connectivity metrics: update ipconnectivity.proto

6 years agoAdd ims registration status
Ping Sun [Wed, 2 Mar 2016 11:09:27 +0000 (19:09 +0800)]
Add ims registration status

Changes the below to display the "IMS registration status" menu
in Status Info setting.
1. Add a new API "isImsRegistered(int subId)" so that IMS registration
status for specific subscription is acquired.
2. Add a carrier config for the customization.

Test: manual Checked "IMS registration state" in Status Info setting
Bug: 28806101
Merged-In: I6c452c512f03cf41704b91331e44141ed3050cf9
Change-Id: I6c452c512f03cf41704b91331e44141ed3050cf9

6 years agoMerge "Fix Crash CarrierDefaultApp due to exception"
Chen Xu [Thu, 7 Sep 2017 20:59:03 +0000 (20:59 +0000)]
Merge "Fix Crash CarrierDefaultApp due to exception"

6 years agoMerge "fix cellular captive portal reevaluation url"
Chen Xu [Thu, 7 Sep 2017 20:46:50 +0000 (20:46 +0000)]
Merge "fix cellular captive portal reevaluation url"

6 years agofix cellular captive portal reevaluation url
fionaxu [Mon, 10 Jul 2017 16:34:07 +0000 (09:34 -0700)]
fix cellular captive portal reevaluation url

we apply redirection link as the url everywhere for cellular captive portal.
this url should only be used when load the portal page at the first place (when users
click on the notification) and shouldn't be used as the re-evaluation url
as it wont return the expected response code.
instead we should use special URL (generate_204) from connectivity
service which will return 204 if redirection is gone.

Test: manual test with cold and hot TMO SIM
Bug: 62532802
Change-Id: I56bb03a58447c5c46758e692ff357d540ea4cd7b

6 years agoIP metrics: update link layer mapping
Hugo Benichi [Tue, 18 Jul 2017 02:35:18 +0000 (11:35 +0900)]
IP metrics: update link layer mapping

Properly map transport nan and lowpan to their corresponding link layer
enum. Also do so for interface names

Bug: 34901696
Bug: 65439160
Test: runtest frameworks-net
Merged-In: I44a1cb3b6d21881b64adda7744360e4dfc519b12

(cherry picked from commit f7f7ed013ca7641c784b81ef685bd84c4c45cfbb)

Change-Id: Ic92b6d5c07404ea79f9a8975e8fc6925eaa10ba4

6 years agoIP connectivity metrics: fix tests after proto update
Hugo Benichi [Tue, 18 Jul 2017 05:28:27 +0000 (14:28 +0900)]
IP connectivity metrics: fix tests after proto update

Update to ipconnectivity.proto in commit
6d2f506bfd788a3685292d404dc9d82a27357cfe broke the associated unit
tests (Change-Id: I4cf5b95956df721aecd63fddfb026a7266c190b9)

Bug: 34901696
Bug: 65439160
Test: runtest frameworks-net
Merged-In: I57a6bad8a9836b1c45690c4589b416786ce1dfa0

(cherry picked from commit 822c5bf77892175d0b52aeaddf4e43c749c341f6)

Change-Id: I98b23b2208bbd7d12237fcb000f3cf10c53d9e55

6 years agoConnectivity metrics: update ipconnectivity.proto
Hugo Benichi [Tue, 20 Jun 2017 02:15:14 +0000 (11:15 +0900)]
Connectivity metrics: update ipconnectivity.proto

Bug: 34901696
Bug: 65439160
Test: $runtest frameworks-net
      build, flashed, booted phone, $ adb shell dumpsys connmetrics list

Merged-In: I4cf5b95956df721aecd63fddfb026a7266c190b9

(cherry picked from commit 6d2f506bfd788a3685292d404dc9d82a27357cfe)

Change-Id: I0fb40d7b644786efc839468b2d7e1cfcedd71ad8

6 years agoMerge "Always add local subnet routes to the interface's routing table"
Rubin Xu [Thu, 7 Sep 2017 12:12:09 +0000 (12:12 +0000)]
Merge "Always add local subnet routes to the interface's routing table"