Commit Graph

1977 Commits

Author SHA1 Message Date
Rubin Xu
ca6ece54cc Clean up exception usage in LockSettingsService (part 1)
RemoteException are thrown when someone invokes a binder call
but the binder calls fails due to technical reasons (the remote
process died; data sent through binder is too big etc). Right now
in LockSettingsService most RemoteExceptions are just blindly
bubbled up through the call chain. This has the issue that it
will be silently ignored if this is part of some app calling into
LSS via binder, because RemoteException cannot be propagated
across binder at the moment. To fix this, we look at each place
within LSS where RemoteException is thrown and take the following
action:

* If the RemoteException is not critical, just swallow it in place
  and emit a log.
* If it's critical (LSS cannot carry on with the failed invocation):
  ** Rethrow as IllegalStateException (which is binder-compatible)
     so it fails fast.
  ** Unless the surronding method has appropriate error return semantics
     which can be adopted instead. In this case, swallow the exception,
     return error code, and emit log.

Bug: 128831839
Test: atest frameworks/base/services/tests/servicestests/src/com/android/server/locksettings

Change-Id: I4e19b8e63a86e5477933bf21c718771e9018e718
2019-08-14 17:03:38 +01:00
Narayan Kamath
bb748c592b Merge "AutofillFieldClassificationService: Mark constructor as @SystemApi" 2019-08-12 12:34:12 +00:00
Narayan Kamath
51f3f610f9 AutofillFieldClassificationService: Mark constructor as @SystemApi
The class is abstract and marked as a SystemApi, but there's real
way to use it while compiling against the system_sdk unless the
constructor is also public.

Test: make update-api
Test: make
Bug: 138589409
Change-Id: Id1fe158ec55b299325bfbc16ab1ea33cd53fc123
2019-08-09 15:17:26 +01:00
Eugene Susla
f366188dac Merge "Use dataclass codegen on a few initial framework classes" 2019-08-07 22:51:23 +00:00
Julia Reynolds
c562fc6937 Prevent NPEs in NLSes
NLSs (rightly) assume that the SBN they get from
onNotification[X] calls will not be null. If it is, log and bail early.

Bug: 78279961
Test: reboot device
Change-Id: Id2bba6b15aeea2d701d92d6c63022463f0f8c1df
2019-08-07 10:50:44 -04:00
Eugene Susla
3b2fe616fd Use dataclass codegen on a few initial framework classes
Test: presubmit
Change-Id: Ide3c21596f6489fdb1db8f72e1436a01b10f56ed
2019-08-06 21:29:29 -07:00
TreeHugger Robot
f80171ef5c Merge "Dispose InputChannel when dispose InputEventReceiver" 2019-08-05 05:28:21 +00:00
Artur Satayev
70507ed5a1 Add @UnsupportedAppUsage annotations for max-p.
See go/UnsupportedAppUsage for more details.

These have already been greylisted, however due to bugs/omissions in the tooling have been kept in go/greylist-txt instead of being annotated in the code.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 137350495
Test: m
Change-Id: I5aa29a49b193db47aaee4d3a756c17f48cc9f0b1
2019-08-01 19:46:29 +01:00
Arthur Hung
12a06ce6ea Dispose InputChannel when dispose InputEventReceiver
There would be an error if an InputChannel didn't be disposed before
finalized. The client InputChannel created by ViewRootImpl or SystemUI
that would also create an InputEventReceiver to receive input events, and hold
the client InputChannel, so if the InputEventReceiver is going to be disposed,
the InputChannel should be disposed as well.

Test: manual
Bug: 128679213
Change-Id: I24c16f032403e8a982a84a5e0adbfabcdc016f0f
2019-07-26 19:14:17 +08:00
Adam He
8a12f02b90 Added TYPE_DATASETS_SHOWN event to FillEventHistory
Fixes: 137225017
Test: atest android.autofillservice.cts.FillEventHistoryTest
Test: atest CtsAutoFillServiceTestCases
Change-Id: I5f858a01c98993148f71d616e73419a1914f5a1b
2019-07-12 13:59:48 -07:00
Vishnu Nair
f7645aa9a9 Prevent SurfaceView from drawing over parent surface insets
Parent SurfaceView to a bounds layer that enforces a crop preventing it
from drawing over the surface insets. The bounds layer crop is set to the
surface insets and updated when the parent surface size changes or the
parent surface insets change.

If the SurfaceView children are reparented to another client surface
then ensure the SurfaceView relative layer info is updated correctly.

Bug: 132205507
Test: go/wm-smoke
Test: test preserve surfaces codepath with split screen and ensure relative z is preserved
Test: test surfaceview apps, youtube, maps & camera.
Test: try to repro maps pip issue described in bug

Change-Id: I14c2f7603345ad89f0af4db48150b05d8ada602a
2019-06-18 12:49:24 -07:00
Will Brockman
f0c8b9508d Merge "Log usage of addPerson() and setStyle() in notifications." into qt-dev am: 029190c1bc am: e320fca53a
am: 4dbe27d84f

Change-Id: I256ff5a1f3ed12e86a04eb5680ecd7f8df9897f5
2019-06-18 11:16:31 -07:00
TreeHugger Robot
029190c1bc Merge "Log usage of addPerson() and setStyle() in notifications." into qt-dev 2019-06-18 17:04:01 +00:00
Julia Reynolds
b1f5aafc91 Use connected boolean as NLS does vs IBinder
To determine if the CPS can get/send messages. Apparently
the IBinder can be cached in ActivityManager and onBind() is not
always called when a service is connected the second time.

Test: manual; ensure a service recieves an onsubscribe for an
active rule post requestUnbind/requestRebind
Fixes: 62584038

Change-Id: Iffe37242509f3bf26e609e6b423f3928c00156ad
(cherry picked from commit 265d093cd9)
2019-06-17 17:51:18 +00:00
Will Brockman
c22772c36a Log usage of addPerson() and setStyle() in notifications.
Added Tron logging to StatusBarNotification.getLogMaker() so it will
be present in most logs about the notification.

Change-Id: I720706d37c663f2018bdfe2153ad180970166c90
Test: atest android.service.notification.StatusBarNotificationTest
Bug: 135180518
2019-06-14 19:10:02 +00:00
TreeHugger Robot
673d6eddf5 Merge "Gatekeeper generated aidl cpp bindings" 2019-06-14 16:29:53 +00:00
Julia Reynolds
dc89693c20 equals!
Test: bugreport
Change-Id: I27bbdfe2b36b0f2e2cf6dcde6f84a3385b1ec301
2019-06-13 12:39:07 -04:00
Julia Reynolds
e8326c9688 Merge "Wrap legacyExtra generation in targetsdk check" into qt-dev am: 11110b74ac am: 29399a1bdb
am: e73aa97665

Change-Id: I9ed08f4fbedbbcbdb3c7af6e2676bfdbd447888c
2019-06-12 11:21:05 -07:00
Julia Reynolds
b9dceee067 Wrap legacyExtra generation in targetsdk check
Newer listeners don't need that information!

Test: atest
Fixes: 134964922
Change-Id: I1eb2fe4d339a7ae4950d905d62bd34eebbdb5657
2019-06-12 14:05:40 +00:00
Daniel Sandler
285cb3eaf9 Merge "Dramatically simplify NotificationRankingUpdate." into qt-dev am: d4d9b233b2 am: dc4d3ec131
am: 86fbef2984

Change-Id: I322f738ff99b811f4796e4f331ca440694685f2d
2019-06-07 10:42:51 -07:00
Janis Danisevskis
037a63fb02 Gatekeeper generated aidl cpp bindings
Moved Gatekeeper aidl definitions to system/core/gatekeeperd.

Test: Manually tested setting PIN.
      android.keystore.cts.CipherTest#testCanCreateAuthBoundKeyWhenScreenLocked
      android.keystore.cts.CipherTest#testKeyguardLockAndUnlock
Change-Id: Ie3583f5682727b1f9a82d270764c94fce33388ec
2019-06-07 08:37:37 -07:00
Dan Sandler
ba666f8f54 Dramatically simplify NotificationRankingUpdate.
It is now simply a container for a parceled RankingMap,
which can be unparceled entirely into objects in the
listener's heap and discarded. Notification key strings are
interned (by reference into the Ranking data structure).

This should save a considerable amount of RAM:

 - parceled Bundles hanging around in the listener process,
   waiting to be unparceled, never freed
 - a dozen copies of the notification key string

Bug: 133763354
Test: atest NotificationManagerServiceTest NotificationListenerServiceTest NotificationDataTest
Test: coretests, cts, etc.
Change-Id: I5d8ab5c8f27c70f4af7051b24608ba0d1f2dd5cd
2019-06-06 15:43:23 -04:00
Julia Reynolds
265d093cd9 Use connected boolean as NLS does vs IBinder
To determine if the CPS can get/send messages. Apparently
the IBinder can be cached in ActivityManager and onBind() is not
always called when a service is connected the second time.

Test: manual; ensure a service recieves an onsubscribe for an
active rule post requestUnbind/requestRebind
Fixes: 62584038

Change-Id: Iffe37242509f3bf26e609e6b423f3928c00156ad
2019-06-05 10:45:29 -04:00
Jan Althaus
3353af52db Merge "Adding issuer information to NAS Adjustments" into qt-dev am: bce92301c2 am: 7fffe8f039
am: 3fbe5bf889

Change-Id: I1fb9cecfb1b8992356fca6783df39429ccd2a049
2019-05-28 12:22:34 -07:00
Jan Althaus
367eb8ca1f Adding issuer information to NAS Adjustments
Test: manually tested with ExtServices and AiAi as NAS
Bug: 132679875
Change-Id: I3b4b3135037fe3f82b18e7c024931842986c70bb
2019-05-23 19:35:01 +00:00
Julia Reynolds
4a57894445 Merge "Merge "Revert "Adding issuer information to NAS Adjustments"" into qt-dev am: 95706d0c60 am: 5266e598e9" into qt-r1-dev-plus-aosp
am: dce86ccebb

Change-Id: I048e3725e5ced6d85bb360f5d1a38db22c4b7781
2019-05-22 12:32:25 -07:00
TreeHugger Robot
99885212fa Merge "Fixed Cancellation for PendingAutofillRequest." into qt-dev 2019-05-22 18:52:32 +00:00
Hyunyoung Song
8942a3c8cb Merge "Add a rule to compile IWallpaperService.aidl" into qt-dev am: 1ef1abed52 am: 6826b8ad9a
am: 9e49f858b1

Change-Id: Ibbc77738e321183c25d8e6b543aa9d904379b256
2019-05-22 03:55:10 -07:00
Jan Althaus
65e2fe71eb Merge "Merge "Adding issuer information to NAS Adjustments" into qt-dev am: 71e6ac93f3 am: 277a30f7f7" into qt-r1-dev-plus-aosp
am: 99816c8226

Change-Id: Id4dce6d75cd559644c63eb813f5c866bd152d79f
2019-05-21 19:05:26 -07:00
Adam He
79e0ba05ec Fixed Cancellation for PendingAutofillRequest.
1. mCallback.cancel() now correctly cancels the pending request.
2. AutofillProxy.update() now updates the CancellationSignal.

Fixes: 132459064
Test: atest android.autofillservice.cts.augmented
Change-Id: If8b2ab5c0fd8db4cfad440bf47031f6d85c28ae5
Merged-In: If8b2ab5c0fd8db4cfad440bf47031f6d85c28ae5
2019-05-21 21:13:03 +00:00
Julia Reynolds
95706d0c60 Merge "Revert "Adding issuer information to NAS Adjustments"" into qt-dev 2019-05-21 18:59:33 +00:00
Hyunyoung Song
1ef1abed52 Merge "Add a rule to compile IWallpaperService.aidl" into qt-dev 2019-05-21 16:35:20 +00:00
TreeHugger Robot
f953da0c20 Merge "DO NOT MERGE - Minor fix on internal method name." into qt-dev 2019-05-21 15:41:53 +00:00
Julia Reynolds
b58434a869 Revert "Adding issuer information to NAS Adjustments"
This reverts commit 3b33a04fb3.

Reason for revert: This is crashing ExtServices on qt-dev

Bug: 132679875
Change-Id: I60b7b6b8db33585f62e108389367c74ce682b922
2019-05-21 15:04:27 +00:00
Jan Althaus
3b33a04fb3 Adding issuer information to NAS Adjustments
Test: manually tested with AiAi NAS
Fixes: 132679875

Change-Id: I5d4bf41383143e9573ddad5c08205e1dca3ba6b3
2019-05-21 08:57:02 +02:00
TreeHugger Robot
49654f21e2 Merge "Fixed Cancellation for PendingAutofillRequest." 2019-05-20 21:47:16 +00:00
Hyunyoung Song
096e40510d Add a rule to compile IWallpaperService.aidl
Test: builds
Bug: 133160356

Change-Id: Ib2bcf5a091c603a08dcdb14126bc284575e75806
2019-05-20 14:46:19 -07:00
Fabian Kozynski
a7bf18223f Merge "Merge "Sets Tile default state to INACTIVE" into qt-dev am: 0d7d8d2baf am: d97c3d29e2" into qt-r1-dev-plus-aosp
am: 27e92caebe

Change-Id: I453d0274631e6c49ed918985ba7860fb8be5bd6b
2019-05-20 13:44:54 -07:00
TreeHugger Robot
0d7d8d2baf Merge "Sets Tile default state to INACTIVE" into qt-dev 2019-05-20 13:34:25 +00:00
Adam He
1d320ec6b1 Fixed Cancellation for PendingAutofillRequest.
1. mCallback.cancel() now correctly cancels the pending request.
2. AutofillProxy.update() now updates the CancellationSignal.

Fixes: 132459064
Test: atest android.autofillservice.cts.augmented
Change-Id: If8b2ab5c0fd8db4cfad440bf47031f6d85c28ae5
(cherry picked from commit 33bbf2aa2f1e5dabce5bd94e9b1c950cdcda1448)
2019-05-17 13:29:44 -07:00
Felipe Leme
15b44fe1e3 DO NOT MERGE - Minor fix on internal method name.
Test: atest CtsContentCaptureServiceTestCases

Bug: 130726495

Change-Id: I608fde123882ef58698957e76a5e8cc023153ef0
2019-05-17 19:11:00 +00:00
Adam He
815979d5df Merge "Metrics for content capture." into qt-dev 2019-05-16 19:53:04 +00:00
Fabian Kozynski
5c6f04df30 Sets Tile default state to INACTIVE
When the Tile is created, we don't have its actual state, so it has to
start with some default state. Between the tile being bound and the
first time the state is updated by TileService, this is the default
state.

When the Tile for CustomTile is created, set its default state to
INACTIVE. On the first update it after it's bound it will be set
correctly. This is probably less upsetting than an ACTIVE tile that
suddenly becomes INACTIVE.

Test: manual using logs to verify that the Tile is never ACTIVE when it
shouldn't.
Fixes: 132813963

Change-Id: I58bad0a2a16ca42366a5772f62fe82c74a6e2fb7
2019-05-16 14:23:58 -04:00
Adam He
ff2185346e Metrics for content capture.
Bug: 119613670
Test: statsd_testdrive & manual test
Change-Id: Ib2c61d2a3c08a9db779790417eb0177c2420d8fd
Merged-In: If43465ccee7454a7ebf9e15caa23fce7bae33cfe
2019-05-15 11:12:02 -07:00
Adam He
3a314441af Merge "Metrics for content capture." 2019-05-15 17:44:52 +00:00
Mehdi Alizadeh
799669e177 Merge "Updates java doc in AppPredictionService" into qt-dev am: 60c9f4803a
am: 2f0c8f7e69

Change-Id: I4f5d97f19d864d96b41536b076c890c4e9b29298
2019-05-14 19:40:36 -07:00
Mehdi Alizadeh
8ed33831c9 Updates java doc in AppPredictionService
Bug: 123591863
Test: None
Change-Id: I1ef31e6c723199432f852ad38e1af35d6017cc1f
2019-05-14 15:05:31 -07:00
Adam He
420947c4cc Metrics for content capture.
Bug: 119613670
Test: statsd_testdrive & manual test
Change-Id: If43465ccee7454a7ebf9e15caa23fce7bae33cfe
2019-05-14 11:33:33 -07:00
Fabian Kozynski
dec71b7aad Merge "Fix race condition in TileServices" into qt-dev am: 5e23231f82
am: 66068f508d

Change-Id: I30fc07f2b0c971aa7773ad5f2683a44bb794d9c1
2019-05-10 18:13:36 -07:00
Fabian Kozynski
5e23231f82 Merge "Fix race condition in TileServices" into qt-dev 2019-05-10 14:22:25 +00:00