Commit Graph

3360 Commits

Author SHA1 Message Date
TreeHugger Robot
87230dceac Merge "Add kernel version to incident report" 2018-06-26 21:15:05 +00:00
TreeHugger Robot
3e2e1ae482 Merge "Clean up TODOs in statsd" 2018-06-26 17:40:06 +00:00
Yao Chen
5bfffb54da Clean up TODOs in statsd
+ Created bugs for those TODOs that are still relevant.
+ Remove obsolete TODOs.

Test: no code change.
Change-Id: I41c2a89a882f087817ee6cbc3f095e1d80e1928e
2018-06-25 11:08:04 -07:00
Andreas Gampe
9e4e689f8f Statsd: Update perfprofd config proto location
Link to new location.

Bug: 110555909
Test: m
Change-Id: I306e1dc740886d1227787604a48158d9f0c3c40a
2018-06-25 09:59:26 -07:00
Yi Jin
908c02f5c1 Add kernel version to incident report
Bug: 110230810
Test: atest incidentd_test
Change-Id: I502b34f23d61a7346d79ff0dc378add8461d2d27
2018-06-22 16:51:40 -07:00
Mickey Keeley
00f2d6038a Merge "BootParameters: Use proto for disk io." 2018-06-20 20:27:49 +00:00
Mickey Keeley
81121bd0ac BootParameters: Use proto for disk io.
Use proto for disk usage.

Bug: 79932027
Test: Ran through the following scenarios-
- RebootActivity parses previous boot parameters; sets next as expected.
- Push old parameters to device and ensured bootanimations reads it and
saves new format (serialized proto) that can be read in userspace
(RebootActivity).
- Unit tests pass.

Change-Id: I98aefb7a832c985d5061ee80ab85a4523f067641
2018-06-20 10:37:54 -07:00
Irina Dumitrescu
24ed35cd83 Add dpm force-network-logs command to force network logs retrieval.
This is useful because logs are batched every 1.5-2hrs if there are
not enough logs to fill up a batch. The command is throttled at
10 seconds as a spam prevention measure.

Bug: 62251154
Test: in adb shell run dpm force-network-logs. Observe a new batch
being created in the phone directory
/storage/emulated/0/Android/data/com.afwsamples.testdpc/files/. Also
observe a fresh batch is being displayed on the phone in the TestDPC
app, under "Retrieve network logs".
Change-Id: I5ff9d5c78497ea81533b5248816b4d6e160d338f
2018-06-20 16:23:58 +01:00
TreeHugger Robot
9e48343247 Merge "StatsPullerManager not use singleton" 2018-06-15 00:50:50 +00:00
Chenjie Yu
e22192071d StatsPullerManager not use singleton
This is to be consistent with other patterns such as UidMap.
This also makes unit test simpler.

Change-Id: I1558cd609e470481f269ecf2ae616277a95cfbf0
Bug: 72722120
Test: unit test
2018-06-14 15:46:54 -07:00
TreeHugger Robot
859df82843 Merge "Treating all FileSection files as device specific." 2018-06-14 17:37:29 +00:00
Kweku Adams
e04ef777c1 Treating all FileSection files as device specific.
Arc++ devices don't have the /d/wakeup_sources file. There's a chance
other device won't have it either, and there may be other files that we
thought were standard but are actually not, so it's safer to just assume
that not every file will be available on every device and not treat a
missing file as an error.

Bug: 110109543
Test: atest incidentd_test
Change-Id: Ief09427f08d18aee611d057ddafdb9a3466744db
2018-06-13 12:46:12 -07:00
Yao Chen
a11cbf368b Merge "Disable statsd and make StatsLog no-op if ro.statsd.enable=false" into pi-dev am: 38b92986df
am: 39c8fe12e4

Change-Id: Ie27a0d43da9fa0eb0c751cafa3f04220a5f8f18a
2018-06-07 15:50:46 -07:00
Yao Chen
39c8fe12e4 Merge "Disable statsd and make StatsLog no-op if ro.statsd.enable=false" into pi-dev
am: 38b92986df

Change-Id: Ia90bed14900a2c944165aefe00661d3979c08aed
2018-06-07 14:53:43 -07:00
Yao Chen
38b92986df Merge "Disable statsd and make StatsLog no-op if ro.statsd.enable=false" into pi-dev 2018-06-07 21:10:16 +00:00
Yao Chen
cf3829a696 Disable statsd and make StatsLog no-op if ro.statsd.enable=false
Bug: 79324611
Test: manually tested on marlin_svelte
Change-Id: Ic7fbf86d7c295cb6b2f20e7f9a957d1ed74c42c0
2018-06-06 17:25:08 -07:00
Annie Meng
da7b36c9d9 Merge "Disable bmgr if BMS is not running" 2018-06-06 10:30:33 +00:00
Bernardo Rufino
52642716a3 Remove adb shell bmgr restore <package>
Also put comment on RestoreSession saying that it doesn't kill the app
in the end.

Bug: 29255593
Test: Builds
      adb shell bmgr help, verify usage
      adb shell bmgr restore android, verify no-op

Change-Id: I89304149ea6c03a80937e321cf3a46fd173308e2
2018-06-06 08:25:26 +00:00
TreeHugger Robot
6976b764ad Merge "Wean Statsd off BatteryStats: Network Power" 2018-06-05 19:57:10 +00:00
Annie Meng
8927037477 Disable bmgr if BMS is not running
If BMS is not running, we should not run any bmgr commands and print an
error. This can occur after a device with a lockscreen reboots and has
not unlocked yet, as the backup service is not active before unlocking.

Bug: 80691476
Test: 1) Device with lock + adb reboot -> run any 'adb shell bmgr'
command -> prints error
2) Device with no lock + adb reboot -> run any 'adb shell bmgr' command
-> success

Change-Id: I101b61d18a637cdb945ffc4a5e989a5dd270ee32
2018-06-05 19:25:37 +01:00
TreeHugger Robot
4e0524bf32 Merge changes Iebe457a5,If32da8e6
* changes:
  Statsd: Add perfprofd call
  Statsd: Add perfprofd_config proto
2018-06-05 16:40:19 +00:00
Bookatz
0b028b1dc0 Wean Statsd off BatteryStats: Network Power
Statsd calls were sometimes made from BatteryStats, instead of directly
from the source, as a way of getting it running quickly in P. These must
now be done properly and separately.
Note that Statsd needs to be independent of BatteryStats, in preparation
for deprecating large parts of BatteryStats.

Bug: 80308558
Test: cts-tradefed run cts-dev -m CtsStatsdHostTestCases
Change-Id: I54fa54a2dc59dfa68f0e063d7063fac423bf0bf4
2018-06-01 10:52:36 -07:00
TreeHugger Robot
7c91d02a2b Merge "Refactor audio code out of bootanimation_main." 2018-05-31 20:38:11 +00:00
Ed Coyne
33f4b7d63b Refactor audio code out of bootanimation_main.
So it can be shared with the iot/ variant I refactored it into the
audioplay.h file. This keeps all of the audio code local, we could hide
the functions and only expose the callback but that would make testing
harder.

Test: Ran a bootanimation.zip with audio.wav on Marlin, works as expected.
Bug: 67051984
Change-Id: Ie31dc5f2cfaad5bb23134ef81be712afa6b3cd6f
2018-05-31 11:50:47 -07:00
TreeHugger Robot
f74c983280 Merge "Allow stats log printing from userdebug builds too." 2018-05-30 17:07:15 +00:00
Yao Chen
980333c960 Allow stats log printing from userdebug builds too.
Test: manually tested.
Change-Id: Id24153dfa9f1520f5037a7af1d54c90c690f99bc
2018-05-30 09:03:17 -07:00
TreeHugger Robot
bab6908c1f Merge "Statsd: ISOLATED_UID_CHANGED out of batterystats" 2018-05-30 11:36:27 +00:00
Bookatz
3c64886a46 Statsd: ISOLATED_UID_CHANGED out of batterystats
Moves the calls to StatsLog.write for ISOLATED_UID_CHANGED to the
calling functions, rather than batterystatsimpl.

Bug: 80308558
Test: none?
Change-Id: I6fe389c536b2a456907c8a87fae61e9c3434004d
2018-05-25 14:24:52 -07:00
Steven Moreland
78019c478d Merge "screencap: return instead of _exit." into pi-dev-plus-aosp
am: 7ac01c22a8

Change-Id: I143b431fa2d194c3cda771b2585737506181bca5
2018-05-25 00:47:34 -07:00
Makoto Onuki
da4db58021 Merge "Tweak exemption for sync requests made by FG apps" into pi-dev am: 621fd20f55
am: d8cf91c5f8

Change-Id: Icac177c8d404ce20d5e894d85df2b72a001d6d9a
2018-05-24 22:14:27 -07:00
Steven Moreland
a89ae86745 screencap: return instead of _exit.
_exit was being used instead of return in order to
work around a static destructor issue that has been
fixed.

Bug: 77934844
Test: screencap (and it doesn't crash)
Change-Id: I5dc25b0af5099993a94705ac9c7b439e68432824
2018-05-25 00:55:51 +00:00
Makoto Onuki
d8cf91c5f8 Merge "Tweak exemption for sync requests made by FG apps" into pi-dev
am: 621fd20f55

Change-Id: I31ae3e9e11b9defb7e6352830439484d7ec7ac01
2018-05-24 17:54:37 -07:00
TreeHugger Robot
874718f03c Merge "Remove TODO in statsd AnomalyTracker_test" 2018-05-24 18:38:07 +00:00
Bookatz
d27ab45ad3 Remove TODO in statsd AnomalyTracker_test
The underlying item the TODO is referencing had already been resolved
so the test line can be properly added, per the TODO.

Change-Id: I5c16e7ea319bd16e37475381def656b38f39d17f
Fixes: 80095149
Test: make statsd_test && adb sync data && adb shell data/nativetest64/statsd_test/statsd_test
2018-05-24 10:35:02 -07:00
Makoto Onuki
d5f25d2cd8 Tweak exemption for sync requests made by FG apps
Exemption given to a sync request made by a foreground app (including
PROCESS_STATE_IMPORTANT_FOREGROUND).
At the schedule time, we promote the sync adapter app for a higher bucket:
- If the device is not dozing (so the sync will start right away)
  promote to ACTIVE for 1 hour.
- If the device is dozing (so the sync *won't* start right away),
promote to WORKING_SET for 4 hours, so it'll get a higher chance to be started once the
device comes out of doze.
- When the sync actually starts, we promote the sync adapter app to ACTIVE for 10 minutes,
so it can schedule and start more syncs without getting throttled, even when the first
operation was canceled and now we're retrying.

Test: atest cts/tests/tests/syncmanager/
Test: Manual test with "requestsync -f" and "am set-standby-bucket", while checking
"dumpsys usagestats"
Test: settings put global app_idle_constants \
  exempted_sync_scheduled_nd_duration=1,exempted_sync_scheduled_d_duration=2,exempted_sync_start_duration=3
  and check "dumpsys usagestats" and make sure the constants are properly updated.
Fixes: 72443754

Change-Id: I233d8e4be85769150830bac798abc04810f4cc7b
2018-05-23 14:50:05 -07:00
TreeHugger Robot
d6f175d727 Merge "Allow keycode lookup without KEYCODE_ prefix" 2018-05-23 16:55:32 +00:00
Siarhei Vishniakou
de1f904713 Allow keycode lookup without KEYCODE_ prefix
Currently, KeyEvent.keyCodeFromString(String name) requires the string
to either start with "KEYCODE_", or be directly convertible to an int.
However, the string representation of every keycode starts with
"KEYCODE_", so this requirement is redundant. Relax this requirement to
alllow both of the following usages:
1) keyCodeFromString("KEYCODE_BUTTON_A")
2) keyCodeFromString("BUTTON_A")

Currently, only 1) is supported.

The other usage,
3) keyCodeFromString("29")
is unchanged.

The input is no longer case-sensitive.
Improved the example of usage in the documentation: the input
"1001" suggests that the string must contain binary representation for
usage 3), while in fact it is supposed to be a base 10 number.

Test: atest cts.KeyEventTest#testKeyCodeFromString
Bug: 36069459

Change-Id: I54d7f9d1270748854143cc9d1e8af48c9ec0cd0f
2018-05-22 07:23:34 -07:00
Jaewan Kim
bca492d684 Merge "Differentiate MediaController in a process for MediaSession" into pi-dev am: 43688e8f2f
am: a31254bde1

Change-Id: I6b10eb78bf428cd93977d3075ae7a200b53bf92c
2018-05-21 17:41:21 -07:00
Jaewan Kim
a31254bde1 Merge "Differentiate MediaController in a process for MediaSession" into pi-dev
am: 43688e8f2f

Change-Id: I8deb492fa82dcb2bec04d85a65a0aa267be830a4
2018-05-21 17:29:35 -07:00
TreeHugger Robot
43688e8f2f Merge "Differentiate MediaController in a process for MediaSession" into pi-dev 2018-05-22 00:11:49 +00:00
Yangster-mac
c038bfeebd Merge "Add a field in config to disable/enable the string hashing in metric report." into pi-dev am: 76cb7fe2f6
am: 02b40158ab

Change-Id: I7445eb13283b007738182e2a5ac4808a87124a11
2018-05-21 12:27:13 -07:00
Yangster-mac
02b40158ab Merge "Add a field in config to disable/enable the string hashing in metric report." into pi-dev
am: 76cb7fe2f6

Change-Id: I4bb331330c505396427bb72ff7b69c2b6653ba97
2018-05-21 12:01:32 -07:00
Mickey Keeley
1d4fe4323c Merge "BootParameters: Support silent boot." 2018-05-21 16:18:58 +00:00
Jaewan Kim
21c23e30b4 Differentiate MediaController in a process for MediaSession
MediaSession#getCurrentControllerInfo() can have more fine grained
differentiation for multiple MediaController in a package/process

Bug: 79728675
Test: Run CtsMediaTestCases
Change-Id: I81e94736e795ee5e7fbd28cb6cd834cc3a3b8f98
2018-05-19 08:36:51 +09:00
Mickey Keeley
47d2c027db BootParameters: Support silent boot.
* If it's a silent boot, call boot_action_silent_boot from lib.
* Otherwise, boot normally (e.g. with callbacks).

Bug: 78525346
Test: Master (sdk_google_iot_x86) builds and validated on oc-mr1-iot-dev,
* With no boot parameters, the boot is not silent,
* With normal parameters, the boot is not silent.
* With silent parameters, the boot is silent.
* With test bootactions lib, verify lib is loaded and non-silent boot
follows expected sequence and a silent boot calls
boot_action_silent_boot.

In all cases above, sample parameters are preserved.

Change-Id: I74bc9b5262fc4a181339da50726b415c3e4d3398
2018-05-18 12:37:50 -07:00
Yangster-mac
1c58f04cd3 Add a field in config to disable/enable the string hashing in metric report.
Statsd hashes (using its own hashing function) raw strings to reduce the
upload data size when there are duplicate strings in the report. And in cloud,
the clearcut translator would backfill the strings.

In a few droidfood users, we find the translator was unable to do that. While
debugging the root cause, we first decided to provide an option to disable
the hashing from the cloud.

Test: statsd unit test, CTS test, tested manually

BUG: b/79943763
Change-Id: If0359c8cf3f3cf83a2938db9ebf95ea7906f0b0c
2018-05-18 10:39:50 -07:00
Chenjie Yu
cded731bcc Merge "ValueMetric pushed events should check condition" into pi-dev am: 644c94f125
am: dcc56f980a

Change-Id: I96f45a327004da4f476c0cb017e532c28a5b4a6d
2018-05-17 16:01:25 -07:00
Chenjie Yu
dcc56f980a Merge "ValueMetric pushed events should check condition" into pi-dev
am: 644c94f125

Change-Id: Ib8555c0664bceee108dc4f93bbeaaa9a146ef00a
2018-05-17 15:53:17 -07:00
Chenjie Yu
021e25307d ValueMetric pushed events should check condition
+ fix unit test flakiness

Bug: 79873404
Change-Id: I15b52a79b18c05603640781e4450e7b62fac24ba
Fix: 79873404
Test: unit test
2018-05-16 14:50:11 -07:00
Andreas Gampe
48f98323ce Statsd: Add perfprofd call
Add the binder call to perfprofd to start profiling.

Bug: 73175642
Test: mmma frameworks/base/cmds/statsd
Change-Id: Iebe457a5fd2f42ed86fbb5cd075bea32965234d1
2018-05-16 09:21:17 -07:00