244 Commits

Author SHA1 Message Date
Petr Cermak
10011fa917 Replace smart reply boolean setting with key-value list
This patch replaces the recently introduced
Settings.Global.ENABLE_SMART_REPLIES_IN_NOTIFICATIONS boolean setting
with a new Settings.Global.SMART_REPLIES_IN_NOTIFICATIONS_FLAGS
key-value list.

Rationale: This will allow us to add and tweak smart reply parameters
without polluting the global settings namespace.

Bug: 67765414
Test: atest SmartReplyConstantsTest
Change-Id: I284bb6b31618a234c4772d16ad6190a713035f1b
2018-02-12 09:40:37 +00:00
TreeHugger Robot
9936ce8245 Merge "Atom: CallStateChanged" 2018-02-09 07:32:21 +00:00
TreeHugger Robot
09726a5d9d Merge "Added display name to DisplayInfo proto" 2018-02-09 06:16:25 +00:00
Andrii Kulian
764e104e28 Added display name to DisplayInfo proto
Bug: 72048469
Test: ActivityManagerMultiDisplayTests
Change-Id: Ied6ed9ce26c8ea8fc49c645ecb86dc455255f947
2018-02-08 15:12:14 -08:00
Kweku Adams
30c1ce2e57 Removing EXPLICIT tag from shared uid name.
It's a value that's hard-coded in apps' AndroidManifest.xml files.

Test: flash device
Change-Id: Iab28371408caf40bc9e9798bac8aff9551a1c07f
2018-02-07 15:35:44 -08:00
TreeHugger Robot
e6bb3818ed Merge "Removing some powermanager proto fields." 2018-02-07 21:53:22 +00:00
TreeHugger Robot
764db50773 Merge "Removing allow_while_idle_min_duration_ms." 2018-02-07 21:53:22 +00:00
Tej Singh
c477d9c001 Atom: CallStateChanged
Adds CallStateChanged atom, including the state and disconnect cause
(when the state is disconnected). Makes the constants in CallState.java
(in packages/services) and DisconnectCause.java reference the proto
enum.

Test: atest TelecomUnitTests, verified events were received in adb logcat -b stats
Change-Id: I5c4d91387259fc7349e17551962cb490f5ed9f36
2018-02-07 04:21:59 +00:00
Kweku Adams
6f55275c87 Removing allow_while_idle_min_duration_ms.
The value was removed from AlarmManagerService in http://ag/3486273.
The CTS test is already broken. I will update it outside of this topic.

Test: flash device and check incident.proto output
Change-Id: Ic3781a14bf14a70d5f7b2c615d7e762278e875b7
2018-02-06 16:04:14 -08:00
Kweku Adams
31f945cc6d Removing some powermanager proto fields.
The fields were removed from PowerManagerService in http://ag/3464790.
The CTS test is already broken at this point. I'll update them outside
of this topic.

Bug: 72660343
Test: flash device and check incident.proto output
Change-Id: Ia2c5872d7ddc70b4e021ff45db3a5a6754c57d31
2018-02-06 15:02:10 -08:00
TreeHugger Robot
bfd1f0c209 Merge "Add privacy tags to print dumping" 2018-02-06 20:29:23 +00:00
TreeHugger Robot
4d5d8dfac8 Merge "Revert "Nuke WindowState#mShownPosition. Rework mXOffset/mYOffset."" 2018-02-06 19:45:37 +00:00
Philip P. Moltmann
e26406bc52 Add privacy tags to print dumping
Test: incident_report print, dumpsys print
Change-Id: I96384c2540727b4e9853a4854107600605de3d74
2018-02-06 09:06:26 -08:00
Rob Carr
06be6bb516 Revert "Nuke WindowState#mShownPosition. Rework mXOffset/mYOffset."
This reverts commit 4ec0def38859d0e5b2457726e67653246903fe84.

Bug: 72953007
Change-Id: I2eaea957d07e9401016419e4e895a99978e7570f
2018-02-06 16:26:06 +00:00
Ricky Wai
066b551e89 Merge "Generate network watchlist report as proto" 2018-02-05 14:09:59 +00:00
Philip P. Moltmann
371a3b879b Dump usb as DualDump
This allows to dump the USB state as proto-buf. This in turn allows to
automatically process this data.

Test: adb shell dumpsys usb
      incident_report usb
      No automated test possible as no field is guaranteed to be set
Change-Id: Ifdf22bfaf9c78226c420b11c43278013ce69f849
2018-02-02 16:40:26 -08:00
Makoto Onuki
a938cfa7a4 Merge "While-idle alarm timeout & EBS" 2018-02-02 23:42:56 +00:00
Rob Carr
b7e75df7d3 Merge "Nuke WindowState#mShownPosition. Rework mXOffset/mYOffset." 2018-02-02 20:04:16 +00:00
Ricky Wai
d89243bf54 Generate network watchlist report as proto
Bug: 63908748
Test: runtest frameworks-services -p com.android.server.net.watchlist
Change-Id: I814abeb7700dd4fb0b74ee1fc95bac32718db739
2018-02-02 15:43:16 +00:00
Joe LaPenna
250d784923 Always show wifi wake setting.
Remove WIFI_WAKEUP_AVAILABLE config setting its available by default.
Remove check for NETWORK_RECOMMENDATIONS_ENABLED, the feature no longer
uses the recommender.

Test: make RunSettingsRoboTests RunSettingsLibRoboTests;
Test: atest SettingsBackupTest; manual/exploratory
Bug: 69624403
Bug: 67952636
Change-Id: I9e287b79d0da01bab00ed81295dcc1f266ca0851
2018-02-01 16:08:32 -08:00
Robert Carr
4ec0def388 Nuke WindowState#mShownPosition. Rework mXOffset/mYOffset.
Ignoring Wallpaper Offsets, the WindowStateAnimator is now
always positioned at (0,0), so we don't need to calculate or store this. For
Wallpaper Offsets we can manipulate the position of the WindowStateAnimator surface
directly. This seems to be a nice level to model the concept of scrolling a buffer
larger than the "Window" to which it is assigned.
Everything on top of WSA can ignore the offsets by only interacting with the WS and above.

Test: Manual. go/wm-smoke
Change-Id: I631ad97bb07b092e795c9530ca34139ccc3e0af7
2018-02-01 15:27:28 -08:00
Makoto Onuki
adb50d8c50 While-idle alarm timeout & EBS
Use the long whileidle timeout for apps in the background.

Test: Manual test with a test app (I9d0c0ed4b6a0)
Test: atest $ANDROID_BUILD_TOP/frameworks/base/services/tests/servicestests/src/com/android/server/ForceAppStandbyTrackerTest.java
Test: atest $ANDROID_BUILD_TOP/cts/tests/tests/batterysaving/src/android/os/cts/batterysaving/BatterySaverAlarmTest.java
Bug: 72124522
Change-Id: Ibd0a46e573604f7f2d1ec51a60ea87c163233003
2018-01-31 15:28:59 -08:00
TreeHugger Robot
df8ec9fc71 Merge "Modify SystemApi so it can be used by CTS to trigger incident report" 2018-01-30 21:57:33 +00:00
TreeHugger Robot
56ab48a8c7 Merge "Adding privacy tags to last few protos." 2018-01-30 20:32:46 +00:00
Yi Jin
3ec5cc792e Modify SystemApi so it can be used by CTS to trigger incident report
Bug: 72502621
Test: Cts/Gts tests covered, see the cls from the same topic
Change-Id: Id0c1cc0fc0054e620de1349dab66513e554b1caa
2018-01-29 21:01:09 -08:00
TreeHugger Robot
6fa646ab95 Merge "Reduce pss collection amount, improve logging." 2018-01-29 16:52:08 +00:00
Kweku Adams
5dd532315e Adding privacy tags to last few protos.
I left out the protos that aren't officially used in incident.proto in any way.
The notification captions are set in NotificationManagerService and
ConditionProviders. They're not set by the app at all.

Bug: 72393215
Test: flash device and check incident.proto output
Change-Id: I4b36e066740fa1e6755eb946e2bcfa4959d9f9db
2018-01-29 16:08:59 +00:00
TreeHugger Robot
4470d5eadb Merge "Clean up the procstats dump enums and change component to use message." 2018-01-27 02:33:21 +00:00
TreeHugger Robot
ce01bd906e Merge "Proto enums for DeviceIdleMode" 2018-01-27 01:18:20 +00:00
TreeHugger Robot
4c32982039 Merge "Adding privacy tags for ps dump." 2018-01-27 00:01:42 +00:00
Dianne Hackborn
e17b445b6c Reduce pss collection amount, improve logging.
Tuned rates that we collect PSS, to reduce how much we do
that heavy operation.  Added a new way to determine
whether a process has changed to a state for the
"first" time -- now this is when it has gone to that
state for the first time since it was in a lower state.
This will reduce the amount of time we consider a
process to be first to only when it has previously
gone into a higher state than it had before.

Keep track of more fine-grained information about why we
collect a PSS sample (not just internal, but for a single
process, all processes because of a mem state change, all
processes because of a poll).

Started collecting RSS in various places, so we can start
looking at that w.r.t. PSS and see about transitioning to
it is a new primary metric.

Added logging for many of the places where the system
writes its configuration files, so we can more easily
see any bad behavior going on in those areas.

Added some currently disabled code to read smaps directly
instead of using fgets().  Probably won't help, but want
tot test.

Bug: 70859548
Test: atest CtsAppTestCases
Change-Id: I400dba0f3ae9c024df51c946cfa592561028b598
2018-01-26 15:15:04 -08:00
TreeHugger Robot
d2e162890e Merge "Proto enum reference for App Transitions" 2018-01-26 22:12:26 +00:00
TreeHugger Robot
c110e17bef Merge "incidentd: Adding privacy tag and expanding field." 2018-01-26 22:07:21 +00:00
Bookatz
8bdae8d682 Proto enums for DeviceIdleMode
Created an enums.proto that contains the device idle modes,
which is referenced by batterystats.

Note that, currently, batterystats is the origin of these
constants in the java code, and I have kept that as is.
Thus, batterystats references the enum.
Nevertheless, because the actual control of device idle
mode is DeviceIdleController.java, where these constants
will likely one day be moved, I have put the constants
in server/enums.proto (since DeviceIdleController is
in server, not os like BatteryStats).

Bug: 69478930
Test: cts-tradefed run cts-dev -m CtsStatsdHostTestCases -t android.cts.statsd.HostAtomTests#testDeviceIdleModeStateChangedAtom
Change-Id: I6e66801ae8256aab423067f9a4b852a194564a8d
2018-01-26 17:26:20 +00:00
Makoto Onuki
83f489b583 Merge "Do not throttle EXEMPT apps on battery saver" 2018-01-26 16:43:08 +00:00
TreeHugger Robot
9af69e9832 Merge "Adding privacy tags to Settings proto." 2018-01-26 16:40:11 +00:00
TreeHugger Robot
b0db811fe9 Merge "Statsd and frameworks reference proto enums" 2018-01-26 05:02:35 +00:00
TreeHugger Robot
f4c5faf932 Merge "Adding privacy tags to alarmmanager protos." 2018-01-26 02:21:15 +00:00
Yi Jin
676d1ace1c Clean up the procstats dump enums and change component to use message.
Bug: 72415114
Test: manually flashed and run: dumpsys procstats --proto
Change-Id: Iea47fa41c04c3c6e8335e040086a0b5d65c22aaf
2018-01-25 17:56:06 -08:00
Bookatz
80d11a00eb Proto enum reference for App Transitions
App transitions, from ActivityManagerInternal, are now referenced via a
proto enum. This is also referenced by statsd's atoms.proto.

Bug: 69478930
Test: still compiles
Change-Id: Ifb5cb0120d4cd4e2464ce3b5a7455842cb55259c
2018-01-25 17:12:31 -08:00
TreeHugger Robot
ada267a31f Merge "Add more privacy tags and disable procrank util figure out permission to run the command" 2018-01-26 00:54:34 +00:00
Kweku Adams
284c5c8f25 Adding privacy tags for ps dump.
Bug: 72393215
Test: android builds
Change-Id: I72a1793363b63c637793bade5d3d378aea11b9d8
2018-01-25 16:51:02 -08:00
TreeHugger Robot
5a0515b325 Merge "Adding privacy tags to JobScheduler and co." 2018-01-26 00:09:14 +00:00
Kweku Adams
ce9ab2d9e1 Adding privacy tags to alarmmanager protos.
Bug: 72393215
Test: Flash device and check incident.proto output
Change-Id: Ibd28a52621ce3c8e1ba447356522772aa04baa3b
2018-01-25 15:52:15 -08:00
Bookatz
1a1b0464cb Statsd and frameworks reference proto enums
For frameworks constants that don't have intrinsic meaning (i.e. their actual
value and order don't matter), so that it is unlikely that their values
will be changed:
This cl introduces proto enums representing some constants found in
the Android codebase, and connects the two.

By using the Proto enum as the source-of-truth, it means that Java and
proto can be kept in sync. Otherwise, when the Java frameworks code
changes, it silently breaks the protos from working properly, since the enums
are wrong. By having the Java code reference the proto enums, it ensures
that everything is in sync. The values of the constants are unchanged.
But future changes to these constants will need to be done in the proto
file, which the Java file merely references.

The protos are necessary for incidentd and statsd and, in the future,
possibly dumpsys. In this way, the logging mechanism is much less likely
to get broken when new constants are added, and we can be ensured that
the logging accurately reflects the underlying codebase.

Bug: 69478930
Test: cts-tradefed run cts-dev -m CtsStatsdHostTestCases
Test: cts-tradefed run cts-dev -m CtsIncidentHostTestCases
Change-Id: If79032c34b2799db1e3e70cb47b1312fd72092b9
2018-01-25 15:47:57 -08:00
Kweku Adams
9954633827 incidentd: Adding privacy tag and expanding field.
Also updating priority category enum to note new values.
Bug: 65750824
Bug: 72393215
Test: flash device and check incident.proto output

Change-Id: I0c764cd4bb258160aa7140e60e81f76f84cc28ce
2018-01-25 14:59:02 -08:00
Makoto Onuki
eb898f1b8a Do not throttle EXEMPT apps on battery saver
- Also keep track of # of callback calls and their duration and print them in
dumpsys. Example:

  Stats:
    UID_STATE_CHANGED: count=141, total=31.9ms, avg=0.226ms
    RUN_ANY_CHANGED: count=0, total=0.0ms, avg=0.000ms
    ALL_UNWHITELISTED: count=0, total=0.0ms, avg=0.000ms
    ALL_WHITELIST_CHANGED: count=0, total=0.0ms, avg=0.000ms
    TEMP_WHITELIST_CHANGED: count=28, total=14.9ms, avg=0.532ms
    EXEMPT_CHANGED: count=2, total=4.7ms, avg=2.370ms
    FORCE_ALL_CHANGED: count=6, total=1.1ms, avg=0.178ms
    FORCE_APP_STANDBY_FEATURE_FLAG_CHANGED: count=0, total=0.0ms, avg=0.000ms

Bug: 70565111
Test: atest $ANDROID_BUILD_TOP/frameworks/base/services/tests/servicestests/src/com/android/server/ForceAppStandbyTrackerTest.java
Test: atest CtsBatterySavingTestCases
Test: atest CtsJobSchedulerTestCases
Test: atest CtsAlarmManagerTestCases

Change-Id: Ie4983456dd60f7115a15ee25a8d1bf5c078dac74
2018-01-25 14:54:14 -08:00
Yi Jin
69040223a9 Add more privacy tags and disable procrank util figure out permission to
run the command

Test: manually flushed to device and run
out/host/linux-x86/bin/incident_report -w -p <A/E/L> <section>

Change-Id: I7c1b6bc03a26de95cb2397d8d653b3b9b3c0e103
2018-01-25 14:38:10 -08:00
TreeHugger Robot
b93b797199 Merge "Update to the ActivityManager proto" 2018-01-25 22:21:30 +00:00
Kweku Adams
02c8b1d908 Adding privacy tags to Settings proto.
Bug: 72393215
Test: flash device and check incident.proto output
Change-Id: If2e49c6448e54223462bb81cc491bb356073fcc6
2018-01-25 11:40:26 -08:00