OSDN Git Service

android-x86/frameworks-base.git
7 years agoMerge "ConnectivityServiceTest: fix flakyness"
Hugo Benichi [Tue, 23 May 2017 04:35:08 +0000 (04:35 +0000)]
Merge "ConnectivityServiceTest: fix flakyness"

7 years agoMerge "ConnectivityManager: improve argument validation"
Treehugger Robot [Tue, 23 May 2017 03:14:29 +0000 (03:14 +0000)]
Merge "ConnectivityManager: improve argument validation"

7 years agoConnectivityManager: improve argument validation
Hugo Benichi [Tue, 9 May 2017 06:19:01 +0000 (15:19 +0900)]
ConnectivityManager: improve argument validation

Using Preconditions and dedicated static methods for checking arguments
to improve error stack traces without error messages.

Test: covered by previously added unit test
Bug: 36701874
Change-Id: Id872b2c887a4bca43a8c3644622add1c2ee57c6d

7 years agoConnectivityServiceTest: fix flakyness
Hugo Benichi [Mon, 22 May 2017 01:44:02 +0000 (10:44 +0900)]
ConnectivityServiceTest: fix flakyness

This patch attempts to fix the remaining spurious failures in
ConnectivityServiceTest, which have two causes:
 - waitForIdle() does not take into account the NetworkAgents handlers.
 - the deadlines in testRequestBenchmark are sometimes exceeded.

To fix the first issue, waitForIdle() is moved to a test level instance
method and also calls waitForIdleHandler on any non null
MockNetworkAgent. This is expected to fix spurious errors for the
following tests:
  - testMobildeDataAlwaysOn
  - testLingering
  - testPacketKeepAlive
  - testMMSonWiFi

To fix the second issue, the deadlines for testRequestBenchmark are
extended by 10ms. Also, the failure message is made more actionable by
providing the total time it took for the operation, instead of printing
the number of dispatches that were achieved before the deadline.

Bug: 32561414
Test: tests pass many times in a row (~500).
Change-Id: Id33c6ac1edfb0b89634fa7789dccb2da237e2709

7 years agoMerge "Added IWLAN metered APN support"
Treehugger Robot [Tue, 23 May 2017 01:02:31 +0000 (01:02 +0000)]
Merge "Added IWLAN metered APN support"

7 years agoAdded IWLAN metered APN support
Jack Yu [Sun, 21 May 2017 00:06:33 +0000 (17:06 -0700)]
Added IWLAN metered APN support

If the device is in IWLAN mode, when checking if the APN
type is metered, we read the settings from the IWLAN
metered APN list.

Test: Telephony unit tests
bug: 38304530

Merged-In: I46c9e1a15dd0dd40811d5a959d558fc78608b127
Change-Id: I46c9e1a15dd0dd40811d5a959d558fc78608b127

7 years agoMerge "Creat a new notification to avoid the mTetheredNotificationBuilder changed"
Treehugger Robot [Mon, 22 May 2017 10:41:38 +0000 (10:41 +0000)]
Merge "Creat a new notification to avoid the mTetheredNotificationBuilder changed"

7 years agoMerge "OBEX: Add required parameters TAG ID's for PBAP 1.2"
Andre Eisenbach [Sat, 20 May 2017 00:28:59 +0000 (00:28 +0000)]
Merge "OBEX: Add required parameters TAG ID's for PBAP 1.2"

7 years agoOBEX: Add required parameters TAG ID's for PBAP 1.2
Hemant Gupta [Sat, 17 Oct 2015 14:10:53 +0000 (19:40 +0530)]
OBEX: Add required parameters TAG ID's for PBAP 1.2

Add required OBEX application parameters TAGID's and length
declarations required to support PBAP 1.2 specification.

Test: Connected with Remote PBAP Client supporting PBAP 1.2 and
verified that connection and transfer happens over L2CAP.
Connected with Remote PBAP Client supporting PBAP 1.1 and
and verified that connection and transfer happens over RFCOMM.

Bug: 33011817
Change-Id: I8a772b0dddf6ecf74b057e12d7596421c0e0f558

7 years agoMerge "Address ConnectivityManager API comments."
Hugo Benichi [Fri, 19 May 2017 23:05:55 +0000 (23:05 +0000)]
Merge "Address ConnectivityManager API comments."

7 years agoMerge "Implement stopStreaming API for MBMS"
Hall Liu [Fri, 19 May 2017 22:32:01 +0000 (22:32 +0000)]
Merge "Implement stopStreaming API for MBMS"

7 years agoMerge "Add a method to start the captive portal login app."
Hugo Benichi [Fri, 19 May 2017 02:29:19 +0000 (02:29 +0000)]
Merge "Add a method to start the captive portal login app."

7 years agoMerge "Add test coverage for explicitlySelected networks."
Lorenzo Colitti [Fri, 19 May 2017 02:05:54 +0000 (02:05 +0000)]
Merge "Add test coverage for explicitlySelected networks."

7 years agoAdd a method to start the captive portal login app.
Lorenzo Colitti [Thu, 27 Apr 2017 05:30:21 +0000 (14:30 +0900)]
Add a method to start the captive portal login app.

Bug: 36203355
Bug: 36656914
Test: ConnectivityServiceTest (including new test) passes
Change-Id: Ide82858af67024623560ab79beea27c201b63447
Merged-In: I82a9a9a8da47870ba3f1bbef5941b37e970c844f

(cherry picked from commit 4734cdbbc38752765376aedb0d5208463674535e)

7 years agoImplement stopStreaming API for MBMS
Hall Liu [Thu, 18 May 2017 01:15:27 +0000 (18:15 -0700)]
Implement stopStreaming API for MBMS

Test: testapps
Change-Id: Ic0477bf489a89a67697a318ff0fab065e0327e08

7 years agoMerge "Also pin vdex file for camera"
Calin Juravle [Thu, 18 May 2017 21:03:48 +0000 (21:03 +0000)]
Merge "Also pin vdex file for camera"

7 years agoMerge "Consolidated all data allow/disallow logic into one method"
Przemyslaw Szczepaniak [Thu, 18 May 2017 08:58:26 +0000 (08:58 +0000)]
Merge "Consolidated all data allow/disallow logic into one method"

7 years agoConsolidated all data allow/disallow logic into one method
Jack Yu [Tue, 2 May 2017 00:01:11 +0000 (17:01 -0700)]
Consolidated all data allow/disallow logic into one method

Consolidated all data allow/disallow logic into one method
and got rid of the obsolete isDataPossible. This is the
preliminary work for checking if data is allowed just right
before data connection entering connected state.

Test: Telephony sanity tests and unit tests
bug: 33847610
Merged-In: I24f1415bbb59990e9e8e9920724be9e3f17e3e60
Change-Id: I24f1415bbb59990e9e8e9920724be9e3f17e3e60

7 years agoMerge "Expand logging capabilities of Tethering subsystem"
Treehugger Robot [Thu, 18 May 2017 03:25:28 +0000 (03:25 +0000)]
Merge "Expand logging capabilities of Tethering subsystem"

7 years agoMerge "Fix NetworkNotificationManagerTest"
Hugo Benichi [Thu, 18 May 2017 03:20:50 +0000 (03:20 +0000)]
Merge "Fix NetworkNotificationManagerTest"

7 years agoMerge "Captive portals: reinspect http result after fallback probe"
Hugo Benichi [Thu, 18 May 2017 02:50:48 +0000 (02:50 +0000)]
Merge "Captive portals: reinspect http result after fallback probe"

7 years agoFix NetworkNotificationManagerTest
Hugo Benichi [Thu, 23 Mar 2017 03:32:27 +0000 (12:32 +0900)]
Fix NetworkNotificationManagerTest

The testNotificationsShownAndCleared test was not doing anything
because the list of notification to show was always empty.

This patch fixes this issue and actually makes the test loop on
non-empty collections, and also fixes another ordering issue in
assertions themselves, hidden until now by the first issue.

Bug: 32561414
Test: runtest -x frameworks/base/tests/net/java/com/android/server/connectivity/NetworkNotificationManagerTest.java
Merged-In: I4837b1175d7c9133e9156e33acaa1e7e3341cc62
Change-Id: Ia30587bd68a87b83b62f57eeeb28fef7d95dbf81

(cherry picked from commit f8b804be5aeb5d0a36ff88649d7c5ecdc47c3ad1)

7 years agoCreat a new notification to avoid the mTetheredNotificationBuilder changed
zhouzhijie [Thu, 18 May 2017 02:02:59 +0000 (10:02 +0800)]
Creat a new notification to avoid the mTetheredNotificationBuilder changed

Now the method NotificationBuilder.build() is different with m.
it is not creat new notification. But here it need to creat a
new notification to avoid the mTetheredNotificationBuilder
changed. So we use buildInto to replace build

Change-Id: I274ec833de4ade4a778e1937a09d1e6242d92a7f
Signed-off-by: zhouzhijie <zhouzhijie@xiaomi.com>
7 years agoMerge "Move NetworkNotificationManagerTest to tests/net"
Hugo Benichi [Thu, 18 May 2017 02:01:39 +0000 (02:01 +0000)]
Merge "Move NetworkNotificationManagerTest to tests/net"

7 years agoExpand logging capabilities of Tethering subsystem
Erik Kline [Fri, 12 May 2017 07:52:48 +0000 (16:52 +0900)]
Expand logging capabilities of Tethering subsystem

Introduce a SharedLog that can be shared among all Tethering
components.  All log entries go to the same log, and each includes
its subsystem name.  Additionally, all entries emitted to the
system log shared the same tag, so can easily be watched.

More subsystems can inherit a SharedLog, but to minimize cherry-pick
conflicts we limit ourselves to these changes only.

Test: as follows
    - built
    - flashed
    - booted
    - log output observed via dumpsys
    - runtest frameworks-net passes
Bug: 32163131
Bug: 36988090
Bug: 38218697
Change-Id: I1229d4c55987402d84b0d4a2c8a595e0c829aa3e

7 years agoMerge "Finish moving NetworkStats tests to tests/net"
Hugo Benichi [Thu, 18 May 2017 00:09:53 +0000 (00:09 +0000)]
Merge "Finish moving NetworkStats tests to tests/net"

7 years agoMerge "Convert libsoundpool to Android.bp"
Treehugger Robot [Wed, 17 May 2017 21:31:16 +0000 (21:31 +0000)]
Merge "Convert libsoundpool to Android.bp"

7 years agoConvert libsoundpool to Android.bp
Colin Cross [Tue, 16 May 2017 20:08:19 +0000 (13:08 -0700)]
Convert libsoundpool to Android.bp

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

Test: m -j checkbuild
Change-Id: If0b7cb1e2c86ff1be41c00d98fd9ddec31287a53
Merged-In: If0b7cb1e2c86ff1be41c00d98fd9ddec31287a53
(cherry picked from commit 98c127f8cc652d1179871ad47cac99d15ea1a5a0)

7 years agoMerge "Fix for Bluetooth not restarting on User Switch"
Treehugger Robot [Wed, 17 May 2017 17:24:02 +0000 (17:24 +0000)]
Merge "Fix for Bluetooth not restarting on User Switch"

7 years agoAdd test coverage for explicitlySelected networks.
Lorenzo Colitti [Tue, 16 May 2017 16:28:09 +0000 (01:28 +0900)]
Add test coverage for explicitlySelected networks.

Also, make all tests start with mobile data always on disabled.

This is because some tests only pass when mobile data always on
is disabled. This doesn't cause any problems when running all
the tests in the file, because these tests are always run after
one or more calls to tearDown, which disables mobile data always
on. However, it does cause issues when those tests are run alone.

Test: new test passes 50 times in a row
Test: ConnectivityServiceTest passes
Change-Id: I1eef5d7f5ec5464e0f9a1d7f1130d9ba6dea4557

7 years agoMerge "Convert libmedia_jni to Android.bp"
Colin Cross [Wed, 17 May 2017 15:19:25 +0000 (15:19 +0000)]
Merge "Convert libmedia_jni to Android.bp"

7 years agoMove NetworkNotificationManagerTest to tests/net
Hugo Benichi [Tue, 16 May 2017 01:56:46 +0000 (10:56 +0900)]
Move NetworkNotificationManagerTest to tests/net

Bug: 32561414
Test: no functional change
Change-Id: Iad17e3336a4a589da5cf88fd6359323e34b747e1

7 years agoFinish moving NetworkStats tests to tests/net
Hugo Benichi [Mon, 15 May 2017 00:53:44 +0000 (09:53 +0900)]
Finish moving NetworkStats tests to tests/net

Follow-up of commit c86013be936f36c61fa0cdfad95141f6de3c6ef7.

Also add @SmallTest annotation to classes moved to tests/net.

Test: no functional change
Bug: 32561414
Change-Id: I0a0e8865d37ba7bae06ce352d3fc385989adc300

7 years agoCaptive portals: reinspect http result after fallback probe
Hugo Benichi [Wed, 17 May 2017 01:30:40 +0000 (10:30 +0900)]
Captive portals: reinspect http result after fallback probe

When DNS queries that precede the http and https probe take a long time
to complete, it is possible that the fallback probe fires earlier than
either the http and https probes.

This causes the detection logic to ignore the result of the http probe,
which may cause the system to miss captive portals advertising
themselves on the url used by the http probe but not on the url used by
the fallback probe.

This patch fixes that issue by forcing the detection to wait on the
result of the http probe if the fallback probe does not find a portal.

Bug: 38259299
Bug: 36532213
Test: manually tested with nearby captive portal networks
Change-Id: I07ea23a2b5f694c5ada9633169af98409efedff1

7 years agoAddress ConnectivityManager API comments.
Hugo Benichi [Mon, 15 May 2017 06:15:33 +0000 (15:15 +0900)]
Address ConnectivityManager API comments.

This patch is a cherry pick of the two following commits:
  - 15fd4395e13b4662a262ee67a5f75f5c521c62ef which addresses several
    issues in the public api of ConnectivityManager.
  - e2d48ff57c5529b32a9cd7bfdcf21d29df539f73 which fixes the documentation
    of several methods in ConnectivityManager public api.

Because the first commit change the public api that is referenced in
the documentation fixed by the second commit, it is not possible to one
without the other. In both cases trying to cherry pick only one of them
results in a build error.

The first commit was submitted successfully on an internal branch before
the checks done in the built got stricter.

Bug: 36370941
Test: marlin builds and boots
Change-Id: I86dcf056e6b165e527c3ee88dbabc2764ac09a08
Merged-In: I693ee5270bf186c88c7c5056293519f7237504ff

(cherry picked from commit 15fd4395e13b4662a262ee67a5f75f5c521c62ef)

7 years agoMerge "Add tethering offload HAL call via JNI"
Treehugger Robot [Wed, 17 May 2017 07:09:13 +0000 (07:09 +0000)]
Merge "Add tethering offload HAL call via JNI"

7 years agoConvert libmedia_jni to Android.bp
Colin Cross [Tue, 16 May 2017 01:10:40 +0000 (18:10 -0700)]
Convert libmedia_jni to Android.bp

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

Test: m -j checkbuild
Change-Id: I1817c75ee45537ca0d5fc40a035f94a3dfeccc11
Merged-In: I1817c75ee45537ca0d5fc40a035f94a3dfeccc11
(cherry picked from commit 76de4f6b4d09423b3a5d3603527ce79acae4ed32)

7 years agoAdd tethering offload HAL call via JNI
Erik Kline [Sun, 30 Apr 2017 10:36:15 +0000 (19:36 +0900)]
Add tethering offload HAL call via JNI

Additionally, try to locate java Control interface.

Test: as follows
    - built
    - flashed
    - booted
    - OffloadController log messages observed, but only ever
      "not enabled" messages (needs a supporting implementation)
Bug: 29337859
Bug: 32163131
Bug: 34361337
Merged-In: I5251d05f2d2fd732a33a8955a6c346b3a2401e46
Change-Id: I5251d05f2d2fd732a33a8955a6c346b3a2401e46
(cherry picked from commit 58ed1b051bdffd239d92919170a0bb41a4cc197c)

7 years agoMerge "Add the new RIL requests and NetworkScanResult."
Ying Xu [Tue, 16 May 2017 23:04:39 +0000 (23:04 +0000)]
Merge "Add the new RIL requests and NetworkScanResult."

7 years agoMerge "Zygote: Allow arbitrary-length wrap property names"
Treehugger Robot [Tue, 16 May 2017 20:49:54 +0000 (20:49 +0000)]
Merge "Zygote: Allow arbitrary-length wrap property names"

7 years agoAdd the new RIL requests and NetworkScanResult.
yinxu [Thu, 20 Apr 2017 22:33:57 +0000 (15:33 -0700)]
Add the new RIL requests and NetworkScanResult.

Those new RIL requests will be used to start and stop network scan, and
the scan result will be returned from RIL in the format of
NetworkScanResult.

Test: Telephony sanity tests
Bug: 30954762
Change-Id: I2bfd0fb8cbb3815cc62ec4385594dec9c5e4d279
(cherry picked from commit b36a4cb40222e1c0a61b13c1eca601ba761bd26e)

7 years agoMerge "Discover primary service by UUID for PTS tests (4/4)"
Treehugger Robot [Tue, 16 May 2017 20:20:16 +0000 (20:20 +0000)]
Merge "Discover primary service by UUID for PTS tests (4/4)"

7 years agoMerge "startStreaming for MBMS apis"
Hall Liu [Tue, 16 May 2017 19:45:10 +0000 (19:45 +0000)]
Merge "startStreaming for MBMS apis"

7 years agoMerge "Support different SIM power states"
Grace Chen [Tue, 16 May 2017 19:30:25 +0000 (19:30 +0000)]
Merge "Support different SIM power states"

7 years agoAlso pin vdex file for camera
Calin Juravle [Tue, 16 May 2017 03:20:50 +0000 (20:20 -0700)]
Also pin vdex file for camera

Test: device boots
Bug: 33168521
Change-Id: I157e9684f9b8d64950b96c07e35b6101eccd4045

7 years agoDiscover primary service by UUID for PTS tests (4/4)
Jakub Pawlowski [Tue, 16 May 2017 17:56:35 +0000 (10:56 -0700)]
Discover primary service by UUID for PTS tests (4/4)

Bug: 38123054
Test: manual
Change-Id: I89e088e60f4325f1ece59d22efda0c907a3b716a

7 years agoSupport different SIM power states
Grace Chen [Tue, 9 May 2017 17:44:42 +0000 (10:44 -0700)]
Support different SIM power states

Test: Verify SIM power states
Bug:  35844036
Merged-In: I968269e88eec40af6e3ca71cbb805a77e016da0f
Change-Id: I968269e88eec40af6e3ca71cbb805a77e016da0f

7 years agoMerge "Set the decay timer for all forked apps."
Christopher Ferris [Tue, 16 May 2017 14:02:51 +0000 (14:02 +0000)]
Merge "Set the decay timer for all forked apps."

7 years agoMerge "Remove unused import in ConnectivityManager"
Treehugger Robot [Tue, 16 May 2017 13:04:36 +0000 (13:04 +0000)]
Merge "Remove unused import in ConnectivityManager"

7 years agoMerge "Fix broken DUN evaluation logic"
Treehugger Robot [Tue, 16 May 2017 07:58:00 +0000 (07:58 +0000)]
Merge "Fix broken DUN evaluation logic"

7 years agoFix broken DUN evaluation logic
Erik Kline [Mon, 15 May 2017 12:11:47 +0000 (21:11 +0900)]
Fix broken DUN evaluation logic

Test: as follows
    - built
    - booted
    - flashed
    - runtest frameworks-net passes
Bug: 32163131
Bug: 38152109
Bug: 38186915
Change-Id: Id4803504e825290d62c0b51a2b9bd664dcef30b1

7 years agoZygote: Allow arbitrary-length wrap property names
Andreas Gampe [Thu, 11 May 2017 01:53:02 +0000 (18:53 -0700)]
Zygote: Allow arbitrary-length wrap property names

The restriction on system property key length has been lifted.
Update the invoke-with code to first check the full-length property.
Then fall back to the truncated version for backwards-compatibility.

Test: m
Test: manual with long package name (Maps)
Change-Id: I9f714af093a6017307cfef18c84de769f0de7c3e

7 years agoRemove unused import in ConnectivityManager
Hugo Benichi [Tue, 16 May 2017 02:39:08 +0000 (11:39 +0900)]
Remove unused import in ConnectivityManager

This makes the pre-upload verification pass.

Test: no functional change.
Change-Id: I6beccea10ccfcb39d975cb8f6f34fc9d79f1e170

7 years agoFix for Bluetooth not restarting on User Switch
Ram Periathiruvadi [Thu, 4 May 2017 02:11:20 +0000 (19:11 -0700)]
Fix for Bluetooth not restarting on User Switch

The flag that keeps track of the Bluetooth adapter status(mEnable) is
not guarded correctly and could go out of sync with the adapter status.
This causes User Switch handling to not function correctly since it
checks for the status of the mEnable flag before restarting Bluetooth.
This fix queries the Bluetooth Adapter for the status instead of using
the mEnable flag.

Bug: b/37648701
Test: Tested switching users multiple times in both phone and carkit.
Also tested pairing and connection for sanity.

Change-Id: I17facecf8e1de90df11c11d5b0a184f48a0356e4

7 years agoSet the decay timer for all forked apps.
Christopher Ferris [Mon, 15 May 2017 23:50:29 +0000 (16:50 -0700)]
Set the decay timer for all forked apps.

This will cause native memory frees to be less expensive, but it will cost
a bit of PSS that might hang around.

Bug: 36401135

Test: Built and booted bullhead.
Test: Ran jemalloc unit tests.
Test: Ran bionic unit tests.
Test: Ran a test that allocated and free'd a large piece of memory,
Test: and verified that after changing the parameter, the PSS
Test: sticks around (decay timer set to 1), the PSS is purged (decay
Test: timer set to 0).
Change-Id: I140b26986f3f81fddd5b9ed9c9e4f2d4977b819b

7 years agostartStreaming for MBMS apis
Hall Liu [Thu, 11 May 2017 20:32:32 +0000 (13:32 -0700)]
startStreaming for MBMS apis

Clean up MBMS APIs a bit and make things functional for the
startStreaming/getPlaybackUri APIs.

Test: testapps
Change-Id: I141a4114cc912b98ae22aefb760346061e286f1a

7 years agoMerge "Change signalStrength to int."
Hall Liu [Mon, 15 May 2017 22:01:20 +0000 (22:01 +0000)]
Merge "Change signalStrength to int."

7 years agoMerge "Remove switchStreams API."
Hall Liu [Mon, 15 May 2017 20:22:55 +0000 (20:22 +0000)]
Merge "Remove switchStreams API."

7 years agoMerge "Moved c.a.i.u.Predicate[s] into legacy-test"
Paul Duffin [Mon, 15 May 2017 18:58:45 +0000 (18:58 +0000)]
Merge "Moved c.a.i.u.Predicate[s] into legacy-test"

7 years agoMerge "Add API to support async network scans."
Ying Xu [Mon, 15 May 2017 16:57:04 +0000 (16:57 +0000)]
Merge "Add API to support async network scans."

7 years agoMoved c.a.i.u.Predicate[s] into legacy-test
Paul Duffin [Tue, 9 May 2017 14:52:46 +0000 (15:52 +0100)]
Moved c.a.i.u.Predicate[s] into legacy-test

These classes are only used by android.test classes that are
being removed. As their name suggests they should not be in the
Android API at all so it makes sense to remove them. Especially
as there is java.lang.function.Predicate available now.

It appears as though Predicate was only added in to the API
because it was used by a method in the API as the directory in
which it and Predicates live was not on the list of classes to
explicitly index. Moving it into legacy-test meant that they are
now being indexed explicitly which means that Predicates needs
to be hidden.

Keeps running the tests as part of the existing target.

At runtime apps targeted at the API version before these are
removed will have the legacy-test library automatically added
to their classpath so they should see no effect. Apps that
target a later API will have to include those classes from the
android.legacy.test.jar which will contain all the android.test
classes that depend on it as well.

Bug: 30188076
Test: make checkbuild
Change-Id: Ia8502ec77ac11f85e078d70b68df214a9435eee7
Merged-In: I6f6f5f16fe93bd80227a450c6254166632fc6813

7 years agoMerge "update time while network is connected"
Treehugger Robot [Mon, 15 May 2017 11:14:42 +0000 (11:14 +0000)]
Merge "update time while network is connected"

7 years agoMerge "ConnectivityService: minor formatting change"
Hugo Benichi [Mon, 15 May 2017 05:50:35 +0000 (05:50 +0000)]
Merge "ConnectivityService: minor formatting change"

7 years agoMerge "CaptivePortal: login activity UI improvements"
Hugo Benichi [Mon, 15 May 2017 02:08:46 +0000 (02:08 +0000)]
Merge "CaptivePortal: login activity UI improvements"

7 years agoConnectivityService: minor formatting change
Hugo Benichi [Wed, 26 Apr 2017 05:53:28 +0000 (14:53 +0900)]
ConnectivityService: minor formatting change

This patch adds a space character between "synchronized" and
"(mTheLockVariable)" so that all synchronized block have a consistent
syntax. Basic stats shows that "synchronized (" is x10 time more likely
than "synchronized(".

This facilitates finding all locked sections by grepping.

Test: no semantics changes
Bug: 37119619
Change-Id: Id860700efa85ffebafed11af3a2997bc115d9c03

7 years agoChange signalStrength to int.
Robert Greenwalt [Fri, 12 May 2017 23:02:01 +0000 (16:02 -0700)]
Change signalStrength to int.

Broadcast signal strength is calculated differently than unicast
so the SignalStrength class used for unicast doesn't make sense.
Also added a -1 constant for unavailable which is mainly used
when the service is delivered via unicast.

Also rename signalStrengthUpdated to broadcastSignalStrengthUpdated.

Test: builds
Change-Id: Ia2680370d4cb8cd838341f58b41d02cdc78d4fc1

7 years agoMerge "Add RIL_UNSOL_MODEM_RESTART message"
Treehugger Robot [Fri, 12 May 2017 22:25:25 +0000 (22:25 +0000)]
Merge "Add RIL_UNSOL_MODEM_RESTART message"

7 years agoRemove switchStreams API.
Robert Greenwalt [Fri, 12 May 2017 22:04:04 +0000 (15:04 -0700)]
Remove switchStreams API.

After discussion about how best this could fit in the API we
discovered many disagreements that we couldn't resolve in the
time available.  Pulling the feature from the API until we
can resolve issues.

Test: builds
Change-Id: I6d36a1dea8ce9816fad497b992a347188d3ac88e

7 years agoAdd API to support async network scans.
yinxu [Wed, 12 Apr 2017 23:09:54 +0000 (16:09 -0700)]
Add API to support async network scans.

This CL includes the new Java API that supports async network scans.
Applications could get faster network scan results with this new API.
The long-term goal is to support Subsecond Switching which is separate
from what this CL is doing.

Bug: 30954762
Test: Unit test, run runtest -x NetworkScanRequestTest.java
Change-Id: I78cadaf838dee8439fe7417ef39f689990bf5705
(cherry picked from commit fdfb6f4d2f6db943d648adec6cc96530f2f70fe6)

7 years agoAdd RIL_UNSOL_MODEM_RESTART message
Naveen Kalla [Wed, 14 Sep 2016 20:53:54 +0000 (13:53 -0700)]
Add RIL_UNSOL_MODEM_RESTART message

RIL_UNSOL_MODEM_RESTART will be sent by vendor RILs when it detects
a modem restart along with the reason for restart which could be a
crash signature if the modem restarted due to a crash or a some
other string such as a user-initiated restart or AT command
initiated restart.

Test: Manual
Merged-In: Idf08e20a49e82d40f6aa0854d23384c35c2efc3a
Change-Id: Idf08e20a49e82d40f6aa0854d23384c35c2efc3a

7 years agoMerge changes I4c0e7fdd,I9ea3827a
Paul Duffin [Fri, 12 May 2017 12:41:24 +0000 (12:41 +0000)]
Merge changes I4c0e7fdd,I9ea3827a

* changes:
  Remove dependency on internal FileUtils class
  Remove dependency on com.google.android.collect classes

7 years agoupdate time while network is connected
zhoulei [Wed, 10 May 2017 10:09:50 +0000 (18:09 +0800)]
update time while network is connected

NTP update time from network while the network is not OK, so it should not
be excuted the network is disconnected to be for low power consumption

Test: as follows
    - built
    - flashed
    - booted
Change-Id: I17f2a9463551e254284ee8a9f894a95e983eee19
Signed-off-by: zhoulei <zhoulei5@xiaomi.com>
7 years agoCaptivePortal: login activity UI improvements
Hugo Benichi [Thu, 11 May 2017 00:58:14 +0000 (09:58 +0900)]
CaptivePortal: login activity UI improvements

Similarly to commit 2e0915f14384901f25a41d698b39ef0add201550 for the
carrier portal login, this patch changes the default settings of the
webview used for the system captive portal login activity to allow
better user experience on "wide" login pages designed for desktop.

Differently from commit 2e0915f14384901f25a41d698b39ef0add201550, the
zooming buttons are not displayed (i.e zooming is possible only with
gesture).

Test: manually tested with captive portals.
Bug: 318139361922894636532213
Change-Id: I2579994da37f3b0f4c08e24e59c81f31835ab832

7 years agoMerge "getStreamingServices for embms"
Hall Liu [Fri, 12 May 2017 01:00:25 +0000 (01:00 +0000)]
Merge "getStreamingServices for embms"

7 years agoMerge "Add hidden APIs to get the cached SignalStrength from SST"
nharold [Thu, 11 May 2017 23:57:14 +0000 (23:57 +0000)]
Merge "Add hidden APIs to get the cached SignalStrength from SST"

7 years agoMerge "Init MemoryIntArray#mFd with -1"
Svetoslav Ganov [Thu, 11 May 2017 23:34:23 +0000 (23:34 +0000)]
Merge "Init MemoryIntArray#mFd with -1"

7 years agoMerge "Add key for carrier_volte_provisioned"
Brad Ebinger [Thu, 11 May 2017 21:20:28 +0000 (21:20 +0000)]
Merge "Add key for carrier_volte_provisioned"

7 years agoMerge "Telephony: Fix the failure of copying SMS to SIM card for sub2"
Chen Xu [Thu, 11 May 2017 19:15:50 +0000 (19:15 +0000)]
Merge "Telephony: Fix the failure of copying SMS to SIM card for sub2"

7 years agoMerge "Adding 'uhid' permission for bluetooth stack."
Siarhei Vishniakou [Thu, 11 May 2017 19:02:29 +0000 (19:02 +0000)]
Merge "Adding 'uhid' permission for bluetooth stack."

7 years agoMerge "Don't skip intents where config changed."
Treehugger Robot [Thu, 11 May 2017 18:31:27 +0000 (18:31 +0000)]
Merge "Don't skip intents where config changed."

7 years agoMerge "support horizontal scroll and zoom for webview"
Chen Xu [Thu, 11 May 2017 17:17:28 +0000 (17:17 +0000)]
Merge "support horizontal scroll and zoom for webview"

7 years agosupport horizontal scroll and zoom for webview
fionaxu [Thu, 4 May 2017 06:19:25 +0000 (23:19 -0700)]
support horizontal scroll and zoom for webview

Bug: 37913717
Test: Manual test for horizontal scroll
Merged-in: I97f19030ae034910c8d6f3e23634f55d43ab6589
Change-Id: I97f19030ae034910c8d6f3e23634f55d43ab6589

7 years agoMerge changes Ie762ce75,I611fd791
Hugo Benichi [Thu, 11 May 2017 12:31:39 +0000 (12:31 +0000)]
Merge changes Ie762ce75,I611fd791

* changes:
  ConnectivityManager: unit test for argument validation
  ConnectivityManager: uses service error codes and exceptions

7 years agoRemove dependency on internal FileUtils class
Paul Duffin [Wed, 10 May 2017 14:05:24 +0000 (15:05 +0100)]
Remove dependency on internal FileUtils class

In preparation for building android.legacy.test library against
the test API this removes a dependency on internal classes.

Bug: 30188076
Test: make checkbuild cts-tradefed run cts -m CtsContentTestCases -t android.content.cts.SyncStorageEngineTest
Change-Id: I4c0e7fdd368e96459c8404ff7cea8738683d0ec1

7 years agoRemove dependency on com.google.android.collect classes
Paul Duffin [Wed, 10 May 2017 12:30:16 +0000 (13:30 +0100)]
Remove dependency on com.google.android.collect classes

In preparation for building android.legacy.test library against
the SDK this removes a dependency on internal classes.

Bug: 30188076
Test: make checkbuild
Change-Id: I9ea3827ab5db167c8cbddad25f0815c942681092

7 years agoMerge "Remove obsolete DEXOPT_SAFEMODE."
Nicolas Geoffray [Thu, 11 May 2017 09:42:23 +0000 (09:42 +0000)]
Merge "Remove obsolete DEXOPT_SAFEMODE."

7 years agoTelephony: Fix the failure of copying SMS to SIM card for sub2
Chaitanya Saggurthi [Thu, 11 May 2017 06:13:18 +0000 (11:43 +0530)]
Telephony: Fix the failure of copying SMS to SIM card for sub2

While copying SMS of sub2 to its SIM memory, in process of getting
current Phonetype will return default sub's(i.e,sub1's)Phonetype. But
we want to get sub2's Phonetype here.

To fix this, get current Phonetype based on subscription id

Test: manual - Copy SMS to SIM card of sub2

Bug: 35025520
Change-Id: If415530d3f74dd357054cae6eb9c3ce8f7727342

7 years agoConnectivityManager: unit test for argument validation
Hugo Benichi [Tue, 9 May 2017 05:09:02 +0000 (14:09 +0900)]
ConnectivityManager: unit test for argument validation

Bug: 3670187437107940
Test: new test passes
Change-Id: Ie762ce758b3d94052b7438a67fc55bef4690cbbb

7 years agoConnectivityManager: uses service error codes and exceptions
Hugo Benichi [Thu, 11 May 2017 04:16:17 +0000 (13:16 +0900)]
ConnectivityManager: uses service error codes and exceptions

This patch introduces between ConnectivityManager and
ConnectivityService a mechanism for propagating back to clients
informative errors in the form of error codes and associated custom
runtime exceptions.

Without error code, the service can only throw a limited number of
different exceptions over Binder. Furthermore the throw site stack
traces are always loss. Although for individual instances of a throw,
the error message can be inspected, aggregations of stack traces from
app crashes sanitize error messages and only leaves the stack traces.

This makes debugging dificult for some service calls such as
requestNetwork that can have a variety of failure modes.

In this patch only one failure mode is codified. More can be added later
at a light cost by: 1) defining an error code, 2) defining an
associated exception, 3) mapping the code to the exception. This patch
can serves as a template for doing so.

Test: $ runtest frameworks-net,
      #testNetworkRequestMaximum() detects the new exception type.
Bug:  3655680936701874
Change-Id: I611fd7915575c9e418f7149fcdc8a879d2a3716d

7 years agoAdding 'uhid' permission for bluetooth stack.
Siarhei Vishniakou [Mon, 8 May 2017 22:42:14 +0000 (15:42 -0700)]
Adding 'uhid' permission for bluetooth stack.

This CL is in support of another CL c/2048848, topic
'Refactor hid command in /frameworks/base/cmds'
in internal master. Adding the permissions for bluetooth
devices here to access uhid_node as part of the new 'uhid'
group.

Bug: 34052337
Test: Tested on angler, bluetooth mouse works OK.

Change-Id: I63963984a0a3dccb4fccc64bb6fef4e809e2737e

7 years agoAdd key for carrier_volte_provisioned
Jordan Liu [Mon, 3 Oct 2016 18:35:33 +0000 (11:35 -0700)]
Add key for carrier_volte_provisioned

Add the key to CarrierConfigManager and remove old configs.

Bug: 29873049
Change-Id: Icf3075fe39d3466732ea81738cb29c512f840401
Merged-In: Icf3075fe39d3466732ea81738cb29c512f840401

7 years agoMerge "Bluetooth: HID: Add support for Set Idle and Get Idle Commands (3/4)"
Andre Eisenbach [Thu, 11 May 2017 00:37:42 +0000 (00:37 +0000)]
Merge "Bluetooth: HID: Add support for Set Idle and Get Idle Commands (3/4)"

7 years agogetStreamingServices for embms
Hall Liu [Tue, 2 May 2017 22:06:29 +0000 (15:06 -0700)]
getStreamingServices for embms

Add code to pipe through getStreamingServices for EMBMS and improve
documentation.

Test: testapps
Change-Id: I5248b69fda0cfdb10ffdc4f6952a1da52b47a716

7 years agoMerge "Notify ImsService Status Correctly"
Brad Ebinger [Wed, 10 May 2017 23:00:52 +0000 (23:00 +0000)]
Merge "Notify ImsService Status Correctly"

7 years agoAdd hidden APIs to get the cached SignalStrength from SST
Nathan Harold [Sat, 11 Mar 2017 03:37:02 +0000 (19:37 -0800)]
Add hidden APIs to get the cached SignalStrength from SST

Add APIs in TelephonyManager to pull the SignalStrength that is
currently cached in ServiceStateTracker

Bug: 36133439
Test: tested with sl4a
Change-Id: I6adbecb8126a715da836fcde7f832fedb2f06bc3

7 years agoMerge "Add Save and Restore of BluetoothOn setting"
Treehugger Robot [Wed, 10 May 2017 20:44:33 +0000 (20:44 +0000)]
Merge "Add Save and Restore of BluetoothOn setting"

7 years agoMerge "Increase limit of locale pairs"
Hall Liu [Wed, 10 May 2017 16:46:18 +0000 (16:46 +0000)]
Merge "Increase limit of locale pairs"

7 years agoMerge "Update startStreaming to return status code"
Treehugger Robot [Wed, 10 May 2017 16:46:12 +0000 (16:46 +0000)]
Merge "Update startStreaming to return status code"

7 years agoNotify ImsService Status Correctly
Brad Ebinger [Sat, 6 May 2017 00:43:41 +0000 (17:43 -0700)]
Notify ImsService Status Correctly

Modifies ImsService to allow multiple status callbacks in
for one ImsFeature. This better handles one ImsFeature
for normal/emergency calling.

Bug: 38001858
Test: Unit Testing
Merged-In: I70ae6f5349aef75aa86d54fe37a3c32459ea3afa
Change-Id: I70ae6f5349aef75aa86d54fe37a3c32459ea3afa

7 years agoAdd Save and Restore of BluetoothOn setting
Stanley Tng [Tue, 2 May 2017 04:27:31 +0000 (21:27 -0700)]
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