Commit Graph

2883 Commits

Author SHA1 Message Date
Arthur Ishiguro
a95fe31562 Adds ContextHubIntentEvent class
Helper class to parse Intent events.

Bug: 117612105
Test: Compile and flash, verify Intent events can be parsed
      using the class
Change-Id: I1267a1ce0cbbfd56ff9abb059ccc0117f060b7ff
2018-11-01 10:09:45 -07:00
TreeHugger Robot
2406e8ffc2 Merge changes Ib84292ca,I3411cb15,I60dfac31
* changes:
  Sends PendingIntent events
  Implements register/unregisterIntent methods
  Modifies concurrency handling in ContextHubClientBroker
2018-10-31 16:42:49 +00:00
Arthur Ishiguro
daeed3cb19 Modifies concurrency handling in ContextHubClientBroker
With PendingIntent, there will be multiple states in the class, so it
will be simpler to mark methods synchronized on the object.

Bug: 117612105
Test: Compile only
Change-Id: I60dfac3113508b9e251e33fd3c1c8f60378017f4
2018-10-29 09:28:32 -07:00
Kevin Chyn
1a3550c1e2 Merge "Update BiometricManager constants" 2018-10-27 06:49:02 +00:00
Kevin Chyn
a8b57efec5 Update BiometricManager constants
Fixes: 117822032

Test: atest BiometricManagerTest
Change-Id: I9a384a94138e188d870dc3f224f6c21b7de1b82c
2018-10-26 16:46:51 -07:00
Jan Kowal
f4ae587aed Merge "Fix for android.hardware.radio.Utils.createIntSet" am: b25190cf62 am: e01a3fd480
am: a5b038fb9e

Change-Id: If938c1028dac3a93d5152a370ef47df20b38052b
2018-10-25 19:26:22 -07:00
Kevin Chyn
ed5b85e3b1 Merge "Surface IBiometricsFace#userActivity to FaceManager" 2018-10-26 01:20:19 +00:00
Kevin Chyn
57f119b667 Surface IBiometricsFace#userActivity to FaceManager
Fixes: 117631611

Test: Builds
Change-Id: Ia2631be24a6920cb0f014d6f9e38c6337db4219b
2018-10-25 15:27:28 -07:00
Kevin Chyn
f2aa603524 Add face acquired constants
Bug: 118382625

Test: Builds
Change-Id: I9d4024f1077a397dcb0895b16164a59a18449ce5
2018-10-25 10:54:01 -07:00
Jan Kowal
a5b038fb9e Merge "Fix for android.hardware.radio.Utils.createIntSet" am: b25190cf62
am: e01a3fd480

Change-Id: I51f552b40809c95620fbd3fbec4e21913bb74710
2018-10-24 16:24:13 -07:00
Nathan Harold
41e2d7494f Merge "Move some members to the "Q blacklist"." am: f5cf9f24ed
am: 13c9e7e2f3

Change-Id: Ia2419cce28d26d9464da2a5172cb332b629e943e
2018-10-24 16:14:06 -07:00
Arthur Ishiguro
2640f0b7d7 Makes minor modifications to Intent-based Service APIs
Bug: 117612105
Test: None
Change-Id: Ic6b623a78a1a807363de403050f027ad3f950817
2018-10-24 15:33:09 -07:00
Arthur Ishiguro
a7c3797577 Adds AIDL definitions for register/unregisterIntent
Bug: 117612105
Test: Compile only
Change-Id: Ib68110664468afc56a33d3c5069f725014473ee1
2018-10-24 15:32:25 -07:00
Michael Dooley
0bf1666c51 Merge changes from topic "getmodelstate-redo"
* changes:
  Rolling forward with indentation fix.
  Revert "Revert "Adding getModelState API to sound trigger""
2018-10-24 06:04:42 +00:00
Arthur Ishiguro
bdce57c880 Fixes typo in Intent extra names
Bug: 117612105
Test: None
Change-Id: I9b31d7d504635cc3eb3f880c925ad1aaf30becf7
2018-10-23 15:51:19 -07:00
Treehugger Robot
b25190cf62 Merge "Fix for android.hardware.radio.Utils.createIntSet" 2018-10-23 22:18:55 +00:00
Nathan Harold
f5cf9f24ed Merge "Move some members to the "Q blacklist"." 2018-10-23 21:53:51 +00:00
Jan Kowal
d09a4081d6 Fix for android.hardware.radio.Utils.createIntSet
Previous solution was assymetric: writeInt vs readTypedObject.

Also, specify the initial capacity to avoid unnecessary reallocations.

Bug: 117113131
Test: atest BroadcastRadioTests
Change-Id: Ib33b97d482422b1acac8e9420a0c974bcd59355b
2018-10-23 13:33:51 -07:00
Michael Dooley
291751e510 Revert "Revert "Adding getModelState API to sound trigger""
This reverts commit 81f71f1c27.

Reason for revert: rolling forward with fix

Change-Id: Ifc0c53581ac567cb968d91993f453220f8253aec
2018-10-23 07:44:51 +02:00
Mathew Inwood
45d2c252b1 Move some members to the "Q blacklist".
Based on some analysis, these fields/methods are likely false positives.
Set maxTargetSdk=P so that any apps using them are required to migrate off
them in future. See the bug for more details.

Exempted-From-Owner-Approval: Automatic changes to the codebase
affecting only @UnsupportedAppUsage annotations, themselves added
without requiring owners approval earlier.

Bug: 115609023
Test: m
Merged-In: I719b5c94e5b1f4fa562dd5d655953422958ad37e
Change-Id: I719b5c94e5b1f4fa562dd5d655953422958ad37e
(cherry picked from commit 8c854f86a4)
2018-10-22 17:28:24 -07:00
Arthur Ishiguro
d2dc0fef0c Clarifies requirements of registerIntent API
- Clarifies that only one PendingIntent can be registered to a client
  at a time, since otherwise it can't be regenerated meaningfully.
- Also adds that a ContextHubInfo object is provided in Intent events
  to regenerate the client.

Bug: 117612105
Test: None
Change-Id: Ia2b1cc9bc01d10b092598374c0d82e4fa1b45079
2018-10-19 13:53:57 -07:00
Yohei Yukawa
5281b6b4c0 Add Context.getDisplayId() to avoid possible IPC
ContextImpl has an internal rule that when ContextImpl#mDisplay is
null the Context is associated with the default display.  The problem
is that, as discussed in Bug 117709581, when ContextImpl#mDisplay is
null ContextImpl#getDisplay() tries to get some non-null Display
object by making an IPC to the system server, which is redundant when
the display ID is the only thing that the caller wants to know.

By having an @hide method Context.getDisplayId(), we can ensure that
display ID can be obtained without any IPC.  This enables us to
re-submit my CL [1] that aimed to instantiate InputMethodManager (IMM)
for each display but then got reverted due to a performance regression
(Bug 117434607).

There should be no developer-observable behavior change.

 [1]: I7242e765426353672823fcc8277f20ac361930d7
      c53d78e992

Fix: 117712745
Test: atest FrameworksCoreTests:android.content.ContextTest
Test: prebuilts/checkstyle/checkstyle.py -f \
      frameworks/base/core/tests/coretests/src/android/content/ContextTest.java
Change-Id: I2534530a5ce90e2620c5039d793a6454a0a1e154
2018-10-15 07:38:25 +08:00
TreeHugger Robot
9208feacfb Merge "Adds missing RequiresPermission annotation to Context Hub APIs" 2018-10-12 23:11:33 +00:00
Shuzhen Wang
d3fd0bd791 Merge "Camera: Trivial doc update" am: e9f1e8c123 am: 9481340777
am: acca5faecf

Change-Id: Id148d8a89cb93a5590bd99006a660ed9baf7c02f
2018-10-11 14:52:35 -07:00
Shuzhen Wang
acca5faecf Merge "Camera: Trivial doc update" am: e9f1e8c123
am: 9481340777

Change-Id: I5d9c7fc848eb154e27012f1101340da2195bc423
2018-10-11 14:34:05 -07:00
Shuzhen Wang
9481340777 Merge "Camera: Trivial doc update"
am: e9f1e8c123

Change-Id: Id1a9c504a460b9f82496fbfcabb49e1c7f583dba
2018-10-11 14:21:35 -07:00
Arthur Ishiguro
f7a5bce7fb Adds missing RequiresPermission annotation to Context Hub APIs
Bug: 111365315
Test: Compile only
Change-Id: I4cf88ee0c5a1f770679ac2c0b7628de2d0562764
2018-10-11 10:16:26 -07:00
Shuzhen Wang
2b11fddb22 Camera: Trivial doc update
Change-Id: I63198c6d2cb348380e718974dd356d48137ae376
2018-10-11 09:17:34 -07:00
Kevin Chyn
167aa777b0 Merge changes I02a3c932,I04b6f64d
* changes:
  Add protected BiometricPrompt API to allow default title
  Add setActiveUser to BiometricManager/Service
2018-10-09 18:04:17 +00:00
Kevin Chyn
3a0187194a Add protected BiometricPrompt API to allow default title
ConfirmDeviceCredentials sometimes shows up without a title. Since CC
is now using BiometricPrompt, we need at least a private API that allows
the client to have the dialog show a default title.

Bug: 111461540

Test: Manual test with modified BiometricPromptDemo, to launch CC with
      empty string

Change-Id: I02a3c9327635c04f201f76754f7c0e1135e5ff36
2018-10-08 20:38:00 -07:00
kopriva
dae6ec0db7 Merge "docs: fixing 'mange' instead of 'manage'" into pi-dev am: 14aa42cfda
am: 57adb99451

Change-Id: I477a610e0602e464847c1a1ccb13b21644ee1ae8
2018-10-08 19:30:00 -07:00
kopriva
57adb99451 Merge "docs: fixing 'mange' instead of 'manage'" into pi-dev
am: 14aa42cfda

Change-Id: Id461e2430301c62be5ee76f5046370069cb1a34c
2018-10-08 19:14:44 -07:00
kopriva
82c591b78b docs: fixing 'mange' instead of 'manage'
Test: make ds-docs

Bug: 117449040

Change-Id: I282a2e960bbf722bf3a72dd932e3bf685abb74e5
Exempt-From-Owner-Approval: Docs-only change
2018-10-08 15:57:00 -07:00
Philip P. Moltmann
fca922976a Merge "Require permission to read USB device's serial number." 2018-10-08 20:22:07 +00:00
Kevin Chyn
bf830a370d Add setActiveUser to BiometricManager/Service
On devices with multiple biometrics, ConfirmCredentials can
potentially ask the user to authenticate using more than one
biometric. This is a wrapper that sets the active user for
all modalities.

Bug: 111461540

Test: With work profile set up, CC has same behavior as
      device running P.
      1) With one lock disabled, use modified BiometricPromptDemo
         to authenticate using CC in the work version of the app
      2) Go to normal version of the app, authenticating
         using BP (not CC) works with non-work biometric

Change-Id: I04b6f64d3fe373269366c243f406d897cb6fd83a
2018-10-07 16:03:48 -07:00
TreeHugger Robot
3121ea3039 Merge "Get correct hasEnrolled for work profiles" 2018-10-06 02:50:45 +00:00
Kevin Chyn
75dbb83fc2 Get correct hasEnrolled for work profiles
The check within BiometricService is done from system server process
so we need to pass in the actual userId.

Bug: 111461540

Test: With normal profile and FP enrolled, with work profile and no
      FP enrolled, launching BiometricPromptDemo for work profile
      and attempting to start authentication shows "none enrolled" message.

Change-Id: I45a1136d2b33bc7c594a3401e2a087103fb839f3
2018-10-05 19:17:28 -07:00
Kevin Chyn
8d46f7d24c Merge "Add missing BiometricManager constant" 2018-10-05 00:43:11 +00:00
TreeHugger Robot
715b8d6ded Merge "Add @IntDef to BiometricManager" 2018-10-05 00:41:31 +00:00
Louis Chang
bddeea865c Merge "Support launching home activity on secondary display" 2018-10-04 07:58:37 +00:00
Kevin Chyn
811ae8b6ad Add missing BiometricManager constant
This constant is being sent from BiometricService but was not exposed
properly.

Fixes: 116823693

Test: atest BiometricManagerTest
Change-Id: I3b80b4908f440b983b4aa68eefb3a785266a4065
2018-10-03 23:24:03 -07:00
Kevin Chyn
b97e9c9350 Add @IntDef to BiometricManager
Bug: 116823693

Test: Builds
Change-Id: Ic800272991f4d4a520627c3e5ff8fdb2cf9b638d
2018-10-03 23:16:14 -07:00
Kevin Chyn
5ff2b1f158 Merge changes from topic "biometric-manager"
* changes:
  Move biometric setting observer from KeyguardUpdateMonitor to BiometricService
  Change BiometricManager#hasEnrolledBiometrics to canAuthenticate
2018-10-04 03:19:25 +00:00
Louis Chang
bd48dca2d0 Support launching home activity on secondary display
- Add a new flag indicating that the display should show
  system decorations, such as status bar, nav bar, home and IME.
- Automatically launches home activity on secondary display
  if the display support system decorations and home
  activity has multiple instances supports.
- Remove ActivityStackSupervisor#mHomeStack and move several
  home stack related methods to ActivityDisplay.

Bug: 111363427
Test: atest ActivityManagerMultiDisplayTests
      atest com.android.server.am
      Manual test on virtual display and chromecast

Change-Id: I48fe245ad12965a19a6768f5dbb4e974ce94b01a
2018-10-04 00:39:29 +00:00
TreeHugger Robot
605f9fd933 Merge "Add type to DisplayViewport" 2018-10-02 21:56:56 +00:00
Siarhei Vishniakou
2eb0f8f5d0 Add type to DisplayViewport
Refactor DisplayViewport to treat internal, external, and virtual
display viewports more equally. Now stored in single array, and mLocked
contains the most up-to-date copy of these. Still enforce the
requirement that there can only be 1 internal and 1 external viewport.
We should remove this requirement in the future.

Bug: 111108021
Test: atest DisplayManagerServiceTest
Change-Id: I6fca9725f6e4180063c86f3c2bc34906ac1d0024
2018-10-02 14:19:30 -05:00
Arthur Ishiguro
8b73024b89 Merge "Adds new PendingIntent-based APIs for ContextHubManager" 2018-10-02 01:29:02 +00:00
Kevin Chyn
b7b54a6039 Move biometric setting observer from KeyguardUpdateMonitor to BiometricService
Fixes: 116872423

Test: with additional logging, do
      adb shell settings put secure face_unlock_keyguard_enabled 1 (or 0)
Test: content observer updates when user changes
Test: clients receive the current state upon registering

Change-Id: Id37381a8c263b29a0b91abb5241d74bb52364d63
2018-10-01 15:40:43 -07:00
Kevin Chyn
e741142569 Change BiometricManager#hasEnrolledBiometrics to canAuthenticate
BiometricPrompt#authenticate and BiometricManager#canAuthenticate now
use the same logic to determine if the prompt can successfully be shown.

Before Android P, apps used FingerprintManager isHwAvail && hasEnrolled
before asking users to enable biometrics for their app. With
BiometricPrompt, which abstracts away individual biometric modalities,
developers need a way to determine if they should ask users to enable
biometrics for their app. Having separate checks is a nightmare due
to the untestable combinations of multi-biometric devices. This API change
makes it much more scalable since the logic will be done in the platform.

Fixes: 116823693

Test: manual test, returns status correctly

Change-Id: Ie0ecd139c9a39100b6dbc9bd85462400cb465f08
2018-10-01 15:00:30 -07:00
Arthur Ishiguro
62a02b6356 Adds new PendingIntent-based APIs for ContextHubManager
Bug: 111365315
Test: Compile only

Change-Id: I9587b4dec0cd5d16df314311f23e3e01771acb08
2018-10-01 13:33:14 -07:00