Commit Graph

7530 Commits

Author SHA1 Message Date
George Mount
056b7d5403 Removed improper check on mCalledExitCoordinator.
Bug 27969302

mCalledExitCoordinator can be nulled before the onResume is called,
so it cannot be used to determine whether or not the Activity is
a caller or called.

Change-Id: Ie3696ed59b89cfc8c6145d22bc230111f0813701
2016-04-01 13:19:35 -07:00
Andrei Stingaceanu
aa60469445 Merge "AfW - suspend apps - API polish" into nyc-dev 2016-03-31 10:57:58 +00:00
Michal Karpinski
31f59f1106 Merge "Adjusting javadocs for process logging" into nyc-dev 2016-03-31 09:56:24 +00:00
Jeff Sharkey
4afe32d493 Merge "Keep COLUMN_LOCAL_URI working for now." into nyc-dev 2016-03-31 03:46:14 +00:00
Jeff Sharkey
281c182cb8 Keep COLUMN_LOCAL_URI working for now.
Bug: 26515039
Change-Id: I48f3ef90443b01fb75a3852e5cfdd83a9bbcac0f
2016-03-30 19:46:42 -06:00
Sudheer Shanka
d2a968f9c3 Merge "Return null value if getActiveAdminUncheckedLocked returns null." into nyc-dev 2016-03-31 01:14:21 +00:00
Andrii Kulian
ac94586714 Merge "Refactor usages of Picture In Picture and Multi Window (1/4)" into nyc-dev 2016-03-31 00:57:42 +00:00
Sudheer Shanka
549b969280 Return null value if getActiveAdminUncheckedLocked returns null.
- Split per user version of getUserRestrictions into a separate method
  in DPMS and make the per-user version return null if the admin
  parameter is not a valid one.
- Update isAccessibilityServicePermittedByAdmin and
  isInputMethodPermittedByAdmin to return false if the admin parameter
  is not a valid one.

Bug: 27909087
Change-Id: I6f4cae6552cbfe02dc4a92b04eeeddf0314e0974
2016-03-30 17:12:07 -07:00
Lorenzo Colitti
7d4ed2f5ab Merge "Avoid null app context in StaticApplicationContextServiceFetcher." into nyc-dev 2016-03-30 23:03:18 +00:00
Adam Lesinski
7f3f499887 Allow multiple Resources associated with an Activity
Previously it was assumed that one Resources object per Activity would be fine.
This proved to be incorrect, as methods like Context#createConfigurationContext()
expect to create a new Resources object that gets updated whenever the Activity Resources
get updated.

To fix this issue, there exists a master override configuration for each Activity. Subsequent
Resources created for an Activity will be based off that master override configuration, and
will be updated accordingly.

Bug:27644297
Bug:27604953
Change-Id: Idb3d851f55ee7981eec4e3fe28e2ea8d55f1192d
2016-03-30 14:27:11 -07:00
Roozbeh Pournader
48d8a39b71 Merge "Fix incorrect initial locale negotiation." into nyc-dev 2016-03-30 19:44:25 +00:00
Rubin Xu
5b7ca24f14 Merge "Add DevicePolicyManager API to install a client cert chain." into nyc-dev 2016-03-30 17:46:18 +00:00
Clara Bayarri
30fb053449 Merge "Change default work challenge background color" into nyc-dev 2016-03-30 16:13:00 +00:00
Clara Bayarri
8d0bd7fa63 Change default work challenge background color
Requested by UX

Bug: 27829562
Change-Id: I815c06784189e68b09e464e936521e82091c93c3
2016-03-30 17:12:08 +01:00
Seigo Nonaka
c14dd78a2c Fix incorrect initial locale negotiation.
It turned out that calling ResourceManager.setDefaultLocalesLocked
and ResourcesManager.applyConfigurationToResourcesLocked
can be called before the locale negotiation is ready.

To fix this issue, move ResourcesManager setup flow after creating
application context.

This also introduces RuntimeException for notifying developers the
initialize order.

Bug: 27567902
Change-Id: Iab7ea384b039fb649fb52d06d45b2bfae21f9a8a
2016-03-31 00:21:35 +09:00
Michal Karpinski
e0e1009820 Adjusting javadocs for process logging
Informing the pre-reboot logs may be empty and specifying that base APK hash is logged.

Bug: 27896341
Change-Id: I9011f6f6ebd0e20e5a4be86f6c5d33094212cc3d
2016-03-30 15:02:26 +01:00
Andrei Stingaceanu
b70ba1971c Merge "AfW custom lock screen message - API polish" into nyc-dev 2016-03-30 12:23:56 +00:00
Rubin Xu
b436591708 Add DevicePolicyManager API to install a client cert chain.
When installing a keypair the caller will have the option to specify a
certificate chain which will later be returned to whoever requests access
to the keypair via KeyChain.

Bug: 18239590
Change-Id: Id21ef026e31537db38d891cb9b712dd4fe7159c7
2016-03-30 11:57:58 +01:00
Andrii Kulian
933076d805 Refactor usages of Picture In Picture and Multi Window (1/4)
Bug: 27365860
Change-Id: I1590e430a12ceb84cb83da295e0bf7e4378fea96
2016-03-29 18:39:45 -07:00
George Mount
d0ca0e0984 Ensure window has been added in isTopOfTask
Bug 27893230

When isTopOfTask is called prior to the window being added, it
will throw an IllegalArgumentException. This checks that the
window has been added before making the call.

Change-Id: Idd14c0f1051e16d96a0a1fa9f990f380a1f69911
2016-03-29 10:35:03 -07:00
Andrei Stingaceanu
efc4a344a1 AfW - suspend apps - API polish
* renamed getPackageSuspended => isPackageSuspended
* does not return false for an error, instead throws
  NameNotFoundException if the package could not be
  found, or if there is an unknown RemoteException,
  wraps it in a RuntimeException and rethrows.

Bug: 27532430
Bug: 22776761
Change-Id: Iee00600089b1c0556a3312b10456826464fa8f9f
2016-03-29 14:49:21 +00:00
Andrei Stingaceanu
16187903b4 AfW custom lock screen message - API polish
DevicePolicyManager:
* getDeviceOwnerLockScreenInfo now returns CharSequence as it returns a string
  for display to a user
* setDeviceOwnerLockScreenInfo
** accepts CharSequence, not String as this is a string displayed to the user
** Returns void; throws an appropriate runtime exception on failure

Bug: 27531295
Change-Id: I30528569cfa66ee76f857fbee1c3196f821718fd
2016-03-29 13:04:29 +00:00
Joe Onorato
0caf007b3f Merge "Refactor ProcessStats." into nyc-dev 2016-03-28 20:52:39 +00:00
Wale Ogunwale
ddfc6f7dc9 Merge "Show non-top tasks in the docked stack in recents." into nyc-dev 2016-03-28 20:22:35 +00:00
Wale Ogunwale
64ae08aa16 Show non-top tasks in the docked stack in recents.
Allows the user to access the task through recents since
it isn't currently visible on screen.

Also, changed recents to launch task currently in the docked
stack in the fullscreen stack when selected from recents list.

Bug: 27864383
Change-Id: I58549023920d064a30b6355367c3193ce3207bbd
2016-03-28 12:06:44 -07:00
George Mount
fe77fdf8b3 Merge "If resume occurs, force finish of exiting activity." into nyc-dev 2016-03-28 17:21:11 +00:00
George Mount
20d51f550f Merge "Disable suppressLayout in Visibility Activity Transitoins." into nyc-dev 2016-03-28 17:20:53 +00:00
Lorenzo Colitti
0ad9ab07fa Avoid null app context in StaticApplicationContextServiceFetcher.
StaticApplicationContextServiceFetcher passes the application
context to the services it creates, but sometimes the application
context can be null. Cases we've seen so far are:

- Apps that (incorrectly) call getSystemService in
  attachBaseContext. In this case the passed-in context is what
  will become the application context soon afterwards.
- ActivityThread$ApplicationThread.setHttpProxy. In this case the
  passed-in context is the system context.

In both of these cases the passed-in context is never freed, so
passing it in to the service will not result in a leak.

Bug: 27532714
Bug: 27502146
Bug: 27337770
Change-Id: I5971c67b0e699d1a77850be8a338a448a96ec7d7
2016-03-28 17:33:30 +09:00
Jeff Sharkey
bd91e2f3f6 Update PRE_BOOT_COMPLETED for FBE.
Now that CE data isn't available until after a user is unlocked, we
need to delay the PRE_BOOT_COMPLETED broadcasts.  This is done by
adding a new RUNNING_UNLOCKING user state to the UserController
lifecycle.

We now track the last fingerprint a user was logged in under, and we
dispatch PRE_BOOT receivers when that fingerprint changes.  To work
around battery pull issues, we only persist the updated fingerprint
once all PRE_BOOT receivers have finished.  This is less granular
than the original solution, but it's still correct.  We only consider
a user as "logged in" once it transitions into the RUNNING_UNLOCKED
state.

When starting a process, track if the user was "unlocked" when
started, so that we only spin up unaware providers in processes
started before user unlock.

Add generic IProgressListener to communicate PRE_BOOT progress and
strings up to lock screen.  For now, LockSettingsService just blocks
until finished, but it could display these strings in the future.

Bug: 27220885
Change-Id: I349439776b885acd32f6a578d8951ffd95640be2
2016-03-27 10:56:48 -06:00
Jorim Jaggi
a04c532a09 Merge changes from topic 'recents_transition' into nyc-dev
* changes:
  Implement transition for docking task in recents #6
  Implement transition for docking task in recents #5
  Implement transition for docking task in recents #4
  Implement transition for docking task in recents #3
  Implement transition for docking task in recents #2
  Implement transition for docking task in recents #1
  Show a scrim activity if task is not resizable
2016-03-25 22:22:05 +00:00
Edward Cunningham
d0ee17d926 Merge "DO NOT MERGE Revert "Revert "DO NOT MERGE Extend the DownloadManager.addCompletedDownload() method to support origin details.""" into nyc-dev 2016-03-25 22:01:07 +00:00
Jorim Jaggi
192086eb8a Implement transition for docking task in recents #1
- When the docking transition is happening, defer updating
the bounds of the home stack until the transition is done.
This is to preserve the scrim which is drawn in the recents
activity.
- Use the PROLONG_AT_START infrastructure to hide the task
in recents when starting the app transition.
- When recents finally get resized at the end of the transition,
reset it's draw state so we don't move the old surface around,
and the new surface gets drawn at the new position, to avoid
flickering.
- Remove hack around not layouting docked divider if it's not
visible, it's not needed anymore and resulted in a wrong
initial position.
- Fix animation selection for docked stack divider.
- Make sure win.moved() always gets called.

Bug: 27607141
Change-Id: I76c35f09461f044a90e2c88335008284b5839cc0
2016-03-25 14:27:58 -07:00
Jorim Jaggi
2adba07d75 Show a scrim activity if task is not resizable
Add a callback to TaskStackChangeListener which gets fired when the system
might need to inform the user that a specific app might not work in
multi-window.

Use that callback in SysUI to show a translucent activity which scrims the
activity behind to inform that it might not be resizable.

Debounce the information to once per multi-window session, to not make it
annoying.

Introduce launchTaskId to start an activity in an existing task, and protect
that with START_TASKS_FROM_RECENTS permission.

Bug: 27327287
Bug: 27431869
Change-Id: I89e8d653872ab01ba3c1e252b426e5481da0e6ca
2016-03-25 14:23:41 -07:00
Edward Cunningham
abb2c5af8e DO NOT MERGE Revert "Revert "DO NOT MERGE Extend the DownloadManager.addCompletedDownload() method to support origin details.""
This reverts commit c6f5738d3c.

Change-Id: Ibb330f44c3910b3fc124ee8c718a508cdf3b32b4
2016-03-25 20:56:31 +00:00
Winson Chung
941a1f81b0 Merge "Don’t scale task thumbnails." into nyc-dev 2016-03-25 03:51:09 +00:00
Winson
217009356e Don’t scale task thumbnails.
- Changing task view thumbnail layout.  In portrait, scale the thumbnail
  to width for portrait screenshots, and apply the same scale to 
  landscape screenshots.  In landscape, scale screenshots up to 1:1, and
  tweak the app transition to clip the sides instead of scaling.
  In both orientations, fill with the background color in the remaining
  space.
- Moving some resources related to the title bar to be calculated 
  programmatically so that we can have different header bar sizes which 
  completely overlap the action bar in the screenshot in each 
  orientation.
- Constraining the task stack width in landscape to portrait

Bug: 27504677
Change-Id: Ic9b6fdde6dd728d9f2d20a8b89c05b3a350edfbf
2016-03-24 20:03:02 -07:00
Svetoslav Ganov
d61a57fdd0 Merge "Guard against a NPE when using ParceledSliceList" into nyc-dev 2016-03-25 01:33:38 +00:00
Svetoslav Ganov
b2c2e452e5 Guard against a NPE when using ParceledSliceList
bug:27558595

Change-Id: Idaa3b37d1d3bbb10b93e08ef1976758fde0b0ce3
2016-03-24 18:01:22 -07:00
Joe Onorato
4eb64fdbcf Refactor ProcessStats.
- Pull most of the inner classes out into their own files.
- Move everything to a new android.app.procstats package.
- Move all of the code that was manipulating the big list
  of longs to use the new SparseMappingTable class rather
  than doing everything by hand. The logic is unchanged.
- Add a sequence number check to SparseMappingTable so
  when the big list of longs and the individual tables are
  reset, which happens somewhat independently, we can
  assert when one of them doesn't get reset.
2016-03-24 15:55:31 -07:00
George Mount
bdc4d8dc96 If resume occurs, force finish of exiting activity.
Bug 27231404
Bug 27274246

Change-Id: Ia92fe6fdebced3e5a1fc9d165212ac1196f395bd
2016-03-24 10:47:25 -07:00
George Mount
f189c2ffa2 Merge "Invalidate entire scene root when executing the transition." into nyc-dev 2016-03-24 14:45:22 +00:00
Clara Bayarri
3e5bf786b7 Merge "Keyboard Shortcuts: plumb deviceId through" into nyc-dev 2016-03-24 13:30:48 +00:00
Clara Bayarri
fcd7e80b21 Keyboard Shortcuts: plumb deviceId through
Bug: 27673736
Change-Id: Ie72807aa8c2bfd142b081a6a915e101c16d31473
2016-03-24 11:47:32 +00:00
Adam Powell
30ac43e4ac Merge "Fix bugs around restoring nested retained instance fragments" into nyc-dev 2016-03-23 22:27:31 +00:00
George Mount
52ff2b7798 Invalidate entire scene root when executing the transition.
Bug 27778109

When switching from forced visibility to using real visibility,
I didn't take into account the fact that invalidating INVISIBLE
Views skip invalidation. This CL invalidates the scene root
to ensure that the transition is properly executed.

Change-Id: I092d0fe42229390927f7d1b65fc2b3ce5fc2938d
2016-03-23 14:01:35 -07:00
Adam Powell
eacacb5989 Fix bugs around restoring nested retained instance fragments
Framework edition

In a few configurations the child fragment state of a
retained-instance fragment would not be preserved correctly, leading
to child fragments not being restored. Clean this up along with live
state management issues that were leading to logged warnings during
normal fragment operation.

Bug 27371492
Bug 27477824

Change-Id: I847ac05b1757392580e008dc20c50c3ef365ca68
2016-03-23 13:07:27 -07:00
Adrian Roos
9b95f615c4 Merge "Ensure notification color contrast" into nyc-dev 2016-03-23 18:14:54 +00:00
Adrian Roos
4ff3b120ff Ensure notification color contrast
Ensure we have at least 3:1 contrast for the
action buttons. Also ensures that the inline
reply box background has 4.5:1 contrast to white.

Further modifies the color of the inline reply
background to satisfy a 4.5:1 contrast ratio for
the entered text.

Bug: 26831312
Change-Id: If42b1c99d1adee547d0a583c1a69c48ef7287c23
2016-03-23 10:49:40 -07:00
Michal Karpinski
3bce4bfa04 Remove legacy DeviceLogging methods from DPM
Those methods were replaced with SecurityLogging ones.

Bug: 27532425
Change-Id: I6952251d9c15f932517e7cb39a7056f35c3a194f
2016-03-23 13:14:33 +00:00
Paul Stewart
68ffbba158 Merge changes Iddeebeb8,Idd1e37a3 into nyc-dev
* changes:
  WifiManager: Use ConnectivityThread
  Create ConnectivityThread
2016-03-22 22:23:48 +00:00