Also, delete a bunch of deprecated functions that are package-private,
and not called anywhere in the package.
Test: booted walleye
Change-Id: I728e63e7d6f9e1ba42644f93983cfcd6a2d2634c
This method transforms a binder call code to a human readable name.
AIDL generator will have the ability to override this method.
Test: n/a
Bug: 111200705
Change-Id: Ic1d82e9b403ab40c8b625ca977a819ccd521dd97
In some situations, path could be null resulting
in a crash.
Test: no crash
Bug: 109730998
Change-Id: I2ce0410162d1327905d690331f461f9187e20906
(cherry picked from commit 6f6154bf04)
The service and associated code is unused.
Bug: 80462439
Test: build / boot
Merged-In: Ibdfab1b7d2951a0c45e07bd47850af037990841b
Change-Id: Ibdfab1b7d2951a0c45e07bd47850af037990841b
Start using ArrayUtils.throwsIfOutOfBounds instead. The Arrays method
is going to be removed.
Bug: 78447530
Test: cts-tradefed run cts-dev -m CtsOsTestCases (shows only unrelated failures: two user/userdebug mismatches and one from b/79471510)
Test: cts-tradefed run cts-dev -m CtsDrmTestCases
Test: adb shell am instrument -w -e class android.content.pm.LimitedLengthInputStreamTest com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
Test: adb shell am instrument -w -e class android.os.FileBridgeTest com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
Change-Id: Ib3cd4f4ead61dbec1ccdc94b2ad4ad9c28574582
* changes:
HIDL: add APIs used by subclasses to SystemApi
Update HIDL-related documentation.
Add remaining missing HIDL SystemApi methods.
HIDL: reportSyspropMethod -> enableInstrumentation
Allow HIDL to be used in priv-apps.
The RELEASE field has no guaranteed internal structure and developers
should not attempt to parse it.
Test: no code changes
Change-Id: I0ea3ab5ba5dd4cc733feb62725cf7c62c00c857b
Two methods:
- HwBinder()
- HwBinder registerService
- HwBinder onTransact
are used by Stub classes generated by hidl-gen.
Bug: 72480743
Test: build hidl-gen generated stubs with system_current
after manually copying stub jar to prebuilts.
Change-Id: I9b409271b683ad4769a0420e1688b14c561d39d1
Merged-In: I9b409271b683ad4769a0420e1688b14c561d39d1
(cherry picked from commit 4c0d6b62a9)
This is a followup CL to previous @SystemApi CLs.
Bug: N/A
Test: N/A
Change-Id: I9c7dcc776dcfb89fd90afa4fc5d74e40ff0a5f94
Merged-In: I9c7dcc776dcfb89fd90afa4fc5d74e40ff0a5f94
(cherry picked from commit 739811a5c5)
A couple methods of Java classes which became SystemApis
but were used are still @hide.
Bug: 72480743
Test: hidl_test_java
Change-Id: I0cb82384932ab1758fa7576b2125825c48a4a6c9
Merged-In: I0cb82384932ab1758fa7576b2125825c48a4a6c9
(cherry picked from commit adcb896fd6)
Renaming this method with a semantic meaning which
better explains its purpose without caring about
its implementation details.
Bug: 72480743
Test: hidl_test_java
Change-Id: I4b0577b3f61180ecfd66ae146973fa5cc2a3b244
Merged-In: I4b0577b3f61180ecfd66ae146973fa5cc2a3b244
(cherry picked from commit 36be191dfd)
Marking HIDL as SystemApi to allow vendor apps to talk to their own
native HIDL services. This includes implementing HIDL callback objects.
HIDL (HAL interface design language) is a language that is used to
facilitate vendor<->system communication which provides guarantees
of ABI stability. For system and vendor services alike, this can also
be used for internal communication.
Bug: 67725182
Test: boot device, hidl_test_java
Change-Id: I9d028cc43ce6f81ea619f01e18f1cd772e17cbfa
Merged-In: I9d028cc43ce6f81ea619f01e18f1cd772e17cbfa
(cherry picked from commit e8e63aae6f)
To avoid future merge conflicts, a dummy WorkChain class must be
added temporarily. It goes along with the dummy StatsLog.java class.
Bug: 71607284
Test: none
Merged-In: Iff361eb98e079c7b2146c092dc27a3618a813c94
Change-Id: I66cf0c36c1842b99a5a4dd104fc5c06c0cfbe2b5
Extend the existing hidden_api_blacklist_exemptions config to support a
list of API signature prefixes to exclude from hidden API enforcement.
Push this list down to the zygote process when that process is created,
and when the list changes. This minimizes overhead, but should also ensure
that all new processes get the latest whitelist.
Test: $ adb shell settings put global hidden_api_blacklist_exemptions \
Test: Landroid/view/RemoteAnimationDefinition\\\;:Landroid/app/ActivityManager\\\$TaskDescription\\\;
Test: Manually verify logcat output from app which uses named APIs
Bug: 73337509
Change-Id: Ib1245b69da4dac50c6968f1be62f1a74591dc433
So we can auto-generate tracing code for AIDL interfaces.
Bug: 74416314
Test: inspect atrace output
Change-Id: I42eee24358763305d6b4e954087f3331ad20f9b7
Merged-In: I42eee24358763305d6b4e954087f3331ad20f9b7
Useful for clients such as BatteryStats which currently rely
on NetworkStatsFactory. Data at that stage is incomplete as
it does not account for tethering, VT data and corresponding
464xlat corrections.
Test: runtest frameworks-net, CTS tests pass.
Change-Id: I763b77f601c827fd2963204694fb5b45425cc791
This change adds the policy but offers no public way to enable it. A
follow-up change will expose the detect/permit methods in the API and
change detectAll to enable it.
This new policy can only be triggered through the libcore BlockGuard API.
Bug: 3400644
Test: cts-tradefed run cts-dev -m CtsLibcoreTestCases
Test: cts-tradefed run cts-dev -m CtsOsTestCases
Change-Id: I2e7f34ce010c78d6a5a7ac85512c045bfb13d204
Merged-In: Ieebe4db747902246968d6382bbc9cee0e539af85
When removing an FD listener from a MessageQueue, the MessageQueue waits
until the next event callback on that FD to remove it from the
underlying native Looper.
This works as expected most of the time, but due to the epoll rebuild
logic in the native Looper, there is a rare condition where FDs can get
stuck in the Looper:
1. Register two or more FD listeners.
2. Unregister FD1 listener and close FD1.
3. Before the Looper processes FD1, get an event on FD2 and close it.
(3) will trigger a rebuild of the epoll set but as FD1 is no longer
valid it cannot be added back to the epoll set, and the MessageQueue
will never get the final callback to clean it up.
Each time this happens:
* There is a small memory leak (24-32 bytes) in native Looper
* Rebuilding the epoll set incurs slightly more processing
* An error is logged for each lost FD on each epoll rebuild
This is fairly minimal, and does get cleaned up if the lost FDs is
re-opened during an epoll rebuild (since it can now be added back in),
but worst-case if a process somehow triggers this on a large number of
FDs it might be noticeable.
It seems worth it to just remove the FD explicitly right away to avoid
this case altogether.
Bug: 64083817
Test: [aosp_x86-userdebug emulator] adb shell am instrument -w \
-e class android.os.cts.MessageQueueTest \
android.os.cts/android.support.test.runner.AndroidJUnitRunner
Change-Id: I33faca37678439f4b28a4138efcdd80ea8952ab2
API to obtain cellular battery stats for power
drain diagnostics.
Test: Manual
BUG:67647477
Merged-In: Iffdb1471cd55847b6454313c94497ab2cd6533cc
Change-Id: Iffdb1471cd55847b6454313c94497ab2cd6533cc
It has been reserved in android_filesystem_config.h since
aosp/245632 in 2016, but was never included in the list of UIDs
in Process.java.
Bug: 29881876
Test: builds, boots
Change-Id: I6d36d7d15634445d992a10087b5ba31b480f9f20
This adds a new --start-child-zygote argument that instructs the main
zygote to create a new child process that will also be a zygote. The
system_server generates a random name in the abstract socket namespace
for it and the child-zygote to communicate over, and that is passed as
an argument to the new process.
A child-zygote bypasses the normal post-fork-child of the zygote process
in order to preserve itself as a zygote. This means not starting the
Binder threadpool nor launching into ActivityThread. Instead, a
child-zygote calls into its own main function. The main function runs a
ZygoteServer select loop, listening on the socket name specified by the
system_server when it was forked.
Unlike the system zygotes, a child-zygote can be killed without bringing
down the system. Killing a child-zygote will not terminate its child
processes, which will be reparented to init for reaping when they
eventually exit.
Bug: 63749735
Test: m (with multi-project commits landed)
Change-Id: I3e7ebbdba498f8fec1d84cdf927dc43a92be4b68
Extend the installd profile interface to take the profile name as
argument. This shifts the responsibility for choosing the names of
profiles for primary apks completely to PackageManager. Each of the
application code paths will get an unique profile name based on their
split name.
All the profile operations will now work on a specific profile name rather
than assuming a default global name.
Also, move dumpProfiles and clearProfiles functionality to the
ArtManagerService so that we can re-use profileName computations easier.
(cherry picked from commit 6ae39fc2e5)
Test: manual (dexopt apps, merge profiles, clear profiles)
gts GtsAndroidRuntimeManagerHostTestCases
Bug: 30934496
Merged-In: Ie65d45eed7de0844edf4b7af918d7eaa74ec1f2c
Change-Id: Ie65d45eed7de0844edf4b7af918d7eaa74ec1f2c
Complete the implementation of ArtManager#snapshotProfile. The snapshot is
performed by calling the installer and then return to the caller via the
specified callback.
(cherry picked from commit fd9f8ae973)
Bug: 30934496
Test: gts-tradefed -m GtsAndroidRuntimeManagerHostTestCases
Merged-In: I87131487846d91d79a56041445420376b61ca8e7
Change-Id: I87131487846d91d79a56041445420376b61ca8e7
Currently ZygoteProcess only uses String names in the RESERVED socket
namespace. This CL reworks the class to use LocalSocketAddress, so that
other socket namespaces can be used to communicate with zygotes.
Bug: 63749735
Test: m (no functional change)
Merged-In: I4146f684bfcd78b16500829d02ff54590a8b48f5
Change-Id: I0113a7189530c2e57c48058df542057e855bae42
When the libcutils constant was added there a merge conflict, which
caused the AID_WEBVIEW_ZYGOTE value to land with a different value than
the Java-side Process value. Nothing yet uses the Process constant, so
there were no ill effects.
Test: m
Change-Id: I8cc87bce1ddbdcdaf79d85c828d86837e96cce21
Add classloader support to android.os.Debug.attachJvmtiAgent. For
the original version without a given classloader, look up the
application's main classloader.
Bug: 65016018
Bug: 70901841
Test: m
Test: cts-tradefed run commandAndExit cts-dev
Change-Id: I649b6883e05dc2f75073fe1f978423f6a7b880df