50058 Commits

Author SHA1 Message Date
Hyunyoung Song
92e3da2354 Update API, add more documentation on AdaptiveIconDrawable
and fix multiple miscellaneous bugs.

Bug: 37079814
Bug: 37100106
Bug: 34829216

Test: $ runtest --path=frameworks/base/core/tests/coretests/src/android/graphics/drawable/IconTest.java
Test: $ runtest --path=frameworks/base/services/tests/servicestests/src/com/android/server/pm/ShortcutManagerTest1.java
Test: $ runtest --path=frameworks/base/core/tests/coretests/src/android/grpahics/drawable/AdaptiveIconDrawableTest.java

Change-Id: I0f5b2232853031bf3860ebea2736e894d17e4d2e
2017-04-12 16:06:45 -07:00
TreeHugger Robot
0ac8fd7adb Merge "Add ICompanionDeviceManager.getAssociation overload with explicit userId" into oc-dev 2017-04-10 15:06:10 +00:00
Erik Kline
e9ec87d0d4 Merge "Tethering: support Local-only Hotspot mode for downstreams" into oc-dev 2017-04-10 14:57:49 +00:00
Charles He
4286c5768d Merge "VPN: cancel always-on notification with new id" into oc-dev 2017-04-10 12:43:36 +00:00
Erik Kline
5f2b7992cf Tethering: support Local-only Hotspot mode for downstreams
Test: as follows
    - built (bullhead)
    - flashed
    - booted
    - "runtest frameworks-net" passes
Bug: 31466854

Change-Id: Ia50e28c8ce0af8cdd7ac63217d921aff213668e7
2017-04-10 21:42:16 +09:00
Eric Sandness
c9a6e75682 Merge "Fix mock of setApplicationRestrictions()" into oc-dev 2017-04-10 12:18:16 +00:00
Charles He
15297a67d3 VPN: cancel always-on notification with new id
Previously we used 0 for the id of the "Always-on VPN disconnected"
notification, as did many other system services. In a recent CL, an
effort was made to assign a dedicated id to each of these system
notifications. Unfortunately, this CL only changed the id in the call to
NotificationManager#notify(), but not NotificationManager#cancel(). This
causes the notification to persist even when always-on VPN is turned off
by the user.

This CL changes the id in the cancel() call, thus fixing the issue.

Bug: 37175930
Test: manually enable and disable always-on and observe the notification
Change-Id: I39c7325c78479afe3dc9e1764d54406bd721b067
2017-04-08 22:03:42 +01:00
TreeHugger Robot
51785edbe9 Merge "Restore session on new window after app kill" into oc-dev 2017-04-08 02:35:35 +00:00
TreeHugger Robot
42136b209d Merge "Start service from libscheduleservicehidl." into oc-dev 2017-04-08 02:27:06 +00:00
Andrii Kulian
72790bade5 Merge "Use feature instead of hidden config for multi-display" into oc-dev 2017-04-08 01:51:29 +00:00
TreeHugger Robot
89628f8809 Merge "FingerprintSettings for non-owner should respond to fingerprint touches" into oc-dev 2017-04-08 01:47:35 +00:00
Philip P. Moltmann
eab62baabf Restore session on new window after app kill
Also:
- Give the session an integer ID as the activityToken is not stable over
  restarts of the activity
- Verify that session is only accessed by one UID
- stabilize AccessibilityViewIds over activity lifecycle at least for
  the IDs we can do that. This required to split the ID namespace in
  "per-app" and "per-activity" views. Only the later ones can be
  restored.
- Do not end session when app is killed (as it can be restarted)

Bug: 35484143
Fixes: 36392498
Test: cts-tradefed run cts-dev -m CtsAutoFillServiceTestCases --test=android.autofillservice.cts.SessionLifecycleTest
      cts-tradefed run cts-dev -m CtsAutoFillServiceTestCases
Change-Id: I229acc1b3ce35fb57262da7d7466b5d4328b49d4
2017-04-08 00:48:55 +00:00
TreeHugger Robot
45539511c0 Merge "Fix when vr app launches 2d activity" into oc-dev 2017-04-08 00:41:02 +00:00
Steven Moreland
3d8166f885 Start service from libscheduleservicehidl.
Test: internal camera successfully sets priority.
Bug: 29251823
Change-Id: I3c3caeb3e2e169dee483da25cc8217e1aad14adf
2017-04-07 17:34:24 -07:00
Winson Chung
7ddf4b3e11 Merge "Ensure that a PIP activity gets stopped before MW/PIP mode changes." into oc-dev 2017-04-08 00:30:34 +00:00
TreeHugger Robot
5c8d88e855 Merge "Autofill Partitioning: support multiple SaveInfos." into oc-dev 2017-04-07 23:52:11 +00:00
Kevin Chyn
f4023b570c FingerprintSettings for non-owner should respond to fingerprint touches
Fixes 36869204
Test: create another account, enroll a fingerprint in the new account
touch the sensor and make sure the finger you just enrolled gets highlighted

Change-Id: Ib3e8d9ddc987a2c8b7f0878a83f4cbd025e13f7a
2017-04-07 16:29:19 -07:00
Andrii Kulian
1981f5fd17 Use feature instead of hidden config for multi-display
Using a feature will allow app developers to find out if a
particular device supports running activities on secondary
screens before using the APIs.

Bug: 36776777
Test: android.server.cts.ActivityManagerDisplayTests
Change-Id: I7121bdb782cac9df70121e9df5cbf3fcb76f4a93
2017-04-07 16:23:12 -07:00
Karthik Ravi Shankar
f29b4c2c43 Fix when vr app launches 2d activity
When a 2D app is launched from a VR app, since the VR app was on
DEFAULT_DISPLAY, the 2D app is also moved to DEFAULT_DISPLAY. This needs
to be addressed by moving any non-VR 2D app launch in VR mode to the
virtual display.

Bug: 37111307
Test: android.server.cts.ActivityManagerDisplayTests
Test: #testVrActivityLaunch
Test: #testVrActivityReLaunch
Test: #testPostVrLaunch

Change-Id: I83bffe94bb89415a6b3c026dd7077e70fe36fee0
Signed-off-by: Karthik Ravi Shankar <karthikrs@google.com>
2017-04-07 15:48:23 -07:00
TreeHugger Robot
d275c9a65c Merge "Return to Home stack when a context of tasks launched from Home finished" into oc-dev 2017-04-07 22:31:03 +00:00
TreeHugger Robot
bc4bd823d9 Merge changes I5d41419a,I763be06c into oc-dev
* changes:
  Introduce android.anim thread in system_server
  Fix thread booster
2017-04-07 22:05:18 +00:00
TreeHugger Robot
77d23337fb Merge "Don't show alert window notifications when in Vr mode." into oc-dev 2017-04-07 22:00:47 +00:00
TreeHugger Robot
735a5e1438 Merge "Show recents at correct time when starting activity in docked stack" into oc-dev 2017-04-07 21:42:50 +00:00
Winson Chung
4790065086 Ensure that a PIP activity gets stopped before MW/PIP mode changes.
- Adds a workaround to ensure that onStop() is dispatched to the PIP
  activities when the PIP is dismissed
- Consolidating dismiss PIP behavior to call moveTaskToFullscreen().
  Now we are consistent, and when we expand the PIP, we call
  moveTaskToFullscreen(top), and when dismissing the PIP we call
  moveTaskToFullscreen(bottom)
- Fixing issue where we were dispatching extra MW/PIP mode changes when
  just expanding the PIP
- Fixing typo in last commit where PIP mode change was not getting
  scheduled correctly
- Fixing issue where move-to-fullscreen log was sent for each task

Bug: 36567036
Test: android.server.cts.ActivityManagerPinnedStackTests
Test: #testStopBeforeMultiWindowCallbacksOnDismiss

Change-Id: I303b88d75e9f136da0c238ef5987804e0684c78e
Signed-off-by: Winson Chung <winsonc@google.com>
2017-04-07 14:03:57 -07:00
Wale Ogunwale
cd501ecd91 Show recents at correct time when starting activity in docked stack
Previous logic relied on the returnTo type of the task of the activity
we are launching which can get the wrong signal at times because the
original task might have been started from home, but since we are
already in docked mode it shouldn't cause recents activity to be
launched.
We now decide if recents ability should be shown based on if the home
stack is currently visible at the time we started the new activity.
Also, renamed ActivityStack.getStackVisibilityLocked() to
ActivityStack.shouldBeVisible() since it is used to determine if the
stack should be visible and also so it isn't confused with the new
method ActivityStack.isVisible() which returns true if the stack is
currently visible.

Test: manual
Change-Id: I051e72ce93c886d25526af2afef851c95812ab3e
Fixes: 37005549
2017-04-07 13:52:29 -07:00
Andrii Kulian
4eab3cb11a Merge "Add hidden API to check support of Multi-Display" into oc-dev 2017-04-07 20:22:58 +00:00
Shunta Sato
63b8ee365d Return to Home stack when a context of tasks launched from Home finished
When the following conditions happen together, another context in
Application stack was launched unexpectedly:
- There is a context of tasks in Application stack, which is launched
  from a task on Home stack.
- All tasks/activities in the context are finishing.

Solution:
Add a condition check to see if the task is NOT one of the task
finishing on-top of the top running task.

Bug: 30883775
Test: manual
Author: Ichitaro Kohara <ichitaro.kohara@sonymobile.com>
Change-Id: I5d6097a7c8dc2733ff684957370c987dd158e329
2017-04-07 13:22:16 -07:00
Jorim Jaggi
ed7993b5d1 Introduce android.anim thread in system_server
We create a new thread on which everything is running that
directly impacts window animations, i.e. layout, anim tick and
starting window creation. This is such that any work on
android.display can not lead to jank in the window animation,
specifically lock contention on activity manager lock that blocks
callbacks from android.display into AM can not lead to window
animation jank.

Test: Run animation, take systrace, make sure animation is on
android.anim
Test: AppWindowContainerControllerTestTest: AppWindowContainerControllerTestss
Fixes: 36792959

Change-Id: I5d41419a709b7984724e7053a3afdcc1ffe1aaa2
2017-04-07 22:10:34 +02:00
Charles He
23a7c1e870 Merge "FingerprintService: check current user correctly" into oc-dev 2017-04-07 20:06:21 +00:00
Geoffrey Pitsch
9394a8fc62 Merge "Don't delete new notification channels not present in backup" into oc-dev 2017-04-07 18:16:35 +00:00
TreeHugger Robot
fc33499c64 Merge "Remove WebView-fallback code for handling the non-functional stub." into oc-dev 2017-04-07 18:13:26 +00:00
Andrii Kulian
597f390681 Add hidden API to check support of Multi-Display
Added ActivityManager#supportsMultiDisplay() to check if system
supports running activities on secondary displays.

Bug: 36776777
Test: android.server.cts.ActivityManagerDisplayTests
Test: #testMultiDisplayDisabled
Change-Id: I18f98f2f6a9e865ad8dc63a470210190536d3271
2017-04-07 11:08:55 -07:00
Eugene Susla
adce09b9a4 Add ICompanionDeviceManager.getAssociation overload with explicit userId
Bug: 30932767
Test: ensure getAssociations works as before
Change-Id: I58dc4dac5bf7aae83fe3611890116a928e290a43
(cherry picked from commit 544d714626db38714f826a31a5483c647510a743)
2017-04-07 17:51:52 +00:00
Eric Sandness
a9b8253b38 Fix mock of setApplicationRestrictions()
If any(Bundle.class) is used in the mock's when() clause instead of
nullable(Bundle.class), the mock is not called when the bundle argument
is null.

Test: runtest -c com.android.server.devicepolicy.DevicePolicyManagerTest
frameworks-services

Bug: 36808416
Change-Id: Iab96fe88837e8f27a1da5775494b4611a547f13a
2017-04-07 18:17:24 +01:00
Bryce Lee
13acf25cfd Merge "Check component before notifying activity is visible." into oc-dev 2017-04-07 14:58:18 +00:00
TreeHugger Robot
ce7f931793 Merge "Removed unused variables in PerformBackupTask#finalizeBackup()" into oc-dev 2017-04-07 14:45:46 +00:00
TreeHugger Robot
1daf6cca42 Merge "Fix format for VR virtual display backing buffers" into oc-dev 2017-04-07 14:11:39 +00:00
Jorim Jaggi
5515b12bee Fix thread booster
If thread was boost priority already before boosting we reset it
to default priority after.

Test: Open app, run systrace, make sure priorities are right
Bug: 36631902
Change-Id: I763be06c0dc68db73548b22f96dd07864a6ace1f
2017-04-07 15:16:55 +02:00
Wale Ogunwale
a10fc7e294 Don't show alert window notifications when in Vr mode.
Change-Id: I6ef60682197f6581fb101598290b2390ea676091
Fixes: 35854095
Test: manual
2017-04-07 06:14:21 -07:00
Gustav Sennton
963dbbbdb6 Remove WebView-fallback code for handling the non-functional stub.
We have already removed the non-functional WebView stub, so we can now
remove the logic ensuring that a primary device user could use any
valid WebView package even when a secondary user did not have any
WebView package to choose from (since all device users should always
have a valid package to use as WebView implementation).

Bug: 34730873
Test: run WebViewUpdateServiceTest tests.
Test: Create new user, disable Chrome for that user, ensure WebView
loads for that user and for the primary user.
Change-Id: Ia77cc2efd9e40a157fb5b68a988425ef15508033
2017-04-07 12:59:20 +00:00
Michal Karpinski
1ee80dd46c Removed unused variables in PerformBackupTask#finalizeBackup()
The unused variables got left behind after changes in ag/1841867.

Bug: 35994670
Test: it builds
Change-Id: Ic28719dafb83542d7e4c73cb48508d6792d10174
2017-04-07 11:08:27 +01:00
Felipe Leme
7d5adb5b86 Autofill Partitioning: support multiple SaveInfos.
Bug: 35707731
Test: CtsAutoFillServiceTestCases (with new tests) pass

Change-Id: I2f234ca13c7e74f84c762473e38f938ed47f216f
2017-04-06 22:19:22 -07:00
TreeHugger Robot
8ce439a768 Merge "NetworkPolicyManagerService: turn off rule debugging" into oc-dev 2017-04-07 03:47:26 +00:00
Philip P. Moltmann
3c002e45dd Merge "Return inet addr for discoverable printers" into oc-dev 2017-04-07 03:04:17 +00:00
TreeHugger Robot
53b6f00dc5 Merge "Who wants...to live...forever? The "Save for Autofill?" dialog does!" into oc-dev 2017-04-07 03:00:07 +00:00
Calin Juravle
1fd46de245 Merge "Check for a null packageInfo before notifying about app install" into oc-dev 2017-04-07 02:53:22 +00:00
Casey Burkhardt
ecb5b5ccc3 Merge "Revise Accessibility button chooser intent/permissions" into oc-dev 2017-04-07 02:40:14 +00:00
Felipe Leme
db5f6c00a4 Who wants...to live...forever? The "Save for Autofill?" dialog does!
Fixes: 37083017
Test: manual verification
Test: CtsAutoFillServiceTestCases pass

Change-Id: Id177fb59810956e4b43c1d357de415d64ab9d89a
2017-04-06 18:03:39 -07:00
Calin Juravle
d34076385d Merge "Reconcile secondary dex paths when compiling with adb shell cmd..." into oc-dev 2017-04-07 00:24:25 +00:00
Calin Juravle
31762dd9a0 Merge "Pass SElinux info to installd dexopt" into oc-dev 2017-04-07 00:23:47 +00:00