Commit Graph

16478 Commits

Author SHA1 Message Date
TreeHugger Robot
9f43c201fe Merge "Do not look for R.class of overlays" 2019-11-14 19:04:48 +00:00
Makoto Onuki
57c99d3a2f Merge "Revert "Clean up system service registration."" 2019-11-14 02:28:26 +00:00
Makoto Onuki
202fd24765 Revert "Clean up system service registration."
This reverts commit a9f2224068.

Reason for revert: broke build

Change-Id: I08d1e3b6f7f02627138ff3f50b436772e1eb756f
Fixes: 144460136
2019-11-14 02:25:11 +00:00
Makoto Onuki
3212ad0167 Merge "Clean up system service registration." 2019-11-14 00:14:22 +00:00
Ryan Mitchell
73bfe41bab Do not look for R.class of overlays
Now that RROs are loaded as shared libraries,
LoadedApk#makeApplication is attempting to find the onResourcesLoaded
method of the overlays. This is a performance hit and causes more
memory than necessary to be allocated during application start up.

Bug: 143314947
Test: com.android.performance.tests.HermeticMemoryTest
Change-Id: I3b8cd22dae83e0164d6678c80279f9fffceb34e6
2019-11-13 14:51:14 -08:00
Makoto Onuki
a9f2224068 Clean up system service registration.
Bug: 143788029
Test: boot

Change-Id: I6e19e2b0f08b4977b3df1cf8b6972bf3fda6d4b9
2019-11-13 14:04:00 -08:00
Tej Singh
5918429fa2 Java API for pulled atoms
This creates a java API for registering pullers. Will implement the
statsd side in a follow up CL.

Test: builds, boots
Change-Id: Ib6735984297ce3148839a6370a3c15b2a585baf5
2019-11-13 13:22:27 -08:00
TreeHugger Robot
bc7671b9fb Merge "Add @UnsupportedAppUsage to test apis that are known to be used by apps." 2019-11-13 15:46:27 +00:00
Artur Satayev
f0b7d0ba51 Add @UnsupportedAppUsage to test apis that are known to be used by apps.
go/testapi-enforcement

Bug: 133832325
Test: m
Change-Id: Ifc8db120640a1554dcbf1722e61e09c7ddc65dd6
Merged-In: Ifc8db120640a1554dcbf1722e61e09c7ddc65dd6
2019-11-13 12:58:29 +00:00
Alex Johnston
5ab1017716 Merge "Call getPasswordComplexity on the parent profile" 2019-11-13 12:07:23 +00:00
TreeHugger Robot
a22721f5ed Merge "Add Bubble as an option in NotificationInfo longpress menu" 2019-11-12 20:12:32 +00:00
Yuncheol Heo
fe0e4a2478 Merge "Make onActivityViewDestroyed called when AV is released." 2019-11-12 18:39:16 +00:00
Alex Johnston
07cb9f04c7 Call getPasswordComplexity on the parent profile
Previously, this API did not support explicitly querying the parent profile.
This CL will now allow the WP DPC to call this method since all other password
related methods can already be called.

Screenshot of TestDPC: https://hsv.googleplex.com/4804408720228352 (WP DPC)
                       https://hsv.googleplex.com/5189846769336320

Bug: 138709470
Test: manual testing using Personal and WP TestDPC
      atest com.android.cts.devicepolicy.ManagedProfileTest
      atest com.android.cts.devicepolicy.PasswordComplexityTest
      atest com.android.server.devicepolicy.DevicePolicyManagerTest

Change-Id: I0fb3a96c4469046c8712b5de582c501ea7eb3d8b
2019-11-12 16:58:33 +00:00
Artur Satayev
d9bc075335 Merge "Add --no-test-api-acces to am instrument." 2019-11-12 16:00:07 +00:00
Artur Satayev
ab4d5afcf7 Add --no-test-api-acces to am instrument.
By default instrumented processed have access to @TestApis; however for certain CTS tests we want to disable access to test APIs, where this flag would be used.

Test: manual
Bug: 133832325
Change-Id: Id56ce3079bcea2632d4002edcf120d9d5c9e0a26
2019-11-12 12:52:34 +00:00
TreeHugger Robot
59cee214bf Merge "Merge Task and TaskRecord into one class (65/n)" 2019-11-12 04:11:33 +00:00
Louis Chang
cdec080895 Merge Task and TaskRecord into one class (65/n)
Merge Task and TaskRecord into a single Task class. Also Consolidate
updateTaskMovement() call points to TaskStack.onChildPositionChanged().

Bug: 80414790
Test: Existing tests pass
Change-Id: Iec0101b211bf34fab42131aae6cddfe1262e2add
2019-11-12 10:29:39 +08:00
Mady Mellor
53162c13a3 Add Bubble as an option in NotificationInfo longpress menu
- If the content is able to bubble, the bubble option will show in
  the menu
- If that notif is able to bubble (either via bubble metadata or via
  notification contents), then show the menu
- Adds tests for the bubble menu option, also tests selection for alert
  and silence buttons; removes unused test code

Test: atest NotificationInfoTest NotificationGutsManagerTest
Test: manual - post a bubble with bubbles test app, longpress on notif
               and demote it via menu => bubble is gone
             - long press on notif and promote it via menu => bubble is
               created
Bug: 138116133
Bug: 143173197
Change-Id: I2f2767ec12c49e5d3a8d2a7b86db5457d062275c
2019-11-11 16:29:37 -08:00
Hyangseok Chae
1d9b805409 Fix a missing synchronization to Notification
Concurrent access on allPendingIntents could cause
crash by ArrayIndexOutOfBoundsException.
Below two accesses can occur in two different threads.
But allPendingIntents(ArraySet) is not thread-safe.
1. Access to write.
   allPendingIntents = new ArraySet<>();
   parcel.writeArraySet(allPendingIntents)
2. Access to add.
   allPendingIntents.add(intent);

So, we added missing synchronization to Notification

Test:
It is hard to reproduce by manual.
Make/Update notification with pendingintent.

Change-Id: Ib866f6b92528f7a944ac93997a9cff07892d4192
Bugs: 144081764
2019-11-11 14:09:42 +00:00
Jorim Jaggi
5fdaa0c9af Merge "Remove FEATURE_SWIPE_TO_DISMISS functionality" 2019-11-11 13:10:30 +00:00
Yuncheol Heo
9076eacaaf Make onActivityViewDestroyed called when AV is released.
Test: WmTests:TaskStackChangedListenerTest#testSingleTaskDisplayEmpty
Change-Id: I1271edb08b65b3ca29f92b237d0a65defb7bb38a
2019-11-10 11:34:08 -08:00
Meng Wang
d4976c4f46 Merge "System API: Context#registerReceiverForAllUsers" 2019-11-08 18:03:02 +00:00
Beverly Tai
707ba29a66 Merge "Update equals and hashCode methods of NoMan.Policy" 2019-11-08 14:27:23 +00:00
Joanne Chung
b26a6c567a Merge "Allow to use ExtService as TextClassifierService" 2019-11-08 05:15:30 +00:00
Sudheer Shanka
a83671193b Merge "Add a new system service for blob store management." 2019-11-08 04:05:35 +00:00
Yunfan Chen
a232661f36 Merge "Hook up TaskDescription into set bar color calls (6/N)" 2019-11-08 02:22:05 +00:00
Joanne Chung
0ad8fe3b87 Merge "Grant permissions to ContentCapture and remove permission for TC." 2019-11-08 01:51:15 +00:00
Yunfan Chen
bd12f5a274 Merge "Notify task freeform constrains change to system UI (5/N)" 2019-11-08 00:01:29 +00:00
Meng Wang
3f9e036f11 System API: Context#registerReceiverForAllUsers
Bug: 141193711
Test: make
Change-Id: Ie692d2ac27474b9fe11f5548bc504aa00c5ad53c
2019-11-07 15:03:13 -08:00
Sudheer Shanka
f5b36964e0 Add a new system service for blob store management.
This change adds a bare-bones system service, implementation will follow
later.

Bug: 143559646
Test: atest cts/tests/BlobStore/src/com/android/cts/blob/BlobStoreManagerTest.java
Change-Id: Idf21dfcd11dd32a42b62c6ad965d6f5ad7eed1b4
2019-11-07 13:37:14 -08:00
TreeHugger Robot
0dc6c591ba Merge "Extracts core logic of ActivityView into TaskEmbedder" 2019-11-07 18:37:53 +00:00
Mark Renouf
89ac988242 Extracts core logic of ActivityView into TaskEmbedder
TaskEmbedder is a new building block for task embedding which
will be used by SystemUI to perform more complex operations
than what can be acheived using ActivityView today.

For task embedding use cases, integrating TaskEmbedder directly
with a SurfaceView (or other surface) will allow:

- management of multiple tasks within a single parent surface
- access to the surfacecontrol of each task for manipulation/animation
- (SurfaceView) configure whether zOrder above or below.

See: go/av-refactor

Change-Id: Ia813c52bc2da3a776e727b5bbd2b03b8ff09f302
2019-11-07 12:11:57 -05:00
TreeHugger Robot
778380a102 Merge "Postpone reporting fully drawn until app is drawn" 2019-11-07 14:50:08 +00:00
James Lin
5da87df5bb Merge "[RCS] Create AIDL layer for RcsUceAdapter, create RCS UCE controller implementation in Telephony." am: 303c5dc0fb am: b815ee2bb9
am: 35a357814c

Change-Id: I6790023bd43b6787e2e9a46e6ec4f645a69b95ee
2019-11-06 19:47:30 -08:00
James Lin
35a357814c Merge "[RCS] Create AIDL layer for RcsUceAdapter, create RCS UCE controller implementation in Telephony." am: 303c5dc0fb
am: b815ee2bb9

Change-Id: I58e1e01f6901cc1630a6f34358e3008a1bbb1da7
2019-11-06 19:41:37 -08:00
James Lin
b815ee2bb9 Merge "[RCS] Create AIDL layer for RcsUceAdapter, create RCS UCE controller implementation in Telephony."
am: 303c5dc0fb

Change-Id: Ibcd4e3ab7c60c1446019d652e5603b02ca9f34b2
2019-11-06 19:33:36 -08:00
James Lin
303c5dc0fb Merge "[RCS] Create AIDL layer for RcsUceAdapter, create RCS UCE controller implementation in Telephony." 2019-11-07 03:26:08 +00:00
Yunfan Chen
91b3a1bd14 Hook up TaskDescription into set bar color calls (6/N)
This patch will update the task description when the app calls
setStatusBarColor or setNavigationBarColor. The status bar is updated
but the information is not reflected in the task description without
this patch.

Bug: 132756841
Bug: 113253712
Test: Test with the test app in b/132756841. The task description is
      updated as expected.
Test: go/wm-smoke
Change-Id: I4ba1e5e7dd0f096cba40221450a8861e3d578e3c
2019-11-06 16:57:05 -08:00
Yunfan Chen
674f969fd1 Notify task freeform constrains change to system UI (5/N)
This patch introduces freeform constraints, including the resize mode
and the minimal size to TaskDescription of TaskRecord. This will be
used to draw the resizing bounds before actually get the resizing done
by the WM. It will provide a better support for resizing strategies
including guide-view and background color fill.

Bug: 113253712
Bug: 122726344
Bug: 143496800
Test: go/wm-smoke
Test: Manually registered a listener from system UI and the event is
      correctly received.

Change-Id: I430c165cfb52ae4135c8d9328f682b8d305d0302
2019-11-06 14:11:12 -08:00
TreeHugger Robot
0c2972635a Merge "Enables multiple clickable links on the SaveUi" 2019-11-06 13:48:11 +00:00
Riddle Hsu
c1f8f9cbfc Postpone reporting fully drawn until app is drawn
"Fully drawn" should stand for an usable state of the application.
If its window hasn't drawn, the early reported time may not close
to the real use case.

This change ensures that "Fully drawn" is at least >= "Displayed".

Bug: 131713448
Test: atest ActivityMetricsLaunchObserverTests#testOnReportFullyDrawn
Test: Launch an application (e.g. Settings) that invokes
      Activity#reportFullyDrawn in an early stage. The printed
      duration of "Displayed" and "Fully drawn" should show
      the same time.

Change-Id: Id37425436dc564fc657f0777db8e0f056bbb748d
2019-11-06 20:58:19 +08:00
TYM Tsai
8af721d0af Enables multiple clickable links on the SaveUi
Enables multiple links for URLSpan on description TextViews. Also fixes
issue about cannot restore the save UI while back from the activity which
URLSpan launched.

Bug: 133515042
Test: manual
Test: atest CtsAutoFillServiceTestCases
Change-Id: I8a97c2eaccdde78622b5b5432c9b00ce19d871df
2019-11-06 13:56:56 +08:00
Joanne Chung
b50ab4bab8 Allow to use ExtService as TextClassifierService
1. Define a trust TextClassifierService list which contains ExtService. And
also define a DeviceConfig flag which can be set to the TextClassifierService
we would like to use. Because the TextClassfierService can be set to a side-load
app, e.g. CTS tests. If the override flag is not one of the packages in the
trust TextClassifierService list, it should be able to see only text from
its own UID.
2. Made TextClassifierService available for testing.
3. Fix the incoreect order for onConnected().
4. Fix API Lint errors.

Bug: 141111813
Bug: 143249163
Test: atest FrameworksCoreTests:android.view.textclassifier
Test: Manual. dumpsys to check current TextClassifierService. Change flag
to another service, and then check TextClassifierService changing to
expected TextClassifierService.
Test: Manual. Use local TextClassifierService to make sure the service
call order of connection callback and API call is correct.
Change-Id: I37ff298f0c65ae0469bd54e30f1ebf48b77c126c
2019-11-06 13:38:56 +08:00
wilsonshih
3c1e53ddaa Use setTaskOverlay to launch ConfirmDeviceCredentialActivity.
WorkLockActivity is launched as a task overlay activity. If it needs to
launch an activity on top of it, the activity should also be a task
overlay.

Bug: 142853039
Test: Follow the issue description
Test: atest WmTests:ActivityOptionsTest
Change-Id: If4cdc892f608df5337223f70333538e33ff593ca
2019-11-06 11:47:12 +08:00
TreeHugger Robot
80018c0878 Merge "Remove cancel listeners from pending intent alarms" 2019-11-06 02:30:24 +00:00
Mady Mellor
ab190a8043 Merge "Bubble icon improvements" 2019-11-05 21:03:49 +00:00
Jorim Jaggi
e06b1fd0f5 Remove FEATURE_SWIPE_TO_DISMISS functionality
Not used anymore by any product.

Bug: 143346248
Test: Boots
Change-Id: I21286e62f73ec34f7d5ca040cd614838c9cd4276
2019-11-05 19:14:54 +01:00
Jordan Liu
2493a630a6 Merge "Expose Context.sendOrderedBroadcast with appop" am: 08a94a2236
am: 43b6116549

Change-Id: I556cbff8a4aa8ca1f507cd1f63c435506b09cf0f
2019-11-04 13:31:04 -08:00
Jordan Liu
43b6116549 Merge "Expose Context.sendOrderedBroadcast with appop"
am: 08a94a2236

Change-Id: I8dd6fe3a9a70eba9d95cfd1e4cefd14c4ba376ed
2019-11-04 12:20:47 -08:00
Suprabh Shukla
0d51a8bcc0 Remove cancel listeners from pending intent alarms
The cancel listeners are created per PendingIntent instance and were
spamming the callback list stored inside PendingIntentRecord. In cases
where there is even a single live PendingIntent backed by this
PendingIntentRecord, all PendingIntent instances backed by this
PendingIntentRecord for which a callback was ever registered will leak.

Test: atest FrameworksMockingServicesTests:\
com.android.server.am.PendingIntentControllerTest
atest FrameworksMockingServicesTests:\
com.android.server.AlarmManagerServiceTest

Bug: 143091024
Change-Id: I65df12da0c437064e6e3719911926738c677c4eb
2019-11-04 11:59:36 -08:00