Commit Graph

16085 Commits

Author SHA1 Message Date
Makoto Onuki
7c730311ea Merge "Remove build time dependency from BatteryStats to JobParameters" 2019-08-09 20:38:34 +00:00
Makoto Onuki
9111d1dcec Remove build time dependency from BatteryStats to JobParameters
In preparation of moving the jobscheduler framework code to its
own jar.

Bug: 138793378
Test: dumpsys batterystats  -c | grep jbc and make sure the line looks correct

Change-Id: I9938c99e37bd44e522e5f8d8e95772e69d5be492
2019-08-08 15:33:37 -07:00
TreeHugger Robot
893735c812 Merge "Fixes usage of WallpaperManager to make it optional." 2019-08-08 20:34:01 +00:00
Charles Chen
635fcc218b Add max target sdk for LocalActivityManager
Test: build and presubmit
Bug: 137825207
Change-Id: I30ca8a966e26bd8394e4f9bb0374b360d064673c
2019-08-08 18:16:59 +08:00
TreeHugger Robot
e1025e8228 Merge "Add max target sdk for ActivityGroup related APIs" 2019-08-08 10:03:37 +00:00
Felipe Leme
34a861add1 Fixes usage of WallpaperManager to make it optional.
As the main javadoc states:
"An app can check whether wallpapers are supported for the current user,
by calling {@link #isWallpaperSupported()}, and whether setting of
wallpapers is allowed, by calling {@link #isSetWallpaperAllowed()}."

Test: manual verification on automotive
Test: atest CtsAppTestCases:android.app.cts.WallpaperManagerTest # on automotive

Bug: 138939803

Change-Id: I88946f92ff54e556d289c41c28e22da3a4b8c8b8
2019-08-07 21:08:52 +00:00
Vinit Nayak
e185ac2b8b Merge "Create general callback for changes to RecentTaskList" 2019-08-06 22:05:26 +00:00
TreeHugger Robot
da6b1ff949 Merge "Fix ActivityView surface can't visible for ActivityViewTest" 2019-08-06 21:22:22 +00:00
Kevin Hufnagle
ac971c2c1c Merge "docs: Clarified when onRestoreInstanceState() executes" into qt-dev am: c80fe63001 am: ad1de8fbe4 am: 0f27f04f9b
am: 7130f7ed6b

Change-Id: Icd331ef8ed5fa1a2925b621d6670140aa03d7c09
2019-08-06 09:45:11 -07:00
Kevin Hufnagle
7130f7ed6b Merge "docs: Clarified when onRestoreInstanceState() executes" into qt-dev am: c80fe63001 am: ad1de8fbe4
am: 0f27f04f9b

Change-Id: Ibafe22878438e3f1ce176647a3ba07544d753dbf
2019-08-06 09:38:01 -07:00
Kevin Hufnagle
0f27f04f9b Merge "docs: Clarified when onRestoreInstanceState() executes" into qt-dev am: c80fe63001
am: ad1de8fbe4

Change-Id: I22a8b72e89aef3063c3f2b40e6d1f58c7155a7e8
2019-08-06 09:23:03 -07:00
Kevin Hufnagle
ad1de8fbe4 Merge "docs: Clarified when onRestoreInstanceState() executes" into qt-dev
am: c80fe63001

Change-Id: I332332fc88e565a3842297b04769778ee1c344ca
2019-08-06 09:09:56 -07:00
lumark
3f51e3cfd4 Fix ActivityView surface can't visible for ActivityViewTest
CL [1] introduced ActivityView's surface view set alpha as zero by default.
but SurfaceView ignores alpha value by default.

So to archieve SurfaceView can support alpha value and then introduced CL[2].
with that CL, it will affect ActivityView that can't see the surface because
of this zero alpha value.

Since CLs[1] & [2] are mainly considered for BubbleController to implement
content visiblity with setting surface view's alpha value without
flickering, and in BubbleExpandedView#onFinishInflate has already
called setContentVisibility(false) to set ActivityView's alpha value as
zero before add this view.

So removing ActivityView's default zero alpha value would be fine, since
it may not always the case that need to set zero alpha but need to show
the black rectangle surface for user. (i.e. ActivityViewTest or Android Auto)

Also, refined ActivityView#setAlpha for some stuff to make it clear.

[1]: Ie5aed373996419b059935889b564ca91c2e3cf23
[2]: I86847de59109b2adf12a2c7c50c988c2cbcf0450

Bug: 137937105
Test: manual as below steps
      1) make & install ActivityViewTest
      2) launch "AV Main" shortcut
      3) press "Test ActivityView" -> "Launch test activity"
      4) see if launched Acitvity is visible as expected.
Test: atest ActivityViewTest, observe if ActivityView is visible during testing.

Change-Id: Iaf480912f06a6851001a42bf90e4d962c8a88a37
2019-08-06 23:22:56 +08:00
Jorim Jaggi
5534e159c1 Merge "Fix overlapping remote and recents animations" into qt-r1-dev am: b248a0343f am: dd40a0c75a
am: c7b3ff1c52

Change-Id: Iaba42814773ab7333aae3fbc90d3bbd2ea8bac87
2019-08-05 12:01:12 -07:00
Jorim Jaggi
c7b3ff1c52 Merge "Fix overlapping remote and recents animations" into qt-r1-dev am: b248a0343f
am: dd40a0c75a

Change-Id: Ia9361be8e0040303ab397e718e055193409624cf
2019-08-05 11:50:14 -07:00
Jorim Jaggi
dd40a0c75a Merge "Fix overlapping remote and recents animations" into qt-r1-dev
am: b248a0343f

Change-Id: I103ff225bbf69e6945cb90430130ae233dd6cb9f
2019-08-05 11:39:05 -07:00
TreeHugger Robot
7682e5d196 Merge "DPM: Add API for granting apps access to keys" 2019-08-05 17:48:43 +00:00
Jorim Jaggi
589c5ba0fa Fix overlapping remote and recents animations
Test: Open app and immediately swipe up while opening. Verify
Thread prioties in systrace

Test: WindowProcessControllerTests
Fixes: 137881181
Change-Id: Ic1d7403d2a648e6f1d1b6a3d55b56bf37bc57a2c
2019-08-05 17:10:18 +02:00
Jeff Sharkey
3a5492c398 Merge "Enable stricter SQLiteQueryBuilder options." 2019-08-04 14:23:36 +00:00
Kevin Hufnagle
4fbcec13a0 docs: Clarified when onRestoreInstanceState() executes
This method executes only after onDestroy() is called.

Change-Id: I4880cc98ea08945f30b16baa7ae400a5bbe3e439
Test: make ds-docs
Bug: 136241777
2019-08-02 15:43:33 +00:00
Eran Messeri
49ed3232cf DPM: Add API for granting apps access to keys
Add a DevicePolicyManager method for granting (or revoking) access to a
key for a specific package.

This prevents apps from having to call KeyChain.choosePrivateKeyAlias to
get a grant for the alias.
The motivation for this change is that apps that run as a background
service do not have an Activity to pass into
KeyChain.choosePrivateKeyAlias any more as they are not allowed to
interact with users.
That creates a situation where even though the Device Policy Client
would silently grant the requesting app access to a KeyChain key, the
app still has to provide an Activity.

With this change, the DPC can pre-grant the app access to a key such
that the app does not need to call KeyChain.choosePrivateKeyAlias and
can instead just call KeyChain.getPrivateKey

BUG: 137921026
Test: atest CtsDevicePolicyManagerTestCases:com.android.cts.devicepolicy.MixedDeviceOwnerTest#testSetKeyGrant
Change-Id: I37a75e1f802e223740eb41f055224baba9aa3b3a
2019-08-02 10:52:41 +01: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
Charles Chen
5c0943dbb0 Add max target sdk for ActivityGroup related APIs
Test: build and presubmit
Bug: 137825207
Change-Id: Ie3125743b46e785bf3f5655518e5634da2f578b0
2019-08-01 10:51:22 +08:00
TreeHugger Robot
cf141432db Merge "Add logs for debugging IME onConfigurationChanged" 2019-07-31 13:42:14 +00:00
TreeHugger Robot
f7cb026386 Merge "Add a comment in WallpaperManager#getWallpaperColors" 2019-07-31 10:48:58 +00:00
Adam He
2eaec69928 Merge "Implement AssistStructure.ViewNode.getHintIdEntry()." 2019-07-30 21:32:27 +00:00
Makoto Onuki
3074086120 Merge "Move the job scheduler service code to its own jar file." 2019-07-30 15:27:16 +00:00
lumark
ddc77fb76d Add logs for debugging IME onConfigurationChanged
To help clarify why IME service client didn't receive
onConfigurationChanged callback.

Bug: 135719017
Test: manual
Change-Id: I2c17e2290f6cefd49ed5c30a8a524dcb48d6ee40
2019-07-30 13:12:23 +08:00
Louis Chang
443c5edeea Merge "Adding caller display id when launching activities via PendingIntent" 2019-07-30 02:48:25 +00:00
wilsonshih
e93eef540d Add a comment in WallpaperManager#getWallpaperColors
After discussion, instead of preventing the user get stuck
when calling WallpaperManager#getWallpaperColors, we decided
to inform developers that this API should not be called in
their UI thread.

Bug: 127343255
Test: atest WallpaperManagerTest
Change-Id: I3ae82a127391d4d8c23b56077954b74fd691f774
2019-07-30 02:38:47 +00:00
Makoto Onuki
792de8d648 Move the job scheduler service code to its own jar file.
- Also remove the dependency from SystemServiceRegistry to JobScheduler

See apex/jobscheduler/README_js-mainline.md for the details.

Bug: 137763703
Test: build and boot
Test: atest CtsJobSchedulerTestCases
Change-Id: I2386c78b7a6085d6e543a63f22cb620c4cabd06a
2019-07-29 09:32:02 -07:00
Louis Chang
477e93ea56 Adding caller display id when launching activities via PendingIntent
Activities were launched on primary display when they were started
via PendingIntent, because we didn’t have the caller information
from PendingIntent and were unable to determine the preferred
displays for the newly created activities.

Applications should use the correct context while calling
PendingIntent.send().

Also fix that animation type could be overrides when merging
two activity options.

Bug: 130967908
Test: atest MultiDisplayActivityLaunchTests

Change-Id: I9c50900937f20a83768d5e676b93c4c02665f8cb
2019-07-29 14:44:19 +08:00
Julia Reynolds
b15b4616d7 Merge "Allow the down volume key to silence notifs" into qt-qpr1-dev
am: 71148077e8

Change-Id: I582d615ae6b66cfaeef0b5420e626855024cf7f2
2019-07-26 17:48:52 -07:00
Julia Reynolds
1ceddc4ce3 Allow the down volume key to silence notifs
Additionally preserve existing behavior by passing
the keypress on.

Fixes: 130025623
Test: manual
Change-Id: I00f83275000369c1ab03bae63eb0a4b6170c4b53
(cherry picked from commit deb2d0b743)
2019-07-26 19:25:38 +00:00
Vinit Nayak
3e73749c13 Create general callback for changes to RecentTaskList
New callback called whenever a user visible task
is added or removed to the recents list. This results
in less work by updating only when recent task list
changes instead of listening for active task list
changes.

Test: atest RecentTasksTest

fixes: 111077107

Change-Id: I9acf13762d0c79bfde90b64fa5e0edaf882068cc
2019-07-26 12:10:47 -07:00
Patrick Baumann
6c1c809923 Initial app filtering logic
This change adds support for filtering apps from one another based on
the declared <queries> tags they have in their manifest. By default,
enforcement of the checks will be bypassed via app op.

Test: atest AppsFilterTest
Test: visibility limited after `adb shell appops set --uid <pkg> QUERY_ALL_PACKAGES ignore
Test: blocking logged after `adb shell appops set --uid <pkg> QUERY_ALL_PACKAGES deny
Bug: 136675067
Change-Id: I7b0c3714298aac183dfe2ae9e94097587648d59f
2019-07-26 18:15:21 +00:00
Ryan Lin
74fc2c8d70 Merge "Added onGesture(AccessibilityGestureInfo) for mulit-display" 2019-07-26 05:49:30 +00:00
Makoto Onuki
a0eb2ddf1a Merge "Revert "Move the job scheduler service code to its own jar file."" 2019-07-25 18:13:15 +00:00
Makoto Onuki
a0c692ff9f Revert "Move the job scheduler service code to its own jar file."
This reverts commit 136d1ecf1e.

Reason for revert: My device didn't boot. :(

Change-Id: I11636c2ad03a3c14f5953a700fc3a2d629a81a42
2019-07-25 18:09:14 +00:00
Makoto Onuki
9343ae0bbe Merge "Move the job scheduler service code to its own jar file." 2019-07-25 16:40:30 +00:00
Makoto Onuki
136d1ecf1e Move the job scheduler service code to its own jar file.
- Also remove the dependency from SystemServiceRegistry to JobScheduler

See apex/jobscheduler/README_js-mainline.md for the details.

Bug: 137763703
Test: build and boot
Test: atest CtsJobSchedulerTestCases
Change-Id: Ic8ae8e99e6600b261618b5cfb6590d3f3664ae9f
2019-07-24 14:50:47 -07:00
Selim Cinek
9f56b20eea Merge "Not asking for the password when dragging down and bypass" into qt-r1-dev am: 87592617ec am: dad92fc913
am: a014f22da9

Change-Id: Ie3463c3494bbeae3b104acfd00d41611b3c6f1e7
2019-07-24 10:28:52 -07:00
Selim Cinek
324bf3e6d1 Merge "Not asking for the password when dragging down and bypass" into qt-r1-dev
am: 87592617ec

Change-Id: Ifd782f3883c52b800228a4a5ca5171fe7f4dc390
2019-07-24 10:17:47 -07:00
Selim Cinek
a014f22da9 Merge "Not asking for the password when dragging down and bypass" into qt-r1-dev am: 87592617ec
am: dad92fc913

Change-Id: Ice0f1ed6e40d76aff872b17913b08ee2615a4fb1
2019-07-24 10:17:37 -07:00
lumark
44fe4e471f Fix ActivityViewTest#testInputMethod failed in freeform mode
Since IMM#reportActivityView() expects a matrix that transform coordinates
that maps (0, 0) in the ActivityView to the actual screen coordinates in
the host process.

So transform coordinates with getLocationInWindow which presents the location
that inside of ActivityView will be wrong when in freeform mode.

We should use getLocationOnScreen to fix this.

Fix: 137566626
Test: atest ActivityViewTest#testInputMethod in freeform / desktop mode
Test: manual as below steps:
      0) Make sure device connected HW keyboard & set Gboard launguages
         as Japanese input.
      1) Make and install ActivityViewTest.
      2) Launch any app and enter split screen mode.
      3) Launch "AV Main" with shortcut in split screen bottom stack.
      4) Press "Test Scroll ActiviyView" - > "launch"
      5) Scroll down ActivityView & tap EditText and then type words with
         HW keyboard.
      6) Check if candidate view shown on the right place that aligned
         with EditText.

Change-Id: Ia40b9aa94028592fd16e45c7226ec6e3cf07c9b1
2019-07-24 22:31:10 +08:00
RyanlwLin
a0daddd8d8 Added onGesture(AccessibilityGestureInfo) for mulit-display
We added a new API to help App developers know the gesture information
performed on specific display.

Bug: 133290787
Test: atest AccessibilityGestureDetectorTest
Change-Id: Ic98847691ba9f608f418408e9bef1c3116388f3c
2019-07-24 11:28:50 +08:00
Selim Cinek
abcc201afb Not asking for the password when dragging down and bypass
Instead we'll just keep them in there looking like locked
notifications.

Fixes: 138225058
Test: add notifications, enable dynamic privacy, drag down
Change-Id: Ica49035ba3fe655c145f81be962817ddd294c48d
2019-07-23 18:44:07 -07:00
Andrii Kulian
057a651f89 Cleanup ActivityStack#requestFinishActivityLocked
In an attempt to reduce the number of different finish* methods in
ActivityTaskManager codebase this CL consolidates
ActivityStack#requestFinishActivityLocked() into
ActivityRecord#finishActivityLocked().

It was used before to initiate activity finishing and the return
value indicated if the request was successful. It was different from
the return value of ActivityRecord#finishActivityLocked(), which only
returned 'true' if the activity record was removed from history
immediately. In order to accomodate both, this CL updates the finish
method in ActivityRecord to return an integer status value, so it can
now be used in both cases.

Bug: 137329632
Test: atest WmTests:ActivityRecordTests
Change-Id: I30ebc306637dea5e8b28ca4b4dfaab8df31d2be3
2019-07-22 13:13:51 -07:00
Varun Shah
10909fd386 Merge "Add OnSharedPreferencesClearListener for Editor#clear." 2019-07-20 10:51:01 +00:00
Adam He
d55b16e73e Implement AssistStructure.ViewNode.getHintIdEntry().
Bug: 135134274
Test: atest CtsAutoFillServiceTestCases
Test: atest android.contentcaptureservice.cts.unit.ViewNodeTest
Change-Id: I7154cf97a5236ad975bd774c29b30e055cfca8bd
2019-07-19 15:33:51 -07:00