Commit Graph

7659 Commits

Author SHA1 Message Date
Dianne Hackborn
9c211a3396 Merge "Work on issue #28221912: Starting service as foreground might..." into nyc-dev 2016-04-19 18:10:28 +00:00
Andrii Kulian
5ac2da04c1 Merge "Recreate activity with correct configuration" into nyc-dev 2016-04-19 16:19:05 +00:00
TreeHugger Robot
f016d3aef7 Merge "Move profile registration from bindApplication to LoadedApk" into nyc-dev 2016-04-19 15:29:19 +00:00
Andrii Kulian
d0ad938760 Recreate activity with correct configuration
Dialer recreates activity inside onConfigurationChange
when configuration changes significantly. Recreated
activity in this case was initialised with old base version
which resulted in incorrect configuration in split-screen.

This CL updates configuration when activity is created from
override config.

Bug: 27976063
Change-Id: I0ac002a5661154ec25f2d5aba3d44070b683ba2f
2016-04-18 20:54:20 -07:00
Adam Powell
de7b2ed881 Merge "Be bug-compatible with Fragment#setUserVisibleHint < N" into nyc-dev 2016-04-18 23:41:41 +00:00
Adam Powell
ef4d99f016 Be bug-compatible with Fragment#setUserVisibleHint < N
Prior to Android N we were simply checking if a fragment had a
FragmentManager set before we would trigger a deferred
start. Unfortunately this also gets set before a fragment transaction
is committed, so if setUserVisibleHint was called before a transaction
commit, we would start the fragment way too
early. FragmentPagerAdapter triggers this situation.

Unfortunately some apps relied on this timing in overrides of
setUserVisibleHint on their own fragments, and expected, however
erroneously, that after a call to super.setUserVisibleHint their
onStart methods had been run.

Bug 28184671

Change-Id: Ie40d5f6963d312c2fad4a48fb4f992d33e65c83b
2016-04-18 16:39:22 -07:00
Adam Lesinski
bfdc2020b9 Merge "Optimize ResTable::getLocales() to improve bindApplication performance" into nyc-dev 2016-04-18 22:24:09 +00:00
Adam Lesinski
b7e1ce0775 Optimize ResTable::getLocales() to improve bindApplication performance
Change from linear searching for uniqueness to binary search.

Bug:27198799
Change-Id: I1ccb6e93cc213810848f07d631d9d8de7c719803
2016-04-18 15:06:50 -07:00
Dianne Hackborn
67324c990c Work on issue #28221912: Starting service as foreground might...
...kill previous notification.

Add new platform API to detach a notification from a service
without dismissing it.

Also, while I am here, add some more @IntDefs.

Change-Id: I3bb46d9cd3db7f73716c8ced19c20fea800eb30d
2016-04-18 14:48:09 -07:00
Wei Wang
f49b51e000 Merge "Use ConnectivityThread for RttManager." into nyc-dev 2016-04-18 21:17:25 +00:00
Tony Mak
853304c0b1 Show work challenge in if user in docked stack is locked
Register docked stack listener in ActivityManagerService.
If the docked stack is leaving minimized state, check whether the user
of the docked stack is locked. If yes, show credential confirmation.
Also, we now show work challenge in home task.

And we now scan the entire top task to handle the case the work app is
somewhere in the middle of the task. (eg: open personal camera in work app)

Bug: 27565539
Bug: 28094505

Change-Id: Iaf0738f43ae916a535b17949ec0f322bbfb194dc
2016-04-18 15:35:36 +00:00
Calin Juravle
2a727d7bd5 Move profile registration from bindApplication to LoadedApk
In order to capture profiles for apps which share the same VM and for
splits loaded without restart we need to move the profile registration
closer to where we create the class loaders (since bindApplication is
not called multiple times).

Moving the registration after class loader creation also allows us to
not profile apks which are already fully compiled.

Bug: 27539488
Bug: 27893309
Bug: 28012567
Change-Id: I6333f026f4f0680ca28e989f1686e3eac1145339
2016-04-18 15:28:40 +01:00
Calin Juravle
6aff67bfcb Merge "Register the UI Thread as a sensitive thread to the runtime" into nyc-dev 2016-04-18 10:40:31 +00:00
TreeHugger Robot
02ebaa02c4 Merge "Don't allow pinned activities to request visible behind" into nyc-dev 2016-04-18 04:19:36 +00:00
Wale Ogunwale
43896cffe6 Don't allow pinned activities to request visible behind
Also, release visible behind when pinning a visible behind activity.

Bug: 28042883
Change-Id: I1162d7639626f669f648ff82f5c367cb7b3fe6e6
2016-04-16 10:54:30 -07:00
Adam Powell
e33901c232 Merge "Retain loaders through stopped config changes" into nyc-dev 2016-04-15 21:40:53 +00:00
Wei Wang
bd3353a6c4 Use ConnectivityThread for RttManager.
Bug:27432949

Change-Id: I80fc02ff78981ca4798844c4d869b0eb60fbd84b
2016-04-15 12:45:34 -07:00
Adam Powell
cbade7f4d3 Retain loaders through stopped config changes
Framework edition

Previously we would throw away any stopped LoaderManagers when we went
to retain instances to pass along as nonConfigurationInstances during
config changes or similar activity restarts. This causes loaders to do
more work than they need to when a calling activity starts a new
activity on top, a config change happens (e.g. screen rotation) and
then the top activity is finished, restarting the caller in a new
configuration. The loaders would go through onReset unnecessarily,
potentially throwing away data to be reloaded again after the config
change completes.

Instead of throwing away stopped LoaderManagers in this case, restart
them and retain them across the config change so they can resume where
they left off.

Bug 27176186

Change-Id: Ia52c6448d2ad41dcb25d493770d9ffae20a19d2a
2016-04-15 11:14:37 -07:00
Calin Juravle
8f5770dcdb Register the UI Thread as a sensitive thread to the runtime
Bug: 27865109
Bug: 28065407
Change-Id: I46194d444530770f505ac5e653536be2da7dd08b
2016-04-15 18:38:21 +01:00
Benjamin Franz
bc33c8290f Revert "Revert "Throw security exception for non-parent aware APIs""
This reverts commit a26c626564.

Bug: 27532279
Change-Id: I0c0394a8abf12e7382e7083a0b9d7f8385c3a63d
2016-04-15 16:08:35 +01:00
Andrii Kulian
5981b8c2e8 Merge "Remember task which is being locked" into nyc-dev 2016-04-15 04:32:57 +00:00
Andrii Kulian
0f051f5abd Remember task which is being locked
We need to remember task which requested to be locked
because we can accidentally lock another task after
user interacts with pinning request dialog.

Bug: 27876860
Change-Id: Ie8e607df4380dd33ea9b3474afc247b02e31de07
2016-04-14 19:26:18 -07:00
Tim Murray
117cff790e Merge "Revert "Optimize ResTable::getLocales() to improve bindApplication performance"" into nyc-dev 2016-04-14 23:48:17 +00:00
Tim Murray
98e80076c6 Revert "Optimize ResTable::getLocales() to improve bindApplication performance"
This reverts commit 5520581b5f.

bug 28189634

Change-Id: I2d2b859f6d9bd44434fa901cce990583f514980c
2016-04-14 16:06:29 -07:00
Amith Yamasani
0d723a2a4d Merge "Multi-window assist callback" into nyc-dev 2016-04-14 19:06:40 +00:00
TreeHugger Robot
82676d9f88 Merge "API Review: Improve javadoc of EXTRA_REMOTE_INPUT" into nyc-dev 2016-04-14 14:45:00 +00:00
Dan Sandler
732bd6cb27 Allow system apps to substitute a different app name in notifications.
This is a privileged permission and is only to be used by
the core OS and related packages whose names are confusing
or misleading when shown in notifications.

The user will always be able to see the true package name by
accessing the notification inspector (longpress or swipe
gesture on the notification row in SystemUI).

Fixes: 26517701
Change-Id: I2b021c9da0757b99df76399666af263668d88070
2016-04-14 13:48:03 +00:00
Clara Bayarri
6e58549740 Merge "Provide startIntentSenderForResult for fragments" into nyc-dev 2016-04-14 10:05:35 +00:00
Amith Yamasani
e8222e551f Multi-window assist callback
Introducing a new callback in VoiceInteractionSession to
provide assist data for additional activities in the
foreground in a multiwindow setup.

PIP, docked windows and free-form windows (top-most)
will be queried for assist data and passed through the
new API to the Voice Interaction service.

Bug: 27718385

Change-Id: Ib4427c304611b75c2078dcb54f1f7e47ae7d9cfa
2016-04-13 17:12:29 -07:00
Dianne Hackborn
9e31b3fd81 Merge "More work on issue #26390151: Add new JobScheduler API..." into nyc-dev 2016-04-13 23:30:14 +00:00
Adrian Roos
005e774ac8 API Review: Improve javadoc of EXTRA_REMOTE_INPUT
Change-Id: I3b23a44ca54be7724ddb29c432bb6975a784b5b4
Fixes: 27365667
2016-04-13 15:05:30 -07:00
Adam Lesinski
b5abb78b7c Merge "Optimize ResTable::getLocales() to improve bindApplication performance" into nyc-dev 2016-04-13 21:53:47 +00:00
Adam Lesinski
5520581b5f Optimize ResTable::getLocales() to improve bindApplication performance
Change from linear searching for uniqueness to binary search.

Bug:27198799
Change-Id: Ifa4672929df286c4693ab1f77716f08945941b0c
2016-04-13 13:25:09 -07:00
Sudheer Shanka
fd580f7d1a Merge "Update {set,get}{Long,Short}SupportMessage APIs to use CharSequence." into nyc-dev 2016-04-13 20:12:05 +00:00
Mitchell Wills
3c5870912b Merge "Make WifiScanner state not static and use ConnectivityThread" into nyc-dev 2016-04-13 18:41:55 +00:00
Dianne Hackborn
8db0fc15b8 More work on issue #26390151: Add new JobScheduler API...
...for monitoring content providers

We now have some delays before reporting URI changes, to allow
them to batch together.

Also clean up debug output, and fix some issues with how we
were managing the content observer state.

And while I am here, fix the device idle and app idle controllers
to no longer maintain their own list of jobs, but just directly
iterate over the JobStore.

Change-Id: If3fdff23c00c2f1b99901a9be096d851562d3439
2016-04-13 10:54:16 -07:00
Dianne Hackborn
e3f617b23f Merge "Fix issue #28035090: Disallow abuse of JobScheduler" into nyc-dev 2016-04-13 17:44:52 +00:00
Dianne Hackborn
807de78c07 Fix issue #28035090: Disallow abuse of JobScheduler
We now keep track of how long each app has been running a job
for, in 30 minute batches.  If it is running jobs frequently,
we will bump down the priority its jobs run at to allow other
jobs to run before it.

Currently we count both pending and active as the job running,
which means that an app that has jobs waiting in the pending
queue will count against its abuse prevention.  This could
allow starvation -- if we bump down the priority of an app's
jobs and the system is so busy continually that they sit
in the pending queue a lot -- it could never recover.  But I
think that is okay...  if we are really in a state where we
are continually running as many jobs as possible, we probably
have other larger issues.

Change-Id: I838aa4b5840e91df49a1e17b53188d6e4a66a6d1
2016-04-13 10:42:51 -07:00
Michal Karpinski
1271cef419 Merge "API polish in DPM for organization color and name methods" into nyc-dev 2016-04-13 13:28:08 +00:00
Clara Bayarri
a0c2dc3cf5 Provide startIntentSenderForResult for fragments
Bug: 27700608
Change-Id: Ibb7689ba0527048dd5944c4315b986f16030081d
2016-04-13 12:33:30 +01:00
TreeHugger Robot
a74888ddf6 Merge "TRON refinements for multi-window" into nyc-dev 2016-04-13 04:18:31 +00:00
TreeHugger Robot
0a6a6dbe91 Merge "Added api to delete cache files for a given user" into nyc-dev 2016-04-13 03:13:49 +00:00
Jorim Jaggi
29379ec859 TRON refinements for multi-window
Bug: 26013430
Change-Id: I89b139b4ca3e7b6a06d8b5b351d67ffac240f73f
2016-04-12 19:43:52 -07:00
Suprabh Shukla
78c9eb8947 Added api to delete cache files for a given user
Added an api to delete application cache files for a specific user. This
allows settings to clear cache files for work profile apps as well.

Bug: b/25338468
Change-Id: I52d4944a7a03b6d63ad44dd6bb868aec62815eab
2016-04-12 18:23:56 -07:00
Adrian Roos
48d746ab32 Fix broken actions with MessagingStyle
Bug: 27250207
Change-Id: I073bb0ef055423a6c152af0e98fe846b15511d11
2016-04-12 15:00:31 -07:00
Mitchell Wills
91312c7cb2 Make WifiScanner state not static and use ConnectivityThread
Bug: 27432949
Change-Id: I3fa14b75ee6a48aea2bfb8fed662c37b678e3cf0
2016-04-12 20:59:24 +00:00
TreeHugger Robot
4db2f1f602 Merge "Notification MessagingStyle: Add handset views" into nyc-dev 2016-04-12 20:12:41 +00:00
Shreyas Basarge
997743d29e Merge "Documentation for flex field" into nyc-dev 2016-04-12 19:35:21 +00:00
Adrian Roos
c1a80b08f0 Notification MessagingStyle: Add handset views
Bug: 27250207
Change-Id: I499cf2beaeeb34f0f189815fc0911f3b8954bd50
2016-04-12 11:52:49 -07:00
Alexander Hills
e3f3cb1048 Merge "Fixes name of intent launch flag for Action Extender" into nyc-dev 2016-04-12 17:10:19 +00:00