When "getPrimaryStorageSize" provides a path
to "readLong", the option that the path
doesn't exist is expected, since it tries
all paths from "INTERNAL_STORAGE_SIZE_PATHS"
until there is success.
This patch makes us catch the "FileNotFoundException"
and "NumberFormatException" seperately.
For the above reason a "FileNotFoundException"
is now treated as an information only.
The "NumberFormatException" and other exceptions
are now treated as error since those are not
expected to happen.
Change-Id: I5316f9c3108e36c31b27dc5df8bf8ac4d4257629
Signed-off-by: Alex Naidis <alex.naidis@linux.com>
We save about 2800ms of cold startup time over baseline on a marlin,
and ~1200 ms over the parallel parsing case.
warm cold
---------------
Baseline : 1700ms 4300ms
Parallel : 1400ms 2700ms
Cache : 1000ms 1600ms
Cache & parallel : 900ms 1500ms
Note that further changes will improve the speed of cache processing.
This change also includes support for :
- a flag that been flipped in code (currently set to false).
- disabling the cache via a system property.
- wiping the cache on system upgrades.
- cache versioning.
Bug: 30792387
Test: FrameworksServicesTests
Test: manual timing
Change-Id: I281710c110af5307901dd62ce93b515287c91918
Otherwise: if the DO sets remove managed profile user restriction:
the profile owner of a managed profile cannot remove this managed
profile.
BUG:33854430
Test: adb shell am instrument -e class com.android.server.devicepolicy.DevicePolicyManagerTest -w
com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
Change-Id: I90b2028ea627a2073298bf9ef3c07b4fdf8d13a1
Keep an additional counter for background access
of sensors. Increment the count when sensor is
accessed while process is in the background state.
Bug: 33553631
Test: runtest -x frameworks/base/core/tests/coretests/src/com/android/internal/os/BatteryStatsSensorTest.java
Change-Id: I87d7dbdaf4c34aa9dd9c7e13134d8f5f759f4e2b
Now we're getting somewhere! This CL starts measuring disk usage
using quotactl(), which is almost instant and has much lower impact
on flash memory lifetime.
We now grant the per-app cache GID to every launched app, and the
ContextImpl logic that creates cache directories matches the logic
down in installd.
Test: builds, boots, quota stats match manual stats
Bug: 27948817
Change-Id: Ie269a2958ce0e1c17cb74dbfecc791a5c12922cf
This is mostly copied over from binder's existing
death recipient support. The implementation keeps
a list of registered recipients, both for being
able to map a native recipient back to the corresponding
Java recipient, as well as being able to unregister
recipients correctly.
Test: mma, hidl_test_java
Bug: 31632518
Change-Id: Id313fd248be6925056c4ade8298fe5fb04e007cc
This change saves and loads a different brightness setting when the user
goes in and out of VR Mode.
Bug: 30984614
Merged-In: Ie5578bbd6ea346f0eb34fe4abbfd604a5d7c0c93
Change-Id: Ie5578bbd6ea346f0eb34fe4abbfd604a5d7c0c93
This change saves and loads a different brightness setting when the user
goes in and out of VR Mode.
Bug: 30984614
Change-Id: Ie5578bbd6ea346f0eb34fe4abbfd604a5d7c0c93
Feature is already built under the hood, but it needs it's own public
StrictMode API so it can be independently enabled.
Test: builds, boots
Bug: 32447617
Change-Id: I3c0c6d62dd36aaf25f30e0ef8e0e7b40cf32c6d2
Don't access the parcelled data while it might be recycled
by another thread.
Also make a local reference of mMap, which could be modified
by another thread.
Bug: 33325384
Test: Hard to repro, so no test
Change-Id: I77f6545ac174236a3da69c0c0f3a01b2eda3f34b
When an app is debuggable, check whether a script called "wrap.sh" exists
in the app's native library directory. If so, start the app using the
invoke-with functionality over the script. Weaken the invoke-with check
on the zygote side to allow the functionality for debuggable apps.
The goal of the functionality is to make malloc debug, strace and other
similar tools available for NDK based application developers.
Bug: 33668201
Test: manual - debug malloc can be enabled using the new feature
Change-Id: Ia4bec0854cf4dc08446f1671494200f54ef366ee
Add "--invoke-with" to the zygote connection protocol. It was
already understood as an argument by the zygote.
Bug: 33668201
Test: m
Change-Id: I59095f2ac542aadff78a7ff1dded86cf5f192707
There are a few major pieces here:
incidentd
---------
This daemon (started by init) runs and accepts incoming requests to take
incident reports. When prompted, it calls into various system services
and fills in an IncidentProto data structure, and then writes the report
into dropbox.
The next steps for incidentd:
- Security review of SELinux policies. These will be a subset of
the dumpstate permissions. Until this is done, incidentd is
not started at boot time.
incident
--------
This shell command calls into incidentd, and can initiate an incident
report and either capture the output or leave for dropbox.
incident_report
---------------
This host side tool can call adb shell with the correct parameters
and also format the incident report as text. This formatting code
was left of the device on purpose. Right now it's pretty small, but
as the number of fields increases, the metadata and code to do the
formatting will start to grow.
The incident_report command also contains a workaround to let it
work before incidentd is turned on by default. Right now, it is
implemented to call adb shell dumpsys <service> --proto directly,
whereas in the future it will go through the full incidentd flow.
incident_section_gen
--------------------
A build-time tool that generates a stripped down set of information
about the fields that are available.
libincident
-----------
This library contains the code to connect to incidentd, and the
meta proto definitions that are used by the framework protos.
The basics are here now, but they are not fully fleshed out yet.
The privacy.proto file contains annotations that can go in the
proto file that we will later use to filter which fields are
uploaded, and which are used by local sources. For example, a
device in a test lab is safe to upload much much more information
than a real user. These will share the same mechanism, but the
user's output will be filtered according to these annotations.
frameworks/core/proto
---------------------
These .proto files contain the definitions of the system's
output. There is one master android.os.IncidentProto file that
is the top level of an incident report, but some other services
(notification, fingerprint, batterystats, etc) will have others
that are used directly by the logging mechanism.
Other files which are shared by several of the services also go
here, such as ComponentName, Locale, Configuration, etc. There
will be many more.
There is also a first iplementation of a dump method handling
--proto in the fingerprint service.
IncidentManager
---------------
The java API to trigger an incident report.
Test: Not written yet
Change-Id: I59568b115ac7fcf73af70c946c95752bf33ae67f
It looks like one operation was done out of order and some of the times used in
the calculations were leading to incorrect results.
BUG: 31023263
Test: bit FrameworksCoreTests:com.android.internal.os.BatteryStatsDurationTimerTest
Change-Id: I417cc28c5a55748067b6c7f682a66fe3dbc09f09
(cherry picked from commit 47db5a8bf7)
It looks like one operation was done out of order and some of the times used in
the calculations were leading to incorrect results.
BUG: 31023263
Test: bit FrameworksCoreTests:com.android.internal.os.BatteryStatsDurationTimerTest
Change-Id: I417cc28c5a55748067b6c7f682a66fe3dbc09f09
This is needed for unbundling of OobConfig app.
Test: gts-tradefed run gts -m GtsGmscoreHostTestCases --test com.google.android.gts.devicepolicy.DeviceOwnerUserRestrictionTest#testDisallowOemUnlock_canSetWithSystemApi
Test: gts-tradefed run gts -m GtsGmscoreHostTestCases --test com.google.android.gts.devicepolicy.DeviceOwnerUserRestrictionTest#testDisallowOemUnlock_doCannotSet
BUG: 32974379
Change-Id: I7710df96006821a5d0eddfe0b411dd3efa0e10f0