Commit Graph

12009 Commits

Author SHA1 Message Date
Lucas Dupin
e0653fabe6 Fix SliceProvider threading
Binding a slice that lives in the same process would lead to a
deadlock since we'd sleep the main thread while waiting for it
to decrease the CountdownLatch. Now we're checking if we're
already in the main looper and only posting when necessary.

Test: run code in ag/3082570
Change-Id: Id7c4f9dd8d84bf0e513606cbe07bf87750c567e4
2017-10-24 17:52:58 +00:00
Yueming Wang
302318bc9b Merge "Add setTime and setTimeZone API." 2017-10-23 17:29:09 +00:00
yuemingw
e43cdf7509 Add setTime and setTimeZone API.
Fix: 67497358
Test: wait for cts test in the following cl. For unitest:
 runtest -x services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java

Add setTime and setTimeZone API in devicepolicymanager.
Add unitest for each API.
Following design doc: https://docs.google.com/document/d/1NV93mr2CT157S_haru1QbKo9HLeP9iPM9eMiGfVmfCM/edit

Change-Id: I188c27b0b99137b6f01e42ae1ad49356ce0a81b2
2017-10-23 10:53:15 +01:00
TreeHugger Robot
b5a52f9026 Merge "Minor logging improvements on Autofill." 2017-10-18 01:21:09 +00:00
Jason Monk
8a77c22205 Merge "Unhide slice data APIs" 2017-10-17 21:59:15 +00:00
Felipe Leme
686128ef59 Minor logging improvements on Autofill.
Test: manual verification

Fixes: 67898895

Change-Id: Ic97d51a388a426b3ff9e74520f52036257a5c1ce
2017-10-17 14:02:58 -07:00
TreeHugger Robot
0d1dfd2c7b Merge "Update UsageStatsManager Javadoc to match implementation" 2017-10-17 17:13:29 +00:00
TreeHugger Robot
b52a5d3331 Merge "Updated TaskDescription to pass drawable resource ID (1/2)" 2017-10-17 01:38:42 +00:00
Jason Monk
d18651fa89 Unhide slice data APIs
Test: CTS
Change-Id: Ie2a05e30e5ac6c830b6a9a14b2d207b7e2fbe9da
2017-10-16 14:38:18 -07:00
Matthew Ng
54bc942fe4 Updated TaskDescription to pass drawable resource ID (1/2)
Depreciated the TaskDescription constructor when passing a bitmap and
added constructors to support passing drawable resource ID. Passing
drawable IDs allow users to use drawables such as AdaptiveIcons
instead of creating and passing a bitmap. Later SystemUI checks for
either bitmap, file name or resource ID to get a drawable to display.

Test: run-test CtsActivityManagerDeviceTestCases android.server.am
.TaskDescriptionTest
Change-Id: Ib944687249acf9fb6bbf9a9a109930cc04539e14
Fixes: 36298959
2017-10-16 10:56:24 -07:00
Lucas Dupin
049978e61d Fix wallpaper placement + performance improvement
Wallpaper would have the wrong placement during
first frame because it would be center aligned
in a surface that's not big enough.

Also removed old OpenGl implementation, in favor of new
hardware accelerated canvas.

Change-Id: Ic9c9eaa817e1f6494aa5431d8278f2c28b2c45a9
Fixes: 66926914
Test: set wallpapaer with different offsets, orientations and devices
2017-10-16 10:05:20 -07:00
Winson Chung
29eea40277 Merge changes Id963434f,I103ccc69,I770cd430
* changes:
  Remove events bus code from task loading code.
  Pull out TaskStackListener into its own class.
  Remove unused recents fast-toggle/paging code.
2017-10-13 23:45:55 +00:00
Winson Chung
2db3557064 Pull out TaskStackListener into its own class.
Bug: 67510855
Test: Code removal
Change-Id: I103ccc690f577dbeba9c3568614d9f4041fff7df
2017-10-13 14:25:26 -07:00
TreeHugger Robot
02a20b7025 Merge "Added new ViewNode properties for Autofill (minEms, maxEms, maxLength)." 2017-10-13 18:13:04 +00:00
Charles He
fe932c78ec Merge "AM: introduce ActivityOptions.setLockTaskMode()." 2017-10-13 13:38:06 +00:00
TreeHugger Robot
fac6655cf5 Merge "New Autofill API: SaveInfo.setTriggerId()" 2017-10-12 22:39:49 +00:00
Charles He
2bf2832047 AM: introduce ActivityOptions.setLockTaskMode().
This new API allows any activity to be launched into LockTask mode, as
if the package of the activity has declared "lockTaskMode =
if_whitelisted" in its manifest.

The lockTaskLaunchMode logic is also moved from TaskRecord to
ActivityRecord, in order to accommodate the new path from
ActivityOptions.

Bug: 66124180
Test: cts-tradefed run cts-dev --module DevicePolicyManager -t com.android.cts.devicepolicy.DeviceOwnerTest#testLockTask_deviceOwnerUser
Test: bit FrameworksServicesTests:com.android.server.am.LockTaskControllerTest
Test: manual, with TestDPC's kiosk mode
Change-Id: I786bf194ed20a212bbad1f3cdb9394cc77aa4d77
2017-10-12 23:03:30 +01:00
Winson Chung
5fa397533f 4/Clean up use of hidden recent task flags
- Remove flags to control which recent tasks are returned -- they are now
  trimmed with the expected behaviour when the task list is modified.
- Remove unused logic related to force-resetting a task based on inactive
  time.
- Remove SysUI logic related to excluded recent tasks since it is already
  handled
- Clean up task list subsetting now that returned list is guaranteed to
  only be visible tasks
- Only use AM interface to fetch recent tasks instead of through AM

Bug: 34270611
Test: runtest --path frameworks/base/services/tests/servicestests/src/com/android/server/am/RecentTasksTest.java
Change-Id: I3f60ce507563152b5704c63985af621b02d0e7c8
2017-10-12 11:37:17 -07:00
Winson Chung
fb44d212f2 3/Removing unnecessary filtering logic for recent tasks in SystemUI
- Remove all code related to last-stack-active-time, quiet profile task
  handling, and visible task range filtering
- Remove the notion of firstActiveTime since that was only used to filter
  tasks in SystemUI, also convert lastActiveTime to elapsed real time since
  it is only used in the system to order active tasks, and in SystemUI as
  a part of the TaskKey for caching purposes (it is no longer used to
  determine the last visible task based on time)

Bug: 34270611
Test: runtest --path frameworks/base/services/tests/servicestests/src/com/android/server/am/RecentTasksTest.java
Change-Id: I44d494a521f60f302e0976fcf33490fe837f7cdb
2017-10-12 11:26:15 -07:00
Felipe Leme
2fe3ade813 New Autofill API: SaveInfo.setTriggerId()
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases -t android.autofillservice.cts.SimpleSaveActivityTest#testExplicitySaveButton
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases -t android.autofillservice.cts.SimpleSaveActivityTest#testExplicitySaveButtonWhenAppClearFields
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases

Bug: 65118073
Fixes: 67006548

Change-Id: Id12179086567d014f35fe4177b041745fb19bafd
2017-10-12 09:55:45 -07:00
Siarhei Vishniakou
1174802b4c Merge "Do not send KEYCODE_VOICE_ASSIST to apps." 2017-10-12 16:06:52 +00:00
Beverly Tai
1e26cacc71 Merge "Add alarm + media/other to NotifManager.Policy" 2017-10-12 13:20:51 +00:00
Siarhei Vishniakou
191cf1b140 Do not send KEYCODE_VOICE_ASSIST to apps.
Prevent KEYCODE_VOICE_ASSIST from being sent
to the apps. Move the key handling logic from
interceptKeyBeforeDispatching to
interceptKeyBeforeQueueing for KEYCODE_ASSIST
and KEYCODE_VOICE_ASSIST.

Allow the launch of assistant with KEYCODE_ASSIST

Remove dead link from the docs.

Test: bit CtsViewTestCases:.KeyEventInterceptTest
Bug: 64776073
Change-Id: I6ab596ffb0448923d71da3fc93ccdd26de8d517f
2017-10-11 19:11:10 -07:00
TreeHugger Robot
f65d166959 Merge "Removed remaining use of static stack ids." 2017-10-11 21:27:05 +00:00
Bernardo Rufino
68a365fe55 Canonicalize notification channel sounds for backup am: 2d7a4a3f67
am: 4229c3fcbd

Change-Id: Ie900b1e7a613e6e7d94cd5c3224954f71fdd1a5d
2017-10-11 17:59:17 +00:00
Bernardo Rufino
4229c3fcbd Canonicalize notification channel sounds for backup
am: 2d7a4a3f67

Change-Id: I47c5aba70bd6713f5cd2432b1141d0772fa1e672
2017-10-11 17:50:06 +00:00
Wale Ogunwale
44f036fd5a Removed remaining use of static stack ids.
Replace by windowingMode and activityType.

Test: Existing tests pass.
Test: go/wm-smoke
Bug: 64146578
Change-Id: I2ff026de3ead1a3e7136df17c68ed37d7aae5495
2017-10-11 07:40:46 -07:00
Bernardo Rufino
2d7a4a3f67 Canonicalize notification channel sounds for backup
Canonicalize for backup and canonicalize and uncanonicalize for restore
(see comment).

Test: Set custom notification sound, make backup, remove notification
sound from device (from Ringtones and make sure to update media content
provider), restore => Observe default instead of random number. Do the
same without removing the sound and observe restores successfully.
Test: runtest systemui-notification
Bug: 66444697

(cherry picked from commit c27bb6ad34)

Change-Id: I32c186d0d7479b01f6cc67cce9bc5cb66264a064
2017-10-11 15:22:32 +01:00
Charles He
e7a7a29d2e Merge "StatusBar: add DISABLE2_GLOBAL_ACTIONS." 2017-10-11 08:07:21 +00:00
TreeHugger Robot
b6777755ec Merge "Document job scheduler wakelock policy" 2017-10-10 23:19:45 +00:00
Christopher Tate
6818d367a9 Document job scheduler wakelock policy
And clarify some other descriptions, particularly getAllPendingJobs().

Bug: 19536175
Test: m offline-sdk-docs
Change-Id: I769eb8eb7bdca77f6f143c0d18a3beccc183d5dc
2017-10-10 14:07:43 -07:00
Charles He
9851a8da99 StatusBar: add DISABLE2_GLOBAL_ACTIONS.
We add a new StatusBarManager flag to disable the global actions dialog
(a.k.a. the power button menu), which is required in certain kiosk mode
scenarios.

Bug: 65813398
Test: runtest systemui
Test: manual, by using a modified version of TestDPC and
      DevicePolicyManagerService

Change-Id: Ib7da2f4837281e98e558afcc30be8bae6f2e179a
2017-10-10 21:04:42 +01:00
Andrew Solovay
056dd6aace Merge "docs: Tiny usage fix ("e-mail" -> "email")" into oc-mr1-dev am: c4a0b34248
am: 81643c09cc

Change-Id: Ib935716cec8ae54f83f6ad85604f97e9982cd14b
2017-10-10 16:51:15 +00:00
Andrew Solovay
81643c09cc Merge "docs: Tiny usage fix ("e-mail" -> "email")" into oc-mr1-dev
am: c4a0b34248

Change-Id: I96c464236f694b194e9f5a6aba68b40ad840035d
2017-10-10 16:42:31 +00:00
Andrew Solovay
ab8ea9ff01 docs: Tiny usage fix ("e-mail" -> "email")
I needed to make an edit in this branch to verify part of our docs
process, so I found a Javadoc typo to fix. No code error, just took
out the hyphen in "e-mail" in a Javadoc comment.

Test: make ds-docs
Bug: 67515954
Change-Id: Icb9b2a9df0d7dfd697050735886adec80bc92ff8
2017-10-09 18:49:41 -07:00
Beverly
0421687f0c Add alarm + media/other to NotifManager.Policy
Alarm and media/system/other policies added to be able to toggle
filtering of alarm and media sounds for ZenMode/DND.

Bug: 63077372
Test: runtest -x frameworks/base/services/tests/notification/src/com/android/server/notification/ZenModeHelperTest.java
Change-Id: I256782af00ad736c1aebdb96f9400d66ebb64a15
2017-10-09 15:10:04 -04:00
Esteban Talavera
fa962315a0 Update UsageStatsManager Javadoc to match implementation
Third party apps can get the permission to use those
APIs, and none of the APIs return null any more

Test: make docs
Change-Id: I989cb15ce239e8fc11e87cf5841cb5165b0f353a
2017-10-09 14:58:40 +01:00
Wale Ogunwale
89be5761bc Removed sys-ui's use of static stack ids.
Test: Existing tests pass
Test: go/wm-smoke
Bug: 64146578
Change-Id: Ia74b363358cbae383e74dbc33fdcbb37191f0419
2017-10-06 16:34:43 -07:00
Wale Ogunwale
388945c01d Changed to allow removal of remaining static stack ids from CTS.
Test: Existing tests pass.
Bug: 64146578
Change-Id: Ia9e7c62427f270fe6cbfd60e068f7c2c95133c53
2017-10-06 16:24:44 -07:00
Felipe Leme
aa7e2294be Added new ViewNode properties for Autofill (minEms, maxEms, maxLength).
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases -t android.autofillservice.cts.LoginActivityTest#testNewTextAttributes
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases

Fixes: 38323227

Change-Id: I6d8606f2d0668644ae1bd33e982edef0ec1e8e63
2017-10-06 15:55:19 -07:00
TreeHugger Robot
8c3c19dbd3 Merge "Canonicalize notification channel sounds for backup" 2017-10-05 21:06:02 +00:00
Bernardo Rufino
c27bb6ad34 Canonicalize notification channel sounds for backup
Canonicalize for backup and canonicalize and uncanonicalize for restore
(see comment).

Test: Set custom notification sound, make backup, remove notification
sound from device (from Ringtones and make sure to update media content
provider), restore => Observe default instead of random number. Do the
same without removing the sound and observe restores successfully.
Test: runtest systemui-notification
Bug: 66444697
Change-Id: Id2f4685b7f64a35e397eb6dff5246802d795d996
2017-10-05 19:57:31 +01:00
Charles He
aff38adc43 Merge "StatusBar: add DISABLE2_NOTIFICATION_SHADE flag." 2017-10-05 07:52:47 +00:00
Ruben Brunk
5a8466172a Merge "Bind VR compositor service from VrManagerService." into oc-mr1-dev am: c765c2c448
am: 3de064f7cc

Change-Id: I97be49896650231b057285ab13672324a8415f11
2017-10-05 04:15:15 +00:00
Ruben Brunk
3de064f7cc Merge "Bind VR compositor service from VrManagerService." into oc-mr1-dev
am: c765c2c448

Change-Id: I868d30cae1181efc90d41d3a2fea33baa503ff0a
2017-10-05 04:03:03 +00:00
TreeHugger Robot
c765c2c448 Merge "Bind VR compositor service from VrManagerService." into oc-mr1-dev 2017-10-05 03:53:44 +00:00
Felipe Leme
e541b65c03 Merge "Sets AutofillClient on attachBaseContext()" into oc-mr1-dev am: 6d17d9d0cf
am: 63b45a87d5

Change-Id: Ib7ae51cf0336c4cea8ff90d60995816d43b3fa36
2017-10-04 22:42:29 +00:00
Felipe Leme
63b45a87d5 Merge "Sets AutofillClient on attachBaseContext()" into oc-mr1-dev
am: 6d17d9d0cf

Change-Id: I4b1d2a4e308a91d15282ae99ee158b7004b91211
2017-10-04 22:25:18 +00:00
TreeHugger Robot
6d17d9d0cf Merge "Sets AutofillClient on attachBaseContext()" into oc-mr1-dev 2017-10-04 22:17:11 +00:00
Charles He
2eda242fbc StatusBar: add DISABLE2_NOTIFICATION_SHADE flag.
Previously, DISABLE_EXPAND would disable the expansion of the status
bar. But this was only limited to the unlocked case. The status bar (and
thus the quick settings panel) could still be expanded on the lock
screen (keyguard), by swiping down from either the status bar or the
notification cards.

We introduce a new flag which would disable notification shade on all
surfaces, which will be used by DevicePolicyManager to enforce LockTask
restrictions, etc.

Bug: 65813398
Test: runtest systemui
Test: manual, by using a modified version of TestDPC and
      DevicePolicyManager

Change-Id: I364567422e0ca8837ecffa3037adc131c3cef691
2017-10-04 21:11:02 +01:00