Commit Graph

15522 Commits

Author SHA1 Message Date
TreeHugger Robot
b5112587de Merge "Inject session id on all AutofillIds kept in the service." into qt-dev 2019-05-03 02:17:37 +00:00
Adam He
43c0699042 ContentCaptureManager is notified when FLAG_SECURE is set dynamically on
windows.

Fixes: 130377514
Test: # manual verification
Change-Id: I18126de8284a0c95ff61107031ffff941ca26be7
2019-05-02 16:22:50 -07:00
Winson Chung
d2ff5562a4 Merge "Preemptively clear buffer reference if snapshot is unused" into qt-dev 2019-05-02 23:01:42 +00:00
Winson Chung
67b090243d Preemptively clear buffer reference if snapshot is unused
- Normally this will be picked up in the next GC, but there is no reason
  to wait

Bug: 129295298
Test: Manual
Change-Id: I945336e86d0980f926586cfba6327c8c6c142ce8
2019-05-02 14:00:51 -07:00
TreeHugger Robot
501152f974 Merge "Avoid unnecessary badging" into qt-dev 2019-05-02 16:59:19 +00:00
Leon Scroggins
6e5efabcfd Merge "Pass ColorSpace along with HardwareBuffers" into qt-dev 2019-05-02 15:15:02 +00:00
Tiger Huang
d8ec938609 Refine getTransformationMatrix for windows in a re-parented display
Currently, the translation of the transformation matrix computed by
WindowState.getTransformationMatrix is related to its own display.
However, if the display has been re-parented, the translation might
be misplaced to the visual result. This CL makes it return the global
transformation matrix.

Bug: 129098348
Test: atest WindowStateTests
Change-Id: I38da5b84a11890bf0f4a57eb9d5b7e71bdcc16a9
2019-05-02 12:53:55 +08:00
TreeHugger Robot
8189440785 Merge "Elevate standby bucket on first foreground service start" into qt-dev 2019-05-02 01:55:12 +00:00
Felipe Leme
785777bb05 Inject session id on all AutofillIds kept in the service.
Android Q introduce the FLAG_DELAY_SAVE, which allows the autofill service to delay the SAVE UI by
keeping the session open. But this approach introduces a new problem, as fields from different
activities could have the same AutofillId.

Test: atest MultiScreenLoginTest#testSaveBothFieldsCustomDescription_sameIds
Test: atest AutofillIdTest
Test: atest CtsAutoFillServiceTestCases # sanity check

Fixes: 113593220

Change-Id: Ibd187f5c58c150f820972fcab6d88217294ffe2d
2019-05-01 18:10:00 -07:00
Ian Pedowitz
8b3b7771c1 Merge "Revert "RESTRICT AUTOMERGE Remove deprecated System APIs added in Q."" into qt-dev 2019-05-02 00:59:09 +00:00
Ian Pedowitz
79a19effee Revert "RESTRICT AUTOMERGE Remove deprecated System APIs added in Q."
This reverts commit 02014297fd.

Reason for revert: QT SDK Finalization. Will be merged again on/after May 13th

Bug: 129975435
Change-Id: Ia054b193a982dee669630555974d2d7831fe2b50
2019-05-02 00:54:39 +00:00
Ian Pedowitz
3f38719b74 Merge "RESTRICT AUTOMERGE Remove deprecated System APIs added in Q." into qt-dev 2019-05-02 00:53:29 +00:00
Patrick Baumann
e34a75dfd0 Avoid unnecessary badging
This change attempts to fetch the unbadged icon from ApplicationInfo for
a given PackageInfo before falling back to the default (badged) icon.

Test: manual; verify that TestDPC is only badged once when viewing device admins
Fixes: 112254944
Change-Id: I55026af543ff71ac0d947159bc6aeb3b33f31271
2019-04-30 12:21:10 -07:00
Svet Ganov
07e5fb253c Address API conucil feedback
Test: compiles

bug:131683068

Change-Id: I02afd0cc392e4fadd60de0d9802748452262543b
2019-04-30 11:16:21 -07:00
Sudheer Shanka
02014297fd RESTRICT AUTOMERGE Remove deprecated System APIs added in Q.
Test: Builds, boots
Bug: 129975435
Change-Id: I4bfd0bfbbc52b7822477ec0c70a08de6f85a3672
2019-04-30 10:49:28 -07:00
Svetoslav Ganov
1a5d1728af Merge "Address API council feedback" into qt-dev 2019-04-29 16:59:13 +00:00
Mady Mellor
02d6277b95 Merge "Remove bubble API added & deprecated in Q" into qt-dev 2019-04-29 16:17:15 +00:00
Svet Ganov
3b6be08c3d Address API council feedback
Make the get actions API async. Also fix a potenrial
memory leak when exchaning callbacks.

Test: atest CtsVoiceInteractionTestCases

bug:129705716

Change-Id: I91f1beb3dc7a395c6c6307ca4601fe7b7097f6e3
2019-04-28 23:01:30 -07:00
Sudheer Shanka
464762e5a2 Merge "Deprecate DownloadManager.allowScanningByMediaScanner/setVisibleInDownloadsUi" into qt-dev 2019-04-28 22:59:45 +00:00
Sudheer Shanka
5b2e695cd0 Deprecate DownloadManager.allowScanningByMediaScanner/setVisibleInDownloadsUi
Bug: 131483165
Test: n/a
Change-Id: I8e7f9c29d9bb323a7c0849e9ae4a87d0e74b16ab
2019-04-28 10:15:26 -07:00
Jeff Sharkey
0107bbb1ef Merge "Deprecate DownloadManager.addCompletedDownload." into qt-dev 2019-04-28 17:03:27 +00:00
Sudheer Shanka
0b70c2a1b4 Deprecate DownloadManager.addCompletedDownload.
Bug: 131483165
Test: n/a
Change-Id: Ie7df900e4cd79dcb4578f1f86fc44ca69356fd7b
2019-04-27 20:12:42 -07:00
Sudheer Shanka
c422917696 Don't assume all downloaded files are under top-level Download dir.
Apps could have downloaded files into their own package-owned paths
and those targeting P or lower, anywhere.

Fixes: 128320098
Test: manual
Test: atest DownloadProviderTests
Test: atest cts/tests/app/src/android/app/cts/DownloadManagerTest.java
Change-Id: I28d9f9b8017b66095fb1abeb9a389a18770989a4
2019-04-27 17:18:19 +00:00
Kweku Adams
8f24a0fb56 Merge "Gating OutOfBoundsException on targetSdkVersion." into qt-dev 2019-04-27 01:17:00 +00:00
Kevin Chyn
4ae9816408 Merge "Fix createConfirmDeviceCredentialIntent documentation" into qt-dev 2019-04-27 00:40:32 +00:00
TreeHugger Robot
777d6a93fc Merge "Use ActivityThread.currentApplication() for application context." into qt-dev 2019-04-26 21:06:21 +00:00
Mady Mellor
eae986e474 Remove bubble API added & deprecated in Q
Test: treehugger
Bug: 131428392
Change-Id: I272c830ab1f63e8de8ef6b03d74d7d60fad2388c
2019-04-26 14:00:20 -07:00
Kevin Chyn
45d0ceb8b1 Fix createConfirmDeviceCredentialIntent documentation
Test: make -j56 docs
Test: checked out/target/common/docs/offline-sdk/reference/android/app/KeyguardManager.html

Fixes: 131419117
Change-Id: I8c9254a591677ccf2453bff7d517a641da2b0f32
2019-04-26 20:30:39 +00:00
Kweku Adams
4be0b1acaf Gating OutOfBoundsException on targetSdkVersion.
Apps targeting Pie or older will get the old undefined behavior. Apps
targeting Q or newer will get the OutOfBoundsException.

Bug: 118339123
Test: atest CtsUtilTestCases
Change-Id: Ibf5467aadec4a2f76ee180e963afeaf5a8a013a2
2019-04-26 12:22:16 -07:00
Hai Zhang
91858b0aac Use ActivityThread.currentApplication() for application context.
Context.getApplicationContext() might return null if the context is
created with Context.createPackageContextAsUser(), as the application
instance for that context won't be created. In this case we can use
ActivityThread.currentApplication() directly, which does the same
thing as if the context wasn't created for a specific package or user.
We are only using this application context to bind to other services
so it will work fine.

Bug: 131356152
Test: presubmit
Change-Id: Iee1ac9aa088d452dc58dd7f19edc58a3e0b791a6
2019-04-26 15:09:10 +08:00
Mady Mellor
7e36009dd0 Merge "Make lifecycle events for bubble activity views report normally" into qt-dev 2019-04-25 20:19:30 +00:00
Amin Shaikh
96e60d7b5e Improve theme application transition.
- Remove duplicate app info changed / activity relaunch messages caused by
applying several overlay packages sequentially; this eliminated the
double launcher activity restart
- Asynchronously enable each overlay from SystemUI; this increases the
speed of enabling overlays, thus decreasing the effect of the frozen
activity transition

Fixes: 130151718
Test: make; change themes many times
Change-Id: Idcf04edc88cb9391b9920b9e1f9f873a5b62b311
2019-04-25 16:55:43 +00:00
Leon Scroggins III
3e2d7b7fe0 Pass ColorSpace along with HardwareBuffers
Bug: 130148101
Bug: 120904891
Test: I3bdb6a7edbab4b9b8f13d4597e5987e6db6fe928

Bitmap#wrapHardwareBuffer defaults to using the SRGB ColorSpace (i.e. if
null is supplied), but it's possible that where the HardwareBuffer was
originally used, it was associated with a different ColorSpace. Update
clients of this API to pass that ColorSpace.

Pass the ColorSpace's ID. This results in only supporting Named
ColorSpaces, which matches some of our other ColorSpace support, and
should be enough for most use cases.

Change-Id: I02460f079ed467199f368b4a4fd7708d6fa5433a
2019-04-25 16:48:08 +00:00
Chavi Weingarten
6ce572ec6c Merge "Added direct call to syncInputTransactions" into qt-dev 2019-04-25 16:27:37 +00:00
Sunny Goyal
d40c345536 [DO NOT MERGE] Adding API for defining and invoking DirectActions
DirectActions are abstract actions defined by an Activtiy. The
actual definition of these actions will be available through
the support lib.

This API provides a secure channel for system or assistant to
interact with a running app using these Actions.

Test: atest CtsVoiceInteractionTestCases
Test: added android.voiceinteraction.cts.DirectActionsTest

Bug: 129705716

Change-Id: I0ce568e0d8f41e0fe46306052016a74c7b394efa
2019-04-25 00:06:02 -07:00
Sudheer Shanka
ebcf054b48 Fix QT build breakage.
Test: builds
Change-Id: Iff6f516d68659a9b81009f82b6e1874089daa592
2019-04-24 18:41:15 -07:00
Sudheer Shanka
cbfe50d70c Merge "Update behavior of some DownloadManager APIs." into qt-dev 2019-04-25 00:51:59 +00:00
chaviw
84dec9f7c6 Added direct call to syncInputTransactions
Previously, there was only a way to inject input after syncing inputs.
However, some tests require a direct call to sync inputs since we need
to ensure the info was propagated to InputManager native before
continuing with the test. This exposes a method just to
syncInputTransactions.

Bug: 130695122
Test: ActivityLifecycleTopResumedStateTests
Test: MultiDisplayPolicyTests
Change-Id: Ie3115741a20d04c743fd854ac421dc3705332488
2019-04-24 17:01:31 -07:00
Mady Mellor
60101c9f29 Make lifecycle events for bubble activity views report normally
There are some extra onPause / onResume events in ActivityView due to
SysUI calling startActivity in onActivityViewReady which happens a bit
before the display being turned on.

This CL posts the startActivity call which is enough to avoid the extra
lifecycle events.

This CL also adds new method on ActivityView to startActivity with your own
ActivityOptions (because posting causes activity transition to occur...)

Test: manual - have Bubbles test APK
             - create a new bubble
             - adb logcat | grep "BubbleActivity"
             - observe the logging to make sure lifecycle events behave
               normally
Bug: 130363466
Change-Id: Ia44d6033e5cff625222006632b7bdc4dc1e59e81
2019-04-24 10:21:34 -07:00
Sudheer Shanka
25f1c6ebeb Update behavior of some DownloadManager APIs.
-- Update behavior of DownloadManager.setDestinationUri(),
   DownloadManager.setDestinationInExternalPublicDir() and
   DownloadManager.addCompletedDownload() based on the latest
   storage re-design. Essentially, going forward these APIs
   will only allow downloading files into package owned dirs
   or the top-level Download dir.
-- Allow some system components to specify
   MediaColumns.OWNER_PACKAGE_NAME when inserting items into
   MediaProvider.
-- Don't copy DownloadManager.COLUMN_TITLE to MediaProvider.
   DownloadProvider and MediaProvider have different constraints
   around "title" and there isn't really a need to keep these
   in sync.
-- Sanity check file download paths hinted by apps.
-- Remove sandbox related logic in DownloadProvider.

Bug: 120879208
Bug: 128630262
Bug: 130797842

Test: manual
Test: atest DownloadProviderTests
Test: atest cts/tests/app/src/android/app/cts/DownloadManagerTest.java
Test: atest cts/tests/app/DownloadManagerLegacyTest/src/android/app/cts/DownloadManagerLegacyTest.java
Test: atest cts/tests/app/DownloadManagerApi28Test/src/android/app/cts/DownloadManagerApi28Test.java
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*

Change-Id: If48bc9ecf9ed94412c6c62ce4e5e6a55fff9b789
2019-04-23 18:55:51 -07:00
TreeHugger Robot
845d5ee587 Merge "Fixed content capture whitelist for specific activities." into qt-dev 2019-04-22 22:34:09 +00:00
TreeHugger Robot
604e253c9e Merge "[wm] Fix smallestScreenWidthDp configuration on non default display (1/2)" into qt-dev 2019-04-22 18:46:26 +00:00
GyeHun Jeon
61cac3a333 [wm] Fix smallestScreenWidthDp configuration on non default display (1/2)
smallestScreenWidthDp configuration should be set to smallest possible size.
This could cause unexpected resources to be loaded based on the incorrect configuration. So it
should be set as minimum size of screenWidthDp and screenHeightDp to account for rotation.

Test: reproduce test steps in bug
Test: atest CtsWindowManagerDeviceTestCases:DisplayTests
Bug: 129521230
Change-Id: I07403294e8fe6e6ad7aa718c8a5948aff4fafae1
(cherry picked from commit 7671d7042d60944813f36a03b74199c5a3d737ad)
2019-04-22 08:32:45 -07:00
Winson Chiu
a99ff5fa9a Merge changes I689ec523,Id249a185 into qt-dev
* changes:
  Delayed install completion
  Defer post-install resource clean up for 5 seconds
2019-04-22 14:35:50 +00:00
Felipe Leme
cbf7f26baa Fixed content capture whitelist for specific activities.
Test: manual verification (it cannot be fully verified using the current CTS setup)
Test: atest CtsContentCaptureServiceTestCases:android.contentcaptureservice.cts.WhitelistTest
Test: atest FrameworksCoreTests:android.content.ContentCaptureOptionsTest
Test: atest CtsContentCaptureServiceTestCases # sanity check
Test: m update-api

Fixes: 130573023
Merged-In: I2c76a01bd98c4154c4c59099f1368232d2dba80d
Change-Id: I2c76a01bd98c4154c4c59099f1368232d2dba80d
2019-04-19 20:25:45 -07:00
Felipe Leme
8c2360b123 DO NOT MERGE - Updated some javadocs.
Test: make ds-docs

Bug: 130726495
Fixes: 130737893

Change-Id: Idaf50cb17b0668f3052d86f256d5428ba4e06a3c
2019-04-19 16:08:48 -07:00
Winson
23863be910 Delayed install completion
This change is an attempt at delaying the install complete callback
to the installer on a DONT_KILL install until the package indicates
that it as completed updating its classpath with the new APKs.

Bug: 80269951
Bug: 109751013

Test: manual test of dynamic delivery/instant apps

Merged-In: I689ec523522da37987cff9b1a67eaae9e5633ffb
Change-Id: I689ec523522da37987cff9b1a67eaae9e5633ffb
(cherry picked from commit abfc054c90)
2019-04-19 22:52:41 +00:00
Andrii Kulian
8602401358 Add event logs for top resumed state change
Bug: 130807813
Test: Build and run, check logs
Change-Id: Ib00a38fa308888bfc784d53145fff54325e355d3
2019-04-18 19:41:23 -07:00
TreeHugger Robot
7fdbe22475 Merge "Make RemoteService propagate Context#bindService failure to PendingRequests" into qt-dev 2019-04-18 23:07:32 +00:00
TreeHugger Robot
f96a3cbaa3 Merge "Add @TestApi to StatusBarManager @SystemApi methods" into qt-dev 2019-04-18 19:58:25 +00:00