437 Commits

Author SHA1 Message Date
TreeHugger Robot
b29199a6c1 Merge "Refine procstats metric protos." 2018-09-07 05:21:00 +00:00
Yangster-mac
bac8232377 Refine procstats metric protos.
Test: statsd tests.
BUG: b/113075414

Change-Id: Ifaff592a01f3bf33854033419e72949a8aa0717f
2018-09-06 18:40:52 -07:00
chaviw
9c81e63d20 Move WS insets into WindowFrames
Moved inset values and calculations into WindowFrames. Also used
InsetUtils helper method to calculate inset diffs.

Test: go/winscope
Bug: 111359087
Change-Id: I90d1bd1faa36a08d5c4d7d93bbaae09a244e8ac1
2018-09-05 14:14:39 -07:00
Vishnu Nair
ddd8074f12 WM: Consolidate seamless rotation logic
Replaces existing seamless rotation logic with the new forced seamless
rotator.

Bug: b/110763772, b/111504081

Test: go/wm-smoke
Test: atest FrameworksServicesTests:com.android.server.wm.WindowStateTests
Test: Build winscope with new proto changes, open new and old traces and verify data can be read correctly

Change-Id: I818d4ce66d8ff3ed268b5d43c6012398672bbfee
2018-08-21 14:12:46 -07:00
Kweku Adams
87c60a029c Updating incident protos.
Adding more comments and fixing some style issues.

Test: Android builds
Change-Id: I70f74c029cf0aed99aaf55b484729a2f3d289e94
2018-08-13 18:51:06 -07:00
Dianne Hackborn
eaed0ba69f Flesh out procstats protobufs to have ALL THE INFO!
This involved re-arranging some of the protobuf structs.
What is there now is kind-of awkward, but I didn't want to go
through and just completely change the whole thing.

Bug: 110957691
Test: atest CtsStatsdHostTestCases:ProcStatsValidationTests
Change-Id: I1d59c15c4d0f3dbdea2cf71307debfcafed7938a
2018-08-10 09:28:12 -07:00
Chavi Weingarten
baf5ff1310 Merge "Changed reserved proto values to deprecated." 2018-08-09 21:30:24 +00:00
chaviw
4eecaa13ad Changed reserved proto values to deprecated.
The reserved values prevent older protobuf files from getting parsed.
Instead deprecated unused proto values, but keep them around so winscope
can parse older protobuf dumps.

Test: winscope with protobuf file from older build
Fixes: 112389396
Change-Id: Id0b009044c1f312eca9b0d3d348543141b0cd2a9
2018-08-08 17:24:31 -07:00
Kweku Adams
ffc19c03a7 Updating WindowManager transition type enums.
A new value was added (26) and they were moved to WindowManager.java so
it makes sense to update the protos accordingly.

Bug: 112053626
Test: Android builds
Change-Id: Ia18287cc1d7cc77e132c24de7e79e65b412df763
2018-08-07 14:15:03 -07:00
Kweku Adams
ef0c08fe7e Fixing proto field name style.
Bug: 110957691
Test: Android builds
Change-Id: I9a7dbe3a6522b243cfd1df85eeae22395ff000ae
2018-08-01 11:55:07 -07:00
TreeHugger Robot
60538cce45 Merge "Add tracking of process run time." 2018-08-01 18:38:51 +00:00
TreeHugger Robot
5984e99a76 Merge "Updating NotificationManager enums." 2018-08-01 13:11:41 +00:00
Kweku Adams
16ed599550 Updating NotificationManager enums.
New constants were added in NotificationManager but the proto wasn't
updated. This updates the proto to include the new values.

Bug: 112050447
Test: N/A
Change-Id: I7fdb4fc4afd07302c68596d68c051d8feaf5ee6d
2018-07-31 16:07:06 -07:00
Dianne Hackborn
99aeba896e Add tracking of process run time.
To help identify processes RAM growth over time, we keep
keep track of the total time the current process has been
running and its RAM use during that time.  Then we can look
at how large processes are based on how long they have been
running for.

See "Cur time" here:

  * com.google.android.inputmethod.latin / u0a124 / v26731214:
      Process com.google.android.inputmethod.latin:train (unique, 6 entries):
        SOff/Norm/(Cch Emty): +1m4s338ms
              Mod/(Cch Emty): +15s977ms
              Low/    Imp Bg: +6s272ms
                     Service: +239ms
                  (Cch Emty): +2s874ms
             Crit/    Imp Bg: +1s52ms
                       TOTAL: +1m30s752ms
        PSS/USS (1 entries):
          SOff/Norm/(Cch Emty): 11MB-11MB-11MB/5.6MB-5.7MB-5.7MB/5.6MB-34MB-62MB over 2
        Cur time +30s214ms: 11MB-11MB-11MB/5.7MB-5.7MB-5.7MB/62MB-62MB-62MB over 1
      Process com.google.android.inputmethod.latin (unique, 6 entries):
        SOff/Norm/    Imp Bg: +2h22m18s830ms
              Mod/    Imp Bg: +15s977ms
              Low/    Imp Bg: +12s98ms
             Crit/    Imp Bg: +32s815ms
         SOn/Norm/    Imp Bg: +53m13s63ms
             Crit/    Imp Bg: +4s170ms
                       TOTAL: +3h16m36s953ms
        PSS/USS (3 entries):
          SOff/Norm/    Imp Bg: 27MB-31MB-34MB/21MB-27MB-30MB/21MB-33MB-88MB over 11
                Mod/    Imp Bg: 25MB-29MB-32MB/19MB-23MB-26MB/19MB-56MB-92MB over 2
           SOn/Norm/    Imp Bg: 34MB-34MB-34MB/30MB-31MB-31MB/30MB-61MB-91MB over 2
        Cur time +2m47s741ms: 27MB-28MB-28MB/21MB-21MB-21MB/21MB-54MB-88MB over 2

Bug: 110957691
Test: manual
Change-Id: I33b291555fd125b3791752cb10de48300bb21706
2018-07-31 14:45:11 -07:00
Beverly
91d0a63a58 Move some global settings to secure settings
The following Settings are being moved to Settings.Secure
from Settings.Global since they are settings that exist
per user
- CHARGING_SOUNDS_ENABLED
- CHARGING_VIBRATION_ENABLED
- ZEN_DURATION
- SHOW_ZEN_UPGRADE_NOTIFICATION
- SHOW_ZEN_SETTINGS_SUGGESTION
- ZEN_SETTINGS_UPDATE
- ZEN_SETTINGS_SUGGESTION_VIEWED
zen_duration used to be a global setting -> move it to
Settings.Secure since users can set different values

Fixes: 110926544
Test: make RunSettingsLibRoboTests -j40 ROBOTEST_FILTER=ZenDurationDialogTest
Test: manual upgrade
Change-Id: Ifa36affe3e52e67a54698a8cf2c3424343877179
2018-07-31 11:42:05 -04:00
Andrii Kulian
ab132eebaf Per-display resumed activities
Allow each display to have its own resumed activity. The focus is
defined by Z-order of displays reported from WindowManager.

Bug: 111541062
Test: ActivityManagerMultiDisplayTests
Change-Id: I347dcfcd1e34f4db985b7d9a649b0a1e6b730eee
2018-07-30 08:10:00 +08:00
Felipe Leme
68b2222546 Created new Settings preferences for internal autofill state.
Currently, these preferences can only be changed through 'cmd autofill', but
moving them to the Settings provider will let us manage them through the
Settings -> Developer Options screen:

- AUTOFILL_LOGGING_LEVEL
- AUTOFILL_MAX_PARTITIONS_SIZE
- AUTOFILL_MAX_VISIBLE_DATASETS

Test: manual verification
Test: atest CtsAutoFillServiceTestCases FrameworksCoreTests:SettingsBackupTest

Bug: 65700540

Change-Id: I6c864d032bc0b2c3b7c24f300af37883adbaf0d0
2018-07-26 09:18:47 -07:00
Chavi Weingarten
c29c4b8ecf Merge "Moved cutout info into WindowFrames" 2018-07-20 16:50:51 +00:00
chaviw
cdba9a44f8 Moved cutout info into WindowFrames
Test: go/wm-smoke
Bug: 111359087
Change-Id: I8c27f6323adcd7dbc2f8a247b57fff725e987a21
2018-07-19 17:01:34 -07:00
Chavi Weingarten
0afbfd1182 Merge "Move mFrame and mLastFrame from WindowState to WindowFrames" 2018-07-19 20:53:19 +00:00
Chavi Weingarten
9648b15877 Merge "Created WindowFrames class and moved data from PWM and WS" 2018-07-19 20:50:20 +00:00
chaviw
492139a70c Move mFrame and mLastFrame from WindowState to WindowFrames
Test: go/wm-smoke
Bug: 111359087
Change-Id: I10df265a5007a2f61d2b884668646abf4ebe7a74
2018-07-18 17:14:19 -07:00
chaviw
553b021cb9 Created WindowFrames class and moved data from PWM and WS
Moved frame data from PWM and WS into the WindowFrames class. Created a
WindowFrames object in both PWM and WS and converted usages of window
frame info to get data from the WindowFrames instance.

Data between PWM and WS is still separate and copied over when
requested.

Bug: 111359087
Test: go/wm-smoke
Change-Id: I95aa9f2f22557e96ad09f08b7fe6d6a2562399c4
2018-07-18 14:59:41 -07:00
wilsonshih
468b7c0152 Fix display id would be ignored if app been launched from pending activity queue.
For those app which might be launched from pending activity queue,
display id would be ignored since it doesn't set ActivityOptions for
ActivityStarter.startResolvedActivity.

Bug:110962502
Test: atest CtsActivityManagerDeviceTestCases

Change-Id: Id8fedca160f35ea3ab229f3382932494067bcde3
2018-07-10 14:53:17 +08:00
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
02bcebede4 Merge "6/n: Have FaceService extend BiometricService" 2018-06-27 22:09:01 +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
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
Gilad Bretter
cb51b8b847 4/n: Add face authentication framework
This change is cherry-picked and rebased from AOSP
https://android-review.googlesource.com/c/platform/frameworks/base/+/660242

Add face recognition as an identification method, following fingerprint
design. Unlike fingerprint, only one face template can be enrolled per
user, and a vendor message is passed from the HAL all the way to the
client callback to allow GUI indication about the enrolled face
templates.

Add FaceAuthenticationManager and FaceService.
Add face authentication capability to TrustManager and Keyguard.
Modify TrustManager and KeyguardUpdateMonitorCallback fingerprint code
to support generic biometric method to eliminate duplications.
Add BiometricSourceType enum to keep track of the specific biometric
method.

Test: biometric authentication still works on the device

Fixes: 110385761

Change-Id: I5d04fe69a112c13d3ef7330b9c08c146e36c5335
Signed-off-by: Gilad Bretter <gilad.bretter@intel.com>
2018-06-21 17:00:07 -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
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
Damien Bargiacchi
2e9b8c3753 Add a setting for the User Absent, Touch Off feature in Wear
This is an extension of the User Absent power feature on Wear aka "for small batteries". Turning the
sensor off is one of the aspects of power saving we want to take advantage of when the user is
absent.

Bug: 77293569
Test: make -j80
Test: Device boots
Change-Id: I25a3577d8eb2d157c20ed344056138bc32e8d158
2018-06-07 16:11:34 -07:00
Philip P. Moltmann
66c5a8d207 Dump activities that handle when USB devices get plugged in
When a USB device or accessory gets plugged in the system might
automatically start activities that have a device/accessory filter set
to include the plugged in USB device.

Unfortunately we seen too many apps setting too broad of a filter and it
annoys the user that this apps wants to start every time the device gets
plugged in.

This change dumps the acitivity names and their filters so debugging
such issues is much easier.

To do this, there is some mild refactoring:

1. Split packageMatchesLocked into
- getDeviceFilters to resolve all device filters
- getAccessoryFilterer to resolve all accessories
- Check if a filter matches after resolving all filters. This is no
  performance issue as usually there is only one or two filters per
  activity.

2. Split queryIntentActivitiesForAllProfiles into
- A per user part, so that we can use the exact same intent-resolution
  code for the dump-code
- And a loop over the per user part

Test: adb shell dumpsys usb
      + incident_report usb
      + verified that the output is as expected

Change-Id: I552c963b9a1b1c7df0adc6746af8cd42a4691cd6
2018-05-31 11:12:32 -07:00
Wale Ogunwale
56034a4f59 Merge "Added TestApi to ActivityInfo.isTranslucentOrFloating" into pi-dev am: 9d19487b1c
am: 9f6c8feb6f

Change-Id: Ia6008e05fe7a7b369be2d9a84bcedc94d74c5334
2018-05-25 19:57:10 -07:00
TreeHugger Robot
9d19487b1c Merge "Added TestApi to ActivityInfo.isTranslucentOrFloating" into pi-dev 2018-05-26 02:23:25 +00:00
Suprabh Shukla
c0e7844d50 Merge "Only user whitelist gets allow_while_idle_unrestricted" into pi-dev am: 3d70d20c88
am: 5ae610751f

Change-Id: Ica6f802d6ff6254a70feee45bc20a9f50617c68a
2018-05-25 12:38:55 -07: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
TreeHugger Robot
4837c7c0c0 Merge "Remove ro.retaildemo.video_path from proto" 2018-05-17 01:08:35 +00:00
Damien Bargiacchi
68bbaade77 Switch the setting for Off Body Radios Off to User Absent Radios Off
Bug: 79491395
Change-Id: I82f8742398da503bdddc420399de444e3314998e
2018-05-09 21:11:44 -07:00
Makoto Onuki
c70d756bf6 Merge "Show "in parole?" in dumpsys jobscheduler" into pi-dev 2018-05-08 18:09:56 +00:00
Kweku Adams
71a9531806 Adding batterystats history to proto dump.
It will only print out a dump for userdebug or eng builds.

Bug: 77727638
Test: flash device and check output of incident proto and
'dumpsys batterystats -c --history'

Merged-In: Ib74d4c664f23a61e6fc33f700ba6a3c6fad32c74
Change-Id: Ia0c993d1281cc350d93f9c13f5540b349a4bfb84
2018-05-07 17:53:57 -07: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
Yi Jin
e09cde0cd9 Merge "Add a section flag to bypass failure if a specific path can't be found." into pi-dev 2018-05-02 21:36:23 +00:00
Dianne Hackborn
025d4a59fc Work on issue #77931346: The notification that should not be named appeared
Keep track of whether a foreground service has been shown in a
notification channel and, the first time one is, make sure the channel
is sufficiently important regardless of what the user or app last
set for it.

Bug: 77931346
Test: runtest systemui-notification
Change-Id: Idecad2dceb8cc918feec91ca1ee26edf3d3ab7de
2018-05-01 22:56:23 -07:00
Yi Jin
7fe3dee3ae Add a section flag to bypass failure if a specific path can't be found.
This is a temporary solution to bypass failure of reading cpu info or 
battery type in P if the path doesn't exist on some devices. See bug for
details. However in Q, incidentd should implement reading from the
common Linux kernel interfaces.

Bug: 78028767
Bug: 78239764
Test: atest incidentd_test
Change-Id: I08ffcb21709efe5478d2ac46121deb5795af1024
Merged-In: I08ffcb21709efe5478d2ac46121deb5795af1024
2018-05-02 01:31:08 +00:00
Christine Franks
3732811822 Remove ro.retaildemo.video_path from proto
Bug: 78063111
Test: n/a
Change-Id: I1501959df58d4aab5b906b26738afc2e3bc5958f
2018-05-01 16:13:53 -07:00
TreeHugger Robot
af52d9815a Merge "Add setting for GNSS location request update duration" into pi-dev 2018-04-18 18:10:04 +00:00
Tej Singh
abdf6e8039 Merge "Enforce dump permission in stats service" into pi-dev 2018-04-17 01:34:47 +00:00