Commit Graph

2004 Commits

Author SHA1 Message Date
Peter Wang
fac73bd00b Fixed java doc for EuiccService#eraseSubscriptions
Bug: 143138878
Test: on device
Change-Id: I2a9ab4fe4e1c48fc7e7178b1de9b1f72b0408183
2019-10-22 11:36:42 -07:00
Peter Wang
95c3d10f3a Merge "Add EuiccCardManager.ResetOption to eraseSubscriptions" 2019-10-09 22:45:11 +00:00
Peter Wang
0c1297b2d7 Add EuiccCardManager.ResetOption to eraseSubscriptions
Bug: 139474431
Test: on device
Change-Id: Ib8496ed6dbc6179940892de8df7901e84dd67d76
2019-10-07 17:25:18 -07:00
TreeHugger Robot
b63f979a6a Merge "Added REQUIRED_ALGO_CREDIT_CARD to field classification." 2019-10-04 04:33:10 +00:00
Adam He
345055d59c Added REQUIRED_ALGO_CREDIT_CARD to field classification.
Bug: 135629019
Test: atest ExtServicesUnitTests
Change-Id: I26cc3663ab7c8eb04ce89ff1d77a507e684a87a8
2019-10-02 13:33:58 -07:00
Beverly
85dfc2e225 Ringer toggle always affects system sounds
Background:
- When DND is on, users can allow "touch sounds" (system sounds) to bypass DND
- The user-visible ringer stream and toggle controls notification,
ringer, and system sounds

Previously, allowing system sounds to bypass DND overrode the ringer
from affecting the system sound stream which made the volume
functionality of touch sounds different from in/out of DND.

This fix ensures that DND always respects the fact that the ringer toggle and stream
controls notifications, ringer, and system sounds at all times (whether in/out of DND).

Test: atest ZenModeHelperTest
Test: atest ZenModeConfigTest
Test: atest AudioManagerTest
Test: atest AudioManagerTest#testPriorityOnlySystemDisallowedWithRingerMuted
Test: atest AudioManagerTest#testPriorityOnlySystemAllowed
Fixes: 141292611
Change-Id: I6e36097f18a93ce554b3fad7e1a2bd1057ac9e1d
2019-09-27 20:06:11 +00:00
TreeHugger Robot
109d8ab84a Merge "Fix reference to config property in TextClassifierService javadoc" 2019-09-27 11:41:37 +00:00
Chen Xu
a56786981e Merge "new TelephonyRegistryManager" 2019-09-24 18:32:48 +00:00
Nikita Dubrovsky
942db108c3 Fix reference to config property in TextClassifierService javadoc
The javadoc referenced "config_defaultTextClassifierService" but the
correct property name is "config_defaultTextClassifierPackage".

Test: build (javadoc-only change)
Change-Id: I2e3b19563d94cdede9498782dc840e04a85c25c1
2019-09-24 10:49:19 -07:00
Chen Xu
288b71c8c1 new TelephonyRegistryManager
today telephonyRegistry lives in system process
this is intended to persists all telephony listeners when
phone process crash. Telephony today notify system server by
using AIDL APIs directly. Instead, we are exposing a proper API
surface: telephonyRegistryManager where only phone app and
carrier privileged apps are allowed to use APIs in
TelephonyRegistryManger to notify telephony related status update.

Bug: 140908357
Test: Build & Manaul
Change-Id: I1b750751148925b4a7bd94553318907654012fc1
2019-09-22 19:56:39 -07:00
Nicholas Ambur
c75ccb8903 Merge "Revert "change KeyphraseEnrollmentInfo to store services"" 2019-09-20 22:49:03 +00:00
Nicholas Ambur
f2c31a51ee Revert "change KeyphraseEnrollmentInfo to store services"
This reverts commit 07ba2b7f83.

This change is being reverted because it needs to be paired with an AGSA
prebuilt APK update.

Test: Confirm prebuilt AGSA apk does not crash on enrollment
Bug: 141155032
Change-Id: Ie504f125966d38a11c65ae96f39e9a5aa7ce43ed
2019-09-18 08:36:27 -07:00
Lyn Han
405e0b705e Dedup smart reply updates for bubble flyout
Smart reply updates are not visually interruptive and bubbles should not
show flyout for them, since flyout text remains the same.

1) Modify NoMan.isVisuallyInterruptive to skip evaluation of fields
irrelevant to bubbles

2) Modify NotificationComparator to rank interruptive notifs higher

3) Pipe bool (isInterruptive) from system_process to SysUI
	NoMan --- set bool on notif record and ranking
	Ranking --- parcel bool for cross-process transport
	SysUI notif entry --- get bool from ranking
	SysUI bubble data --- on notif entry update, suppress flyout if isInterruptive=false

	Considered adding "isInterruptive" bool to StatusBarNotification.
	Did not because "visually-interruptive" is additional information that the
	system figured out and SBNs should be limited to info from the app.

4) NoMan --- schedule ranking update if interruptive changes for bubble

Fixes: 138755533
Test: manual - send one sms => flyout appears once
Test: manual - send multiple sms in a row => flyout appears for each one
Test: atest FrameworksUiServicesTests
Test: atest NotificationComparatorTest
Test: atest SystemUITests
Change-Id: Id4b855054689ee73a109bb7cd18004531b41f28c
(cherry picked from commit 0dddc61824d091e48962e36939828cae3cde2aa9)
2019-09-18 10:05:50 -04:00
Chen Xu
8474c6b9b4 Merge "move IApnSourceService.aidl to android.service.carrier" 2019-09-18 04:06:44 +00:00
Chen Xu
478ba408d3 move IApnSourceService.aidl to android.service.carrier
Bug: 140908357
Test: Build & Manual
Change-Id: I21b83798f5ecd819627a7168c167cf3cfe99dd68
2019-09-16 18:16:46 -07:00
Nicholas Ambur
07ba2b7f83 change KeyphraseEnrollmentInfo to store services
Current hotword enrollment is done through a transparent activity which
when triggered causes a breif interuption on the UI. Because there is no
actual UI component to this activity, it is being transitioned from an
activity to a service.

applications supporting MANAGE_VOICE_KEYPHRASES are moved from ativity
to service based to allow for enrollment which does not effect the UI

Bug: 139954183
Test: confirmed enrollment and unenrollment intents can start the
registered enrollment service.

Change-Id: I1e2d80e08efaf47a5c1c8760e2979143df436a93
2019-09-16 16:54:43 +00:00
TreeHugger Robot
a3da049fb3 Merge "Fix zen alarms only mode check" 2019-09-05 19:05:06 +00:00
Julia Reynolds
5cb8d5a6c3 Address API review feedback
Make methods fully public, add documentation, swap what method is public

Test: make
Fixes: 139833596
Bug: 138589409
Change-Id: If39d6423efedcf8578dc2942274f6fbb341d164a
2019-09-05 16:22:29 +00:00
Michele
856102468d Removal of usage of hidden APIs
Moved RESOLUTION_ACTIONS from EuiccService to EuiccResolutionUiDispatcherActivity,
so that it does not need to be made public.

Bug: 137202333
Test: compilation
Change-Id: If8011bbe6af32c038f55d851acc2406eba208de6
2019-09-04 13:52:31 -07:00
Beverly
1f11492ea7 Fix zen alarms only mode check
Also fixes setting the consolidated zen policy logging.

Fixes: 140329813
Test: android.app.cts.NotificationManagerTest#testTotalSilenceOnlyMuteStreams
Test: android.app.cts.NotificationManagerTest#testAlarmsOnlyMuteStreams
Change-Id: I43d503ac23d7b0b141930d77cb76f1f589b22525
2019-09-04 14:11:14 +00:00
Aurimas Liutikas
4d1699da48 Add missing nullability annotations.
To prepare for enabling MissingNullability Metalava check this CL
works on adding missing nullability issues that metalava flags if
we tell it to flag new things since API 29.

This is not a complete CL, mostly addresses public api and
toString/equals for @SystemApi

Exempt-From-Owner-Approval: Large scale nullability clean up
Bug: 124515653
Test: make -j checkapi
Change-Id: I109260842cfc25f06e40694997fcbb4afa02c867
2019-08-29 17:15:44 -07:00
Tony Mak
cdc81e8aff Hold a strong reference to the callback in TextClassifierService
Issue:
TextClassifierService failed to invoke the callback to send the result back
to client occasionally because  the callback object may be GCed.
And thus smart selection failed occasionally, as the client doesn't get
a response back when it hits this issue. It won't fallback to local
textclassifier due to the timeout specified in TextView.

Cause:
We thought that ITextClassifierCallback is a "cross process" reference, and
so we only store a weak reference of it to avoid leak.
And it turns out that it is wrong. As soon as the weak ref gets GCed in
the service, that counts as dropping the callback. The service doesn't
know about any strong references the client has.

Bug: 138865849

Test: Try smart selection over 30 times, make sure smart action is shown
for every single time.

Change-Id: Ia9218cf67e8d67697a0fdff22c7918a55efc39ca
2019-08-22 15:17:09 +01:00
Joanne Chung
d38b888249 Merge "Log the error of TCS, TCMS and SysTC." 2019-08-22 02:03:14 +00:00
Julia Reynolds
9ef59c953d Merge "Make some APIs used by ExtService module @SystemApi" 2019-08-21 13:05:11 +00:00
Joanne Chung
0b7c2c4135 Log the error of TCS, TCMS and SysTC.
TextClassifierService passes the error message to onFailure() when it fails
to process the task. But the error message was dropped at TextClassifierService
right away which makes debugging hard. Log the error at the place where the
error happens to help debugging.

Bug: 139114128
Test: Manual. Use DefaultTCService to pass error message and make sure
the error log is printed.

Change-Id: I7c848a6e96db85d6e5b4f90ee9677dfe5b703149
2019-08-21 16:47:53 +08:00
Zim
e1c49ce35d Add ExternalStorageService API
The ExternalStorageService implementation will live in android.process.media
It will orchestrate filesystem IO from apps coming from an upper filesystem
to a lower filesystem

Test: m
Bug: 135341433
Change-Id: I9b132ce7e5e5985ef3307c75ce7db50affc65a8e
2019-08-21 08:02:47 +01:00
Julia Reynolds
a10437f460 Make some APIs used by ExtService module @SystemApi
These are all pieces of data apps could get anyway;
these are code nice-to-haves to reduce code replication

Test: make
Bug: 122138479
Bug: 138589409
Change-Id: Ie8ffacb6c28840f779c68f7aa95f1405e70f5ce5
2019-08-19 11:32:12 -04:00
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