OSDN Git Service

android-x86/frameworks-base.git
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 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 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

7 years agoBluetooth: HID: Add support for Set Idle and Get Idle Commands (3/4)
Hemant Gupta [Tue, 30 Jul 2013 10:39:20 +0000 (16:09 +0530)]
Bluetooth: HID: Add support for Set Idle and Get Idle Commands (3/4)

Provides an interface for application to send Set Idle
and Get Idle commands to remote HID Device. Support for these
two commands was missing from existing code, so existing code
design is reused to add support for these two commands.

Without this support following mandatory PTS test cases for HID 1.0
cannot be passed, TC_HOS_HID_BV_05/06.

Test: Executed PTS tests TC_HOS_HID_BV_05/06 and confirmed if they can
pass

Bug: 34344715
Change-Id: I548362cc328498920b2dae740f1a76b2cc2d6a67

7 years agoRemove obsolete DEXOPT_SAFEMODE.
Nicolas Geoffray [Fri, 5 May 2017 13:30:02 +0000 (14:30 +0100)]
Remove obsolete DEXOPT_SAFEMODE.

PackageManager side of the change.

bug:37929796
Test: build

(cherry picked from commit 56123bacff220e6ac77a1179197578d3a62ecdd2)

Change-Id: I3a789d49121ca383f7931f3803b6140be456340f

7 years agoMerge "Statically include android.test.runner classes in legacy-android-test"
Paul Duffin [Wed, 10 May 2017 11:18:42 +0000 (11:18 +0000)]
Merge "Statically include android.test.runner classes in legacy-android-test"

7 years agoMerge "NetworkStatsFactory: no double looping on stats + stacked interfaces"
Hugo Benichi [Wed, 10 May 2017 08:19:31 +0000 (08:19 +0000)]
Merge "NetworkStatsFactory: no double looping on stats + stacked interfaces"

7 years agoMerge "Bluetooth: Fix Periodic Adv interval check"
Jakub Pawlowski [Wed, 10 May 2017 07:23:16 +0000 (07:23 +0000)]
Merge "Bluetooth: Fix Periodic Adv interval check"

7 years agoBluetooth: Fix Periodic Adv interval check
Sunny Kapdi [Fri, 5 May 2017 22:27:33 +0000 (15:27 -0700)]
Bluetooth: Fix Periodic Adv interval check

The MIN and MAX values need to be swapped else
the parameter check in setInterval would always
fail

Bug: 37579882
Change-Id: I48538c2a61be88caaf04abd94074b3d9eb6dde96

7 years agoMerge "Changes to MbmsStreamingManager for test app"
Hall Liu [Wed, 10 May 2017 00:50:47 +0000 (00:50 +0000)]
Merge "Changes to MbmsStreamingManager for test app"

7 years agoMerge "NsdService: more cleanups"
Hugo Benichi [Wed, 10 May 2017 00:37:10 +0000 (00:37 +0000)]
Merge "NsdService: more cleanups"

7 years agoNetworkStatsFactory: no double looping on stats + stacked interfaces
Hugo Benichi [Thu, 27 Apr 2017 05:52:53 +0000 (14:52 +0900)]
NetworkStatsFactory: no double looping on stats + stacked interfaces

This patch uses the associative structure of the stacked/base interface
collection to avoid the two nested for loops over stacked/base
interfaces and all stats entries when correcting 464xlat traffic stats.

Consequently the list of stats entries is iterated only once.

Test: runtest -x frameworks/base/../NetworkStatsFactoryTest.java
Bug: 33681750
Change-Id: I84ae997fb693b909f431764697627b9957131732

7 years agoMerge "NetworkStatsFactory: fix double accounting on IPv6 only networks"
Hugo Benichi [Wed, 10 May 2017 00:07:28 +0000 (00:07 +0000)]
Merge "NetworkStatsFactory: fix double accounting on IPv6 only networks"

7 years agoMerge "Bluetooth: Fix interval low/min values"
Andre Eisenbach [Tue, 9 May 2017 23:26:13 +0000 (23:26 +0000)]
Merge "Bluetooth: Fix interval low/min values"

7 years agoBluetooth: Fix interval low/min values
Jakub Pawlowski [Tue, 9 May 2017 21:28:21 +0000 (14:28 -0700)]
Bluetooth: Fix interval low/min values

Bug: 38175945
Test: none
Change-Id: Idf487c7aafc518f2c57be78a1fa979b2c4a383d6

7 years agoMerge "Switch from libcrypto_static to libcrypto target"
Alex Klyubin [Tue, 9 May 2017 19:13:51 +0000 (19:13 +0000)]
Merge "Switch from libcrypto_static to libcrypto target"

7 years agoMerge "Bluetooth: Move Bluetooth battery stats tracking (1/2)"
Treehugger Robot [Tue, 9 May 2017 17:53:17 +0000 (17:53 +0000)]
Merge "Bluetooth: Move Bluetooth battery stats tracking (1/2)"

7 years agoBluetooth: Move Bluetooth battery stats tracking (1/2)
Ajay Panicker [Tue, 2 May 2017 23:28:03 +0000 (16:28 -0700)]
Bluetooth: Move Bluetooth battery stats tracking (1/2)

Move Bluetooth battery stats tracking to AppScanStats for a more
unified tracking system.

Bug: 37720787
Test: cts-tradefed run cts-dev -m CtsIncidentHostTestCases -t com.android.server.cts.BatteryStatsValidationTest#testBleScans
      Perform BLE scan and check battery stats
Change-Id: Ie6c682374e6e258c291d3a11eede649c7747ef40

7 years agoStatically include android.test.runner classes in legacy-android-test
Paul Duffin [Tue, 2 May 2017 12:13:13 +0000 (13:13 +0100)]
Statically include android.test.runner classes in legacy-android-test

In preparation for removing junit and android.test classes from
the Android API this change adds the android.test classes that are in
the android.test.runner library into legacy-android-test so that they
can be statically included into the application.

The junit.... classes from android.test.runner can already be
statically included from the junit library.

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

7 years agoNetworkStatsFactory: fix double accounting on IPv6 only networks
Hugo Benichi [Fri, 7 Apr 2017 06:20:56 +0000 (15:20 +0900)]
NetworkStatsFactory: fix double accounting on IPv6 only networks

For 464xlat scenarios on IPv6 networks, the clatd interface setup
introduces double counting of apps ipv4 traffic. NetworkStatsFactory was
accounting for this on the tx path, but not on the rx path. Also it did
not accounted for the 20 bytes added by the IPv6 header.

This patch subtract correctly the rx and tx traffic from the root uid on
the underlying interface, and also adds correctly the 20 bytes cost per
packet on the stacked interface for 464xlat traffic.

Test: added several new unit tests, based on synthetic data and real
      data also.
Bug: 33681750
Change-Id: I2675643b220acbc6110179fa937d4c313b6f5e32

7 years agoMerge "Refactor and improve logging."
Treehugger Robot [Tue, 9 May 2017 10:33:50 +0000 (10:33 +0000)]
Merge "Refactor and improve logging."

7 years agoMerge "Prepare for removal of junit and android.test classes from Android API (step 1)"
Paul Duffin [Tue, 9 May 2017 10:23:15 +0000 (10:23 +0000)]
Merge "Prepare for removal of junit and android.test classes from Android API (step 1)"

7 years agoRefactor and improve logging.
Erik Kline [Mon, 8 May 2017 08:56:35 +0000 (17:56 +0900)]
Refactor and improve logging.

Test: as follows
    - build
    - flashed
    - booted
    - "runtest frameworks-net" passed
    - "dumpsys connectivity" shows new log output
Bug: 32163131
Bug: 36504926

Change-Id: I14d6da18660223f7cace156cb6594ee18928a7b0

7 years agoMerge changes I4872f8ba,I92039f29,Iaad13e13
Hugo Benichi [Tue, 9 May 2017 06:08:18 +0000 (06:08 +0000)]
Merge changes I4872f8ba,I92039f29,Iaad13e13

* changes:
  NsdService: simple cleanups
  NsdService: test coverage for client requests.
  NsdManager: remove duplicated argument validation

7 years agoNsdService: more cleanups
Hugo Benichi [Mon, 24 Apr 2017 07:41:03 +0000 (16:41 +0900)]
NsdService: more cleanups

This patch does some simple refactoring around management of nsd service
enabled status.

Test: TODO
Bug: 3701336933298084
Change-Id: If1b124459a814cd0e821f683ccd568e30a698d2e

7 years agoNsdService: simple cleanups
Hugo Benichi [Tue, 11 Apr 2017 05:42:47 +0000 (14:42 +0900)]
NsdService: simple cleanups

This patch replace some SparseArray<Integer> with SparseIntArray, and
simplify a value lookup function by using indexOfValue().

Test: TODO
Bug: 3701336933298084
Change-Id: I4872f8baa2bb2ff456c7f848d3afe2e7bcc9892e

7 years agoNsdService: test coverage for client requests.
Hugo Benichi [Fri, 28 Apr 2017 06:31:10 +0000 (15:31 +0900)]
NsdService: test coverage for client requests.

Adding coverage for:
  - NsdManager client disconnection
  - in-flight request GC

Test: new test passes
Bug: 3701336933298084
Change-Id: I92039f297cf99352bbf4196797933d89c0b819ff

7 years agoNsdManager: remove duplicated argument validation
Hugo Benichi [Tue, 2 May 2017 04:36:28 +0000 (13:36 +0900)]
NsdManager: remove duplicated argument validation

This patch simplifies argument validation in NsdManager public api and
regroup duplicated validation into common methods.

This makes stack traces more actionable as now specific errors will
cause the api to throw exception from specific methods, whereas before
IllegalArgumentException would be thrown from inside the same api method
for different reasons.

This patch also includes a couple of other small cleanups.

Test: $ runtest -x frameworks/base/tests/net/../NsdManagerTest.java
Bug: 37013369
Change-Id: Iaad13e13976e9bf8f508d7188f823f8184ac414b

7 years agoMerge "Remove unused lambda captures"
Yi Kong [Tue, 9 May 2017 00:19:08 +0000 (00:19 +0000)]
Merge "Remove unused lambda captures"

7 years agoIncrease limit of locale pairs
Robert Greenwalt [Mon, 8 May 2017 23:44:08 +0000 (16:44 -0700)]
Increase limit of locale pairs

This is just to avoid people injecting arbitrarily large
numbers here and causing crashes due to memory limitation.
Raised to a high enough level to avoid chance of hitting in practice.

Test: build
Change-Id: I1d2a245f9c391a9d6aec52bddd3dc086206d3e30

7 years agoUpdate startStreaming to return status code
Robert Greenwalt [Mon, 8 May 2017 23:41:38 +0000 (16:41 -0700)]
Update startStreaming to return status code

The StreamingService object will be constructed by the manager code.

Test: build
Change-Id: I53e321dbae14270d0df2c81774bf7f055baf216f

7 years agoSwitch from libcrypto_static to libcrypto target
Alex Klyubin [Mon, 8 May 2017 21:09:03 +0000 (14:09 -0700)]
Switch from libcrypto_static to libcrypto target

libcrypto target offers the same static library as libcrypto_static.
Thus, there's no need to use libcrypto_static.

Test: make pbkdf2gen
      Run pbkdf2gen with and without a password and confirm it works
Bug: 26160319

Change-Id: I89a60b7521e6c3df91421d0edf64a71b8b2c20e0

7 years agoMerge "Fix a NPE with outlineProvider="none""
Sergey Prigogin [Mon, 8 May 2017 20:44:11 +0000 (20:44 +0000)]
Merge "Fix a NPE with outlineProvider="none""

7 years agoPrepare for removal of junit and android.test classes from Android API (step 1)
Paul Duffin [Wed, 1 Mar 2017 13:21:10 +0000 (13:21 +0000)]
Prepare for removal of junit and android.test classes from Android API (step 1)

In preparation for removing junit and android.test classes from
the Android API this change adds explicit dependencies on junit
and/or legacy-android-test to ensure that modules will compile
properly once it is removed.

Care was taken to ensure that any targets that depended,
directly or indirectly, on android-support-test did not also
depend on junit or hamcrest as they conflict with the versions
embedded within android-support-test.

Bug: 30188076
Test: make checkbuild
Change-Id: Ice80a29b420061f5d0af6eb46426455abf890e5e
Merged-In: Ifc3ee3dc804074a3c572bf2600cfb1fe1b6fa749

7 years agoRemove unused lambda captures
Yi Kong [Mon, 8 May 2017 17:24:22 +0000 (10:24 -0700)]
Remove unused lambda captures

Test: build
Bug: 37752547
Change-Id: Id102e93fef06e9c818b27fa8a5c6218c319bdd30

7 years agoMerge "Destroy Allocation right away on exception"
Yang Ni [Mon, 8 May 2017 15:52:07 +0000 (15:52 +0000)]
Merge "Destroy Allocation right away on exception"

7 years agoMerge "Convert libandroid and libandroid_runtime to Android.bp"
Treehugger Robot [Sat, 6 May 2017 02:02:44 +0000 (02:02 +0000)]
Merge "Convert libandroid and libandroid_runtime to Android.bp"

7 years agoMerge changes from topic 'sms-files-move-opt-to-base'
nharold [Sat, 6 May 2017 01:45:35 +0000 (01:45 +0000)]
Merge changes from topic 'sms-files-move-opt-to-base'

* changes:
  Move newFromRil() function to a utility class
  Remove dependency on telephony-common from services/core
  Move OTASP_* Consts from ServiceStateTracker to TelephonyManager
  Port Utility Functions from DefaultPhoneNotifier
  Remove dependency on IccConstants from SmsManager
  Move files from frameworks/opt/telephony to frameworks/base

7 years agoMove newFromRil() function to a utility class
Nathan Harold [Wed, 25 Jan 2017 01:08:34 +0000 (17:08 -0800)]
Move newFromRil() function to a utility class

Remove a dependency on frameworks/opt from SmsMessage for CDMA

-Code move to frameworks/opt/telephony../cdma/SmsMessageConverter

Bug: 33414487
Test: Manually verified GSM and CDMA SMS: MO and MT
Change-Id: I730d292c4aad6524b03b18c0751738a73a71ecf7

7 years agoRemove dependency on telephony-common from services/core
Nathan Harold [Wed, 14 Dec 2016 19:40:03 +0000 (11:40 -0800)]
Remove dependency on telephony-common from services/core

After migrating all the dependencies from frameworks/opt/telephony
to frameworks/base, the dependency is no longer needed and should
never have been created in the first place. Happily removed.

Bug: 33414487
Test: compilation
Change-Id: I261da4c6b819b3c960ce56d2cab5c80cb34e852e

7 years agoMove OTASP_* Consts from ServiceStateTracker to TelephonyManager
Nathan Harold [Wed, 14 Dec 2016 19:24:48 +0000 (11:24 -0800)]
Move OTASP_* Consts from ServiceStateTracker to TelephonyManager

-Move the OTASP_* constants from SST
-Update references to those constants in TelephonyRegistry

Bug: 33414487
Test: compilation
Change-Id: I9516a8dfa9623d69d7e051749815e91ed3d013fa

7 years agoPort Utility Functions from DefaultPhoneNotifier
Nathan Harold [Wed, 14 Dec 2016 18:48:00 +0000 (10:48 -0800)]
Port Utility Functions from DefaultPhoneNotifier

-Move static utility functions from frameworks/opt/telephony/
 ..DefaultPhoneNotifier to a new utility class in frameworks/base

-Update TelephonyRegistry to point to the new functions.

Bug: 33414487
Test: compilation
Change-Id: I36a113cb5122569d451ec3a2dfa71d72d590fa52

7 years agoRemove dependency on IccConstants from SmsManager
Nathan Harold [Wed, 14 Dec 2016 03:03:09 +0000 (19:03 -0800)]
Remove dependency on IccConstants from SmsManager

-Redefine the length of the SmsRecord in SmsManager

Bug: 33414487
Test: compilation
Change-Id: I941085e96f45164152528c123102a59930859546