Commit Graph

76142 Commits

Author SHA1 Message Date
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
049b12a9cc Merge "Process joystick MotionEvents correctly." 2017-10-13 21:01:39 +00:00
TreeHugger Robot
f32edc9f65 Merge "Replace mNotifyAutofillManagerOnClick by mPrivateFlag." 2017-10-13 18:31:52 +00:00
TreeHugger Robot
02a20b7025 Merge "Added new ViewNode properties for Autofill (minEms, maxEms, maxLength)." 2017-10-13 18:13:04 +00:00
Felipe Leme
f39c3c1395 Replace mNotifyAutofillManagerOnClick by mPrivateFlag.
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases

Bug: 67006548

Change-Id: I2027e5d6d952b473c4d20b2aac15792d230ae43c
2017-10-13 09:37:24 -07:00
Makoto Onuki
a96f6a0a14 Merge "Return canned messages from getDisabledMessage for..." 2017-10-13 15:53:18 +00:00
Charles He
fe932c78ec Merge "AM: introduce ActivityOptions.setLockTaskMode()." 2017-10-13 13:38:06 +00:00
Siarhei Vishniakou
461faf9d0e Process joystick MotionEvents correctly.
Joystick MotionEvents, such as AXIS_HAT0Y and AXIS_HAT0X,
are translated into KeyEvents KEYCODE_DPAD_UP,
KEYCODE_DPAD_DOWN, etc for navigating menus. When two or more
AXIS_HAT0Y events are batched into a single event, this would
not be recognized by the SyntheticJoystickHandler as a down/up
event, thus missing the event entirely. This commit updates
SyntheticJoystickHandler to use the entire MotionEvent,
including the HistoricalEvent portions.

Bug: 36069459
Test: Connected Sony DS4 joystick, recorded the event
that reproduces the bug with inputstudio. Replayed the
event after patch, the bug could not be reproduced.

Change-Id: I7c15c3a7c9ac326481214b1f6b553ae39c459bc4
2017-10-12 21:09:22 -07:00
TreeHugger Robot
8ff1a4b14c Merge "Fix identation in the switch block." 2017-10-13 03:21:57 +00:00
Yi Jin
7376615ca6 Merge "Implement Activity Manager Broadcasts dump protos" 2017-10-13 00:51:31 +00:00
TreeHugger Robot
f055302a73 Merge "Flags to enable/disable smart selection in EditText" 2017-10-13 00:33:44 +00:00
Abodunrinwa Toki
0e6b43ed58 Flags to enable/disable smart selection in EditText
1. smart_selection_enabled_for_edit_text
   Disables smart selection for editable text.
2. smart_selection_dark_launch
   Dark launch TextClassifierImpl.suggestSelection(...)
   In this mode we run the method, but never change the user's
   selection to measure the quality of the results based on what
   the user actually wanted.

Bug: 65959640
Test: Manually tested flags turn on/off feature with 'adb shell
settings put global' and GServices override.
Test: bit FrameworksCoreTests:android.provider.SettingsBackupTest
Change-Id: Iacc561c8ee004b0123de66ad1ee06b1f56b4e4b4
2017-10-12 23:50:53 +01:00
Makoto Onuki
b1588c0d39 Return canned messages from getDisabledMessage for...
shortcuts that haven't been restored.

Bug 62451035
Test: adb shell am instrument -w -e class com.android.server.pm.ShortcutManagerTest1 -w com.android.frameworks.servicestests
Test: adb shell am instrument -w -e class com.android.server.pm.ShortcutManagerTest2 -w com.android.frameworks.servicestests
Test: adb shell am instrument -w -e class com.android.server.pm.ShortcutManagerTest3 -w com.android.frameworks.servicestests
Test: adb shell am instrument -w -e class com.android.server.pm.ShortcutManagerTest4 -w com.android.frameworks.servicestests
Test: adb shell am instrument -w -e class com.android.server.pm.ShortcutManagerTest5 -w com.android.frameworks.servicestests
Test: adb shell am instrument -w -e class com.android.server.pm.ShortcutManagerTest6 -w com.android.frameworks.servicestests
Test: adb shell am instrument -w -e class com.android.server.pm.ShortcutManagerTest7 -w com.android.frameworks.servicestests
Test: adb shell am instrument -w -e class com.android.server.pm.ShortcutManagerTest8 -w com.android.frameworks.servicestests
Test: adb shell am instrument -w -e class com.android.server.pm.ShortcutManagerTest9 -w com.android.frameworks.servicestests
Test: adb shell am instrument -w -e class com.android.server.pm.ShortcutManagerTest10 -w com.android.frameworks.servicestests
Test: cts-tradefed run cts-dev --skip-device-info --skip-preconditions --skip-system-status-check com.android.compatibility.common.tradefed.targetprep.NetworkConnectivityChecker -a armeabi-v7a -l INFO -m CtsShortcutManagerTestCases
Test: cts-tradefed run cts-dev --skip-device-info --skip-preconditions --skip-system-status-check com.android.compatibility.common.tradefed.targetprep.NetworkConnectivityChecker -a armeabi-v7a -l INFO -m CtsShortcutHostTestCases

Change-Id: I8678adbbb7074bc28fe4b1b440fb11a6acfc9fdf
2017-10-12 15:43:09 -07:00
TreeHugger Robot
fac6655cf5 Merge "New Autofill API: SaveInfo.setTriggerId()" 2017-10-12 22:39:49 +00:00
TreeHugger Robot
b43d18baf7 Merge "Updating documentation for setOnClickPendingIntent" 2017-10-12 22:09:06 +00:00
Rob Carr
53966760d7 Merge "Use new SurfaceFlinger transaction API." 2017-10-12 22:08:03 +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
TreeHugger Robot
714be0178c Merge "Let service set the SaveRequest.getClientState() on dataset auth responses." 2017-10-12 21:02:56 +00:00
Siarhei Vishniakou
27358ef48d Fix identation in the switch block.
Currently, case and switch start at the same
ident level, which fails the presubmit hooks.

Test: make
Change-Id: I4e22fe0c633541c00cfda3ed27731f78490e8fae
2017-10-12 13:03:22 -07:00
Sunny Goyal
d7d0c691bf Updating documentation for setOnClickPendingIntent
Bug: 65464277
Test: N/A
Change-Id: I7bdc397375e6c49d47d24868a5427dd3990057cf
2017-10-12 12:36:19 -07:00
Felipe Leme
a937238eae Let service set the SaveRequest.getClientState() on dataset auth responses.
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases -t android.autofillservice.cts.LoginActivityTest#testFillResponseAuthClientStateSetOnIntentOnly
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases -t android.autofillservice.cts.LoginActivityTest#testFillResponseAuthClientStateSetOnFillResponseOnly
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases -t android.autofillservice.cts.LoginActivityTest#testFillResponseAuthClientStateSetOnIntentAndFillResponse

Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases -t android.autofillservice.cts.LoginActivityTest#testDatasetAuthClientStateSetOnIntentOnly
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases -t android.autofillservice.cts.LoginActivityTest#testDatasetAuthClientStateSetOnFillResponseOnly
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases -t android.autofillservice.cts.LoginActivityTest#testDatasetAuthClientStateSetOnIntentAndFillResponse

Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases

Fixes: 67588471

Change-Id: I05a56bfc02400ce87077c93301abc0e0e1aa59a6
2017-10-12 12:03:42 -07: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
Phil Weaver
b19789f80a Merge "Don't recycle replaced nodes in a11y cache" into oc-mr1-dev am: 15c8747ad9
am: 73e2acb9ae

Change-Id: I906748223efd88d5d48889b2866725ba13c0268e
2017-10-12 02:30:42 +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
Phil Weaver
73e2acb9ae Merge "Don't recycle replaced nodes in a11y cache" into oc-mr1-dev
am: 15c8747ad9

Change-Id: I1b1c16800319aac6abf8403f168d0b4343293fc0
2017-10-12 01:38:32 +00:00
Yi Jin
129fc6ce19 Implement Activity Manager Broadcasts dump protos
Bug: 66729158
Test: Manually build and flash the system.img and test "activity --proto
broadcasts"
Change-Id: I3cb7474c4a3ab092f38ed6a121b4d034cadfc402
2017-10-11 18:35:14 -07:00
TreeHugger Robot
045c82dec0 Merge "Fix Catalan and Polish hyphenation." 2017-10-12 01:28:11 +00:00
TreeHugger Robot
15c8747ad9 Merge "Don't recycle replaced nodes in a11y cache" into oc-mr1-dev 2017-10-12 01:24:48 +00:00
TreeHugger Robot
96a30ab84c Merge "Improve shortcut backup & restore." 2017-10-11 23:55:33 +00:00
Seigo Nonaka
898a319db3 Fix Catalan and Polish hyphenation.
After I7e2ece979181d12ac1adbede14995ec9b7b87d21, the special hyphenation
logic for Catalan and Policy was not working.

Bug: 65024629
Bug: 67702053
Test: N/A
Change-Id: I985253e24cf0ce4e537c01074e75054381a7816a
2017-10-11 23:21:12 +00:00
Phil Weaver
9704426d14 Don't recycle replaced nodes in a11y cache
This is a patch for another bug. When the cache refreshes
nodes, it marks the transaction to bypass the cache. We
still, however, replace the cached node. If we recycle
the node as well, we end up refreshing it after it's been
recycled and end up with a sealed node in the cache. That
node can then be obtained and then throw an exception when
a setter is called. These exceptions are almost impossible
to debug.

I'm going to leave the bug open to roll this CL back and
fix the cache's behavior, but this fix seems safer this
late.

Bug: 35626351
Test: Ran a11y CTS and unit tests. Verified on instrumented
master build that the error indeed goes away. Removing one
line from unit tests that requires recycling.

Change-Id: Icc9a43ee49cf7c6bfa996839b35954faaf31621c
2017-10-11 15:51:33 -07:00
Jean-Michel Trivi
900699c173 Merge "Merge "Fix alarm preview volume" into oc-mr1-dev am: b9629cd432" into oc-mr1-dev-plus-aosp
am: fd77afd548

Change-Id: I9ed6b346f9f81a338169628d9e2c955421560744
2017-10-11 22:28:57 +00:00
Makoto Onuki
a4f89b1251 Improve shortcut backup & restore.
From http://go/p-shortcut-restore :

Currently on pre-P builds, there are 6 cases where shortcuts won't be restored.

Launcher issue:
A: Launcher is downgraded
B: Launcher has allowBackup="false"
C: Launcher's signature changed.
A-C would result in not restoring any shortcuts from any apps.

App issue:
D: App is downgraded
E: App has allowBackup="false"
F: App's signature changed.
D-F would result in not restoring any shortcuts from individual apps.

In P, we'll restore all pinned shortcuts anyway except in case B and C.

The new behavior would be:
A: We'll restore all pinned shortcuts anyway even if the launcher is downgraded.
B: If the launcher doesn't support backup&restore, we still don't restore shortcuts.
C: If the launcher has a different signature, we still don't restore shortcuts.

D, E, F: All pinned shortcuts will be restored, but are disabled.

In case of D, E, F, shortcuts would be:
1. ShortcutInfo.isEnabled() will return false. They are not launchable.
2. If it's case D (downgrade), shortcuts will be re-enabled once a publisher app
is updated to the original version or higher.
3. getDisabledMessage() will return a special, canned message explaining why
they're disabled.
4. A new API getDisabledReason() will return one of the following values:
 - DISABLED_REASON_NOT_DISABLED (for non-disabled shortcuts)
 - DISABLED_REASON_BY_APP (for shortcuts disabled by apps)
 - DISABLED_REASON_APP_CHANGED (for shortcuts disabled when a manifest shortcut is gone.)
 - DISABLED_REASON_VERSION_LOWER (case D)
 - DISABLED_REASON_BACKUP_NOT_SUPPORTED (case E)
 - DISABLED_REASON_SIGNATURE_MISMATCH (case F)
 - (DISABLE_REASON_OTHER_RESTORE_ISSUE for future use)
Launcher can opt to use this API to show a custom error message, rather than
using the canned system message from getDisabledMessage().

5. This spec change is completely transparent to publisher apps.
In case D,E,F, the disabled shortcuts will only be visible to the launcher,
and from the publisher app's point of view, they still don't exist.
APIs such as getPinnedShortcuts() will not return them, and updateShortcuts()
will not affect them. The enableShortcut() will not enable them either.

Bug 62451035
Test: adb shell am instrument -w -e class com.android.server.pm.ShortcutManagerTest1 -w com.android.frameworks.servicestests
Test: adb shell am instrument -w -e class com.android.server.pm.ShortcutManagerTest2 -w com.android.frameworks.servicestests
Test: adb shell am instrument -w -e class com.android.server.pm.ShortcutManagerTest3 -w com.android.frameworks.servicestests
Test: adb shell am instrument -w -e class com.android.server.pm.ShortcutManagerTest4 -w com.android.frameworks.servicestests
Test: adb shell am instrument -w -e class com.android.server.pm.ShortcutManagerTest5 -w com.android.frameworks.servicestests
Test: adb shell am instrument -w -e class com.android.server.pm.ShortcutManagerTest6 -w com.android.frameworks.servicestests
Test: adb shell am instrument -w -e class com.android.server.pm.ShortcutManagerTest7 -w com.android.frameworks.servicestests
Test: adb shell am instrument -w -e class com.android.server.pm.ShortcutManagerTest8 -w com.android.frameworks.servicestests
Test: adb shell am instrument -w -e class com.android.server.pm.ShortcutManagerTest9 -w com.android.frameworks.servicestests
Test: adb shell am instrument -w -e class com.android.server.pm.ShortcutManagerTest10 -w com.android.frameworks.servicestests
Test: cts-tradefed run cts-dev --skip-device-info --skip-preconditions --skip-system-status-check com.android.compatibility.common.tradefed.targetprep.NetworkConnectivityChecker -a armeabi-v7a -l INFO -m CtsShortcutManagerTestCases
Test: cts-tradefed run cts-dev --skip-device-info --skip-preconditions --skip-system-status-check com.android.compatibility.common.tradefed.targetprep.NetworkConnectivityChecker -a armeabi-v7a -l INFO -m CtsShortcutHostTestCases

Change-Id: Ib4d73aa44a0395f5e37c8ad0c9cd041a9038fb66
2017-10-11 14:50:38 -07:00
Jean-Michel Trivi
47aa351692 Merge "Fix alarm preview volume" into oc-mr1-dev
am: b9629cd432

Change-Id: If5bc5bbdb5239609db61e4706c6b2395b0231f83
2017-10-11 21:48:00 +00:00
TreeHugger Robot
f65d166959 Merge "Removed remaining use of static stack ids." 2017-10-11 21:27:05 +00:00
TreeHugger Robot
b9629cd432 Merge "Fix alarm preview volume" into oc-mr1-dev 2017-10-11 21:19:54 +00:00
Felipe Leme
b147de882a Merge "Document how to handle save on multi-steps activity." into oc-mr1-dev am: a4dffa032b
am: 705d318485

Change-Id: I75ff776435f53c8aed5731dfe984813af48c760a
2017-10-11 20:20:09 +00:00
Felipe Leme
705d318485 Merge "Document how to handle save on multi-steps activity." into oc-mr1-dev
am: a4dffa032b

Change-Id: I01afae63e1fa5503104244c2e78dfb589697a467
2017-10-11 19:43:34 +00:00
TreeHugger Robot
a4dffa032b Merge "Document how to handle save on multi-steps activity." into oc-mr1-dev 2017-10-11 19:34:45 +00:00
TreeHugger Robot
7c3c3c8bf8 Merge "Expose API for heavy-weight apps and get it working again." 2017-10-11 18:36:06 +00:00
Android Build Merger (Role)
f1dd657edf Merge "Canonicalize notification channel sounds for backup am: 2d7a4a3f67 am: 4229c3fcbd" 2017-10-11 18:01:29 +00:00
TreeHugger Robot
93af341d5e Merge "Deprecate view drawing cache" 2017-10-11 18:00:00 +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
TreeHugger Robot
b34b70b067 Merge "incidentd: Dumping batterystats system data to proto." 2017-10-11 17:56:34 +00:00
Bernardo Rufino
4229c3fcbd Canonicalize notification channel sounds for backup
am: 2d7a4a3f67

Change-Id: I47c5aba70bd6713f5cd2432b1141d0772fa1e672
2017-10-11 17:50:06 +00:00