Commit Graph

7935 Commits

Author SHA1 Message Date
Chong Zhang
5c689127ba Merge \"Use getActivityToken() instead of mToken in isTopOfTask\" into nyc-dev
am: 723e5afa9e

Change-Id: Ib739a55588b270e76cdb11c5356fd90c19c644dc
2016-06-08 01:22:43 +00:00
Felipe Leme
53c1637134 Merge \"Duplicate file descriptor when dumping asynchronously.\" into nyc-dev
am: c02ba17898

Change-Id: Ief488d02aac6900453e5344959aad8c417d60c8d
2016-06-08 01:15:06 +00:00
Chong Zhang
723e5afa9e Merge "Use getActivityToken() instead of mToken in isTopOfTask" into nyc-dev 2016-06-08 01:12:27 +00:00
Felipe Leme
29de4922db Duplicate file descriptor when dumping asynchronously.
dumpDbInfo() uses an async task when dumping from the system thread, but
then the file descriptor is closed by the time the task is executed. As
such, the system databases are not dumped.

BUG: 29123428
Change-Id: Ibb8bbe503aa03c3ca13b2b1789f0ead0b869e9d5
2016-06-07 16:35:50 -07:00
TreeHugger Robot
fe3ecdab1b Merge "Revert "Internal API for cross-task Activity used by assistant."" into nyc-mr1-dev 2016-06-06 23:44:34 +00:00
Eino-Ville Talvala
563df3b328 Revert "Internal API for cross-task Activity used by assistant."
This reverts commit 04073dc5be.

Bug: 29128683
Change-Id: I7d9bb7bb388f38e8e5ab159a211ee7f9f4fb7ab9
2016-06-06 22:04:54 +00:00
TreeHugger Robot
c27660d45a Merge "Add new attributes for wallpaper info" into nyc-mr1-dev 2016-06-04 00:22:06 +00:00
Jorim Jaggi
526505da25 Add new attributes for wallpaper info
Adjust test wallpaper to use these attributes.

Also fix some issues where wallpaper got laid out differently in the preview
mode.

Bug: 28770685
Change-Id: I259f3884f5f2c0b723a6a5ce012d45170f64c4c7
2016-06-03 15:50:31 -07:00
George Mount
3af59ef42c Merge "Internal API for cross-task Activity used by assistant." into nyc-mr1-dev 2016-06-03 22:22:53 +00:00
George Mount
04073dc5be Internal API for cross-task Activity used by assistant.
29091742

A new internal API has been created for use by assistant
to launch an Activity Transition from a non-Activity.

The ActivityOptions are also passed along when using
a spring board Activity so that the shared elements
can be properly synchronized.

This also fixes TransitionManager.endTransition so
that it forces Transitions to end the animations.

Change-Id: Id18d9765bfc0c7b438e17966455aa66d3fa3aeda
2016-06-03 14:08:06 -07:00
Chong Zhang
6f9ae4ffc5 Use getActivityToken() instead of mToken in isTopOfTask
mToken could be local tokan and causes IllegalArgumentException.

bug: 29072444
Change-Id: I0f889a70a848ffea31663ed80337e1605c75223e
2016-06-03 11:50:44 -07:00
Makoto Onuki
37087ad710 Merge "ShortcutManager: Implement usage report API" into nyc-mr1-dev 2016-06-03 15:21:45 +00:00
Tony Mak
d73c6eb6f3 OP_ACTIVATE_VPN should not map to DISALLOW_CONFIG_VPN
am: 33d03a9e43

* commit '33d03a9e435eb474e3bdd3e958943e0057866477':
  OP_ACTIVATE_VPN should not map to DISALLOW_CONFIG_VPN

Change-Id: I2de02ec6febdc58ff9a79562059cc11e7d617be5
2016-06-03 10:43:30 +00:00
Tony Mak
33d03a9e43 OP_ACTIVATE_VPN should not map to DISALLOW_CONFIG_VPN
They are two different things.
OP_ACTIVATE_VPN means can we allow a vpn app to establish without user
interaction while DISALLOW_CONFIG_VPN means can the user modify vpn
config.

Testing:
1. Turn on DISALLOW_CONFIG_VPN, user cannot modify vpn config through
   setting
2. Turn on DISALLOW_CONFIG_VPN, Dpm.setAlwaysOnVpn works.
3. Reboot after 2, vpn established automatically.

Bug: 29086229
Change-Id: I24899d6c7f0dd62bf441a44c6ee66fee35973a11
2016-06-03 10:06:06 +00:00
Makoto Onuki
ac042501c8 ShortcutManager: Implement usage report API
Bug 28536054

Change-Id: I293e8eaad523e3b0d76d562fc381601633451ed3
2016-06-02 15:57:40 -07:00
Calin Juravle
ae9f5b6559 Merge "Don\'t create or check permissions on profiles during app startup" into nyc-dev
am: e67a29a037

* commit 'e67a29a037d11d242d6afba6aff5a0feb60e289b':
  Don't create or check permissions on profiles during app startup

Change-Id: I43d0c4af8e20fabd3f752ce8ad97f4ad1f28dd1b
2016-06-02 10:18:06 +00:00
Calin Juravle
e67a29a037 Merge "Don't create or check permissions on profiles during app startup" into nyc-dev 2016-06-02 10:10:36 +00:00
Jeff Sharkey
f02954ccd5 Merge "Release AssetManagers when ejecting storage." into nyc-dev
am: 380f3b12a4

* commit '380f3b12a4725a0534d62ada7c6f3bd67ebd0d01':
  Release AssetManagers when ejecting storage.

Change-Id: I54282cfcf53279f87e66cc1263ae9663fe94bc04
2016-06-01 23:03:38 +00:00
TreeHugger Robot
380f3b12a4 Merge "Release AssetManagers when ejecting storage." into nyc-dev 2016-06-01 22:14:57 +00:00
Jeff Sharkey
98bf12f999 Release AssetManagers when ejecting storage.
When ejecting a storage device, the system process needs to rapidly
release any open FDs to prevent itself from being killed by vold.

This change examines all ResourceImpls cached inside the system
process and evicts any that reference the storage device being
ejected.  (ResourcesManager will gladly recreate any evicted entries
when asked again in the future.)

Also replace broken use of WeakHashMap, since we want the values to
be weak references, not the keys.

Bug: 28867548
Change-Id: Ib9cfc66497149b6d3f8d49213e9779408a331d2a
2016-06-01 14:52:27 -06:00
Dianne Hackborn
7aaeb394a9 Merge "Fix issue #29058724: Improve JobScheduler API demo" into nyc-dev
am: 61721ee3d7

* commit '61721ee3d7b7d55a0535584449b49143b1c2e039':
  Fix issue #29058724: Improve JobScheduler API demo

Change-Id: Icbee904b90fe52afaa8074b3165e4618d1fae526
2016-06-01 19:37:43 +00:00
Dianne Hackborn
61721ee3d7 Merge "Fix issue #29058724: Improve JobScheduler API demo" into nyc-dev 2016-06-01 19:29:43 +00:00
Dianne Hackborn
c43a7f89f7 Fix issue #29058724: Improve JobScheduler API demo
We can now include it in the java docs!

Change-Id: I46b4f58e6220347e4f3f12139c9484d1b964c6a2
2016-06-01 10:48:43 -07:00
Adrian Roos
72bc1299f2 Merge "MessagingStyle: Generate EXTRA_TITLE and EXTRA_TEXT" into nyc-dev
am: ff39d3ec2f

* commit 'ff39d3ec2fa773a50bbd069a40570767c80fd404':
  MessagingStyle: Generate EXTRA_TITLE and EXTRA_TEXT

Change-Id: I96b1992f69d94f24a63784c1c2d954b91ab9570d
2016-06-01 17:14:47 +00:00
TreeHugger Robot
ff39d3ec2f Merge "MessagingStyle: Generate EXTRA_TITLE and EXTRA_TEXT" into nyc-dev 2016-06-01 17:02:00 +00:00
Dianne Hackborn
0e443c1320 Merge "Work on issue #28942589: Tune job scheduler" into nyc-dev
am: 438693dd6c

* commit '438693dd6cc4e3fe2ffb336d551c0d69e9546102':
  Work on issue #28942589: Tune job scheduler

Change-Id: I8264ce4204762358ccbf893e7846434eed258a22
2016-06-01 16:38:12 +00:00
Dianne Hackborn
438693dd6c Merge "Work on issue #28942589: Tune job scheduler" into nyc-dev 2016-06-01 16:27:06 +00:00
Dianne Hackborn
e9a988caca Work on issue #28942589: Tune job scheduler
We now have a new settings key that provides all of the existing
tuning parameters, plus some newly redone ones for dealing with
different memory levels.

Changed the minimum batching for overall jobs from 2 to 1, so
we will never get in the way of immediately scheduling jobs
when the developer asks for this.  We should now be able to rely
on the doze modes to do better batching of jobs for us when it
is really important.

Also work on issue #28981330: Excessive JobScheduler wakeup alarms.
Use a work source with scheduled alarms to blame them on the app
whose job they are being scheduled for, and add a check for whether
a job's timing constraint has been satisfied before considering it
a possible candidate for the next alarm.  (If it is satisified,
the time is in the past, so we should not schedule an alarm for it.)

Finally clean up a bunch of the dumpsys output to make it easier
to understand.

Change-Id: I06cf2c1310448f47cf386f393e9b267335fabaeb
2016-05-31 18:16:19 -07:00
Christopher Tate
7d45e0231e Merge "Don\'t bother with WeakHashMap for direct alarm bookkeeping" into nyc-dev
am: cd0aa9cda8

* commit 'cd0aa9cda8e57c224b473198a345fb008fe30b5a':
  Don't bother with WeakHashMap for direct alarm bookkeeping

Change-Id: I3b28a8c03cee7fe6f85540f1f679de10de09923c
2016-05-31 23:13:20 +00:00
Chris Tate
cd0aa9cda8 Merge "Don't bother with WeakHashMap for direct alarm bookkeeping" into nyc-dev 2016-05-31 22:59:26 +00:00
Christopher Tate
09d7d8f674 Don't bother with WeakHashMap for direct alarm bookkeeping
Call cancel() explicitly before dropping local references to your
callback objects; they won't just quietly go away.

Bug 28987260

Change-Id: Id9da66ed86a46b4fb38127e2ddd7a7d84fd2313a
2016-05-31 15:19:47 -07:00
George Mount
27a0e5a632 Merge "Better handling of confused finish transition." into nyc-dev
am: 2fd9cd7cbb

* commit '2fd9cd7cbb7a792d041d0e0780b11b12b4591a90':
  Better handling of confused finish transition.

Change-Id: I27914d6161ab68ce236b9d15e5d07c71889edb4e
2016-05-31 21:37:51 +00:00
George Mount
5ae0b7abf0 Better handling of confused finish transition.
Bug 28347277

When an activity calls startActivity with makeSceneTransitionAnimation
and then calls finishAfterTransition, it should not do any transition
and just finish.

Change-Id: I00e537638fa6f24c95605f09bbafd843b569bb4d
2016-05-31 12:58:52 -07:00
Adrian Roos
7d4da18d03 Merge "Fix IME and NavBar overlap with Direct Reply" into nyc-dev
am: 5dbb9ff674

* commit '5dbb9ff67468979214542eb6a448711d2d614cdb':
  Fix bad one-line MessagingStyle

Change-Id: I1b6cf5033b970aea74fed1ac07c93fe69b7fb1de
2016-05-27 23:12:29 +00:00
Adrian Roos
33fbd2c965 MessagingStyle: Generate EXTRA_TITLE and EXTRA_TEXT
Generates an appropriate title and text for MessagingStyle
Notifications, such that SystemUI can generate the appropriate
oneline representation.

Bug: 28934989
Change-Id: Ic23ed18bb9c4af21ad59626ca161ca7abb25a4e9
2016-05-27 15:49:05 -07:00
Adrian Roos
5dbb9ff674 Merge "Fix bad one-line MessagingStyle" into nyc-dev 2016-05-27 22:02:38 +00:00
Felipe Leme
8c8ea506d9 Merge "Allow apps to bypass Power Save restrictions when launched from a Notification\'s PendingIntent." into nyc-dev
am: efa291a860

* commit 'efa291a8605e91d775faf46ada349ec7f81fcdb9':
  Allow apps to bypass Power Save restrictions when launched from a Notification's PendingIntent.

Change-Id: Ibd09b082140b66d25bd8583040761581bb20af76
2016-05-27 20:04:22 +00:00
Felipe Leme
a1b79bfd7a Allow apps to bypass Power Save restrictions when launched from a Notification's PendingIntent.
This scenario typically happens when the device is on Doze Mode and a
notification action is triggered from a Wear device.

In a nutshell, the workflow is:

- ProcessRecord has a flag telling whether a process has "whitelist
  management" privileges.
- When NotificationManager binds a new NotificationListenerService, it
  sets the BIND_ALLOW_WHITELIST_MANAGEMENT flag.
- On bind(), ActiveService asserts that only system apps can set that
  flag.
- On computeOomAdjLocked(), ActivityManagerService sets the
  ProcessRecord flag if necessary.
- Upon creating a notification, NotificationManager calls AM to mark its
  PendingIntents as coming from a notification.
- When PendingIntentRecord sends it to the target, it checks if it's
  from a notification and if so calls AM to do the temp whitelist.
- On unbind(), ActiveService removes the ProcessRecord flag if necessary.

Fixes: 28818704

Change-Id: I00d46036a2cbb73f7f733fd35bf0b743a02807a1
2016-05-27 11:45:09 -07:00
Calin Juravle
126f78011d Don't create or check permissions on profiles during app startup
The impact is small but the IO work can be perform at different
moments. Profile creation is done during app install and
permission check postpone until the first profile write.

Bug: 28785119
Bug: 28625993
Change-Id: Ib364f21f07a78c78e03851fa12142319ea1f931b
2016-05-27 12:02:12 +01:00
George Mount
8453136b8e Merge "Fix Activity Transition mess-up." into nyc-dev
am: bd34103c5d

* commit 'bd34103c5defbfd180be6a387eb5aa82d4b97eac':
  Fix Activity Transition mess-up.

Change-Id: I62457d504583e1865ceeace2918d81b4ef223b12
2016-05-27 03:24:06 +00:00
George Mount
bd34103c5d Merge "Fix Activity Transition mess-up." into nyc-dev 2016-05-26 22:15:32 +00:00
Adrian Roos
b1f427c7c4 Fix bad one-line MessagingStyle
The one-line non-group version of MessagingStyle causes
a bug with the action bar and generally looks bad because
it is too short. To fix, show this variant like a BigText
notification.

Change-Id: I8af9e9da8286599b81ccb7c4637471ac01795366
Fixes: 28767094
2016-05-26 13:13:47 -07:00
George Mount
f43ea5d4d2 Fix Activity Transition mess-up.
Bug 28610520

isTopOfTask() was returns false in onResume always because
it wasn't being made visible until after onResume. The visibility
of the window is not important for this method (older versions
didn't check it at all), so that was removed.

Change-Id: I45e506e72356cc3808e2e9340739726c99da7d97
2016-05-26 10:06:35 -07:00
Adam Lesinski
ade0bce32a Merge "Use app\'s best locale if they override LocaleList" into nyc-dev
am: fbf3a0964a

* commit 'fbf3a0964a458508f834bffd18198394037bb5c1':
  Use app's best locale if they override LocaleList

Change-Id: I980061c2e818a746eb46e64a88887be8566ad618
2016-05-26 01:38:22 +00:00
TreeHugger Robot
fbf3a0964a Merge "Use app's best locale if they override LocaleList" into nyc-dev 2016-05-26 01:11:03 +00:00
Adam Lesinski
27d301667b Use app's best locale if they override LocaleList
App's can technically override their configuration's Locale,
which means we must choose the overriden locale as the best,
and therefore set the LocaleList.setDefault() with that locale.

Bug:28953437
Change-Id: I4b301fcd6bc426e37bb389d3a6f2b4a3c69ac33a
2016-05-25 16:45:14 -07:00
Antonio Cansado
f49cbec84c Merge "Cleaning up NetworkStatsManager." into nyc-dev
am: c45f0aea71

* commit 'c45f0aea71944464b7636023f56a53fa635c09e2':
  Cleaning up NetworkStatsManager.

Change-Id: Id556eb00f5183a2f6905020f24f5d3f5f8d02795
2016-05-25 22:25:11 +00:00
Antonio Cansado
904237f839 Cleaning up NetworkStatsManager.
- Throwing SecurityExceptionand and IllegalArgumentException instead of null for new APIs
- removing @removed APIs

Bug:27530098,27379882
Change-Id: Ifbe65bfc5051aa33aff2baa22cfa8e67b0f7c358
2016-05-25 11:07:41 -07:00
Ricky Wai
fdf928d4b5 Do not allow DPM.resetPassword() when child profile exists or user is locked
am: 977ade26dd

* commit '977ade26dd8bc6a442be2db2470459058246844f':
  Do not allow DPM.resetPassword() when child profile exists or user is locked

Change-Id: I05277051a8f30c4d020440dd01b5dc284d552fd4
2016-05-25 13:14:23 +00:00
Ricky Wai
977ade26dd Do not allow DPM.resetPassword() when child profile exists or user is locked
Bug: 28878708
Change-Id: Iaae2a9ba9c7c0ff388264c474c78a0dcd9fec258
2016-05-25 13:09:44 +00:00