Rename android.util.TimestampedValue to android.os to avoid dependency
from android.util onto android.os, which is disallowed by lint.
Bug: 147012511
Test: boot
Change-Id: I4b84db03c8ad24bbef63e45d6d15fb306a10364e
We can't expose android.telephony.Rlog directly to the telephony
module as @SystemApi because we can't protect it from app code.
So instead, expose a lower level API from the Log class to the
telephony module with client=SystemApi.Client.MODULE_LIBRARIES so
it can only be accessed by boot classpath code, and then create
a copy of Rlog in the telephony module, which internally use the
aforementioned API.
Note:
- Support for MODULE_LIBRARIES is not fully in yet, so for now
the Log.logToRadioBuffer() API is still hidden.
- Once all the infra is in, we can expose logToRadioBuffer.
- Once we mark it with MODULE_LIBRARIES, ART will protect it
against app code, so no further protection will be needed.
Bug: 144374158
Test: boot
Change-Id: I5be0497a17d00152286fe3351bf58e75b675ceb6
Fix copy and paste errors from commit 4ab8a199de -
the API is new so does not need @UnsupportedAppUsage and
the debug log was incorrect.
Bug: 140712361
Test: build only
Change-Id: I123f76d011d7505d3dc053cb48c40353f0579d17
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.
Bug: 145132366
Test: m && diff unsupportedappusage_index.csv
Change-Id: I288969b0c22fa3a63bc2e71bb5009fe4a927e154
This CL is a partial cherrypick of ag/9686088. This is needed because new
changes to libstatssocket (that need to be cherrypicked into AOSP) wrap
#write_to_statsd() with #write_buffer_to_statsd().
Bug: 143978873
Test: m -j
Test: flashes successfully
Test: DocumentsUI(a Mainline module) is able to successfully log to statsd
Change-Id: I886331f728ccaa3d281b5683eb89179aa73596b6
Merged-In: I9cdc6151d8feb29a712532e50f143af9d52c8d94
This change moves some logic associated with time detection out of the
NetworkTimeUpdateServiceImpl and moves it to the TimeDetectorStrategy
called by the TimeDetectorService.
The TimeDetectorStategy implementation now decides when to use an
NTP-derived time instead. The logic implemented here is effectively the
same as it was: NITZ takes priority over NTP until the latest NITZ
signal becomes "too old".
The motivating reasons for the change:
1) The "what signal is used when several are available?" logic should be
in one place: the TimeDetectoryStrategy not scattered around the
platform. Centralizing will enable different strategies and time sources
to be introduced over time.
2) It will allow removal of the ACTION_NETWORK_SET_TIME intent in a
follow-up commit; this intent was used to coordinate the NTP vs NITZ
logic should no longer be required.
The "bonus" effect of this change is that NetworkTimeUpdateServiceImpl
becomes more general: It can now be the authority for the NTP time on a
device independently of how the system clock should be set. e.g. it
could be used in future to back the
AlarmManager.currentNetworkTimeMillis() API call. Anything that needs a
"what is the best time according to NTP?" answer could use this service.
Note: The NetworkTimeUpdateServiceImpl still observes the AUTO_TIME
setting and will perform an NTP lookup "on demand" (if required) when
the user enables the setting. This should be a temporary state and
likely to be removed in future; knowledge of AUTO_TIME shouldn't be
required for the NTP info to be correct and if
NetworkTimeUpdateServiceImpl is doing the right thing.
Bug: 140712361
Test: atest com.android.server.timedetector
Test: atest android.app.timedetector
Change-Id: I4b2936a42c552c4dd4cb55010306bb81bca0c712
To help with monitoring Mainline releases, log the reason
for a watchdog-initiated rollback. This may be due to
native crashes, app crashes, ANRs or explicit health check
failures.
Add a mapping from PackageWatchdog failure reason to the
new metrics.
Bug: 146415463
Test: atest PackageWatchdogTest
Test: atest StatsdHostTestCases
Change-Id: Ia3e73d955508297004591eac762555665c557b8a
Merged-In: Ia3e73d955508297004591eac762555665c557b8a
(cherry picked from commit dd1dabaef7)
LongArrayQueue wasn't overriding the toString method, so it couldn't be used
in dumps.
Bug: 135764360
Test: atest CountQuotaTrackerTest
Change-Id: I02b1d22f8cf0fca96d0fdaff3becaa07e46ddb06
Updated first sample with `Reference.reachabilityFence(this)`
to be consistent with the second sample.
Bug: 145831809
Test: none
Change-Id: I8c625de4f36a8cd52a3825021ff631db62f04662
Create framework-statsd jar in statsd apex.
Move StatsEvent to framework-statsd.jar.
Right now, frameworks jar links against framework-statsd directly. This
should be changed to link against framework-statsd-stubs.
Bug: 145923096
Bug: 145923116
Bug: 142810493
Test: m
Test: flashes successfully
Test: adb shell cmd stats print-logs && adb logcat "*:S statsd:*"
Change-Id: Ife224abd5c9b9b0eeab681dc4b7f71c0bdb856b1
"n" in SparseSetArray is actually the key, not the index. "index" is used
as a parameter name in this class wherever it actually is the index.
Using index in documentation in the wrong places gives users the wrong
understanding.
Bug: N/A
Test: N/A
Change-Id: I239a653347dab4ea1a00c6d709aac06a98012a46
As of ag/9820253, Binder communication between pull atom clients and
statsd uses the structured StatsEventParcel. The custom parcelable
StatsEvent class is not needed anymore.
Test: m
Change-Id: I33aa975a2cd1b02ba232aadc11e2ac58814de4c3
generateFsVerityTree is never used now, thus and code path for
skipSigningBlock == false is dead.
Test: build
Bug: N/A
Change-Id: I32a3a0ad50aae6fb47ae4af2f70a5114d832b907
Wrap dalvik.system.CloseGuard and expose it as a
public API from android.util.
Bug: 145831809
Test: atest CloseGuardTest
Change-Id: Ia44c84a69a5fb693fb8bb1a075c18a60253cedfc
Add usePooledBuffer flag to the Builder which determines whether to reuse
the Buffer's byte array in StatsEvent or use a copy.
The build() function also calls release() on the Buffer
if a copy of the Buffer's byte array is passed to StatsEvent.
Also, for pushed events, release the StatsEvent object and consequently,
the Buffer in StatsLog.write(StatsEvent)
Fixes: 145026572
Fixes: 144126444
Test: bit FrameworksCoreTests:android.util.StatsEventTest
Change-Id: I1cdaf0027b69281cb7cb6f3c8ca923d03829b4dd
Extend LocalLog to enable UTC timestamps with elapsed realtime clock
info too.
Switch time-related usages over to using UTC timestamps. This will make
debugging a lot easier when the code doing the logging is responsible
for changing the system clock and default time zone.
Test: treehugger only
Bug: 140712361
Change-Id: Ic6b12f9032c0c3ebc48f12a970a7b4dd398e7fec
To help with monitoring Mainline releases, log the reason
for a watchdog-initiated rollback. This may be due to
native crashes, app crashes, ANRs or explicit health check
failures.
Add a mapping from PackageWatchdog failure reason to the
new metrics.
Bug: 138782888
Test: atest PackageWatchdogTest
Test: atest StatsdHostTestCases
Change-Id: Ia3e73d955508297004591eac762555665c557b8a
This implementation continue to uses libbinder, as opposed to
libbinder_ndk.
We also move many (but not all) statsd aidl files from
frameworks/base/core into the apex.
Test: m -j128 && bit statsd_test:*
Change-Id: I95f06e937e50c1e2a638163b13587682402956a7
Bug: 143978873
Test: m -j
Test: flashes successfully
Test: DocumentsUI(a Mainline module) is able to successfully log to statsd
Change-Id: I9cdc6151d8feb29a712532e50f143af9d52c8d94
New system property settings_fuse enables user to switch persist.sys.fuse
flag on/off from Settings UI. New system property is added as the
Settings UI sets system property with a fixed prefix
(persist.sys.fflag.override.) for persistent properties and for
consistency we do not want to rename persist.sys.fuse.
The user needs to restart the device after toggling the flag from
Settings UI. When the device restarts for the first time,
persist.sys.fuse is set from settings_fuse when the
StorageManagerService starts. If the value of persist.sys.fuse is
modified, then the device reboots for it to take effect.
The 2 reboots take almost the same time as 1 reboot and the difference is
not noticeable to the user as the lock screen does not show up in
between the 2 reboots.
This change would also mean that the newly added flag
(persist.sys.fflag.override.settings_fuse) will always override
persist.sys.fuse (as it is always checked on reboot), which implies that
`adb shell setprop persist.sys.fuse [true/false] && adb reboot` will
have no effect.
Bug:144419848
Test: * Enable developer options in Settings.
* Go to Settings->System->Advanced->Developer Options->Feature Flags.
* Turn on (off by default) settings_fuse toggle button and
restart.
* After reboot run `adb shell getprop persist.sys.fuse` shows
true.
* Turn off settings_fuse from Settings UI and reboot
* After reboot run `adb shell getprop persist.sys.fuse` shows
false.
Test: Using adb command to change the fuse system property.
* `adb shell setprop persist.sys.fflag.override.settings_fuse
true && adb reboot`
* After reboot run `adb shell getprop persist.sys.fuse` shows true
* Similarly for false case.
Change-Id: I0093d2b020a9d8ffeec7fca31a44ef2e65b4dfb4