Commit Graph

76115 Commits

Author SHA1 Message Date
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
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
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
Felipe Leme
ed7796f302 Document how to handle save on multi-steps activity.
Test: ran 'm -j doc-comment-check-docs' and checked resulting HTML
Fixes: 67650364

Change-Id: Ib9e6c63e537b47a0670fe6bdf5163e8ab80eef0c
2017-10-11 10:13:15 -07: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
Siyamed Sinir
2d729d55aa Merge "Removed unused variables from text layout code" 2017-10-11 02:20:27 +00:00
Jean-Michel Trivi
d51d398383 Fix alarm preview volume
SeekBarVolumizer: do not use FLAG_BYPASS_INTERRUPTION_POLICY as
 there is no need to bypass DnD modes in seek bar for volume
 since they are disabled according to the DnD mode.
AudioService (PlaybackActivityMonitor): check both
 AudioAttributes flags BYPASS_INTERRUPTION_POLICY and
 BYPASS_MUTE for forced alarm playback (see b/63617557).

Test: see bug
Bug: 67578783
Change-Id: Iaf43f16d96d1ad8a1eacc73a050db767004ba96b
2017-10-10 18:13:18 -07:00
Dianne Hackborn
70c95c5674 Expose API for heavy-weight apps and get it working again.
Still very rough UI, but basically does what is intended.
Also add two tests apps for manual tests (CTS test will
be coming).

Bug: 63937884
Test: manual

Change-Id: I45a6a2b122a75f8125510a2027bb1faf57c6956d
2017-10-10 17:57:22 -07:00
TreeHugger Robot
c6ee8d68dc Merge "UID mapping to provide app name and version." 2017-10-10 23:31:48 +00:00
TreeHugger Robot
b6777755ec Merge "Document job scheduler wakelock policy" 2017-10-10 23:19:45 +00:00
TreeHugger Robot
a30e82213b Merge "Remove nGetWidths and pass the jfloat[] as nComputeLineBreaks argument." 2017-10-10 22:50:00 +00:00
Hyunyoung Song
a91a0c5dc4 Merge "Wrap StackOverflowError in NotFoundException. Bug: 67462465 Test: builds and tested using faulty apk with recursive drawable. Change-Id: I47691343dae892beb5ed8c1c66c33edefade321e" into oc-mr1-dev am: 384689934d
am: 3702ce391d

Change-Id: I2ca8d4fb271245e3fc9b7f406456e3dc54dd96cd
2017-10-10 22:42:02 +00:00
Hyunyoung Song
3702ce391d Merge "Wrap StackOverflowError in NotFoundException. Bug: 67462465 Test: builds and tested using faulty apk with recursive drawable. Change-Id: I47691343dae892beb5ed8c1c66c33edefade321e" into oc-mr1-dev
am: 384689934d

Change-Id: Id4885fe270e24d54830d6858e37487de551a3f52
2017-10-10 22:30:23 +00:00
TreeHugger Robot
384689934d Merge "Wrap StackOverflowError in NotFoundException. Bug: 67462465 Test: builds and tested using faulty apk with recursive drawable. Change-Id: I47691343dae892beb5ed8c1c66c33edefade321e" into oc-mr1-dev 2017-10-10 22:22:38 +00:00
David Chen
de70169109 UID mapping to provide app name and version.
The UID map is updated by StatsCompanionService, which listens to broadcast
updates indicating that an app was updated/installed or removed. Also,
the entire map is updated when statsd first connects to the companion
service. Also, there is a way for metrics producers to subscribe to
updates, so that they can know when an app was upgraded.

Test: Created new unit-test for mapping and manually tested for install
and remove. Did not manually test the app upgrade.

Change-Id: I6676ae5c93b75c72d9badabb36aa9c40006db07d
2017-10-10 14:33:23 -07: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
Seigo Nonaka
2dd1a55b41 Remove nGetWidths and pass the jfloat[] as nComputeLineBreaks argument.
nGetWidths was always called just before nComputeLineBreaks. It would be
an improvement to pass the result array as the argument of
nComputeLineBreaks.

Bug: 65024629
Test: bit FrameworksCoreTests:android.text.StaticLayoutLineBreakingTest
Test: bit CtsTextTestCase:*
Test: Manually checked no regression in TextViewOnMeasurePerfTest
Test: Manually checked no regression in StaticLayoutPerfTest result
Change-Id: I566be66558a22b3a3ff79d502bebbbfec75dd065
2017-10-10 20:44:47 +00: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
Charles He
af60534c97 Merge "Add user restriction to suppress error dialogs." 2017-10-10 19:45:12 +00:00
Hyunyoung Song
dc92d925d8 Wrap StackOverflowError in NotFoundException.
Bug: 67462465
Test: builds and tested using faulty apk with recursive drawable.
Change-Id: I47691343dae892beb5ed8c1c66c33edefade321e
2017-10-10 12:41:05 -07:00
Siyamed Sinir
a273a70ecb Removed unused variables from text layout code
Test: None
Change-Id: I890c3d260edd0570259db5089dcb37f79c2e56e9
2017-10-10 12:40:47 -07:00
Andreas Gampe
e2ce9017cd Merge "Parcel: Avoid NPE in finalization" am: b085deece9 am: cb34bdf55c am: 7934a7f828
am: 77de886b55

Change-Id: If5a797b8780765be8cc658d1e09bf4dea69dd923
2017-10-10 18:18:17 +00:00
Andreas Gampe
77de886b55 Merge "Parcel: Avoid NPE in finalization" am: b085deece9 am: cb34bdf55c
am: 7934a7f828

Change-Id: I5c2819892170855c4d009261785f9e8d26f9ad5e
2017-10-10 18:01:22 +00:00
Andreas Gampe
7934a7f828 Merge "Parcel: Avoid NPE in finalization" am: b085deece9
am: cb34bdf55c

Change-Id: Idd444cd9dfe78d4200f67a4fe6b3c4fb13767f29
2017-10-10 17:52:50 +00:00
TreeHugger Robot
faa5840f06 Merge "Move mPermissionTrees to permission settings" 2017-10-10 17:49:18 +00:00
Andreas Gampe
cb34bdf55c Merge "Parcel: Avoid NPE in finalization"
am: b085deece9

Change-Id: I646baf55627a3874a10775846458af5f1dcd5d8c
2017-10-10 17:35:55 +00:00