24779 Commits

Author SHA1 Message Date
Sudheer Shanka
dc589ac82b Update usage of ActivityManagerNative.
- Remove references to ActivityManagerProxy.
- Add isSystemReady to ActivityManager.

Bug: 30977067
Test: cts/hostsidetests/services/activityandwindowmanager/util/run-test android.server.cts
      adb shell am instrument -e class com.android.server.am.ActivityManagerTest,com.android.server.am.TaskStackChangedListenerTest \
          -w com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
Change-Id: I07390b6124fb1515821f5c0b37baf6ae74adc8fa
2016-11-14 11:27:12 -08:00
TreeHugger Robot
18fe8f6359 Merge "Added a callback for AutoFillService." 2016-11-14 17:56:59 +00:00
Wale Ogunwale
059de0230b Merge "Removed used of DisplayContent.getReadOnlyWindowList()" 2016-11-13 01:01:11 +00:00
TreeHugger Robot
357c6e5e5b Merge "Fixing issue where PIP did not stay minimized after rotation." 2016-11-12 04:59:13 +00:00
Winson Chung
d5a01599f7 Fixing issue where PIP did not stay minimized after rotation.
- Ensure that we reapply the minimized offset after applying the snap
  fraction to the rotated bounds
- Fixing small issue where we weren't bottom aligning the PIP when the
  visible IME changes size (but is not made invisible)
- Also fixing an issue where the touch gesture continually allowed
  swiping offscreen even after dragging the PIP a distance. Now, if no
  gesture handles the drag, then the default gesture will disallow
  offscreen dragging once it handles the move.
- Shrinking PIP slightly to fit proportions of screen.

Test: Enable minimization in SysUI tuner, put PIP into minimized state,
      rotate the screen.  This is not final UX and the CTS tests will
      be updated to reflect this behavior once it is final.

Change-Id: I15c851a0bcf5f867289bc5ad50d298f82a103308
2016-11-11 16:25:04 -08:00
Marie Janssen
989c408137 Merge "Bluetooth: BLE app tracking fixes" am: 2174731449 am: 3d8d5dbb56 am: 56853771ae
am: ddede667fb

Change-Id: I82db19aad214fee9aeec8a56e6e1efd13630a616
2016-11-12 00:17:47 +00:00
Marie Janssen
ddede667fb Merge "Bluetooth: BLE app tracking fixes" am: 2174731449 am: 3d8d5dbb56
am: 56853771ae

Change-Id: I2c0ac6fd2047643ae3c1e6450397b2cd9eed7e94
2016-11-12 00:05:19 +00:00
Felipe Leme
29a5b0d0f1 Added a callback for AutoFillService.
So far AutoFillService only received the assist data from framework; in
this CL, it also offers a method where the auto-fill provider can send
the auto-fill data back to framework.

The workflow is:

- AFMSI calls a new AM method (requestAutoFillData(), instead
  of requestAssistContextExtras()).
- The assist receiver is located in the app, not on system service.
- AM uses a new request type (ASSIST_CONTEXT_AUTOFILL) to request the
  assist data to the activity.
- ViewStructure has a new setAutoFillId() method which is used to set an
  unique id for the view.
- View uses the accessibility id to implement the auto-fill id.
- When the activity fullfills the request, it creates an IAutoFillCallback
  remote object - that will be used to set the auto-fill fields - and
  returns it in the assist bundle (using the
  VoiceInteractionSession.KEY_AUTO_FILL_CALLBACK key).
- The app-visible AutoFillService class offers an onFillRequest() method,
  which contains the assist data and a FillCallback used to handle it.

BUG: 31001899
Test: manually built and ran it

Change-Id: I3d208c14e81022dc96dd03f38bbe25a778b24a67
2016-11-11 16:02:55 -08:00
Marie Janssen
56853771ae Merge "Bluetooth: BLE app tracking fixes" am: 2174731449
am: 3d8d5dbb56

Change-Id: Ia9b8950f66f31b0d3b78f6e2f6c2314cf0b931f0
2016-11-11 23:53:47 +00:00
Marie Janssen
3d8d5dbb56 Merge "Bluetooth: BLE app tracking fixes"
am: 2174731449

Change-Id: Id07abb3d5ad76b318d1b7cee6d9fb9351737b141
2016-11-11 23:41:42 +00:00
TreeHugger Robot
4d5f44f619 Merge "Ensure consistent stack behind PIP when going to/from fullscreen." 2016-11-11 23:20:38 +00:00
Marie Janssen
2977c3e372 Bluetooth: BLE app tracking fixes
Simplify tracking registered BLE Apps and clear the state when we
try to recover bluetooth from starting to ON.

Test: enable and disable bluetooth an LE-only app running
Bug: 32609235
Change-Id: I3233bf8402a3c8fc4886ef21b1e9411bc78d4e2c
2016-11-11 21:30:33 +00:00
TreeHugger Robot
3a7c696fc5 Merge "Make getter & setting names consistent." 2016-11-11 20:19:49 +00:00
Winson Chung
0c1ca09dbb Ensure consistent stack behind PIP when going to/from fullscreen.
- When a fullscreen activity enters PIP, we were previously always
  bringing the home stack forward due to the return type being set
  to HOME_ACTIVITY_TYPE, causing the home screen to be visible if
  expanding PIP over a fullscreen activity and going back into PIP
  immediately.  This CL instead updates the return-to type to
  reflect the stack that was currently open before the pinned task
  was made fullscreen again to ensure that it is consistent when
  entering PIP again.

Test: android.server.cts.ActivityManagerPinnedStackTests
Test: #testPipUnPipOverHome
Test: #testPipUnPipOverApp

Change-Id: Id5dd7db1f5a8040ff21190cc347eb6aae5893006
2016-11-11 19:47:32 +00:00
Julia Reynolds
3785605a44 Make getter & setting names consistent.
Test: runtest systemui-notification
Change-Id: Iff746f0ae149d1b09792e240503db9d008fe267c
2016-11-11 09:36:52 -05:00
Jason Monk
97a06a12ed Add switchable theme to tuner
Allows option in tuner to switch between system theme overlays
if multiple exist. Requires a restart to take effect.

Test: Settings -> Tuner -> Other -> Theme
Change-Id: Iea43b9cbb67fd91c6008be594ad4cfd19c3f57ec
2016-11-11 09:01:20 -05:00
Yohei Yukawa
e9b99f8260 Merge changes I7918c0a3,I19d87fc1
* changes:
  Support content URIs w/ userId in IC#commitContent
  Fix up content URI for different users
2016-11-11 03:40:32 +00:00
Yohei Yukawa
3933a6e0c3 Support content URIs w/ userId in IC#commitContent
With this CL, one can specify a content URI with an embedded user ID to
InputContentInfo, like such a URI is supported in
Context#grantUriPermission().

Note that such a scenario is actually possible when 1) an application
running as User X sets a content URI to the system clipboard then 2) the
IME runing as User Y who share the clipboard with User X obtains the
content URI from the system and tries to create a new instance of
InputContentInfo.

Bug: 32427307
Bug: 32778718
Test: 'adb shell dumpsys activity permissions' with a custom IME that
      instantiates InputContentInfo from the content URI obtained from
      the clipboard.
Change-Id: I7918c0a379b8f3e7e64b106447b42447876f9057
2016-11-11 03:39:25 +00:00
Winson Chung
fa7053789f Adding experiment for minimized pinned stack.
- Also refactoring the PIP touch handling to be independent gestures

Test: Enable the setting in SystemUI tuner, then drag the PIP slightly
      offscreen. This is only experimental behaviour, and
      android.server.cts.ActivityManagerPinnedStackTests will be updated
      accordingly if we keep this behavior.

Change-Id: I5834971fcbbb127526339e764e7d76b5d22d4707
2016-11-10 23:09:17 +00:00
Winson Chung
7075d79cab Merge "Adding API for apps to specify their aspect ratio when entering PIP." 2016-11-10 23:08:54 +00:00
Julia Reynolds
05675c80c1 Merge "Expose dismiss reasons to notification listeners." 2016-11-10 20:46:07 +00:00
Dianne Hackborn
e07641d4fb Start implementing background restrictions for eph apps.
This implements the additional intended path for checking
allowed background operations, APP_START_MODE_DISABLED, which
doesn't allow an app to launch in the background at all.

Also change the semantics of delivering broadcasts to manifest
receivers to always restrict those, not changing based on
whether the app is currently idle.  This is the desired intended
behavior for apps as they explicitly update to work with
bg check.

And now that we have ephemerality associated with the uid state
in the activity manager, we can propagate this through the
relevant callbacks in IUidObserver so things watching these
changes can immediately determine whether they should do their
more aggressive shut down work for the uid rather than having
to walk through all their state looking for package associated
with that uid and whether they should be shut down.

Also remove the "lenient" bg check mode, since that was
just an early experiment that we won't actually use.

Add a new "make-idle" activity manager command to immediately
put a uid into the idle state (if possible) to make it easier
to test.

Test: manually against an eph app
Change-Id: I43a138ff281f69a9251d3f29ab6e13f48cff8ad6
2016-11-10 12:01:20 -08:00
Winson Chung
84a3834a0c Adding API for apps to specify their aspect ratio when entering PIP.
Test: android.server.cts.ActivityManagerPinnedStackTests
Test: #testEnterPipAspectRatio
Test: #testEnterPipExtremeAspectRatios

Change-Id: I9efba942b9a6451dec07428fe1e428ef4a896867
2016-11-10 09:19:52 -08:00
Wale Ogunwale
d188096058 Removed used of DisplayContent.getReadOnlyWindowList()
Changed the call points to use DisplayContent.forAllWindows() to
get windows on the display.

Test: Existing tests pass.
Change-Id: I6f8bf15ba246fac69c4a496ebb1d9e0b9b6a95a2
2016-11-10 06:45:55 -08:00
Lorenzo Colitti
667f31278e Merge "Unbreak TetherInterfaceStateMachineTest." 2016-11-10 08:37:58 +00:00
TreeHugger Robot
aad0c779f5 Merge "Catch a missed case when adding a toast" 2016-11-10 04:18:00 +00:00
Svetoslav Ganov
200adfbea8 Catch a missed case when adding a toast
We allow a single toast window per UID. It is possible that
the UID had another toast window that is going away and this
CL adds a catch all check as there was a case missing.

Change-Id: I4c68e7212a05ce349e6e5b1cffe6e36d429aaca0
2016-11-09 18:43:06 -08:00
TreeHugger Robot
72c532acbb Merge "Traverse window hierarchy without window list" 2016-11-10 02:14:15 +00:00
TreeHugger Robot
446e723c08 Merge "The big Keyguard transition refactor (8/n)" 2016-11-10 00:54:54 +00:00
TreeHugger Robot
4bd26bef66 Merge "Add event logging for UserState transitions." 2016-11-10 00:02:14 +00:00
Wale Ogunwale
b783fd8a08 Traverse window hierarchy without window list
Added support for to get all windows in the hierarchy without needing
to use WindowList concept which is a very complicated implementation
in the code base.
This implementation walks the hierarchy node by node returns windows
in order to the caller using a callback.

Test: bit FrameworksServicesTests:com.android.server.wm.DisplayContentTests
Change-Id: I2719f7c96f26dad23f91c1c589be88712bd224b8
2016-11-09 15:54:00 -08:00
Jorim Jaggi
e69c93181f The big Keyguard transition refactor (8/n)
Don't force mKeyguardGoingAway, as this never recovers. Make sure
to only show the dismissing Keyguard activtiy and recover the
state when trusted state changes.

Test: Make sure Keyguard is in a trusted state, start an activity
with FLAG_DISMISS_KEYGUARD from FLAG_SHOW_WHEN_LOCKED activity
and make sure there is no flicker.

Bug: 32057734
Change-Id: I5d212f6f9d5430250b22c8370f45dc95756432d2
2016-11-09 15:32:04 -08:00
TreeHugger Robot
c4f65e0da8 Merge "Move dump() to dumpAsync(), more oneway calls." 2016-11-09 21:08:01 +00:00
Julia Reynolds
3aa5f1eec0 Expose dismiss reasons to notification listeners.
Test: see cts tests on same topic
Change-Id: Ibae45e125ebc2aa394fbdb41c00341bf0ac101e5
2016-11-09 15:43:49 -05:00
Julia Reynolds
3775a39e39 Merge "Move notification channel from record to sbn." 2016-11-09 20:40:41 +00:00
Julia Reynolds
67c8e1e61f Merge "Ranker --> Assistant." 2016-11-09 20:38:47 +00:00
Jeff Sharkey
97c6d3d492 Add event logging for UserState transitions.
Event log sticks around longer, and will help debug timing issues.

Test: builds and boots
Bug: 32719353
Change-Id: Ie19f76a341c58a8efee0eb1edbf183c22e9c5270
2016-11-09 13:31:36 -07:00
Damien Bargiacchi
9510921cc1 Allow config.xml to set the default display's default color mode am: 4364bbf93f am: 4e9436261f
am: 9d14e6d6bd

Change-Id: Iaae647e8373b624f3e7deb7c1c54fb6b9bbd8992
2016-11-09 19:32:58 +00:00
Jeff Sharkey
850c83e6da Move dump() to dumpAsync(), more oneway calls.
When calling out to dump services hosted by external apps, use
dumpAsync() to avoid hanging if the remote process is wedged.

Test: builds, boots, runs with minimal logs triggered
Bug: 32715088
Change-Id: I70aa2666ae21dae8f09ded2063bed359c0b210c5
2016-11-09 12:25:48 -07:00
Damien Bargiacchi
9d14e6d6bd Allow config.xml to set the default display's default color mode am: 4364bbf93f
am: 4e9436261f

Change-Id: Id468f9e353ae159df5cd730655fe7ce4a43696cf
2016-11-09 19:21:29 +00:00
Damien Bargiacchi
4e9436261f Allow config.xml to set the default display's default color mode
am: 4364bbf93f

Change-Id: I6d68be94598f3fe28225826e00459d5707b7ecee
2016-11-09 19:14:26 +00:00
TreeHugger Robot
cd06305852 Merge "Ensure that focusable stack is focused when starting a new activity." 2016-11-09 17:44:37 +00:00
Jeff Sharkey
d0ac9d3bac Merge "Detect non-oneway calls leaving system_server." 2016-11-09 16:51:41 +00:00
Julia Reynolds
423b9fc83d Move notification channel from record to sbn.
So notificationlisteners know about it.

Test: runtest systemui-notification
Change-Id: I28fc86730d3f7ad246a0164f44157594f57430c0
2016-11-09 09:51:08 -05:00
Julia Reynolds
77b2cc920f Ranker --> Assistant.
Rename ranker to assistant and make some of the methods public.
Delete the ext services ranker and restore the listener-type
lifecycle to the assistant.

Test: manual. add a notification assistant and verify it gets
assistant and listener callbacks.

Change-Id: Ia3406c8c14d923426c1b8a6d8b5187efe64c31c3
2016-11-09 09:04:16 -05:00
Tamas Berghammer
67387af732 Merge "Update package names to work with the proto3 compiler" 2016-11-09 13:38:58 +00:00
TreeHugger Robot
2fb2556833 Merge "Allow shell to enable/disable individual component in test package" 2016-11-09 10:56:26 +00:00
TreeHugger Robot
fd869cfe53 Merge "Add ability to modify credential via shell command" 2016-11-09 02:04:25 +00:00
TreeHugger Robot
c62ca218ba Merge "Add AppFuseBridge class to the system service." 2016-11-09 01:49:23 +00:00
TreeHugger Robot
664e8e5829 Merge "Move wallpaper related methods to WallpaperToken" 2016-11-09 01:43:03 +00:00