OSDN Git Service
Erik Kline [Sat, 24 Jun 2017 10:29:10 +0000 (19:29 +0900)]
Pass all offload-exempt prefixes into OffloadController
Additionally:
- eliminate useless TetherMasterUtilState
Test: as follows
- built
- flashed
- booted
- runtest frameworks passes
Bug:
29337859
Bug:
32163131
Change-Id: I0482ac9dd9e8ba558b253643dbc01875ce9475ef
Treehugger Robot [Sat, 1 Jul 2017 03:24:12 +0000 (03:24 +0000)]
Merge "Add boot profile support"
Mathieu Chartier [Fri, 30 Jun 2017 18:47:38 +0000 (11:47 -0700)]
Add boot profile support
If the boot profile file exists, its passed to the runtime as an
image compiler option. Also pass speed-profile for this case.
Bug:
37966211
Test: make, flash, and look at logcat during boot
(cherry picked from commit
f99e70e93408bd6dfda595866f13ba0068d4798e)
Change-Id: Ia09ff0200186382e45151b7cabb53016f8e0aa3f
Treehugger Robot [Fri, 30 Jun 2017 20:36:36 +0000 (20:36 +0000)]
Merge "hidl getService throw correct exceptions."
Neil Fuller [Fri, 30 Jun 2017 12:28:23 +0000 (12:28 +0000)]
Merge "Track move of distro installer code"
Hall Liu [Thu, 29 Jun 2017 21:33:11 +0000 (21:33 +0000)]
Merge "Implement cancelDownload and remove appName"
Steven Moreland [Wed, 28 Jun 2017 17:21:00 +0000 (10:21 -0700)]
hidl getService throw correct exceptions.
NoSuchElementException needs to be thrown when getService is
called and the service is not available.
Test: hidl_test_java
Fixes:
63087967
Merged-In: I207098cfb732e888f91704f623e888e72e6ce7d9
Change-Id: I207098cfb732e888f91704f623e888e72e6ce7d9
Treehugger Robot [Thu, 29 Jun 2017 17:44:10 +0000 (17:44 +0000)]
Merge "Support battery level reporting via Apple VSC (1/2)"
Jack He [Wed, 21 Jun 2017 00:09:47 +0000 (17:09 -0700)]
Support battery level reporting via Apple VSC (1/2)
* Add related constants to BluetoothHeadset
Bug:
35874078
Test: make, test with supporting headsets
Change-Id: I9f49ea28efdf6de0e751a377d879fe13a47655d5
Treehugger Robot [Thu, 29 Jun 2017 17:17:38 +0000 (17:17 +0000)]
Merge "Support battery level reporting via Plantronics XEVENT (1/2)"
Jack He [Wed, 21 Jun 2017 00:07:40 +0000 (17:07 -0700)]
Support battery level reporting via Plantronics XEVENT (1/2)
* Add related constants to BluetoothHeadset
Bug:
35874078
Test: make, test with supporting headsets
Change-Id: Ied089a065bf9caa0d03f681950fefa2ea990bb3e
Treehugger Robot [Thu, 29 Jun 2017 12:18:35 +0000 (12:18 +0000)]
Merge "No need to explicitly list ethernet upstream type"
Neil Fuller [Thu, 29 Jun 2017 11:39:49 +0000 (12:39 +0100)]
Track move of distro installer code
Track move of distro installer code; reflect the new
build target.
Tested with:
make -j30 FrameworksServicesTests
adb install -r -g \
"out/target/product/angler/data/app/FrameworksServicesTests/FrameworksServicesTests.apk"
adb shell am instrument -e package com.android.server.timezone -w \
com.android.frameworks.servicestests \
"com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner"
Bug:
31008728
Test: See above
Change-Id: Iad987d404af75af3694d50e25ed419889a9557f2
Treehugger Robot [Thu, 29 Jun 2017 11:29:37 +0000 (11:29 +0000)]
Merge "Use sendBroadcastAsUser rather than sendBroadcast"
Andre Eisenbach [Thu, 29 Jun 2017 08:30:50 +0000 (08:30 +0000)]
Merge "HFP: Modify comments for ACTION_HF_INDICATORS_VALUE_CHANGED (1/2)"
Jack He [Thu, 22 Jun 2017 19:56:54 +0000 (12:56 -0700)]
HFP: Modify comments for ACTION_HF_INDICATORS_VALUE_CHANGED (1/2)
* Per HFP 1.7.1 spec page 102 of 144
EXTRA_HF_INDICATORS_IND_ID should be int
EXTRA_HF_INDICATORS_IND_VALUE should be int
Bug:
35874078
Test: make, PTS test, unit tests
runtest -c com.android.bluetooth.btservice.RemoteDevicesTest bluetooth
Change-Id: Idd316a82bab164b6ea1701bb261b1cc3dee196f1
Erik Kline [Wed, 21 Jun 2017 14:27:55 +0000 (23:27 +0900)]
No need to explicitly list ethernet upstream type
Test: as follows
- built
- flashed
- booted
- runtest frameworks-net passes
Bug:
32163131
Bug:
36076442
Change-Id: I743c20d5b969e33c6b10d0b47ac06e6b8c968acf
Treehugger Robot [Thu, 29 Jun 2017 01:51:04 +0000 (01:51 +0000)]
Merge "Use Bundle for inter-process message"
Hall Liu [Fri, 23 Jun 2017 23:32:30 +0000 (16:32 -0700)]
Implement cancelDownload and remove appName
Implements the cancelDownload call
Removes appName as an argument from all EMBMS-related apis
Implements the cross-filesystem move method in MbmsDownloadReceiver
Change-Id: Ie8ebfccca4fbb3d69289beb2ed77101fe2c7727f
Hall Liu [Wed, 28 Jun 2017 20:26:15 +0000 (20:26 +0000)]
Merge changes from topics 'embms-cleanup-action', 'embms-download-token'
* changes:
Implement the cleanup action in MbmsDownloadReceiver
Add download request tokens and enforce destination clear
yinxu [Tue, 27 Jun 2017 21:05:17 +0000 (14:05 -0700)]
Use Bundle for inter-process message
The message sent from NetworkScanRequestTracker to TelephonyScanManager
might be across different process, so we have to wrap the List<CellInfo> into
Bundle because List<> is not parcelable.
Cherry-picked cleanly from:
https://googleplex-android-review.googlesource.com/#/c/
2467157/
Test: Telephony sanity tests
Bug:
30954762
Merged-in: I77945b247530b85c0b82876d528549498a711550
Changg-Id: I77945b247530b85c0b82876d528549498a711550
(cherry picked from commit
56049437095d3cb8334f667ff73061f2926b5416)
Change-Id: Iec4043e611a8f58733a361ec9a52fc74e1c974d5
Neil Fuller [Wed, 28 Jun 2017 17:01:56 +0000 (17:01 +0000)]
Merge "Switch PackageStatusStorage to XML-based storage"
Treehugger Robot [Wed, 28 Jun 2017 08:26:13 +0000 (08:26 +0000)]
Merge "Add APIs to get remote device's battery level (1/2)"
Hall Liu [Thu, 22 Jun 2017 01:23:48 +0000 (18:23 -0700)]
Implement the cleanup action in MbmsDownloadReceiver
Implement ACTION_CLEANUP, add result codes for the ordered broadcasts,
and remove the download request extra for file descriptor requests
Change-Id: I5ee19ad0aefbdceacb636b3d17e197a6fb1bdaa6
Jack He [Sat, 17 Jun 2017 02:43:58 +0000 (19:43 -0700)]
Add APIs to get remote device's battery level (1/2)
* Add BluetoothDevice.getBatteryLevel() API to retreive battery level
information of remote device
* Add BluetoothDevice.ACTION_BATTERY_LEVEL_CHANGED intent to notify user
that remote device's battery level has changed
Bug:
35874078
Test: make, pair with devices and use them
Change-Id: I41051ee25383f5f3a1e505aef6f8c526385f58bd
Neil Fuller [Tue, 27 Jun 2017 17:53:58 +0000 (18:53 +0100)]
Use sendBroadcastAsUser rather than sendBroadcast
According to messages in the logcat sendBroadcastAsUser
is the better option.
Test: Manual
Bug:
31008728
Change-Id: I06bcd3c53878fc2b1b817337ea8719fcc4975501
Brad Ebinger [Tue, 27 Jun 2017 16:46:57 +0000 (16:46 +0000)]
Merge "IMS: Check for binderstate before calling endSession"
Neil Fuller [Tue, 27 Jun 2017 11:56:53 +0000 (11:56 +0000)]
Merge "Switch to streaming data for time zone update"
Paul Duffin [Tue, 27 Jun 2017 10:42:56 +0000 (10:42 +0000)]
Merge "Clean up Predicate related code in android.test"
Paul Duffin [Tue, 27 Jun 2017 10:42:51 +0000 (10:42 +0000)]
Merge "Clean up ClassPathPackageInfoSource"
Benergy Meenan Ravuri [Tue, 20 Jun 2017 11:30:42 +0000 (17:00 +0530)]
IMS: Check for binderstate before calling endSession
ImsRegistrationListenerProxy listener, which is registered
as part of ImsManager.open, is not cleared even after moving
feature state to NOT_AVAILABLE because end session
is never called.
Check for binder state instead of feature state READY before
calling end session. End session will be triggered after
moving feature state to NOT_AVAILABLE.
Notify Ims state change only for the supported feature state
change to clients.
Test: Manual
Bug:
62816014
Change-Id: I1bb588ce2be9c181355ff744f43dad4e784e4ec5
Treehugger Robot [Mon, 26 Jun 2017 22:50:23 +0000 (22:50 +0000)]
Merge "[Resources] house keeping in TypeList"
Ying Xu [Mon, 26 Jun 2017 17:05:57 +0000 (17:05 +0000)]
Merge "Fix the inconsistency of scan status."
Paul Duffin [Tue, 20 Jun 2017 15:18:07 +0000 (16:18 +0100)]
Clean up ClassPathPackageInfoSource
Part of the work of removing JUnit and dependent android.test classes
from the Android API involves providing a static library that developers
can include in their test applications to ease migration. That library
will be built directly from the source (as opposed to android.jar which
is built from stubs) and so developers will be able to see classes and
methods that are not present in the stubs. This change is one of a
number of similar changes that cleanup the existing non-API code in
order to minimize the additional methods and classes exposed externally.
The basic approach is to remove unused classes and methods, use least
visible access modifier possible and generally minimize the amount of
publicly visible code.
PackageInfoSources only provided a static field and accessor method so
they were moved into ClassPathPackageInfoSource and PackageInfoSources
was removed.
ClassPathPackageInfo was only used in ClassPathPackageInfoSource and in
TestGrouping. In the latter it was simply used as an intermediate value
between ClassPathPackageInfoSource.getPackage(String packageName) and
ClassPathPackageInfo.getTopLevelClassesRecursive(String packageName).
Moving that method into ClassPathPackageInfoSource allowed the
ClassPathPackageInfo to become an inner class of
ClassPathPackageInfoSource. As it is an inner class it no longer needed
an explicit reference to the containing ClassPathPackageInfoSource.
Bug:
30188076
Test: make checkbuild and ran FrameworkTestRunnerTests
Change-Id: Idb0b6a585030805b9cff8562abb93b7e5920c53a
Pankaj Kanwar [Mon, 26 Jun 2017 15:36:43 +0000 (15:36 +0000)]
Merge "Carrier Config changes to support IMSI encryption."
Paul Duffin [Thu, 22 Jun 2017 09:47:25 +0000 (10:47 +0100)]
Clean up Predicate related code in android.test
Part of the work of removing JUnit and dependent android.test classes
from the Android API involves providing a static library that developers
can include in their test applications to ease migration. That library
will be built directly from the source (as opposed to android.jar which
is built from stubs) and so developers will be able to see classes and
methods that are not present in the stubs. This change is one of a
number of similar changes that cleanup the existing non-API code in
order to minimize the additional methods and classes exposed externally.
The basic approach is to remove unused classes and methods, use least
visible access modifier possible and generally minimize the amount of
publicly visible code.
The HasClassAnnotation and HasMethodAnnotation were never used
separately and only used by HasAnnotation. This merges the functionality
into a single nested class in TestPredicates, hidden behind the new
TestPredicates.hasAnnotation(). The HasAnnotationTest was renamed as
TestPredicatesTest and the HasClassAnnotationTest and
HasMethodAnnotationTest classes were removed as their tests provide no
additional coverage. The removal of the Has*Annotation.java files means
that the test-runner/src/android/test/suitebuilder/annotation/ directory
is empty apart from the package.html file so that was moved to
legacy-test to sit alongside the actual annotation classes.
The Predicates class, while part of the legacy-test module was only
ever used by the test-runner module and only its not() method was
actually used. So, the not() method and associated nested class were
moved to TestPredicates, the tests for not() were moved to
TestPredicatesTest and the Predicates* classes were removed.
That allowed for the removal of the legacy-android-tests as that is now
empty.
TestPredicates has a number of constants that were public. They were
hidden by moving them to the class that actually used them.
A minor generic issue was fixed in AssignableFrom.
Bug:
30188076
Test: make checkbuild and run FrameworkTestRunnerTests
Change-Id: I861da388a4146bb28e1e480d1b7ba9137b7b270e
Treehugger Robot [Mon, 26 Jun 2017 14:40:28 +0000 (14:40 +0000)]
Merge "Avoid use of TimeZoneDistro.equals() method"
Paul Duffin [Mon, 26 Jun 2017 14:24:29 +0000 (14:24 +0000)]
Merge "Remove a.t.TestCase"
Neil Fuller [Wed, 17 May 2017 03:43:12 +0000 (04:43 +0100)]
Switch PackageStatusStorage to XML-based storage
Based on feedback from a framework developer: an XML file can be used
instead of a Sqlite DB.
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: I1e6614d26df0e37ccea4dff82867e0b6aba39ca6
Hugo Benichi [Mon, 26 Jun 2017 11:43:11 +0000 (11:43 +0000)]
Merge "IpManager: always log immediate provisioning errors"
Paul Duffin [Mon, 26 Jun 2017 11:21:19 +0000 (11:21 +0000)]
Merge "Removed a.t.TestRunner and cleanup a.t.TestPrinter"
Neil Fuller [Thu, 22 Jun 2017 13:10:29 +0000 (14:10 +0100)]
Switch to streaming data for time zone update
Switch to streaming data for time zone update rather than
loading it into memory first.
Also make sure that the ParcelFileDescriptor passed to the
service is closed in all cases.
make -j30 FrameworksServicesTests
adb install -r -g \
"out/target/product/angler/data/app/FrameworksServicesTests/FrameworksServicesTests.apk"
adb shell am instrument -e package com.android.server.timezone -w \
com.android.frameworks.servicestests \
"com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner"
Test: See above
Test: Manual
Bug:
31008728
Change-Id: Ia1e27b204697caee62deb2a3d682800350bca800
Neil Fuller [Thu, 22 Jun 2017 13:10:29 +0000 (14:10 +0100)]
Avoid use of TimeZoneDistro.equals() method
The TimeZoneDistro method is going away.
make -j30 FrameworksServicesTests
adb install -r -g \
"out/target/product/angler/data/app/FrameworksServicesTests/FrameworksServicesTests.apk"
adb shell am instrument -e package com.android.server.timezone -w \
com.android.frameworks.servicestests \
"com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner"
Test: See above
Test: Manual
Bug:
31008728
Change-Id: Id90cf7ce534b888bf6df1bf1dc9d497608dcdbe9
Sean Lu [Mon, 26 Jun 2017 10:19:28 +0000 (18:19 +0800)]
[Resources] house keeping in TypeList
Symptom: Type was freed but still may be access
Root Cause: TypeList not cleared
Solution: clear the TypeList
Project: AOSP
Note: None
Test: Yes
Change-Id: I00225165a30d15a299b7a483ea393b4447d2a3fc
Paul Duffin [Mon, 26 Jun 2017 09:15:05 +0000 (09:15 +0000)]
Merge "Clean up TestCaseUtil"
pkanwar [Wed, 31 May 2017 20:10:03 +0000 (13:10 -0700)]
Carrier Config changes to support IMSI encryption.
Adding 2 config parameters to CarrierConfigManager:
1. imsi_key_download_url.
2. imsi_key_expiration_days_time.
BUG:
35606429
Test: manual
Change-Id: I191dd0db5fa84a57faea88cb59c2c0b2604064b2
Hugo Benichi [Thu, 22 Jun 2017 06:19:35 +0000 (15:19 +0900)]
IpManager: always log immediate provisioning errors
And also migrate remaining Log.e usage to logError.
Bug:
62716267
Test: built and flashed
Change-Id: I61a6cec081d2bc0fe3d73e46fd52f1a42684e58c
Hugo Benichi [Sat, 24 Jun 2017 12:19:55 +0000 (12:19 +0000)]
Merge "Relax SharedLogTest asserts"
Hugo Benichi [Sat, 24 Jun 2017 00:01:22 +0000 (00:01 +0000)]
Merge changes I193297e0,I43beb966
* changes:
NetworkCapabilities: Added support for TRANSPORT_LOWPAN
Connectivity metrics: serialize networkId, transports, ifname
Hall Liu [Tue, 20 Jun 2017 00:20:10 +0000 (17:20 -0700)]
Add download request tokens and enforce destination clear
Start writing tokens for each download request after calling download(),
and check agains them when a completed-file intent is received with a
download request extra.
Also start checking that the download destination is clear.
Change-Id: I533fe2ba49ac56bed5eab44670fe8e9a273b1ffb
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
Elliott Hughes [Fri, 23 Jun 2017 17:51:45 +0000 (17:51 +0000)]
Merge "Replace MallocHelper with std::unique_ptr."
Treehugger Robot [Fri, 23 Jun 2017 17:42:38 +0000 (17:42 +0000)]
Merge "Don't statically link libcrypto in frameworks."
Vladimir Marko [Fri, 23 Jun 2017 10:36:00 +0000 (10:36 +0000)]
Merge "Rename Binder.destroy() to Binder.destroyBinder()."
Robert Quattlebaum [Mon, 15 May 2017 22:53:29 +0000 (15:53 -0700)]
NetworkCapabilities: Added support for TRANSPORT_LOWPAN
This change simply adds a new constant, `TRANSPORT_LOWPAN`, for
identifying low-power wireless networks like Thread.
Bug: b/
33073713
Merged-In: Ie4aa77496f8ff466fa1a5fbc556e9c029457a689
(cherry pick from commit
557e0c38b98f66d6147206f23d24d8d73b09e3e5)
Change-Id: I21f9b41b8b31c63ceeb1bc9c965f6da2614c356a
Test: runtest frameworks-net (not in original commit message)
Hugo Benichi [Wed, 15 Mar 2017 14:05:01 +0000 (23:05 +0900)]
Connectivity metrics: serialize networkId, transports, ifname
This patch adds translation from ConnectivityMetricsEvent to
IpConnectivityEvent of recently added fields:
- top-level network id
- top-level ifname
- transports
Also adds inference of link layer from transports or ifname.
At the moment these new fields are not populated in
ConnectivityMetricsEvent. Follow-up patches will fill this gap for
the events of the android.net.metrics package.
Test: new unit tests, $ runtest frameworks-net passes
Bug:
34901696
Merged-In: I563a6a3183470bdfaabb7c781a1beaf6b1058bf0
(partial cherry pick from commit
73fd4d1fafd0208e843abb6a6ad8a46a6fb18143)
Change-Id: I6a00270e73a1bd07f23c367f2394d90a43ced47a
Test: runtest frameworks-net (not in original commit message)
Hugo Benichi [Fri, 23 Jun 2017 01:06:39 +0000 (10:06 +0900)]
Relax SharedLogTest asserts
This patch makes the asserts of SharedLogTest looser so that it is less
likely to get invalidated by a date formatting change.
The timestamp format of LocalLog changed in commit
6229d990828 from
"mm-dd HH:MM:SS.xxx" to "yyy-mm-ddTHH:MM:SS.xxx".
Bug:
62918393
Test: runtest frameworks-net pass
Change-Id: I57ab3e05a0f3093f9c7b1760e596a3919d4f2ed7
Marie Janssen [Fri, 23 Jun 2017 03:17:35 +0000 (03:17 +0000)]
Merge "Bluetooth: minor documentation fix to de-confuse"
Treehugger Robot [Thu, 22 Jun 2017 22:10:56 +0000 (22:10 +0000)]
Merge "ASM Priority Boost Tool"
Treehugger Robot [Thu, 22 Jun 2017 21:23:52 +0000 (21:23 +0000)]
Merge "Fix code and test related to rules version check"
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
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)
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
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
Christopher Ferris [Thu, 22 Jun 2017 18:22:07 +0000 (18:22 +0000)]
Merge "Add a common call when wrapping an app."
Paul Duffin [Thu, 22 Jun 2017 12:29:26 +0000 (13:29 +0100)]
Clean up TestCaseUtil
Part of the work of removing JUnit and dependent android.test classes
from the Android API involves providing a static library that developers
can include in their test applications to ease migration. That library
will be built directly from the source (as opposed to android.jar which
is built from stubs) and so developers will be able to see classes and
methods that are not present in the stubs. This change is one of a
number of similar changes that cleanup the existing non-API code in
order to minimize the additional methods and classes exposed externally.
The basic approach is to remove unused classes and methods, use least
visible access modifier possible and generally minimize the amount of
publicly visible code.
TestCaseUtil.getTestCaseNames() is only used by tests but its tests did
provide some coverage of the getTests() method so remove the method and
the tests the method was simply moved into TestCaseUtilTest and the
tests renamed to make it clearer that they are testing
TestCaseUtil.getTests().
Similarly, TestCaseUtil.createTestSuite() was only used by tests but its
tests did provide some coverage of the invokeSuiteMethodIfPossible()
method so the tests were modified and renamed to preserve that coverage.
TestCaseUtil.getTestAtIndex() was completely unused so was just removed.
Bug:
30188076
Test: make checkbuild and ran FrameworkTestRunnerTests
Change-Id: I62bbdbab428d7560f0c7df11f313fe60cfd31d13
Paul Duffin [Thu, 22 Jun 2017 13:48:58 +0000 (14:48 +0100)]
Remove a.t.TestCase
Part of the work of removing JUnit and dependent android.test classes
from the Android API involves providing a static library that developers
can include in their test applications to ease migration. That library
will be built directly from the source (as opposed to android.jar which
is built from stubs) and so developers will be able to see classes and
methods that are not present in the stubs. This change is one of a
number of similar changes that cleanup the existing non-API code in
order to minimize the additional methods and classes exposed externally.
The basic approach is to remove unused classes and methods, use least
visible access modifier possible and generally minimize the amount of
publicly visible code.
The android.test.TestCase class is only referenced from the
DatabasePerformanceTests class. There do not seem to be any references
to that class either and there is a NewDatabasePerformanceTests.java
file in the same directory that looks to be a JUnit based replacement.
Bug:
30188076
Test: make checkbuild and ran FrameworkTestRunnerTests
Change-Id: Iafb26dc98a40715244f07d1c9e05ada5b1602ebf
Paul Duffin [Thu, 22 Jun 2017 13:17:29 +0000 (14:17 +0100)]
Removed a.t.TestRunner and cleanup a.t.TestPrinter
Part of the work of removing JUnit and dependent android.test classes
from the Android API involves providing a static library that developers
can include in their test applications to ease migration. That library
will be built directly from the source (as opposed to android.jar which
is built from stubs) and so developers will be able to see classes and
methods that are not present in the stubs. This change is one of a
number of similar changes that cleanup the existing non-API code in
order to minimize the additional methods and classes exposed externally.
The basic approach is to remove unused classes and methods, use least
visible access modifier possible and generally minimize the amount of
publicly visible code.
The TestRunner class is not part of the API and is unused anywhere
within Android code (apart from one unused import which is in the
process of being removed) and in TestPrinter.
TestPrinter is not part of the API and its only use of TestRunner is to
implement the TestRunner.TestListener interface. It was safe to stop
TestPrinter from implementing TestRunner.TestListener because the latter
is only called from TestRunner which itself is never used. TestPrinter
was made package private as it is only used from the same package.
One the usages in TestPrinter were removed it was safe to remove
TestRunner.
Bug:
30188076
Test: make checkbuild and ran FrameworkTestRunnerTests
Change-Id: I0f4a6cf1fbec14c4778c6e09b8eabf822802774f
Treehugger Robot [Thu, 22 Jun 2017 14:17:16 +0000 (14:17 +0000)]
Merge "Ensure that android.test tests pass"
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
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
Treehugger Robot [Thu, 22 Jun 2017 07:46:34 +0000 (07:46 +0000)]
Merge "ConnectivityManager: fix style issue"
Joel Scherpelz [Thu, 22 Jun 2017 06:34:28 +0000 (06:34 +0000)]
Merge "Use 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
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)
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
Chen Xu [Wed, 21 Jun 2017 17:21:37 +0000 (17:21 +0000)]
Merge "migrate 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
Treehugger Robot [Wed, 21 Jun 2017 09:03:26 +0000 (09:03 +0000)]
Merge "Cleanup a.t.TestGrouping"
Paul Duffin [Wed, 21 Jun 2017 07:46:41 +0000 (07:46 +0000)]
Merge "Remove unused a.t.InstrumentationUtils"
Paul Duffin [Wed, 21 Jun 2017 07:46:04 +0000 (07:46 +0000)]
Merge "Cleanup a.t.InstrumentationTestRunner"
Paul Duffin [Wed, 21 Jun 2017 07:46:02 +0000 (07:46 +0000)]
Merge "Remove unused a.t.s.InstrumentationTestSuiteBuilder"
Paul Duffin [Wed, 21 Jun 2017 07:46:00 +0000 (07:46 +0000)]
Merge "Remove unused android.test.DatabaseTestUtils"
Treehugger Robot [Wed, 21 Jun 2017 07:06:47 +0000 (07:06 +0000)]
Merge "Always 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
Treehugger Robot [Tue, 20 Jun 2017 14:44:57 +0000 (14:44 +0000)]
Merge "Remove unused a.t.InstrumentationCoreTestRunner"
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
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
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
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
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
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
Treehugger Robot [Tue, 20 Jun 2017 12:06:29 +0000 (12:06 +0000)]
Merge "Track TimeZoneDistroInstaller method changes"
Erik Kline [Tue, 20 Jun 2017 11:01:13 +0000 (11:01 +0000)]
Merge "Create 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
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
Hugo Benichi [Tue, 20 Jun 2017 05:04:01 +0000 (05:04 +0000)]
Merge "CaptivePortalLogin correctly unregisters callbacks"
Hugo Benichi [Tue, 20 Jun 2017 05:03:22 +0000 (05:03 +0000)]
Merge "Better errors from unregisterNetworkCallback"
Hugo Benichi [Tue, 20 Jun 2017 00:47:55 +0000 (00:47 +0000)]
Merge "DO NOT MERGE Instrument captive portal login activity"
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"