Awhile back we explicitly blocked any new ASEC installs, with the
expectation that we'd eventually remove the logic entirely. We've
had them disabled for about a week now without incident, so let's
rip out the remaining code.
Test: bit FrameworksCoreTests:android.content.pm.PackageHelperTests
Test: bit FrameworksCoreTests:android.content.pm.PackageManagerTests
Bug: 32913676
Change-Id: I1ecc35487420731f5c4bdf03bca5751548ce51b3
This patch takes out the ring buffer array added for NFLOG wakeup packet
events logging and extract it into its own class for reuse. This new
RingBuffer class has the two minimal useful functions append() and
toArray().
Bug: 65164242
Bug: 65700460
Test: runtest frameworks-net, with new unit test
Change-Id: Ib94d79a93f4e99661b7d0fac67117b91d57af980
...if destroy() hasn't already been called through some
other codepath.
Bug: 65249720
Test: runtest -x core/tests/coretests/src/com/android/internal/app/ChooserActivityTest.java
Change-Id: I5f90548e437986d8585390578f4ceecd57cc3473
When BatteryService triggers ACTION_REQUEST_SHUTDOWN intent, add the reason
for shutdown as extra to indicate low battery or critical battery
thermal state.
Bug: 63736262
Test: 1/ adb shell cmd battery unplug && adb shell cmd battery set level 0
2/ Power on the device
3/ Verify sys.boot.reason == shutdown,battery
Test: 1/ adb shell cmd battery set temp 700
2/ Power on the device
3/ Verify sys.boot.reason == shutdown,thermal,battery
Change-Id: If20a36ef53f8bcbfae4114df08f741ec1dcd7df9
Bug: 64458884
Test: runtest -c com.android.server.NightDisplayServiceTest \
frameworks-services and manually tested Hawaii and London
Change-Id: I052034a4c64eb73c42672215e8847c11e00efeb5
(cherry picked from commit 2ce862c3ed)
Bug: 64458884
Test: runtest -c com.android.server.NightDisplayServiceTest \
frameworks-services and manually tested Hawaii and London
Change-Id: I052034a4c64eb73c42672215e8847c11e00efeb5
The new OEM permission flavor of signature protected perissions
can be granted only to apps on the OEM partition if they are:
1. Signed as the one declaring the permission
2. The requesting app is on OEM partition of the system image and
declares the permission used and the OEM explicitly granted this
permission by adding an entry in /oem/permission/*.xml
with the following format:
<permissions>
<oem-permissions package="foo.bar.baz">
<permission name="android.permission.ACCESS_FOO" granted="true"/>
</oem-permissions>
</permissions>
All OEM permissions requested by any app on the OEM partition
must be declared granted or not to force the OEM making a well
though out explicit choice. If that condidtion is not met the
system server restarts - this prevents shipping a device with
OEM permissions for which no opition was explicitly expressed.
Normal apps requesting an OEM permission has no effect, i.e the
permission is only granted on a signature match.
Change-Id: I345bb0b56368ee03e4bd768faab540ee4e0571ae
Bug: 65497745
Test: Manual
Before this change, we were throwing a checked exception on success
and returning on failure. This made it hard to figure out where / when
something was going wrong. This change switches things around to throw
a RuntimeException when something goes wrong and to return a Runnable
on success. This lets us make stronger assertions in both the parent
and the child process about their state and expected return values.
This change also upgrades the severity of several errors that we would
earlier just ignore. We will now reject the command and terminate the
connection to the client when we encounter these errors such as:
- Malformed arguments
- Any ZygoteSecurityException, such as thown thrown by
applyUidSecurityPolicy and applyInvokeWithSecurityPolicy.
- Any error in setting up pipes etc. to facilitate communication
with child processes.
(cherry picked from commit bf99d06003)
Bug: 13618569
Test: Manual
Merged-In: Id931d44135ae2e4ede1bbac6a4b187f6c139e1fd
Change-Id: Id931d44135ae2e4ede1bbac6a4b187f6c139e1fd
Before this change, ZygoteProcess.preloadPackageForAbi returned
as soon as the command was written to the zygote socket and not
after the preload completed. This meant that there was a small
window of time before the server side of the socket polled its FDs
where a second command could be written to the zygote socket. This
would lead to only one of the commands being processed and the
other being dropped. The client side of that socket would then wait
forever for a response and bring down the system once the watchdog
timeout was hit.
Example failure case :
--------------
system_server:send command(preloadPackage)
system_server:send command(fork)
zygote:poll & process command(preloadPackage) // the fork command is dropped.
Example of normal operation :
------------------
system_server:send command(preloadPackage)
zygote:poll & process command(preloadPackage)
system_server:send command(fork)
zygote:poll & process command(fork)
This change makes preloadPackageForAbi synchronous, which ensures
that each POLLIN event corresponds to precisely one command.
(cherry picked from commit 24a3306c32)
Bug: 62886909
Bug: 13618569
Test: Manual
Contributed-By: yuqianyu@huawei.com
Merged-In: I83faf974c9a70a6ab18323f692c1981784e4c56a
Change-Id: I83faf974c9a70a6ab18323f692c1981784e4c56a
RPM = resource power manager.
Fetching the rpm stats (specifically, the subsystem low power stats) is
slow... too slow to reasonably do each time the screen state changes.
Therefore, it is disabled until fetching this information can be done
more quickly. Consequently, the screen-off RPM values will be incorrect
until it is re-enabled; they are therefore not printed.
Bug: 65164435
Bug: 62549421
Test: manual
Change-Id: I54d54f244c69ee372f22ecd99f32570db4aeb222
RPM stats are expensive to fetch. However, updateRpmStatsLocked can
get called over and over again. E.g. if
BatteryStatsService.getStatistics is called multiple times in quick
succession, the RPM stats would be fetched repeatedly. Because it is
expensive, if therefore makes sense to throttle it to ensure that the
fetching is not done too frequently.
The data last fetched is cached. When asked to update, it will only
actually do so if it is sufficiently old.
Bug: 62549421
Bug: 65629008
Test: manual
Change-Id: I6b7530d203deb9ad5bfb3415336a0de6a55bd89b
Currently Resource Power Management (e.g. VMIN time) is reported in the
batterystats history each time the battery level changes. We need this
information in the batterystats checkin, and need to be able to
differentiate time spent in each power state/voter, total as well as
when the screen is off.
The RPM information is obtained via a JNI call to the appropriate HALs.
Batterystats report version is increased to 26.
Bug: 62549421
Test: manual
Change-Id: I0c384eb3950714d8a0aa1353a4bf965330ebc8c1
If pm.dexopt.priv-apps is set to false, disable verifier and
only allow loading oat files from system.
bug: 30972906
bug: 63920015
Test: works as expected when pm.dexopt.priv-apps is true or false
Change-Id: Ib9e80c9b7b4106e82c0b9d1c7fbb8065c190ac1f
Also now pass the flags to the forked process through --runtime-flags instead
of converting to command line arguments and converting back to an integer.
bug: 30972906
bug: 63920015
Test: builds
Change-Id: I7f10c43dd916ca2d3b9b5141f17261eb7b64f49a