Commit Graph

414 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
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
Tej Singh
dd83d70371 Enforce dump permission in stats service
Enforces the dump permission in stats service and fixes a typo in an
enum name.

Bug: b/77723108
Test: adb shell dumpsys stats as root and not root
Test: build success on marlin (and cts build success)
Change-Id: I131f97fe4fd370d50bc4ad369377f6adcca5f6ae
2018-04-16 15:04:28 -07:00
Kweku Adams
1856a4cfcc Adding privacy tags to graphicsstats proto.
Creating a copy of the graphicsstats proto so that one can be tagged
with privacy annotations and the other can be used internally while
still using the protobuf-cpp-lite library.

Bug: 72570104
Test: flash device and check incident output
Merged-In: I2d72e7bd17689c1401a16d5a13956e6528ddb525
Change-Id: I0a46ee6cc463b133925be1cf8dee8cf3d107930c
2018-04-12 14:23:15 -07:00
Kweku Adams
6d49896324 Merge "Setting stack traces to EXPLICIT." into pi-dev 2018-04-12 17:23:17 +00:00
TreeHugger Robot
4738c7d0ab Merge "Cleaning up frameworks protos." into pi-dev 2018-04-12 09:55:45 +00:00
TreeHugger Robot
ce9fe591ac Merge "Fixing typo in proto field." into pi-dev 2018-04-12 01:33:01 +00:00
TreeHugger Robot
4e0fc234d9 Merge "Turning print proto dump back on." into pi-dev 2018-04-12 01:02:17 +00: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
Kweku Adams
3984cf625c Fixing typo in proto field.
Bug: 72814439
Bug: 74975371
Test: atest CtsIncidentHostTestCases:com.android.server.cts.UsbIncidentTest
Change-Id: Ia04c13b96bd1996e6e96f9b4e2e693af4cb97070
2018-04-11 16:35:50 -07:00
TreeHugger Robot
5d9498a62c Merge "Updating BatteryStats to account for Ambient Display sipper." into pi-dev 2018-04-11 22:28:17 +00:00
Winson Chung
95f2937499 Merge "Prevent extraneous saving of pinned snap fraction." into pi-dev 2018-04-11 02:32:46 +00:00
Kweku Adams
ef72895a48 Updating BatteryStats to account for Ambient Display sipper.
The sipper was added in http://ag/3667626 but BatteryStats wasn't
updated to properly output the data.

Bug: 77877717
Test: flash device and check batterystats output
Change-Id: Ibf98545a147f2d62dd29c57dd7efa14ed4c58aa6
2018-04-10 18:24:41 -07:00
Mehdi Alizadeh
1264d880e2 Adds entries for Swipe Up Enable in Settings.Secure
Bug: 77549883
Test: None
Change-Id: Ie346c4f527fa014eadbfaa1d81d7f8a5f37f653f
2018-04-09 18:28:04 +00: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
TreeHugger Robot
e0dfebcce3 Merge "Turning on proto dumping for stack traces." into pi-dev 2018-04-06 20:41:01 +00:00
Yu-Han Yang
ab3e7bdd62 Add setting for GNSS location request update duration
Bug: 77696830
Test: atest SettingsBackupTest
Change-Id: I4514070ba12de2d1c4c47c03a9bf70d8f57fe197
2018-04-06 11:44:21 -07:00
TreeHugger Robot
b1bcab2210 Merge "Implements GNSS satellite blacklist" into pi-dev 2018-04-05 23:28:19 +00:00
TreeHugger Robot
72a39eb3be Merge "This cl tries to fix cts tests IncidentdTest" into pi-dev 2018-04-05 18:48:59 +00:00
Hall Liu
fe85e4589b Merge "Move RTT system setting to Settings.Secure" into pi-dev 2018-04-05 18:15:37 +00:00
Yu-Han Yang
66c7ea91b4 Implements GNSS satellite blacklist
Bug: 38269641

Test: m -j ROBOTEST_FILTER=GnssSatelliteBlacklistHelperTest RunFrameworksServicesRoboTests
Test: atest SettingsBackupTest
Test: Tested with adb on device

Change-Id: Ifaa330bf74353ea5c8826f0000d1935258b8dbf2
2018-04-05 08:57:04 -07:00
Hall Liu
44e41012ec Move RTT system setting to Settings.Secure
Bug: 76449217
Test: manual
Change-Id: I85620d5b834aa7e04579212f3fd5cf6c0498b570
2018-04-05 01:18:02 +00:00
Yi Jin
ad3e6e5d5a This cl tries to fix cts tests IncidentdTest
1. Disable BatteryType section which is device-specific
2. Make timeout longer since meminfo section timedout in test
3. make some negative values sint
4. varint can be 64 bits, there is a bug implicitly convert it to 32
which loses values.
5. Found another bug which failed to read 64 bits varint, create a
native test to make sure it works.

Bug: 77291057
Test: atest CtsIncidentHostTestCases:com.android.server.cts.IncidentdTest
Change-Id: I04cc730741f7901f37ac57a11af7777d57118a23
2018-04-04 16:29:55 -07:00
Kweku Adams
39cb92086f Turning on proto dumping for stack traces.
Bug: 72177715
Test: flash device and check incident.proto output
Change-Id: I009a2ef07a47431d4af1c0b59c49634946c96710
2018-04-03 18:29:40 -07:00
Kweku Adams
995db766b9 Turning print proto dump back on.
Bug: 72570451
Test: flash device
Change-Id: I605a49b2aad602e2bf7add5688cce40986547f7d
2018-04-03 17:12:51 -07:00
Kweku Adams
cee85f1b16 Setting stack traces to EXPLICIT.
After some discussion, we've decided to set these to EXPLICIT.
Bug: 72177715
Test: N/A

Change-Id: Ia118ce3ba4f8ec7e643f6759e99cd32721150756
2018-04-03 17:11:26 -07:00