| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Link frameworks-statsd.jar against framework-all
since it is currently infeasible to to link against stubs
Linking against stubs in frameworks/base cannot be done because
we still have StatsLog that calls StatsEvent.getBytes which
is a hidden API.
We can't move StatsLog to the apex because of hidden APIs in the
autogenerated code which is currently being migrated.
Test: m -j
Bug: 147923515
Change-Id: I0a59dce83a8075bdde3e72d1d8eceef2ed572791
|
| |
|
|
|
| |
Test: adb shell cmd stats pull-source 10000 (chosen randomly)
Change-Id: I9578f84213e6c2787da60ae7e2c20157087d5b6a
|
| |
|
|
|
|
|
|
|
| |
Also clear calling identity before invoking the pull.
Test: make
Test: atest GtsStatsdHostTestCases
Bug: 146383532
Change-Id: I9a17d88944da0074dbbaffb0c1b99a9ce7743991
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The code path to register and uregister pullers now goes through
StatsManagerService as opposed to StatsCompanionService. Pullers are
also now cached in StatsManagerService.
Test: m -j
Test: atest GtsStatsdHostTestCases (passes even when the RVC check is
removed from relevant tests)
Bug: 147010937
Change-Id: I6549a41e2059c5fc9e57d861b751760ef165f879
|
| |
|
|
|
|
| |
Test: GTS Tests
Bug: 146383400
Change-Id: Ibcd6802468fa3be3ffde4357b37060711deff9b3
|
| |
|
|
|
|
| |
Test: GTS Tests
Bug: 146383638
Change-Id: Id640e568d41c5f30e7c42a06addfba644061c706
|
| |
|
|
|
|
| |
Test: GTS Tests
Bug: 146384074
Change-Id: I263489874616d4ed5d16f2796fa74c740059a35a
|
| |
|
|
|
|
| |
Bug: 146384076
Test: GTS Tests
Change-Id: I9da3526d97d5adef423c69366f50fac59a1d6247
|
| |
|
|
|
|
|
|
|
| |
change #setBroadcastSubscriber and #unsetBroadcastSubscriber
to avoid using intentsender
Bug: 146074295
Test: Ran GTS Tests
Change-Id: I1510e44bcdf49b579fd49f51081c6a40618039fa
|
| |
|
|
|
|
|
|
|
| |
avoid using intentsender in #sendActiveConfigsChangedBroadcast
and #removeActiveConfigsChangedBroadcast.
Bug: 146074295
Test: Ran GTS Tests
Change-Id: I9313299ea0bc89f092b1c62fbfc34e06a127eaa9
|
| |
|
|
|
|
|
|
| |
Update #setDataFetchOperation to avoid using intentsender.
Bug: 146074295
Test: Ran GTS Tests
Change-Id: I7df5c6441725aa4e46fac18925664c9455f50fb9
|
| |
|
|
|
|
| |
Bug: 146385269
Test: bit FrameworksCoreTests:android.app.PullAtomMetadata
Change-Id: I4c78d2744348dbab6ee792caa0a7a8bbd3c17f28
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds an API to unregister pullAtomCallbacks.
Fixes bug where the StatsEventParcels are null.
Makes onPullAtom a oneway call.
OnPullAtom returns an int code instead of a boolean
Made the APIs return RuntimeExceptions
Test: make, boots
Test: atest GtsStatsdHostTestCases
Bug: 146385842
Bug: 146385173
Bug: 144373250
Change-Id: I107a705a9024240c5c9f9e276293de8410e2b6f3
|
| |
|
|
|
|
| |
Bug: 146074170
Test: Manual
Change-Id: Ia96f2df24e660fe3293fb2e873e9050a55398cee
|
| |
|
|
|
|
| |
Bug: 146075178
Test: CTS/GTS tests
Change-Id: I235944758b8cc24a0df85b54d7441e7e8d0a8bbc
|
| |
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
| |
StatsManager used to synchronize on "this", which is dangerous because
an app can get StatsManager and also sychronize on it, which would block
all calls. We now lock on a private final object.
Test: make
Bug: 144315658
Fixes: 144315658
Change-Id: Ia34b1c586b09a48b244cc16dba77fe54e81f62cf
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Create PullAtomMetadata for registering pullers. This will simplify the
API design and allow users to not specify the metadata if they just want
to use defaults.
Test: builds, boots
Change-Id: I6b84c02f535fc911d1dc66768413d27f342d9515
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Internal implementation of the puller API. Registers pullers by putting
them in the kAllPullAtomInfo map. Implements the actual pull,
with condition variables to timeout.
Lastly, keys the kAllPullAtom info by a PullerKey, which is a uid and
atom id. However, the uid is just set to a default of -1 for now. I will
work the security implementation in a follow up CL.
Test: builds, boots
Test: I will write unit tests in the future. It's very difficult to
write any without StatsEvent being completed.
Change-Id: Id602dd297b6ba7df811e2d5ab2e77efc0684e418
|
| |
|
|
|
|
|
|
| |
This creates a java API for registering pullers. Will implement the
statsd side in a follow up CL.
Test: builds, boots
Change-Id: Ib6735984297ce3148839a6370a3c15b2a585baf5
|
| |
|
|
|
|
| |
Bug: 129099771
Test: treehugger
Change-Id: I8689a06ae5667a146064bc870be8b5a4e92fb9b7
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Change the file format to store the
experiment IDs direclty so we don't
need to parse the proto when reading
the values out.
Bug: 129099771
Test: bit statsd_test:* && adb shell cmd stats pull-source 10051
Change-Id: I0dc1fd118f4d9ba597c2f0959648136bbafb5aab
|
| |/
|
|
|
|
|
|
|
| |
Adds @NonNull annotation to setActiveConfigsChangedOperation as per API
feedback in b/126700913.
Test: builds
Bug: 126700913
Change-Id: If70f311dab6751644253b6192834bec3d9ac1b3c
|
| |
|
|
|
|
|
|
|
| |
Creates a hidden api to register puller callbacks for vendor atoms.
Test: manual local test
Test: statsd unit tests
Bug: 119898637
Change-Id: Id28817b8fc718e128adc4e1c6b2e997db84517f9
|
| |
|
|
|
|
|
|
|
|
|
| |
Changes the return type of the setActiveConfigsChangedOperation to
long[] since it returns the configs that are currently active for the
given client.
Test: manually tested with local gmscore
Bug: 122806328
Change-Id: I49c4a28313c1e410dd1fa61f6b8393334fecea5d
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Creates a StatsManager API to register a pending intent that is invoked
whenever the active status of any of any config sent by that uid
changes.
ag/6112554 and further cls are needed to properly send back the pending
intent.
Bug: 123372077
Test: build success on blueline-eng. More thorough testing should be
done once ag/6112554 is submitted.
Change-Id: I36985c9820d4e7ac178064924190af88ea822254
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When P shipped, StatsManager had some new (introduced in P) APIs that
were already deprecated but had been needed temporarily. No one should
ever have used these APIs when P shipped because they already had
comments instructing the reader that they were deprecated. They were not
marked @Deprecated, however, so this cl does that.
Fixes: 113856561
Fixes: 77648233
Test: still compiles
Test: make ROBOTEST_FILTER=AnomalyConfigJobServiceTest RunSettingsRoboTests
Test: gts-tradefed run gts-dev --module GtsStatsdHostTestCases
Change-Id: I7c5cdc616f806b9aa5a5e4ee4229750973f533ed
|
| |
|
|
|
|
|
|
| |
Marking some API's as deprecated, so users avoid getting confused.
Test: Test that build works.
Bug: 80099023
Change-Id: I4b3d4e4fa1ee3d706e49b8180aa4d0ad0e7d6eeb
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
APIs that return package usage data (such as the new StatsManager)
must ensure that callers hold both the PACKAGE_USAGE_STATS permission
and the OP_GET_USAGE_STATS app-op.
Add noteOp() method that can be called from native code.
Also add missing security checks on command interface.
Bug: 77662908, 78121728
Test: builds, boots
Change-Id: Ie0d51e4baaacd9d7d36ba0c587ec91a870b9df17
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When StatsManager fails to connect to statsd, it now throws an exception
for the caller to catch. It also throws an exception of the config being
added is of an unreadable format.
Due to backwards compatibility issues, the old APIs could not be
changed, so new ones were made to replace the old ones. The old ones are
now temporary and will be removed when the compatibility issue is
resolved.
Bug: 77648233
Test: gts-tradefed run gts-dev --module GtsStatsdHostTestCases
Change-Id: Ibea05883a29b9b3ef9927d2f8fe295eb99832ab7
|
| |
|
|
|
|
|
|
|
| |
Adds some annotations, deletes an unused API method, and adds some
comments.
Test: Flashed onto marlin-eng and verified there are no crashes.
Bug: 72562867
Change-Id: I6c93ee4aeeacf6842795256c76551cfb1c28888d
|
| |
|
|
|
|
|
|
|
|
| |
Change the Slog.d to Slog.w and enable them, so that we can see them.
They seem to represent important failure events when people call the
public API into StatsManager.
Bug: 74997752
Test: none
Change-Id: I1c577b32358158f73453a8a3066013e0f3733d87
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Subscribers can now provide additional Strings that will be passed back to
it when an anomaly is detected. This way, the Subscriber can be informed
about anomaly-specific information has meaning to it.
Statsd itself does not use these strings and doesn't care what they are
- it simply passes them back to the subscriber.
Change-Id: If269872397c4ed2c67e41d54d850cdc664d4f73e
Fixes: 74012329
Test: run cts-dev -m CtsStatsdHostTestCases -t android.cts.statsd.alert.BroadcastSubscriberTests
|
| |
|
|
|
|
|
|
|
| |
This reverts commit 16dcd33abdc80b3bd4455ec867a32675f66faa13.
Reason for revert: b/73975175
Bug: 73975175
Change-Id: I5bcccde100900b1370c2e43b8bcfc7d1697e5c72
|
| |
|
|
|
|
|
|
|
| |
Adds some annotations, deletes an unused API method, and adds some
comments.
Test: Test that make succeeds.
Bug: 72562867
Change-Id: I6c93ee4aeeacf6842795256c76551cfb1c28888d
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Sets DEBUG to false everywhere and replaces all ALOGD with VLOG so they
do not print with DEBUG false. Leaves all ALOGI, ALOGW and ALOGE as is.
Test: ran all CTS tests and checked "adb logcat -s statsd" to make sure
it wasn't spammy
Change-Id: Iaa8eb3a0a63723ffe40f94f2815f94df877fd432
|
| |/
|
|
|
|
|
|
|
|
| |
Adds back in the old method signature. This temporary method can
be deleted in a week or so, after all callers have been migrated to
the new API.
Test: Test that make finishes.
Bug: 72562867
Change-Id: I608fcab0ac5508a482fc8d1e63490d3cfc1fedb1
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, statsd would inform interested listeners that it's time
to collect data via a protected broadcast. However, the preferred
solution is to pass a PendingIntent via a separate setter. Whenever
statsd wants the listener to call getData, StatsCompanionService
will trigger the pending intent.
Test: Tested in marlin-eng that functionality works as expected with
dogfood app.
Bug: 72562867
Change-Id: Ibcfcd5072a1a78947f8a7cbcd0bc429b54351da3
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To send configurations and PendingIntents to statsd, statsd must first
be alive. In particular, a PendingIntent must be resent to statsd each
time it starts (they are not stored, since reboots make them expire
anyway). Therefore, statsd needs to send a broadcast to inform them of
its starting.
The broadcast receiver will require DUMP permission.
Bug: 72450885
Bug: 70389379
Test: manually confirmed broadcast is sent
Change-Id: I47c130130342465a50cd625bdb135855d5d04f6e
|
|
|
Allows a uid that uploads a statsd config to additionally
register a BroadcastSubscriber with statsd. If statsd
detects an anomaly (according to the config's Alert),
statsd can inform a BroadcastSubscriber provided in the config.
The config uses a subscriberId (just an int) to identify the
BroadcastSubscriber. It then uses StatsManager.setBroadcastSubscriber
to associate that subscriberId with a given PendingIntent.
Then, when the anomaly is detected, statsd sends a broadcast
using that PendingIntent, alerting whoever was specified by
the config/setBroadcastSubscriber.
Bug: 70356901
Test: cts-tradefed run cts-dev -m CtsStatsdHostTestCases -t android.cts.statsd.alert.BroadcastSubscriberTests
Change-Id: I4d9ea9a6c8a85e61fadfd99c1513c55abbadd5e9
|