Also increase the default internal buffer size from 8kb to 32kb. We
have evidence that we're incurring a fair bit of "extra" disk write load
in various common circumstances like SharedPreferences, and this should
help eliminate that.
Bug 63432101
Test: bit CtsContentTestCases:.SharedPreferencesTest
Change-Id: Iba4768262142555a279284b2ae70741424ee2184
New quota APIs are much faster than trying to measure manually, and
removing this last user of calculateDirectorySize() means we can
remove it once and for all.
Bug: 36056324
Test: builds, boots
Change-Id: Ibdf1ee4e8885680e106df6a9269b6309ddc61af8
Tracking occasional lock contention in ActivityManagerService
that might be due to battery stats locking while reading proc files.
Bug: 63287747
Test: manual
Change-Id: Idfde8c960507930df4dc7e1337a89535d2ca932e
Make sure that the preload method returns a boolean to avoid the
possibility of a NullPointerException or a ClassCastException during
the boxing / casting of its return value.
Test: manual
Change-Id: I483edc8f8726de4359fc37304ca7019024eaf577
The biggest change is that padding will only appear above/below
service section, and at the start of the non-service section. For
this a bunch of changes to how padding is needed.
Also some other dimen changes for specs.
Test: visual
Change-Id: I39747701597e620425bdcb4113d1a3585f6de137
Fixes: 37913738
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.
Bug: 13618569
Test: Manual
Change-Id: Id931d44135ae2e4ede1bbac6a4b187f6c139e1fd
Telling kernel module uid_cputime to stop accounting time for uids
belonging to a stopped user. Upon user remove, removing uid states for
those uids.
Test: adb shell am instrument -e class \
com.android.internal.os.BatteryStatsUserLifecycleTests -w \
com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
adb shell am instrument -e class android.util.SparseLongArrayTest -w \
com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
Bug: 62390461
Change-Id: Ibe07778465e3d2c13679e4d88d32f7b92fa959d9
1. Fix the bug about foregroundActivityTime. It should take microseconds
as parameter and return microseconds
2. Use the min time of foregroundActivity time and Top time as "screen
time"
3. Hide bluetooth, wifi, idle but don't smear it
Bug: 63176214
Test: runtest -x BatteryStatsHelperTest
Change-Id: I5798577da17d60fb3e3b18351deb31ae77939154
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.
Bug: 62886909
Bug: 13618569
Test: Manual
Contributed-By: yuqianyu@huawei.com
(cherry-picked from commit 24a3306c32)
Change-Id: I83faf974c9a70a6ab18323f692c1981784e4c56a
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.
Bug: 62886909
Bug: 13618569
Test: Manual
Contributed-By: yuqianyu@huawei.com
Change-Id: I83faf974c9a70a6ab18323f692c1981784e4c56a
Several com.android.internal packages were being included in the
Javadoc build, even though they have no public APIs. Added a
package.html with the @hide tag to each of those packages, to
exclude them from the doc build.
Updated doc is staged to: http://go/dac-stage/reference/ ; verified
that the packages are now *not* in
http://go/dac-stage/reference/packages.html , and that package
summary files are not being generated for those packages.
Test: make ds-docs
Bug: 63166900
Change-Id: I7f96abb3e57d005c290cce6eda58f9368159a34e
Previously, TextServicesManager was exposing APIs to system services to
modify spell checker settings. However, Settings application is the only
client of these APIs and there is no need to expose it to all the other
services. Settings app already has the WRITE_SECURE_SETTINGS permission
and can directly update the spell checker settings. Hence, we can remove
these APIs from TSM.
Fixes: 62950392
Test: Manually as follows.
1. Build and flash an OS image.
2. Complete the setup wizard (if any).
3. Make sure AOSP Keyboard (com.android.inputmethod.latin) is installed
4. Install SampleSpellCheckerService
4.1 tapas SampleSpellCheckerService
4.2. make -j
4.3. adb install -r out/target/product/generic/system/app/SampleSpellCheckerService/SampleSpellCheckerService.apk
5. Set the current spell checker service to be AOSP SCS by
adb shell settings put secure selected_spell_checker com.android.inputmethod.latin/.spellcheck.AndroidSpellCheckerService
6. Run a test program that has TextView and tap on one of the
TextViews and type some text.
7. Observe that there is a connection to AOSP SCS by
adb shell dumpsys textservices
8. Set the current spell checker service to be
SampleSpellCheckerService SCS by
adb shell settings put secure selected_spell_checker com.example.android.samplespellcheckerservice/.SampleSpellCheckerService
9. Observe that there is a connection to SampleSpellCheckerService
SCS by
adb shell dumpsys textservices
Change-Id: I4513ca661788f00785f684c21d7244c233b6e33e
In both battery stats and job scheduler statistics, keep track of
the reason jobs are ending. This can help to identify apps that
are having bad behavior with jobs (in particular, regularly timing
out their job instead of finishing it when done).
Test: manual
Change-Id: Icc12d5e0dc0df1906716e7d995c56d50a9fa148a