Commit Graph

12078 Commits

Author SHA1 Message Date
yuemingw
2280019d5a Fix cts failure for com.android.cts.devicepolicy.ManagedProfileTest#testParentProfileApiDisabled
Change-Id: Iba6078f06d7d251a12c530058d1f2ace78aa3e92
Fix: 68954948
Test: com.android.cts.devicepolicy.ManagedProfileTest#testParentProfileApiDisabled
2017-11-08 10:27:14 +00:00
Selim Cinek
c7b5f78765 Merge changes from topic "notification_messaging"
* changes:
  Fixed measuring of messages with excess space
  Fixed the handling of oneToOne conversations for certain apps
  Improved the messaging transformation
  Implemented animations for messaging changes
  Refactored clipping util to be used in core
  Improved the headsup notification for messages
  Redesigned the messaging style
  Fixed a bug where images weren't transforming properly
2017-11-07 18:42:24 +00:00
Selim Cinek
f7409dbbb2 Fixed the handling of oneToOne conversations for certain apps
Certain apps were using specific white-spaces in order to get
an effect they wanted on the old messaging style. We're now
fixing that to ensure that the transition is smoothed

Test: manual send messages using multiple apps
Bug: 63708826
Change-Id: Ie8628c5b394b974f3dfcbbc6f26a7f50bc60a7b9
2017-11-06 16:22:08 -08:00
Selim Cinek
e62255ccc5 Improved the headsup notification for messages
Previously the heads up notifications and also the collapsed versions were not
displaying in the new style.
They are now displayed in the new style of heads up notifications.

Test: add messaging notification in heads up
Bug: 63708826
Change-Id: I041584cd6ee740fd8c59f332f727ed83c89e777f
2017-11-06 16:22:07 -08:00
Selim Cinek
88188f2d62 Redesigned the messaging style
The layout now looks much more recognizable
as a messaging template and enables us to
prepare for more useful functionality.

Test: Send messages and observe display
Bug: 63708826
Change-Id: I896b3692a1e84976e8fd37cf37611ddb1d358fb9
2017-11-06 16:22:04 -08:00
TreeHugger Robot
a7d81598b5 Merge "Fix content observer in SliceView" 2017-11-06 14:47:14 +00:00
Jeff Sharkey
7370d8bd07 Merge changes I61178def,I536e8934
* changes:
  Flip feature flag to enable StrictMode defaults.
  Narrower StrictMode defaults.
2017-11-04 02:39:34 +00:00
TreeHugger Robot
8095edc17b Merge "Update shortcuts to match spec" 2017-11-04 00:29:43 +00:00
Jeff Sharkey
8918298045 Narrower StrictMode defaults.
Until now, userdebug and eng builds have tracked StrictMode
violations on all system apps, including prebuilts that we have no
control over, which results in a lot of unactionable noise.

This CL narrows the set of enabled apps to only "bundled" system
apps, which gives us a much higher chance of burning these violations
down to 0 and keeping them there.  We don't have a good proxy for an
app being "bundled", so we detect it based on being in the "android."
or "com.android." package namespace.

Clean up the entire flow of applying StrictMode defaults to make it
much more human-readable.  This resulted in us fixing a bug where
StrictMode was never actually enabled for jank-sensitive threads in
system_server!

Relax I/O checks in a few places where we know we're interacting with
procfs or sysfs.  Add internal "allow" methods that avoid object
allocation by returning raw mask.

Test: cts-tradefed run commandAndExit cts-dev -m CtsOsTestCases -t android.os.cts.StrictModeTest
Bug: 68662870
Change-Id: I536e8934fbcdec14915fcb10995fc9704ea98b29
2017-11-03 17:36:35 -06:00
TreeHugger Robot
51c05d23b4 Merge "Fix BatteryManager.getIntProperty returns 0 as invalid value." 2017-11-03 21:11:47 +00:00
Mady Mellor
603e779aa5 Fix content observer in SliceView
showSlice was being called which would clear the content observer, instead
specify slice and reinflate within setSlice(uri) method.

Test: Have a slice, call notifyContentChanged on the uri, note that it
      updates

Change-Id: I5ce8af2867114b9d053f1623bc4a47dfabe961fc
2017-11-03 13:34:07 -07:00
Yifan Hong
b0f1352be1 Fix BatteryManager.getIntProperty returns 0 as invalid value.
Long.MIN_VALUE cast to Integer.MIN_VALUE always returns 0.

Change-Id: Ief7a1fd12a356c83a4ef3f28139c330034507dfa
Fixes: 37090343
Test: BatteryManagerTest
2017-11-03 19:26:06 +00:00
Amith Yamasani
4a76a3f32a Merge "Make CHANGE_APP_IDLE_STATE a system API" 2017-11-03 15:34:25 +00:00
Amith Yamasani
4470ab9c33 Make CHANGE_APP_IDLE_STATE a system API
Allows a privileged app to set standby bucket states for apps.

Bug: 63527785
Test: adb shell am set-standby-bucket com.example.foo 0
Change-Id: I613f8872ae816e39b167aad1c289187362aa6094
2017-11-02 21:12:18 -07:00
Winson Chung
84deaa29d4 Ensure closeSystemDialogs() is not oneway.
Bug: 68787785
Test: Launch overview with QS down
Change-Id: I136a3d2e45a91abe364027747bca03d4edb454c5
2017-11-02 15:57:28 -07:00
Andreas Gampe
9f4e7dbff8 Merge "Revert "Make CHANGE_APP_IDLE_STATE a system API"" 2017-11-02 22:45:16 +00:00
Mady Mellor
b367fb754a Update shortcuts to match spec
Necessary information for a shortcut is label, icon, intent. This alters
how that information is retrieved from a Slice and falls back to using
the app icon / title / intent if any of the information is missing from
the slice ensuring that there is always an actionable shortcut.

Also adds notion of HINT_HIDDEN, allowing apps to exclude parts of a slice
from being visible in a template, note when creating a shortcut HINT_HIDDEN
is ignored.

Test: Manual with SlicesApp, test different varients of having HINT_TITLE
      and not having HINT_TITLE on an action / icon / label as well as
      not having an icon / label / or action.
Bug: 68378574

Change-Id: I1de9e502204dfb7fd83a7ec7622e8fd464146cfd
2017-11-02 15:17:58 -07:00
Andreas Gampe
8948c79fe0 Revert "Make CHANGE_APP_IDLE_STATE a system API"
This reverts commit c433ee5451.

Fails on walleye with:

java.lang.IllegalStateException: Signature|privileged permissions not in privapp-permissions whitelist: {com.android.settings: android.permission.CHANGE_APP_IDLE_STATE, com.android.shell: android.permission.CHANGE_APP_IDLE_
STATE}

Bug: 63527785
Change-Id: I7a30615d20a6c22467a41d4b2d4f84f7702ce195
2017-11-02 21:58:15 +00:00
Steven Thomas
ec0aaa0650 Merge "On standalones, stay in vr mode until standby" 2017-11-02 21:14:15 +00:00
Amith Yamasani
68eec5cbee Merge "Make CHANGE_APP_IDLE_STATE a system API" 2017-11-02 19:49:06 +00:00
TreeHugger Robot
27d39bd77e Merge "Add support for minimized mode for right dock side for tablets (1/2)" 2017-11-02 18:43:18 +00:00
Amith Yamasani
c433ee5451 Make CHANGE_APP_IDLE_STATE a system API
Allows a privileged app to set standby bucket states for apps.

Bug: 63527785
Test: adb shell am set-standby-bucket com.example.foo 0
Change-Id: I069546555e1b370247f8cd45b2f4c32e6abe15ed
2017-11-02 17:14:49 +00:00
Steven Thomas
1356ec950f On standalones, stay in vr mode until standby
On standalones, stay in vr mode until the Power Policy Service notifies
us it has switched to standby mode.

We still have a few issues elsewhere in the code, so the "stay in vr
mode" functionality is only enabled if the system property
"persist.vr.use_standby_to_exit_vr_mode" is set to true, which you can
do like this:

$ adb shell setprop persist.vr.use_standby_to_exit_vr_mode true

Bug: 65248224

Test: - Confirmed on a standalone that doffing leaves us in vr mode for
5 minutes, then we get a notification that we've entered standby, and we
exit vr mode. Confirmed we enter vr mode again when we don the device.

- Confirmed no behavioral change on phones, as expected.

Change-Id: I41d62761fe8c2fc7630f0615732453669cb25f06
2017-11-01 17:58:52 -07:00
Lucas Dupin
80f05cee86 Merge "Fix slice permissions to allow uri grants" 2017-11-01 22:32:29 +00:00
Jason Monk
b40dad566a Fix slice permissions to allow uri grants
Also bypass when caller is self.

Test: bind own app's slice.
Bug: 68751119
Change-Id: I7b4b0f2a81bf6168cb81b03056c6b75e17808036
2017-11-01 16:14:01 -04:00
Bryce Lee
e83f34cde7 Remove orientation restriction to only fullscreen activities.
This changelist removes checks that enforce that only fullscreen,
opaque activities may request orientation changes. An application
may itself be compatible with the change and update their SDK level.
However, it is possible they use a library that has not itself been
updated and still leverages this feature for non-fullscreen
activities.

Change-Id: Ie1d300e3531fc8c588d2124dea698e4a876713c2
Fixes: 68684796
Test: bit FrameworksServicesTests:com.android.server.wm.AppWindowTokenTests
2017-10-31 20:25:15 -07:00
Winson Chung
b43a529e5b Merge changes Icb5ea78e,I1cf97299
* changes:
  Move more calls to the lib.
  Migrating some animation spec logic to shared lib
2017-11-01 00:42:27 +00:00
TreeHugger Robot
aaad26df79 Merge "Allow dnd access for secondary users" 2017-10-31 20:17:35 +00:00
Charles He
11e7d7d650 Merge "AM: make LockTask truly multi-task-aware." 2017-10-31 20:08:56 +00:00
Winson Chung
aa35745690 Move more calls to the lib.
- Move the task stack listener wrapper into the shared lib, along with some
  other AM calls.

Bug: 67510855
Test: Launch recents

Change-Id: Icb5ea78ec42d4b76a1c531ce336dd9a3f07a9629
2017-10-31 12:19:45 -07:00
Matthew Ng
f59a4132e8 Add support for minimized mode for right dock side for tablets (1/2)
Tablets have the ability to dock to the right side in landscape. This
change supports minimized mode for right dock side.

Test: run-test CtsActivityManagerDeviceTestCases
android.server.am.ActivityManagerDockedStackTests#
testMinimizedFromEachDockedSide
Change-Id: Ie879bdf7bf74226c0ceda9295f9de2004fd6a9b5
Fixes: 68017311
2017-10-31 11:03:48 -07:00
TreeHugger Robot
687b37cd52 Merge "Add App Op for changing WiFi State." 2017-10-31 12:47:35 +00:00
TreeHugger Robot
73f6b8a6fc Merge "Renamed moveTaskToDockedStack to setTaskWindowingModeSplitScreenPrimary" 2017-10-30 23:45:31 +00:00
Winson Chung
a17d0ac384 Merge "2/ Add API to start overview activity with assist callbacks" 2017-10-30 20:51:06 +00:00
Winson Chung
941dcba6e3 Merge "1/ Refactor out logic to fetch assist data asynchronously" 2017-10-30 16:22:26 +00:00
Charles He
ff9b4dff6c AM: make LockTask truly multi-task-aware.
LockTask was first designed to be single-task only. It was later
expanded to multi-task use cases in a rather flawed manner. Many aspects
of the implementation overlook the implications of more than one locked
tasks, and sometimes completely ignore the LockTask-unaware apps.

For example, LockTask-unaware apps are not registered in
LockTaskController's list of locked tasks, although they can be launched
in LockTask mode as long as they are whitelisted. As a consequence,
these unregistered tasks are not finished when their whitelist
authorization is removed.

In this patch, we make sure LockTask-unaware apps are also registered,
and introduce the notion of a root task, thus providing a genuine
multi-task experience with LockTask.

Bug: 66130096
Bug: 66132035
Test: bit FrameworksServicesTests:com.android.server.am.LockTaskControllerTest
Test: cts-tradefed run cts-dev -m DevicePolicyManager --test com.android.cts.devicepolicy.DeviceOwnerTest#testLockTask_deviceOwnerUser
Test: manual, by using TestDPC > Start kiosk mode
Change-Id: I68a26d2198fa3991f85ae1e7a6acae5981c34db5
2017-10-30 13:35:08 +00:00
Julia Reynolds
92febc3c58 Allow dnd access for secondary users
Test: runtest systemui-notification
Change-Id: Ie63b767bcd25b7b3e7cac08afcf3351adc97263f
Fixes: 68060759
2017-10-30 13:08:28 +00:00
Péter Visontay
23567494d0 Merge "Fix some paths (in comments) pointing to old locations of C++ Binder interfaces." 2017-10-30 11:27:32 +00:00
TreeHugger Robot
99981920a3 Merge "Provide a way for jobs to estimate network traffic." 2017-10-28 00:41:53 +00:00
Matthew Ng
bf15587d0d Renamed moveTaskToDockedStack to setTaskWindowingModeSplitScreenPrimary
Renamed a few functions related to moveTaskToDockedStack to use the new
notion of split screen primary windows instead of docked stack. Most of
the calls that use moveTaskToDockedStack are renamed.

Test: go/wm_smoke
Bug: 68017311
Change-Id: I73df051a9261d213b3415ac132962d91ec632e0a
2017-10-27 17:09:39 -07:00
Mady Mellor
dedcab0bac Merge "Unhide slice view APIs" 2017-10-27 22:28:47 +00:00
Winson Chung
ec1ef09c23 2/ Add API to start overview activity with assist callbacks
- Only the recents component package can launch the overview activity
  directly, and if an assist data receiver is provided, then assist data
  will be proxied to the caller.

Bug: 67864419
Test: com.android.server.am.RecentTasksTest
Test: com.android.server.am.AssistDataRequesterTest
Test: CtsVoiceInteractionTestCases
Change-Id: Icdd7e6716a84c11e9262ce5453f7d39ae7d8ce77
2017-10-27 13:49:37 -07:00
Winson Chung
da2818fe89 1/ Refactor out logic to fetch assist data asynchronously
- This logic will also be used when the recents component is started to
  fetch assist data associated with the current activity.

Bug: 67864419
Test: com.android.server.am.AssistDataRequesterTest
Test: CtsVoiceInteractionTestCases

Change-Id: I4cb3c2536a104d7071bc0a1fd6e31dfc2c0ce8d0
2017-10-27 13:49:26 -07:00
Mady Mellor
800ba36336 Unhide slice view APIs
Test: to be added
Change-Id: I10e6c3259a3cde6f02c968b24f891b1215e12b1b
2017-10-27 13:33:56 -07:00
TreeHugger Robot
599ef4698b Merge "New Autofill API: FillResponse.disableAutofill(duration)" 2017-10-27 19:38:32 +00:00
Peter Visontay
cee763269a Fix some paths (in comments) pointing to old locations of C++ Binder interfaces.
Test: None (comment changes).

Change-Id: I372e38bbb73c9d0a289089b239fa669f130252ba
2017-10-27 18:15:33 +01:00
Felipe Leme
17292d1a25 New Autofill API: FillResponse.disableAutofill(duration)
This API is useful to improve the autofill performance for the scenarios where
the service knows it cannot autofill an app or activity.

Bug: 67867469

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

Change-Id: I58e3eb5714db840104e699d614e750c03e26e8ca
2017-10-27 09:40:59 -07:00
TreeHugger Robot
bfc6a2bc36 Merge "Notification: Fix PendingIntent whitelisting" 2017-10-27 15:34:49 +00:00
Adrian Roos
fb92184ebc Notification: Fix PendingIntent whitelisting
Fixes several issues with the way PendingIntents are being whitelisted
from background check with Notifications. Most visibly, this causes the
whitelisting not to work on Notifications that use the DecoratedContentViewStyle,
but there are some conditions where the whitelisting breaks for regular
notifications too.

- After a Notification is rebuilt with Notification.Builder, the set
  of PendingIntents in the notification was not rebuilt.
  This broke the whitelisting whenever a PendingIntent is added after
  the Notification was already sent once. Workaround for broken platform
  releases: always use  a fresh Notification object, or clone before
  sending.

- Fixes PendingIntent.writePendingIntentOrNullToParcel to invoke the
  OnMarshalListener.
  This broke whitelisting for any PendingIntents attached to custom
  RemoteViews. Workaround for broken platform releases: Also attach
  the PendingIntent to the Notification's extras.

- Changes RemoteViews to keep the parcel cookies that were present
  during unparceling, such that they can be reapplied when it gets
  cloned.
  This broke whitelisting for any PendingIntents attached to a
  DecoratedContentViewStyle *even if added to extras*. Workaround
  for broken platform releases: none.

- Fixes Notification.whitelistToken mistakenly being static.
  There's an unlikely race condition where the field could be
  overriden with null by an incoming notification right as another
  notification is sent out. Workaround for broken platform releases:
  none.

Test: runtest -x core/tests/coretests/src/android/app/NotificationTest.java && runtest -x core/tests/coretests/src/android/widget/RemoteViewsTest.java
Bug: 68218899
Change-Id: I02e44040604a1d24422340611ae9e0332a611800
2017-10-27 15:46:40 +02:00
Charles He
ab57e18da1 Merge "DPM: introduce setLockTaskFeatures()." 2017-10-27 07:57:06 +00:00