Commit Graph

101 Commits

Author SHA1 Message Date
Adrian Roos
bad8de914a WM: Add debug information proto definition from other branch
To make sure that the proto definitions stay in sync across branches,
we merge them to master even though the logic for this does not exist
here.

Bug: 111062294
Test: make droid
Change-Id: I2521cfde6cdc04644666eff753226d6d008d378f
2018-07-09 12:08:31 +00:00
Kevin Chyn
a56dff7339 6/n: Have FaceService extend BiometricService
In the Service layer, this change is pretty much the same as ag/4340638.
FingerprintService already extends BiometricService which contains all
of the common code. FaceService now does the same after this change.

Updated the Manager layer to use the infrastructure added in P, namely
  - Private APIs for BiometricPrompt
  - Removed FaceManager#CryptoObject, use biometrics/CryptoObject directly
  - Few other BiometricAuthenticator things

Bug: 110387294

Test: enrolling FP still works
Test: removing FP still works
Test: changing FP name persists across reboots
Test: enumerating still works (extra framework fp, extra hw fp)
Test: keyguard still receives lockout reset callbacks

Change-Id: I2195b08e28d024a120df56fe87b0dd4f9b96505a
2018-06-27 11:31:03 -07:00
Kevin Chyn
95d628ef86 1/n: Move fingerprint-service related code to biometrics/fingerprint
Bug: 109900227

Test: builds
Change-Id: I973c816d75c48ed838c1638c45d728b9df4d11ef
2018-06-19 16:09:06 -07:00
TreeHugger Robot
9d19487b1c Merge "Added TestApi to ActivityInfo.isTranslucentOrFloating" into pi-dev 2018-05-26 02:23:25 +00:00
Wale Ogunwale
30eab1f430 Added TestApi to ActivityInfo.isTranslucentOrFloating
This would be use to determine the right activity state during CTS
test for products that have windowSwipeToDismiss set.

Also, dump ActivityRecord.fullscreen to proto for the same reason.

Bug: 76207986
Bug: 79167358
Test: atest CtsActivityManagerDeviceTestCases:ActivityLifecycleTests
Test: atest CtsActivityManagerDeviceTestCases:ActivityManagerAssistantStackTests
Change-Id: Iadc088e9129be088b8a083ebbafd8d20fe26b673
2018-05-25 10:24:14 -07:00
Suprabh Shukla
5bf4981e8b Only user whitelist gets allow_while_idle_unrestricted
Due to earlier refactorings, now allow-in-power-save-except-idle apps
are getting the flag ALLOW_WHILE_IDLE_UNRESTRICTED, which should not
happen. Restricting to user whitelisted app ids as was the case in O.

Test: atest com.android.server.AppStateTrackerTest
atest android.alarmmanager.cts.AppStandbyTests
Also, manually,
adb shell cmd deviceidle whitelist +<package-name>
Then verify the app id appears in App state tracker dump in
adb shell dumpsys alarm

Bug: 74773710
Change-Id: I6fdce33446e1374c6672ce98769aa8b5844effa9
2018-05-25 03:13:37 +00:00
Makoto Onuki
0525b98b3a Show "in parole?" in dumpsys jobscheduler
Bug: 77225434
Test: dumpsys jobscheduler  / incident_report  jobscheduler

Change-Id: I09fb2ca5702b81910b8361d395a94a4d5a6f80c9
2018-05-02 15:40:42 -07:00
Kweku Adams
21b8d26084 Cleaning up frameworks protos.
Note: It is currently only safe to renumber the fields because we have
not started using them yet.

* animationadapter: added in http://ag/3709688, but was not following
the indentation policy or the unit naming policy. The durations that
have documentation in
frameworks/base/services/core/java/com/android/server/wm/ state that
they're in milliseconds. These durations didn't have documentation, but
I'm assuming they're in the same units.
* batterystats: was not following the indentation policy
* jobscheduler: AppIdleController was removed in http://ag/3699210 and
the proto was only partially updated
* powermanagerservice: BatterySaverStateMachineProto added in
http://ag/3763026 but was not privacy tagged and the indentation was off
* surfaceanimator: was not following the indentation policy
* remote_animation_target: was not following the indentation policy
* others: weren't following the indentation policy

Bug: 74975371
Test: flash device and run 'test CtsIncidentHostTestCases'
Change-Id: Id012f4690b1d58816fef096523e1a0ea2bccadb0
2018-04-11 16:55:33 -07:00
Winson Chung
82267ce197 Prevent extraneous saving of pinned snap fraction.
- When the PIP is dismissed offscreen, the pinned stack can receive
  onConfigurationChanged (when its windowing mode is set back to
  fullscreen) after the stack is hidden.  In this case, the saved snap
  fraction will be incorrect leading to a wrong animation on the next
  PiP animation. We don't expect the snap fraction to be saved in this
  case since the user is not expanding the PiP.
- Also add the animating-bounds state to the proto for use in the cts
  tests.

Bug: 73775460
Test: atest CtsActivityManagerDeviceTestCases:ActivityManagerPinnedStackTests
Change-Id: I30398ecf11de045d11a95282b8203e4d2d344ae9
2018-04-06 18:35:22 -07:00
Yi Jin
e5e2a75e8e Add more privacy tags.
Bug: 74837756
Test: manual
Change-Id: I8993ae736df171f379aa6e24e865a6fbace9d091
2018-03-29 20:35:17 +00:00
Jorim Jaggi
13c4b14e92 Merge "Add different animation for transitions with translucent apps" into pi-dev 2018-03-28 19:09:08 +00:00
Jorim Jaggi
98a9d206be Add different animation for transitions with translucent apps
None of the existing animation really work with transitions in
which a translucent app is appearing/disappearing. Add a separate
animation for that and change all existing transitions to these
new transition types in case we detect that only translucent
activities are appearing/disappearing.

Test: Sharesheet animations
Test: go/wm-smoke
Change-Id: Iffe57b7664dddf647d723c91d115ade60c12ad33
Fixes: 37953606
Fixes: 70730519
Fixes: 72649981
Fixes: 72686618
2018-03-28 16:46:41 +02:00
TreeHugger Robot
788e74a613 Merge "Marking ClipData as LOCAL and adding comment in jobscheduler proto." into pi-dev 2018-03-27 23:17:31 +00:00
TreeHugger Robot
6e2ef53a72 Merge "Fix privacy tags based on go/irpf." into pi-dev 2018-03-27 05:35:25 +00:00
Makoto Onuki
a3cd7b9d53 Sticky battery saver
- When battery saver is enabled manually (i.e. via PM.setPowerSaveMode()),
it'll stick, and we'll re-enable battery saver even after a reboot
or a charge.

- Extracted all battery saver state transition logic into a separate
class.

Fix: 75033216
Bug: 74120126
Test: Manual test with "dumpsys battery set ...."
Test: atest $ANDROID_BUILD_TOP/frameworks/base/services/tests/servicestests/src/com/android/server/power/batterysaver/BatterySaverStateMachineTest.java
Change-Id: If020cd48f341b339783fe09dd35bc7199e737a52
Test: dumpsys power
Test: incident_report power
Test: atest CtsBatterySavingTestCases
2018-03-26 10:27:56 -07:00
Yi Jin
2921dd0f87 Fix privacy tags based on go/irpf.
Bug: 74837756
Test: manual
Change-Id: I1619a967e9f8c9d7f16ba8fbbafe1ac2009051c7
2018-03-23 14:10:31 -07:00
Kweku Adams
cb89f62ef8 Marking ClipData as LOCAL and adding comment in jobscheduler proto.
Bug: 74837756
Bug: 74975371
Test: N/A
Change-Id: I099343f933ae091a52ecb9fc780baa981d1ef677
2018-03-22 13:55:46 -07:00
TreeHugger Robot
dcccfd9742 Merge "ScheduledJobStateChanged: add stop reason" into pi-dev 2018-03-22 01:30:52 +00:00
Yi Jin
6c6e9cab42 Remove am/wm.proto which is redundant. The naming convention is defined
in core/proto/README.md

Bug: 72474563
Test: make sure the Android build
Change-Id: I2a90cbb6bb0b0c62fe4a0b81cb5bb3ea36381871
2018-03-20 17:39:32 -07:00
Tej Singh
33a412b52d ScheduledJobStateChanged: add stop reason
Adds stop reason to scheduled job state changed

Bug: b/71755130
Test: cts-tradefed run cts-dev -m CtsStatsdHostTestCases -t android.cts.statsd.atom.UidAtomTests#testScheduledJobState
Test: cts-tradefed run cts-dev -m CtsIncidentHostTestCases -t com.android.server.cts.JobSchedulerIncidentTest
Change-Id: Ic29a5e9160ac258140a52d31bc6210300949545d
2018-03-20 11:20:58 -07:00
Yi Jin
83fb1d58b5 Fix the test failure of LogSection, don't consider read log msg error as
a failure since it is used to signal EOF.

Additionally tag this message as auto so user_id won't become explicit.

Bug: 75017304
Test: atest incidentd_test
Change-Id: I151bab5a72a532e7c9f54ae0686561001730bdeb
2018-03-16 16:03:18 -07:00
Yi Jin
163967fe8e Fix privacy tags based on PWG review meeting.
1. Remove unnecessary hex_hashs.
2. Make intent extras LOCAL
3. Make mnc EXPLICIT
4. Make diskstats error AUTO since it is only IOException.

It is safe to modify proto numbers since they are not used yet.

Bug: 74837756
Test: flash the changes and call incident -d, also updated go/irpf
Change-Id: Idee0e927515e737c9a42a1dc29cb3c05e6d91ca9
2018-03-15 18:31:36 -07:00
Kweku Adams
5b0623a180 Making wakelock tag in PowerManager dump AUTO.
Bug: 74837756
Test: N/A
Change-Id: If9b982c35eee8f2643e2bc2e2f5dbd1a0e00de12
2018-03-14 17:12:06 -07:00
Jorim Jaggi
f75d161dd8 Improve animation dump/logging
Bug: 74220420
Test: go/wm-smoke
Test: adb shell dumpsys window during animation
Change-Id: Ib8bddb4f38ad4fe7a80315d3bfdac0a80aea4cc8
2018-03-13 14:06:08 +01:00
TreeHugger Robot
a71712dfa8 Merge "Avoid changing display power state on draw wake lock" into pi-dev 2018-03-12 17:58:55 +00:00
Christopher Tate
20afddd2ed Jobs in 'active' apps are not subject to standby
Along the way we turn down the "app idle" tracking in the
jbo scheduler: it's now redundant with standby bookkeeping,
and was muddying the waters.

Bug: 74017233
Test: atest CtsJobSchedulerTestCases
Change-Id: I3220e6ef97f153b3f718e267a0dc4fbd3b926316
2018-03-07 13:53:39 -08:00
Ivan Podogov
56bc6d0a47 Avoid changing display power state on draw wake lock
When Sidekick is controlling the display, any draw wake lock can cause a
sequence of endDisplayControl/setDisplayPowerState/beginDisplayControl
twice, because of DOZE_SUSPEND -> DOZE -> DOZE_SUSPEND transitions.
We can avoid that by telling power manager that display is controlled by
Sidekick, and draw wake locks shouldn't change the display power state.

Bug: 70574675
Test: build, flash Sardine, run Stopwatch, observe logcat
Change-Id: Ie4dac76606e45f0d3b62bc5890841f4f24d454d7
2018-03-07 18:02:55 +00:00
TreeHugger Robot
7d55509c19 Merge "Modifying proto csv output to include privacy levels." 2018-03-03 00:02:52 +00:00
TreeHugger Robot
8006a272da Merge changes I5c2facba,I2fecbeaa,I045ddf19,I961d190d
* changes:
  Move frame validation logic for deferTransactionUntil.
  Handle surfaceInset changes with deferred transactions.
  Various pinned animation bug fixes.
  Nuke WindowState#mShownPosition. Rework mXOffset/mYOffset.
2018-03-01 02:06:40 +00:00
Robert Carr
217e7cc221 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.
Seamless rotation may mess with the position so we need to be sure to reset it to 0,0.

Test: Manual. go/wm-smoke
Bug: 72038766
Change-Id: I961d190d1f1ee71faaede095617092a0ad32e16f
2018-02-28 11:41:21 -08:00
Yi Jin
2b30f32212 Rename dumpsys protos to make platform proto names consistent.
All the other dumpsys use XXXServiceDumpProto or XXXDumpProto other
than ones modified here.

The name convention is if the proto describes the top level output of dumpsys,
it should contain `Dump`. This makes the consumer easy to understand the proto
is from dumpsys of a certain service, not data structure of
the service, e.g. WindowManagerServiceProto ->
WindowManagerServiceDumpProto.

Another change here is ActivityManagerService has 4 sub dump protos, so
the top level for each one should be a DumpProto instead of its internal
data struture, e.g. ActivityStackSupervisorProto will just be a field of
AmServiceDumpActivitiesProto, which `dumpsys --proto activities` used to
output ActivityStackSupervisorProto directly.

Bug: 72474563
Test: manual and CTS tests
Change-Id: I1e1ac032d27591083bb5b1b19aac82804215472a
2018-02-28 10:31:54 -08:00
Winson Chung
a29de13cee Merge "1/ Fixing docked task animation when entering split screen from home" 2018-02-28 03:30:31 +00:00
Winson Chung
c1674270b5 1/ Fixing docked task animation when entering split screen from home
- Update the minimized state when docking an app from home to ensure that
  the animation of the docked task goes to the right bounds
- Temporarily block the invocation of the old recents activity when showing
  recents as a part of setting the windowing mode of another task (this is
  fine right now because quickstep only allows docking via the UI and not
  from the nav bar while another task is open).
- Add proto field so we can determine whether to check the recents activity
  from the split screen CTS tests
- Also fix issue with invisible docked task due to wrong bounds calculated
  due to launcher not notifying the divider of the first docked frame

Bug: 73118672
Test: go/wm-smoke
Test: atest CtsActivityManagerDeviceTestCases:ActivityManagerSplitScreenTests
Test: atest CtsActivityManagerDeviceTestCases:ActivityManagerTransitionSelectionTests

Change-Id: Ib1208501c311de009a9e706103134865c521cb63
2018-02-27 16:49:30 -08:00
Chris Tate
67aef39ea2 Merge "Deal with alarm times near MAX_VALUE" 2018-02-27 19:02:06 +00:00
Christopher Tate
22e919d346 Deal with alarm times near MAX_VALUE
Avoid overflow across the end of time when calculating window endpoints, and
clamp recurrence periods at something workable but too long to be plausible.

Bug: 70536740
Bug: 72658919
Test: manual
Test: atest CtsAppTestCases:AlarmManagerTest

Change-Id: Icb7a571802b722499df09833522d1d3f28607621
2018-02-26 13:31:55 -08:00
Makoto Onuki
b5d5e973a9 Print heartbeat information in job dumpsys
Sample:
=======================
  Heartbeat:
    Current:    1
    Next
      ACTIVE:   0
      WORKING:  11
      FREQUENT: 43
      RARE:     130
    Last heartbeat: -1m21s575ms
    Next heartbeat: +9m38s425ms

Started users: [0, 10]
Registered 82 jobs:
  JOB #1000/800: 341134 android/com.android.server.pm.BackgroundDexOptService
       :
    Last run heartbeat: 1
    Ready: false (job=false user=true !pending=true !active=true !backingup=true comp=true)
=======================

Also:
=======================
    current_heartbeat=1
    next_heartbeat=[
      0
      11
      43
      130
    ]
    last_heartbeat_time=30828
    next_heartbeat_time=690828
  :
        last_run_heartbeat=1
=======================

Test: boot
Test: dumpsys jobscheduler
Test: incident_report jobscheduler
Change-Id: I2bf5d6e4189d3938e04a4790a6b1d55fb44f68e3
2018-02-23 16:48:00 -08:00
Kweku Adams
ecf4bdb447 Modifying proto csv output to include privacy levels.
Bug: 73775471
Test: use new output in go/irpf
Change-Id: Ib9e836e350f8d664ef66ecfe2539d15d164953be
2018-02-22 17:48:23 -08:00
Jeff Sharkey
ac2e8efa43 Knobs for connectivity experiments.
We keep the sane default values of 50% through a job window for
delaying on congested networks and promoting prefetch jobs, but now
allow experiments to override these values.

There's only ever one of each controller, so just create it tied to
the JobSchedulerService that owns it.  (People that need hooks for
testing can provide a mock JSS, instead of doing extra constructor
overloads.)

Use IndentingPrintWriter for dumping constants.

Test: bit FrameworksServicesTests:com.android.server.job.
Bug: 72353440, 73019091
Change-Id: Icdb40ee3b0bb22a20ed821888b42b87f33eb49ec
2018-02-22 16:33:30 -07: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
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
4d5d8dfac8 Merge "Revert "Nuke WindowState#mShownPosition. Rework mXOffset/mYOffset."" 2018-02-06 19:45:37 +00:00
Rob Carr
06be6bb516 Revert "Nuke WindowState#mShownPosition. Rework mXOffset/mYOffset."
This reverts commit 4ec0def388.

Bug: 72953007
Change-Id: I2eaea957d07e9401016419e4e895a99978e7570f
2018-02-06 16:26:06 +00:00
Makoto Onuki
a938cfa7a4 Merge "While-idle alarm timeout & EBS" 2018-02-02 23:42:56 +00: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
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
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