OSDN Git Service

android-x86/frameworks-base.git
7 years agoFix the inconsistency of scan status.
yinxu [Fri, 23 Jun 2017 22:27:42 +0000 (15:27 -0700)]
Fix the inconsistency of scan status.

In types.hal and ril.h, the scan status is defined as:
    PARTIAL = 0x01
    COMPLETE = 0x02

But in NetworkScanResult.java, the scan status is defined as:
    public static final int SCAN_STATUS_PARTIAL = 0
    public static final int SCAN_STATUS_COMPLETE = 1

This CL makes changes to NetworkScanResult.java so that the scan status
is consistent both in Telephony and RIL.

Test: Telephony sanity tests
Bug: 30954762
Change-Id: Iadcd344ad3fe682da98a1a41c2964583f67dc792

7 years agoMerge "Replace MallocHelper with std::unique_ptr."
Elliott Hughes [Fri, 23 Jun 2017 17:51:45 +0000 (17:51 +0000)]
Merge "Replace MallocHelper with std::unique_ptr."

7 years agoMerge "Don't statically link libcrypto in frameworks."
Treehugger Robot [Fri, 23 Jun 2017 17:42:38 +0000 (17:42 +0000)]
Merge "Don't statically link libcrypto in frameworks."

7 years agoMerge "Rename Binder.destroy() to Binder.destroyBinder()."
Vladimir Marko [Fri, 23 Jun 2017 10:36:00 +0000 (10:36 +0000)]
Merge "Rename Binder.destroy() to Binder.destroyBinder()."

7 years agoMerge "Bluetooth: minor documentation fix to de-confuse"
Marie Janssen [Fri, 23 Jun 2017 03:17:35 +0000 (03:17 +0000)]
Merge "Bluetooth: minor documentation fix to de-confuse"

7 years agoMerge "ASM Priority Boost Tool"
Treehugger Robot [Thu, 22 Jun 2017 22:10:56 +0000 (22:10 +0000)]
Merge "ASM Priority Boost Tool"

7 years agoMerge "Fix code and test related to rules version check"
Treehugger Robot [Thu, 22 Jun 2017 21:23:52 +0000 (21:23 +0000)]
Merge "Fix code and test related to rules version check"

7 years agoDon't statically link libcrypto in frameworks.
Robert Sloan [Wed, 21 Jun 2017 23:15:44 +0000 (16:15 -0700)]
Don't statically link libcrypto in frameworks.

That creates duplicate copies of libcrypto in memory, which confuses
conscrypt.

Test: CtsLibcoreTestCases
Change-Id: I3b03d37feb405f14f8495015be7ff768b4347737
Merged-In: I547bb838befa743d72d356c186ff3cd355736589

7 years agoASM Priority Boost Tool
Alan Leung [Sat, 13 May 2017 00:31:13 +0000 (17:31 -0700)]
ASM Priority Boost Tool

This tool is a replacement for the Jack plugin that allows injection
of static method calls before lock enter and exit.

A common use case would be to boost a thread's priority as soon as
it acquires a heavily contented lock and resetting the priority upon
release.

This tool is meant to be optionally invoked from /build/core/ rules
during the build process.

Test: JUnit Tests / resulting image on a bullhead.

Change-Id: If400414a0bf50f03768a1de2ebee42086a9d701f
Merged-In: If400414a0bf50f03768a1de2ebee42086a9d701f
(cherry picked from commit 93db63059ad5e9e1d59c8ce013559069d566ef4c)

7 years agoBluetooth: minor documentation fix to de-confuse
Marie Janssen [Fri, 13 Jan 2017 00:00:30 +0000 (16:00 -0800)]
Bluetooth: minor documentation fix to de-confuse

It was somewhat unclear which is the preferred method of retrieving a
BluetoothAdapter.  Make it clear that using BluetoothManager is
preferred, and remove references to the old method in BluetoothManager
docs since it is only avaialable in API 18 or higher.

Test: recompile, check that documentation is updated
Fix: 33355430
Change-Id: Ia20b4e45dca03bc2f13c2ab477799b89c5e14f45

7 years agoFix code and test related to rules version check
Neil Fuller [Thu, 22 Jun 2017 16:58:02 +0000 (17:58 +0100)]
Fix code and test related to rules version check

Fix code and test related to an incorrectly implemented
rules version check.

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

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

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

Test: See above.
Bug: 31008728
Change-Id: I31b55e88072dd73055cb3d8cf252be6eac920322

7 years agoMerge "Add a common call when wrapping an app."
Christopher Ferris [Thu, 22 Jun 2017 18:22:07 +0000 (18:22 +0000)]
Merge "Add a common call when wrapping an app."

7 years agoMerge "Ensure that android.test tests pass"
Treehugger Robot [Thu, 22 Jun 2017 14:17:16 +0000 (14:17 +0000)]
Merge "Ensure that android.test tests pass"

7 years agoRename Binder.destroy() to Binder.destroyBinder().
Vladimir Marko [Wed, 21 Jun 2017 13:40:12 +0000 (14:40 +0100)]
Rename Binder.destroy() to Binder.destroyBinder().

There are a few AIDL-generated stubs that perform "destroy"
transactions and call "this.destroy()". Previously, this
resolved to the "destroy()" method from their interface on
ART while resolving to Binder.destroy() on the RI, though
this is a subject of a bug report against the JDK,
    http://bugs.java.com/bugdatabase/view_bug.do?bug_id=8021581 .
Resolving to the private Binder.destroy, inaccessible to
the Stub, would lead to throwing IllegalAccessErrror.

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

Test: Nexus 6P boots.
Bug: 62855082
Change-Id: I43baf76b6f3c681d93b411cecf2bc00fccafecac

7 years agoEnsure that android.test tests pass
Paul Duffin [Thu, 22 Jun 2017 11:52:18 +0000 (12:52 +0100)]
Ensure that android.test tests pass

It looks as though the tests in test-runner/tests have not actually been
run successfully for over 7 years. As a result they have degraded. This
change fixes the tests so that they will pass and provides instructions
on how to run them.

TestCaseUtilTest.testGetTestCaseNamesForTestSuiteWithSuiteMethod
    This fails because it expected 2 names to be returned but only
    returns 0. The reason for that is although TwoTestsInTestSuite has a
    Test suite() method that does create a TestSuite with two tests the
    TestCaseUtil method does not actually call suite(). Instead, because
    TwoTestsInTestSuite is a TestSuite it just calls the tests() method
    on it which returns an empty Enumeration because TwoTestsInTestSuite
    is empty.

    The support for "static Test suite() {}" is broken but fixing this
    will affect the behavior of InstrumentationTestRunner which is used
    in thousands of different places both in and outside Google and so
    could cause untold problems.

TestSuiteBuilderTest.testIncludeAllPackagesUnderHere
    Reformat the list, one per line and then add missing name
    "testPublicConstructor".

ErrorTest/FailingTest
    These tests are not meant to be run on their own, only as part of a
    separate test. The RunAsPartOfSeparateTest annotation was added to
    allow these to be excluded using notAnnotation as shown in the
    instructions for running the tests.

Bug: 30188076
Test: followed new instructions in test-runner/tests/Android.mk
Change-Id: I60e7bee9cd08a9ab7777a2578fc58da772de5c1f

7 years agoMerge "ConnectivityManager: fix style issue"
Treehugger Robot [Thu, 22 Jun 2017 07:46:34 +0000 (07:46 +0000)]
Merge "ConnectivityManager: fix style issue"

7 years agoMerge "Use RFC 7217 stable privacy addresses"
Joel Scherpelz [Thu, 22 Jun 2017 06:34:28 +0000 (06:34 +0000)]
Merge "Use RFC 7217 stable privacy addresses"

7 years agoUse RFC 7217 stable privacy addresses
Joel Scherpelz [Wed, 7 Jun 2017 06:38:38 +0000 (15:38 +0900)]
Use RFC 7217 stable privacy addresses

Ask Netd to setup WiFi interfaces to use stable privacy addresses. This
should fail benignly on devices with kernels lacking RFC 7217 support.

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

Change-Id: I9465de16685b1eb0fd842446a530cf98d77a0c28

7 years agoAdd a common call when wrapping an app.
Christopher Ferris [Tue, 20 Jun 2017 23:13:40 +0000 (16:13 -0700)]
Add a common call when wrapping an app.

When an application is wrapped using setprop wrap.<application>, it
doesn't set the special zygote flag, or make the mallopt call. This
means that a wrapped application will behave differently, and not
be able to track zygote native allocations versus app native allocations.

This CL adds a nativePreApplicationInit call that is used after the
Zygote is forked, and when a wrapped application is called.

Bug: 62068500

Test: Booted sailfish system. Verified that the zygote has not called
Test: the new function. Verified the function is called when a wrapper
Test: is used. Verified the function is called when the Zygote forks
Test: a process.
Change-Id: I392e1b5429be77def63f7815b072d68e9408cc7f
(cherry picked from commit 2980de4a59db048851fbbac9cd847a96a12fa4ec)

7 years agoReplace MallocHelper with std::unique_ptr.
Elliott Hughes [Wed, 21 Jun 2017 18:52:35 +0000 (11:52 -0700)]
Replace MallocHelper with std::unique_ptr.

Obviously this code could be cleaned up more, but I doubt anyone wants to.
Minimal change to remove MallocHelper.

Bug: https://issuetracker.google.com/36982134
Test: builds, boots
Change-Id: I138739c281cc2ad9723d1eea3546bf5c797ade90

7 years agoMerge "migrate roaming operator configs to carrierconfig"
Chen Xu [Wed, 21 Jun 2017 17:21:37 +0000 (17:21 +0000)]
Merge "migrate roaming operator configs to carrierconfig"

7 years agomigrate roaming operator configs to carrierconfig
fionaxu [Fri, 2 Jun 2017 01:52:17 +0000 (18:52 -0700)]
migrate roaming operator configs to carrierconfig

Bug:37885668
Test:runtest --path
packages/apps/CarrierConfig/tests/src/com/android/carrierconfig/CarrierConfigTest.java
Change-Id: Ic669581243a7a640f9ac1b5155954514168cd14b
Merged-In: Ic669581243a7a640f9ac1b5155954514168cd14b

7 years agoMerge "Cleanup a.t.TestGrouping"
Treehugger Robot [Wed, 21 Jun 2017 09:03:26 +0000 (09:03 +0000)]
Merge "Cleanup a.t.TestGrouping"

7 years agoMerge "Remove unused a.t.InstrumentationUtils"
Paul Duffin [Wed, 21 Jun 2017 07:46:41 +0000 (07:46 +0000)]
Merge "Remove unused a.t.InstrumentationUtils"

7 years agoMerge "Cleanup a.t.InstrumentationTestRunner"
Paul Duffin [Wed, 21 Jun 2017 07:46:04 +0000 (07:46 +0000)]
Merge "Cleanup a.t.InstrumentationTestRunner"

7 years agoMerge "Remove unused a.t.s.InstrumentationTestSuiteBuilder"
Paul Duffin [Wed, 21 Jun 2017 07:46:02 +0000 (07:46 +0000)]
Merge "Remove unused a.t.s.InstrumentationTestSuiteBuilder"

7 years agoMerge "Remove unused android.test.DatabaseTestUtils"
Paul Duffin [Wed, 21 Jun 2017 07:46:00 +0000 (07:46 +0000)]
Merge "Remove unused android.test.DatabaseTestUtils"

7 years agoMerge "Always allow Ethernet to be an upstream"
Treehugger Robot [Wed, 21 Jun 2017 07:06:47 +0000 (07:06 +0000)]
Merge "Always allow Ethernet to be an upstream"

7 years agoAlways allow Ethernet to be an upstream
Erik Kline [Thu, 9 Mar 2017 02:44:11 +0000 (11:44 +0900)]
Always allow Ethernet to be an upstream

If there are any upstream types defined at all, make sure that
either TYPE_ETHERNET is included somewhere within the sorted list
or force it to be at the front.

Test: as follows
    - built
    - flashed
    - booted
    - runtest frameworks-net passes
Bug: 32163131
Bug: 36076442
Change-Id: Ie61d1358f73d518de23f6ca48ca2765ca14a1067

7 years agoMerge "Remove unused a.t.InstrumentationCoreTestRunner"
Treehugger Robot [Tue, 20 Jun 2017 14:44:57 +0000 (14:44 +0000)]
Merge "Remove unused a.t.InstrumentationCoreTestRunner"

7 years agoCleanup a.t.TestGrouping
Paul Duffin [Tue, 20 Jun 2017 13:53:48 +0000 (14:53 +0100)]
Cleanup a.t.TestGrouping

TestGrouping is not part of the API but is used by classes that are and
so will need to be included in the static library we ship as part of the
SDK. As that library will be built directly from the source (as opposed
to android.jar which is built from stubs) developers will be able to see
classes and methods that are hidden and so not present in the stubs.

This change makes TestGrouping and its members as inaccessible as
possible. Unused methods and fields were removed and the TestGrouping
class was simplified by passing the ClassLoader into the constructor,
initializing the classLoader, making the classLoader field final,
and removing the setClassLoader(ClassLoader) method.

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

7 years agoRemove unused a.t.InstrumentationUtils
Paul Duffin [Tue, 20 Jun 2017 13:04:27 +0000 (14:04 +0100)]
Remove unused a.t.InstrumentationUtils

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

7 years agoCleanup a.t.InstrumentationTestRunner
Paul Duffin [Tue, 20 Jun 2017 13:41:20 +0000 (14:41 +0100)]
Cleanup a.t.InstrumentationTestRunner

ARGUMENT_TEST_CLASS, ARGUMENT_TEST_PACKAGE, ARGUMENT_TEST_SIZE_PREDICATE
and ARGUMENT_DELAY_MSEC were made package private because they are not
part of the API and are only used from within the same package.

The JavaDoc comment was changed to a multi-line comment because it is
not and should not be associated with any member.

Fixed a couple of minor JavaDoc issues.

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

7 years agoRemove unused a.t.s.InstrumentationTestSuiteBuilder
Paul Duffin [Tue, 20 Jun 2017 13:03:28 +0000 (14:03 +0100)]
Remove unused a.t.s.InstrumentationTestSuiteBuilder

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

7 years agoRemove unused a.t.InstrumentationCoreTestRunner
Paul Duffin [Tue, 20 Jun 2017 10:05:25 +0000 (11:05 +0100)]
Remove unused a.t.InstrumentationCoreTestRunner

The only usage of this was in the unused
cts/tests/vm-tests-tf/AndroidManifest.xml which was deleted in
https://android-review.googlesource.com/#/c/418900/.

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

7 years agoRemove unused android.test.DatabaseTestUtils
Paul Duffin [Tue, 20 Jun 2017 13:00:03 +0000 (14:00 +0100)]
Remove unused android.test.DatabaseTestUtils

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

7 years agoMerge "Track TimeZoneDistroInstaller method changes"
Treehugger Robot [Tue, 20 Jun 2017 12:06:29 +0000 (12:06 +0000)]
Merge "Track TimeZoneDistroInstaller method changes"

7 years agoMerge "Create a TetherInterfaceStateMachine when told the interface name."
Erik Kline [Tue, 20 Jun 2017 11:01:13 +0000 (11:01 +0000)]
Merge "Create a TetherInterfaceStateMachine when told the interface name."

7 years agoCreate a TetherInterfaceStateMachine when told the interface name.
Erik Kline [Tue, 20 Jun 2017 08:18:27 +0000 (17:18 +0900)]
Create a TetherInterfaceStateMachine when told the interface name.

Test: as follows
    - built
    - flashed
    - booted
    - runtest frameworks-net passes
Bug: 32163131
Bug: 62343300

Change-Id: I93f3bdcf20dc4f03cd621d7ab6066344642550e3

7 years agoConnectivityManager: fix style issue
Hugo Benichi [Tue, 20 Jun 2017 05:10:14 +0000 (14:10 +0900)]
ConnectivityManager: fix style issue

Simple style fix flagged by linter.

Test: no functional change.
Change-Id: I2cb19912cba149eeaffdd157616d210259d42959

7 years agoMerge "CaptivePortalLogin correctly unregisters callbacks"
Hugo Benichi [Tue, 20 Jun 2017 05:04:01 +0000 (05:04 +0000)]
Merge "CaptivePortalLogin correctly unregisters callbacks"

7 years agoMerge "Better errors from unregisterNetworkCallback"
Hugo Benichi [Tue, 20 Jun 2017 05:03:22 +0000 (05:03 +0000)]
Merge "Better errors from unregisterNetworkCallback"

7 years agoMerge "DO NOT MERGE Instrument captive portal login activity"
Hugo Benichi [Tue, 20 Jun 2017 00:47:55 +0000 (00:47 +0000)]
Merge "DO NOT MERGE Instrument captive portal login activity"

7 years agoMerge "Add an extra level of indirection to make sure that native IHwBinder"
Treehugger Robot [Mon, 19 Jun 2017 21:55:04 +0000 (21:55 +0000)]
Merge "Add an extra level of indirection to make sure that native IHwBinder"

7 years agoMerge changes from topics 'embms-init-fix', 'embms-download-2'
Hall Liu [Mon, 19 Jun 2017 19:53:40 +0000 (19:53 +0000)]
Merge changes from topics 'embms-init-fix', 'embms-download-2'

* changes:
  Add callback for initialization done
  Embms download part 2

7 years agoMerge "Remove legacy advertiser from map after it's no longer used"
Treehugger Robot [Mon, 19 Jun 2017 19:17:38 +0000 (19:17 +0000)]
Merge "Remove legacy advertiser from map after it's no longer used"

7 years agoAdd an extra level of indirection to make sure that native IHwBinder
Andreas Huber [Fri, 16 Jun 2017 21:56:12 +0000 (14:56 -0700)]
Add an extra level of indirection to make sure that native IHwBinder

objects, while alive, maintain a strong reference to their Java
counterpart.

Bug: 33042939
Test: hidl_test_java
Change-Id: I69179772b3218705e9ef46cbb10b21b6473280d6

7 years agoRemove legacy advertiser from map after it's no longer used
Jakub Pawlowski [Wed, 14 Jun 2017 01:59:07 +0000 (18:59 -0700)]
Remove legacy advertiser from map after it's no longer used

Test: manual
Bug: 62597369
Change-Id: Ief1e1b054f29b59b1ed72514b138d4f209f9847a

7 years agoTrack TimeZoneDistroInstaller method changes
Neil Fuller [Mon, 19 Jun 2017 11:56:08 +0000 (12:56 +0100)]
Track TimeZoneDistroInstaller method changes

The TimeZoneDistroInstaller now takes a TimeZoneDistro object
not bytes, which will help to hide whether the distro is in memory
or in storage. See the associated libcore change for details.

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

Test: See above.
Bug: 31008728

Change-Id: Ieead1bb87b9ae196abab93342ba5c5747ca45116

7 years agoCaptivePortalLogin correctly unregisters callbacks
Hugo Benichi [Sat, 17 Jun 2017 03:47:33 +0000 (12:47 +0900)]
CaptivePortalLogin correctly unregisters callbacks

The NetworkCallback registered by the CaptivePortalLogin activity in
onCreate was unregistered in both onDestroy() and done(). In addition
done() can be called concurrently from different places (from the
webview, from the captive portal test probe, from the activity menu),
resulting in incorrectly unregistering the callback more than once.

This patch fixes the lifecycle management of the NetworkCallback
registered by the CaptivePortalLogin activity so that it is unregistered
once only in onDestroy.

In addition the done() method is made robust against multiple calls and
becomes a no-op after the first call. This avoids multiple calls
to CaptivePortal for the same captive portal.

Bug: 62497809
Test: tested manually with captive portal setup in the office
Change-Id: I77fbeb55cf91d3b44e91d2fecb800dae40279652

7 years agoBetter errors from unregisterNetworkCallback
Hugo Benichi [Sat, 17 Jun 2017 04:14:12 +0000 (13:14 +0900)]
Better errors from unregisterNetworkCallback

This patch changes the validation of unregisterNetworkCallback in
ConnectivityManager so that the caller can better distinguish the case
of a callback that was never registered from the case of a callback that
has already been unregistered.

Bug: 62497809
Test: runtest frameworks-net passes
Change-Id: I58eda22725dd4e67dc4b64207e38cf482032df10

7 years agoDO NOT MERGE Instrument captive portal login activity
Hugo Benichi [Mon, 5 Jun 2017 05:52:24 +0000 (14:52 +0900)]
DO NOT MERGE Instrument captive portal login activity

Also add CAPTIVE_PORTAL_LOGIN_ACTIVITY_SSL_ERROR constants to
metrics_constants.proto for counting ssl error pages shown by the
captive portal login activity.

Bug: 36203355
Bug: 34901696
Bug: 36532213
Test: manually tested with captive portal testing setup while watching
      event logs: adb logcat -b events | grep captiveportallogin
        06-08 16:25:20.279 21558 21558 I sysui_action: [1004,com.android.captiveportallogin]
        06-08 17:01:04.052 21558 21558 I sysui_action: [1007,com.android.captiveportallogin]

Merged-In: Ia05853506d424ad4cb2c11770ae7718fbef3f01c

(cherry picked from commit c61dc92fc0619d101c4b789f6305012701cc47a0)
(cherry picked with DO NOT MERGE because oc-dev-plus-aosp already
contains a version of this commit compatible with proto2).

Change-Id: I55ea3c61842f16bf6a98e812fb6dc940f96f895c

7 years agoMerge "Make interface IP serving code set LinkProperties"
Treehugger Robot [Mon, 19 Jun 2017 13:00:34 +0000 (13:00 +0000)]
Merge "Make interface IP serving code set LinkProperties"

7 years agoMerge "Documentation: changed tid parameter description for getThreadPriority()"
Treehugger Robot [Mon, 19 Jun 2017 11:29:58 +0000 (11:29 +0000)]
Merge "Documentation: changed tid parameter description for getThreadPriority()"

7 years agoDocumentation: changed tid parameter description for getThreadPriority()
Alessio Balsini [Wed, 7 Jun 2017 09:41:33 +0000 (11:41 +0200)]
Documentation: changed tid parameter description for getThreadPriority()

Wrong description of the "tid" parameter used by getThreadPriority():
the function does not "change" the priority of the thread associated to
"tid".
Defined also the meaning of setting tid parameter to 0.

Test: None

Change-Id: I8552f3b110eaab1aefa51477e82d3e295547be34
Signed-off-by: Alessio Balsini <alessio.balsini@gmail.com>
7 years agoMake interface IP serving code set LinkProperties
Erik Kline [Mon, 12 Jun 2017 09:20:08 +0000 (18:20 +0900)]
Make interface IP serving code set LinkProperties

Additionally, clean up awkward IPv6TetheringInterfaceServices
instantiation mechanics.  In future, this class will be absorbed
by TetherInterfaceStateMachine (prior to its renaming to IpServer).

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

Change-Id: Ib620e3df182f9f8e2c019aae1cd8981eb0b29376

7 years agoAdd callback for initialization done
Hall Liu [Fri, 16 Jun 2017 21:59:57 +0000 (14:59 -0700)]
Add callback for initialization done

Add callback for initialization done in the framework, and listen to it
in the testapps. Make initialization asynchronous as well for both
download and streaming.

Change-Id: Iea7f803df9d2752401b2eca9f6c7375007cac35e

7 years agoMerge "Simplify NfcCommand and avoid NullPointerExceptions"
Treehugger Robot [Sat, 17 Jun 2017 01:25:12 +0000 (01:25 +0000)]
Merge "Simplify NfcCommand and avoid NullPointerExceptions"

7 years agoEmbms download part 2
Hall Liu [Wed, 7 Jun 2017 20:57:11 +0000 (13:57 -0700)]
Embms download part 2

Add support for multi-part file downloads.
Improves destination directory handling in the download process.

Change-Id: Ibad57bab8804530ce09305424790d5520cd02071

7 years agoMerge "Add a svc command for enabling/disabling Bluetooth"
Treehugger Robot [Fri, 16 Jun 2017 23:28:23 +0000 (23:28 +0000)]
Merge "Add a svc command for enabling/disabling Bluetooth"

7 years agoAdd a svc command for enabling/disabling Bluetooth
Myles Watson [Tue, 13 Jun 2017 18:42:36 +0000 (11:42 -0700)]
Add a svc command for enabling/disabling Bluetooth

Bug: 62067926
Test: svc bluetooth disable
      svc bluetooth enable
Change-Id: I9a53d7ab1805df98d8cf1292cf1061eacc14655d

7 years agoMerge "Track movement of some libcore/tzdata files"
Neil Fuller [Fri, 16 Jun 2017 14:37:15 +0000 (14:37 +0000)]
Merge "Track movement of some libcore/tzdata files"

7 years agoMerge "Fixes for tetheroffload crashes"
Treehugger Robot [Fri, 16 Jun 2017 13:49:56 +0000 (13:49 +0000)]
Merge "Fixes for tetheroffload crashes"

7 years agoFixes for tetheroffload crashes
Erik Kline [Thu, 15 Jun 2017 09:06:34 +0000 (18:06 +0900)]
Fixes for tetheroffload crashes

Now that we can talk to the HALs (with some out of tree CLs and
"setenforce 0"), several crashes were encountered.

Fixes here include:
    - avoid hidl_handle move semantics
    - check HIDL method status return value (isOk())
    - convert Java short port numbers to ints
    - don't pass nulls to HIDL where Strings are required
      (limitations in parceling)

Test: as follows
    - built
    - flashed
    - booted
    - runtest frameworks-net passes
    - "setenforce 0" and start tethering
Bug: 29337859
Bug: 32163131

Merged-In: I5fa930be0c9eda491cf17bd4de9b55ab33672d25
Merged-In: Id1037d22826f4d426bccfa17dce0962c54518d64
Change-Id: I91314440c3a04e5f2502579b5f06dac9f25cf0cd
(cherry picked from commit 1185459c4169891bd7550655218e738c8bf1abe2)

7 years agoTrack movement of some libcore/tzdata files
Neil Fuller [Tue, 13 Jun 2017 14:12:17 +0000 (15:12 +0100)]
Track movement of some libcore/tzdata files

Some files in libcore/tzdata are moving to system/timezone
under the package com.android.timezone.distro.

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

Test: See above.
Bug: 31008728
Merged-In: I2600dd4bee22a571b9eb7303733591b60d1a8b2a
Change-Id: I2600dd4bee22a571b9eb7303733591b60d1a8b2a

7 years agoMerge "When updating a split app, copy compiled files from base.apk only."
Treehugger Robot [Thu, 15 Jun 2017 23:32:57 +0000 (23:32 +0000)]
Merge "When updating a split app, copy compiled files from base.apk only."

7 years agoSimplify NfcCommand and avoid NullPointerExceptions
Myles Watson [Tue, 13 Jun 2017 23:07:32 +0000 (16:07 -0700)]
Simplify NfcCommand and avoid NullPointerExceptions

Test: adb root
      adb shell
      stop
      svc nfc enable
      start
      svc nfc disable

Change-Id: Ie5170f0525f8830d1d80b5607191ce95e78a55ae

7 years agoMerge "Use java.util.Objects.hashCode to get hashcode."
Ying Xu [Thu, 15 Jun 2017 16:50:09 +0000 (16:50 +0000)]
Merge "Use java.util.Objects.hashCode to get hashcode."

7 years agoMerge "NfcTile: make sure NFC adapter is always available when needed"
Jason Monk [Thu, 15 Jun 2017 15:21:36 +0000 (15:21 +0000)]
Merge "NfcTile: make sure NFC adapter is always available when needed"

7 years agoNfcTile: make sure NFC adapter is always available when needed
Anas Karbila [Thu, 15 Jun 2017 13:36:53 +0000 (22:36 +0900)]
NfcTile: make sure NFC adapter is always available when needed

Test: enable NFC->reboot->directly open QS panel, NFC tile will show disabled state. This commit fixes it.

Change-Id: Iabbe4ec11a38614b9c65627d58c6ee9ec93435f3

7 years agoUse java.util.Objects.hashCode to get hashcode.
yinxu [Wed, 14 Jun 2017 17:31:40 +0000 (10:31 -0700)]
Use java.util.Objects.hashCode to get hashcode.

Test: Telephony sanity tests
Change-Id: I8b845f2e5e44b242278b8955807d1b40e67e1414

7 years agoMerge "Merge IPv6TetheringInterfaceServices into TetherInterfaceStateMachine"
Treehugger Robot [Wed, 14 Jun 2017 10:11:58 +0000 (10:11 +0000)]
Merge "Merge IPv6TetheringInterfaceServices into TetherInterfaceStateMachine"

7 years agoMerge "Adds error codes and maximum RAN/Bands/Channels"
Ying Xu [Wed, 14 Jun 2017 02:16:51 +0000 (02:16 +0000)]
Merge "Adds error codes and maximum RAN/Bands/Channels"

7 years agoMerge "Do not CloseGuard KernelID or FieldID"
Treehugger Robot [Tue, 13 Jun 2017 21:49:46 +0000 (21:49 +0000)]
Merge "Do not CloseGuard KernelID or FieldID"

7 years agoMerge "Add updateMethod callback"
Robert Greenwalt [Tue, 13 Jun 2017 20:38:49 +0000 (20:38 +0000)]
Merge "Add updateMethod callback"

7 years agoMerge "remove the lock-use for prunePrintService in case blocking main thread"
Treehugger Robot [Tue, 13 Jun 2017 20:30:37 +0000 (20:30 +0000)]
Merge "remove the lock-use for prunePrintService in case blocking main thread"

7 years agoAdds error codes and maximum RAN/Bands/Channels
yinxu [Wed, 31 May 2017 01:04:19 +0000 (18:04 -0700)]
Adds error codes and maximum RAN/Bands/Channels

Added error codes which are mapped from the RadioError which is returned
from RIL, also added some errors which will be generated at telephony.
Those errors will be returned to the user with the onError() callback.

Added the maximun number of RAN/Bands/Channels in 1 scan request.

Test: Telephony sanity tests
Bug: 30954762
Change-Id: Ie7865ed2101d9564e26870a8ebbb0ceb7bd9bd1b

7 years agoMerge "Radio Interface changes to pass the encryption object, including the key,to...
Pankaj Kanwar [Tue, 13 Jun 2017 20:22:22 +0000 (20:22 +0000)]
Merge "Radio Interface changes to pass the encryption object, including the key,to the modem."

7 years agoDo not CloseGuard KernelID or FieldID
Yang Ni [Fri, 28 Apr 2017 15:45:40 +0000 (08:45 -0700)]
Do not CloseGuard KernelID or FieldID

Bug: 28053584

Stop CloseGuarding for two reasons:

1) KernelID and FieldID objects are constructed in auto-generated
(RenderScript reflected) Java code. It would be impossible for a user to
explicitly call destroy() on them. Guarding them would leave a lot of
noisy warnings in logcat.

2) These KernelID and FieldID objects are not big compared to other
RenderScript objects, e.g. Allocations. They occupy almost no native
resources except for a native pointer. Leaving their destruction to Java
GC would be completely acceptable, since any delay in reclaiming them is
unlikely to cause memory pressure.

Test: CTS on x86_64 emulator
Change-Id: I587b5561a0b2bdbf0b2e95bf2995c20d5f5faf9d

7 years agoMerge "Binder: Add more logging on Error"
Andreas Gampe [Tue, 13 Jun 2017 18:34:45 +0000 (18:34 +0000)]
Merge "Binder: Add more logging on Error"

7 years agoWhen updating a split app, copy compiled files from base.apk only.
Jeff Hao [Tue, 13 Jun 2017 18:09:10 +0000 (11:09 -0700)]
When updating a split app, copy compiled files from base.apk only.

This fixes issues with some splits failing to be recompiled if they
haven't changed, but the dex files they depend on have.

The real fix will be for frameworks to generate the new expected
classpath and check in DexFile.getDexOptNeeded. Then we can undo
this change and copy over all the compiled split files again.

Bug: 62269291
Test: cts-tradefed run singleCommand cts -d --module
CtsAppSecurityHostTestCases -t android.appsecurity.cts.SplitTests

Change-Id: Id8e6dc59b16d4f10a6c2d9d81027012204e0f26b

7 years agoRadio Interface changes to pass the encryption object, including the
pkanwar [Mon, 22 May 2017 22:23:38 +0000 (15:23 -0700)]
Radio Interface changes to pass the encryption object, including the
key,to the modem.

We will now pass the ImsiEncryptionInfo object which includes mnc/mcc.
BUG: 35606429
Test: manual
Change-Id: Idf835d9b99a26cb0c0d73fb70ffa9875843ac62b

7 years agoMerge changes I73ae8de1,I58260902
Treehugger Robot [Tue, 13 Jun 2017 15:27:09 +0000 (15:27 +0000)]
Merge changes I73ae8de1,I58260902

* changes:
  Binder: Log details of pending exception.
  Binder: Be forceful about a forceful exit.

7 years agoMerge IPv6TetheringInterfaceServices into TetherInterfaceStateMachine
Erik Kline [Tue, 13 Jun 2017 12:32:10 +0000 (21:32 +0900)]
Merge IPv6TetheringInterfaceServices into TetherInterfaceStateMachine

Ideally this would have been done immediately after IPv6 tethering code
was made part of an official named release. Getting this in now should
help with the relaying of LinkProperties that is required for offload.

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

Change-Id: I015fa3cb05a15624f9e80b7aa5a871cefef431b7

7 years agoMerge "make UpsreamNetworkMonitor the sole source of upstream network information"
Erik Kline [Tue, 13 Jun 2017 08:20:40 +0000 (08:20 +0000)]
Merge "make UpsreamNetworkMonitor the sole source of upstream network information"

7 years agoMerge "Only disable Wi-Fi IP serving on specific interface, if available"
Treehugger Robot [Tue, 13 Jun 2017 03:13:18 +0000 (03:13 +0000)]
Merge "Only disable Wi-Fi IP serving on specific interface, if available"

7 years agomake UpsreamNetworkMonitor the sole source of upstream network information
Erik Kline [Fri, 9 Jun 2017 08:08:52 +0000 (17:08 +0900)]
make UpsreamNetworkMonitor the sole source of upstream network information

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

7 years agoOnly disable Wi-Fi IP serving on specific interface, if available
Erik Kline [Fri, 9 Jun 2017 07:36:29 +0000 (16:36 +0900)]
Only disable Wi-Fi IP serving on specific interface, if available

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

Change-Id: Ifd9131bad20810ee24c9436d8c0df7a81fae11d5

7 years agoBinder: Add more logging on Error
Andreas Gampe [Mon, 12 Jun 2017 17:43:05 +0000 (10:43 -0700)]
Binder: Add more logging on Error

Try to add the Error's message to the abort, so that it shows up
when the logcat is missing.

Sample message:

'jni_internal.cc:508] JNI FatalError called: java.lang.Error thrown during binder transaction: java.lang.LinkageError: This is a test.'

Bug: 62514767
Test: m
Change-Id: I12026bb7a8ec9438db493f135ed5d0177187f702

7 years agoMerge "Address IMSI privacy issues."
Pankaj Kanwar [Tue, 13 Jun 2017 00:28:42 +0000 (00:28 +0000)]
Merge "Address IMSI privacy issues."

7 years agoAddress IMSI privacy issues.
pkanwar [Tue, 21 Feb 2017 03:23:55 +0000 (19:23 -0800)]
Address IMSI privacy issues.

Added getCarrierInfoForImsiEncryption and
setCarrierInfoForImsiEncryption methods.

CP from Master

Bug: 35606429
Test: runtest --path ..ImsiEncryptionInfoTest.java
Change-Id: I62bdc8ac5e57b749fc5675c28579ec2d9183643d

7 years agoBinder: Log details of pending exception.
Narayan Kamath [Tue, 18 Apr 2017 16:48:39 +0000 (17:48 +0100)]
Binder: Log details of pending exception.

This was accidentally removed by change d64abfcf93b59500a0d.

Test: manual; verify exception trace is printed in logs.
Bug: 36813403
Bug: 37435516
Change-Id: I73ae8de167c457d56fddb85943a8f08f8913f0f7
(cherry picked from commit ccc9fad9e6abfa3cf082567669cc5d03ec7a3086)

7 years agoBinder: Be forceful about a forceful exit.
Narayan Kamath [Wed, 12 Apr 2017 10:50:10 +0000 (11:50 +0100)]
Binder: Be forceful about a forceful exit.

We were previously using exit(1) when code servicing an IPC threw
any subclass of Error. That made it much harder to diagnose cases
where that happened because :

- exit runs global destructors, which might prove problematic (see
  linked bug).
- such exits are often due to bugs in application code (things like
  AssertionErrors being thrown) but aren't flagged as such by our
  infrastructure, or by humans for that matter.

To address both issues, use FatalError() so that the runtime can dump
more useful information to the logs before it aborts.

Test: manual
Bug: 36813403
Change-Id: I5826090229109dc7cb19f0c3571c609f990cd36a
(cherry picked from commit d64abfcf93b59500a0dba1626e73861848eb4407)

7 years agoMerge "Protect broadcast used in settings for bond cancel"
Marie Janssen [Mon, 12 Jun 2017 22:36:05 +0000 (22:36 +0000)]
Merge "Protect broadcast used in settings for bond cancel"

7 years agoProtect broadcast used in settings for bond cancel
Marie Janssen [Fri, 9 Jun 2017 23:38:19 +0000 (16:38 -0700)]
Protect broadcast used in settings for bond cancel

Test: cancel pairing from notification tray
Bug: 62094630
Change-Id: Ia83a874c1ea9a1d9d5502609f81e94052bb5759c

7 years agoremove the lock-use for prunePrintService in case blocking main thread
yangbingqian [Mon, 12 Jun 2017 14:45:50 +0000 (22:45 +0800)]
remove the lock-use for prunePrintService in case blocking main thread

As in the change: I4f4cdaba65132dc2ef054877cbb097b499a723f6
the lock object is removed when calling RemotePrintSpooler
and so as it in the method prunePrintService(). But in the
constructor of UserState, the mLock is still held when calling
prunePrintService(), it may also block the main thread

It is better to take it out of the synchronized block

Test: null

Change-Id: I709b491d611dbcbf21a5fd493b879ed290dd0247
Signed-off-by: yangbingqian <yangbingqian@xiaomi.com>
7 years agoMerge "Changed Locale in ServiceInfo to a list."
Robert Greenwalt [Sat, 10 Jun 2017 00:03:56 +0000 (00:03 +0000)]
Merge "Changed Locale in ServiceInfo to a list."

7 years agoMerge "Update documentation for streaming methods"
Hall Liu [Fri, 9 Jun 2017 21:44:27 +0000 (21:44 +0000)]
Merge "Update documentation for streaming methods"

7 years agoMerge "Add IApnSourceService.aidl"
Jordan Liu [Fri, 9 Jun 2017 17:25:08 +0000 (17:25 +0000)]
Merge "Add IApnSourceService.aidl"

7 years agoMerge "Revert "Instrument captive portal login activity""
Hugo Benichi [Fri, 9 Jun 2017 11:31:21 +0000 (11:31 +0000)]
Merge "Revert "Instrument captive portal login activity""