14184 Commits

Author SHA1 Message Date
David Christie
c5a5d20b7c Merge "Revert "Fix broken unit test"" 2013-08-06 17:28:49 +00:00
David Christie
ba530545f7 Revert "Fix broken unit test"
This reverts commit 0ca981fe42c43a4b7c345f4a0a2b3b2a519be5da.

Change-Id: I67f5e7227a8a874158c4f0954e62a77a317f1edd
2013-08-06 17:28:03 +00:00
David Christie
94fa8956b0 Merge "Fix broken unit test" 2013-08-06 16:56:16 +00:00
Dianne Hackborn
03901667db Merge "Start restricting service calls with implicit intents." 2013-08-06 00:16:04 +00:00
Dianne Hackborn
254798f22f Merge "Add a new process state for "service restarting"." 2013-08-06 00:15:16 +00:00
Dianne Hackborn
221ea892dc Start restricting service calls with implicit intents.
The bindService() and startService() calls have always had
undefined behavior when used with an implicit Intent and there
are multiple matching services.  Because of this, it is not
safe for applications to use such Intents when interacting with
services, yet the platform would merrily go about doing... something.

In KLP I want to cause this case to be invalid, resulting in
an exception thrown back to the app.  Unfortunately there are
lots of (scary) things relying on this behavior, so we can't
immediately turn it into an exception, even one qualified by the
caller's target SDK version.

In this change, we start loggin a WTF when such a call happens,
and clean up some stuff in Bluetooth that was doing this behavior.

Change-Id: I62e25d07890588d2362104e20b054aebb6c0e007
2013-08-05 16:53:26 -07:00
Craig Mautner
449ff24353 Merge "Clear last paused activity." 2013-08-05 23:18:07 +00:00
Craig Mautner
f140fd9cef Clear last paused activity.
Moving an activity to the back used to move it behind the launcher.
This meant that the test in resumeTopActivityLocked() for
mLastPausedActivity being equal to the top activity would fail after
moveTaskToBack(). In the new activity stack model the launcher is
on a different stack so if there is only one task then the test
now passes. Clearing mLastPausedActivity when moving an activity
forward now passes the test.

Fixes bug 10022212.

Change-Id: I17932d5c87d2483f13c29ae85a7067202a08f34e
2013-08-05 16:14:22 -07:00
Dianne Hackborn
8eea0fcd3b Add a new process state for "service restarting".
This is a process that is not actually running, but would be
if we had enough RAM.

Also rework how service stats are stored to used the nice
compact structure we are already using for processes.

And fix a bug where when we committed the current state data,
we would mistakenly write it under the name of the *next* state
that is now starting.  Ouch.

Change-Id: I9f2b84b8b3f305301fd48dcd9d4e6c232abe8ef9
2013-08-05 14:19:44 -07:00
Elliott Hughes
e6a0b7dea2 Merge "Remove member "m" prefix from now local variables" 2013-08-05 17:23:20 +00:00
John Spurlock
32230ef4e6 Merge "Collapse/disable shade when hiding status bar window." 2013-08-05 13:18:54 +00:00
Svetoslav Ganov
7bb1be4ba9 Merge "Polish the print spooler loading of stored print jobs." 2013-08-05 04:08:46 +00:00
Svetoslav Ganov
835835ee6f Polish the print spooler loading of stored print jobs.
1. The singleton print spooler isntance is created when the print spooler
   service gets a connection to the system and is destroyed when this
   connection is removed. Note that if the spooler has work, then the
   connection to the system will not be removed.

   When the spooler is created, it reads the stored state and notifies the
   system which in turn dispatches this to the print services.

   When the system connects to the spooler and passes it a connection, we
   schedule a delayed check whether there is work for the spooler. We do
   not handle this immediately to avoid intermitted spinning on and off
   of the spooler process if a client makes a sequence of queries while
   the spooler has really no work.

2. Fixed a bug in the NotificationManagerService where adding a notification
   and removing it immediately after that does not remove the notification.
   The code that is adding a notification is run on a handler thread while
   the code to remove it on the calling thread. This creates a race and
   erroneous results. Now the removal is also scheduled on the handler.

3. Many small fixes here and there.

Change-Id: I6415c253139fa6616393fbe23c659d031a29e1f6
2013-08-04 20:45:10 -07:00
Craig Mautner
5c7132560a Merge "Add force default orientation." 2013-08-03 22:32:04 +00:00
Dianne Hackborn
0770f9ef66 resolved conflicts for merge of c8911ddd to master
Change-Id: I790b547268a23848577199256fc5abc9bdb7abb8
2013-08-02 23:43:31 -07:00
Jeff Brown
33041bd903 Add debug message to help diagnose a presentation bug.
Bug: 10154780
Change-Id: I0e711a6316cb231ec48fc31d87b8cbd5d857c2f8
2013-08-02 21:11:14 -07:00
Jeff Brown
7d00affce6 Support public virtual displays.
Refactor the new private virtual display API to also support
creating public virtual displays with various characteristics.
This feature requires special permissions and is only intended
for use by the system.

Change-Id: I44dd19f37cf76ea6d6e313afe42f4a412bd96663
2013-08-02 21:11:07 -07:00
Brian Carlstrom
f4bdcaba5d Remove member "m" prefix from now local variables
Change-Id: I7808cafc1f74c47fcd9d9a4b6a90fb50951457b1
2013-08-02 19:49:15 -07:00
Jeff Brown
040f44d0eb Add support for secure overlay displays for development.
Change-Id: I426115ec5a3fbda52a481097731abc8b3d9013a4
2013-08-02 19:44:19 -07:00
Dianne Hackborn
c8911ddd48 am 373a2f15: am 607b414d: Add new app ops method to reset all op modes.
* commit '373a2f15667956ff8a00ba59b42972b9c930af92':
  Add new app ops method to reset all op modes.
2013-08-02 19:32:13 -07:00
Dianne Hackborn
607b414d04 Add new app ops method to reset all op modes.
Change-Id: I5ee6764de8dc31d812e5a788914ab0099bbef4c0
2013-08-02 19:06:25 -07:00
Brian Carlstrom
c5e32ef628 Merge "Teach PackageManager to skip core-libart.jar" 2013-08-02 23:58:42 +00:00
Craig Mautner
46ac6fa614 Add force default orientation.
Devices can be configured to remain in their default landscape or
portrait orientation by setting config_forceDefaultOrientation true
in overlay/.../values/config.xml.

Activities that desire to run in the non-default orientation are
supported by creating a logical display within the physical display.
Transitions to and from the activity perform a crossfade rather than
the normal rotation animation.

Also, improve SurfaceTrace debug output.

Fixes bug 9695710.

Change-Id: I053e136cd2b9ae200028595f245b6ada5927cfe9
2013-08-02 16:23:58 -07:00
Svetoslav Ganov
bb9b300787 Merge " First cut of the print notifications." 2013-08-02 21:24:38 +00:00
Svetoslav Ganov
4d79d7821d Merge "Revert "ssss"" 2013-08-02 21:22:59 +00:00
Svetoslav Ganov
8c43376ea8 First cut of the print notifications.
1. Added notifications for a queued print job, for a started print job,
       for ongoing canceling a print job, and for a failed print job. The
       notifications for queued and started state have a cancel action. The
       notification for failed print job has a cancel and a restart action.

    2. Propagating failure message from the print service to the notifications.

    3. PrintJobConfigActivity was not setting the initial value for the
       print job copies and was not updating the UI immediately after creation.

    4. Refactored PrintJobConfigActivity to avoid using the hack to avoid
       reaction for item selection change in a spinner for an event that
       happened before the callback was registered.

    5. Removed the label attribute from PrinterInfo and now PrinterId is
       composed of the printer name and the service component name. This
       is nice since for restarting print jobs we do not need to store
       information about the printer except the printer id which is
       already part of the PrintJobInfo's data. Also the printer name
       is not expected to change anyway.

    6. Allowing cancellation of a queued print job. Also no print job is
       cancelled without asking the managing print service to do that.
       Before we were immediately canceling print jobs in queued state
       but it was possible for a buggy print service to not set the
       print job state to started before starting to do expensive work
       that will not be canceled.

    7. PrintServiceInfo was throwing an exception the the meta-data
       XML for the print service was not well-formed which would crash
       the system process. Now we just ignore not well-formed meta-data.

    8. Removed unused permissions from the PrintSpooler's manifest.

Change-Id: Iba2dd14b487f56e137b90d1da17c3033422ab5e6
2013-08-02 14:22:22 -07:00
Svetoslav Ganov
e67b5e314f Revert "ssss"
This reverts commit 650f0ee31bbd2a23dc64b60caba3a52e7665398c.

Change-Id: Iae83ca6ccb7feccb74069bf09cfb3150c03ec710
2013-08-02 21:19:37 +00:00
Svetoslav Ganov
d347168f50 Merge "ssss" 2013-08-02 21:15:36 +00:00
Dave Burke
aa3b0ff3e1 am 0eab98dd: am 019f4385: am 7925e7cc: Merge "Revert "Add version identifier to app ops."" into jb-mr2-dev
* commit '0eab98dd24b3a4272d5e9a41f353071f8508ec2a':
  Revert "Add version identifier to app ops."
2013-08-02 13:44:17 -07:00
Dave Burke
0eab98dd24 am 019f4385: am 7925e7cc: Merge "Revert "Add version identifier to app ops."" into jb-mr2-dev
* commit '019f4385d17234324db23521149e1f1cb6d7d061':
  Revert "Add version identifier to app ops."
2013-08-02 13:42:03 -07:00
Dave Burke
7925e7cc08 Merge "Revert "Add version identifier to app ops."" into jb-mr2-dev 2013-08-02 20:36:28 +00:00
Svetoslav Ganov
650f0ee31b ssss
Change-Id: I001c2ae5bc6caeac7e1a2223e221be69f6e6cb6c
2013-08-02 13:31:20 -07:00
Dave Burke
0997c5bd79 Revert "Add version identifier to app ops."
This reverts commit 483a6bbfc118409b9c46b226cf0aa6afdc4d9159.

Change-Id: I91d6b8b8d1789089bf9764e734f7fe59d03151a2
2013-08-02 20:25:02 +00:00
David Christie
0ca981fe42 Fix broken unit test
Change-Id: I4aa0035233749f6d585c151329436439ae9b2921
2013-08-02 12:33:00 -07:00
David Christie
df2cab2fc4 Fix build breakage
Change-Id: Ia684fb55db301fdadaa3aae93f82b2cdcfc200af
2013-08-02 10:54:55 -07:00
David Christie
474daa2b78 Merge "Add WorkSource capability to AlarmManager." 2013-08-02 17:17:38 +00:00
Satoshi Kataoka
02260e2141 Add a comment on the spell checker framework
Change-Id: Ibd826d68074d8524cbeaae296ce483f8b10c3d07
2013-08-02 16:22:04 +09:00
Dianne Hackborn
2fc3245537 Merge "Try to improve PSS collection." 2013-08-02 03:34:06 +00:00
Dianne Hackborn
f1cca18ae4 Try to improve PSS collection.
The goal is to collect PSS data from processes when they
are in as stable a state as possible.  We now have tables
for the durations to use for PSS collection based on
process state, and scheduling of collection is all driven
by process state changes.

Change-Id: I95e076f6971b9c093118e53dc8240fb3f5bad3b2
2013-08-01 20:28:36 -07:00
David Christie
40e5782f5c Allow a particular LocationRequest to be excluded from
AppOps monitoring as long as the client as the appropriate
permission (UPDATE_DEVICE_STATS).

Change-Id: I7223a53bc1551e6498302a22eb310c8c5b5684b0
2013-08-01 14:31:48 -07:00
Sascha Prueter
930524ade2 am 95990fe4: am aa268f8f: am d364859c: Merge "Add version identifier to app ops." into jb-mr2-dev
* commit '95990fe4c38641ea574efe9224ae279db61cde0f':
  Add version identifier to app ops.
2013-08-01 13:59:09 -07:00
Sascha Prueter
95990fe4c3 am aa268f8f: am d364859c: Merge "Add version identifier to app ops." into jb-mr2-dev
* commit 'aa268f8fb2855335fc0d4f181cbf91505448e5eb':
  Add version identifier to app ops.
2013-08-01 13:55:43 -07:00
Brian Carlstrom
b33278f876 Teach PackageManager to skip core-libart.jar
A little grossness for now to support dual booting Dalvik and Art.

While I was here, removed isDexOptNeeded calls for boot class path which already return false.

Change-Id: Iaaaf21b7733c1791e7bd8ae27e84c47463f9e9c9
2013-08-01 13:55:07 -07:00
Sascha Prueter
d364859ce6 Merge "Add version identifier to app ops." into jb-mr2-dev 2013-08-01 20:50:02 +00:00
David Christie
ebe51fc0d8 Add WorkSource capability to AlarmManager.
Change-Id: I663ea3078d405f0fa667a04bdaa376ae6652e994
2013-08-01 13:22:40 -07:00
David Christie
e1f886f5e3 Merge "Add new app op to monitor high power location requests." 2013-08-01 19:24:53 +00:00
Dianne Hackborn
483a6bbfc1 Add version identifier to app ops.
All old versions drop their modes except for the notification op
(which is the only one there is currently a user-visible control for).

Change-Id: I9e09cebe63e9ea81f2adc01aef7d1a5a59f57a56
2013-08-01 11:15:04 -07:00
Daniel Sandler
87d01e9e83 am 9e6f26a8: am f3e2f8fe: am 9eb434c3: Allow the user to block notifications for foreground services.
* commit '9e6f26a8e1e69b1c49676d60a5ebe36c0a0f23f9':
  Allow the user to block notifications for foreground services.
2013-08-01 09:35:16 -07:00
Daniel Sandler
9e6f26a8e1 am f3e2f8fe: am 9eb434c3: Allow the user to block notifications for foreground services.
* commit 'f3e2f8feef1a22708cc7ce1a7bc5d914bb53933d':
  Allow the user to block notifications for foreground services.
2013-08-01 09:32:40 -07:00
Jean-Michel Trivi
5813f240ec Merge "Notification muting conditional to exclusive audio focus request" 2013-08-01 16:07:08 +00:00