12388 Commits

Author SHA1 Message Date
Craig Mautner
5b35bab44a am 2af9dd71: am 019f8cb8: Merge "Add bounds checks before accessing ArrayList." into klp-dev
* commit '2af9dd716ec117af602b86c0d26cc40eb733338e':
  Add bounds checks before accessing ArrayList.
2013-09-17 16:18:15 -07:00
Craig Mautner
2af9dd716e am 019f8cb8: Merge "Add bounds checks before accessing ArrayList." into klp-dev
* commit '019f8cb8a78c5584618655f5478d9a9f3dedc3f0':
  Add bounds checks before accessing ArrayList.
2013-09-17 16:15:20 -07:00
Craig Mautner
019f8cb8a7 Merge "Add bounds checks before accessing ArrayList." into klp-dev 2013-09-17 23:13:31 +00:00
Craig Mautner
dccb770b84 Add bounds checks before accessing ArrayList.
Add a test for emptiness before accessing either mTaskHistory[0] or
TaskRecord.mActivities[0]. This will keep us from hitting
IndexOutOfBoundsException.

Fixes bug 10789624.

Change-Id: If726df888a2c8b393788793b6220a6bffe2df883
2013-09-17 15:53:34 -07:00
David Braun
a2ee725744 am fdacf747: am 345d491b: Merge "Implement new method for handling SMS/MMS on the platform" into klp-dev
* commit 'fdacf74764ed42b6550cefa0306621200517b36e':
  Implement new method for handling SMS/MMS on the platform
2013-09-17 15:18:13 -07:00
Craig Mautner
a4ac9a3ac4 am e0dcb7df: am bc65c1db: Merge "Do not assign InputMethod to non-input windows." into klp-dev
* commit 'e0dcb7df5206d283b29054f3e9d3da9732b27935':
  Do not assign InputMethod to non-input windows.
2013-09-17 15:18:07 -07:00
David Braun
fdacf74764 am 345d491b: Merge "Implement new method for handling SMS/MMS on the platform" into klp-dev
* commit '345d491b77d70942f7a4390645fae7748b418459':
  Implement new method for handling SMS/MMS on the platform
2013-09-17 15:15:44 -07:00
Craig Mautner
e0dcb7df52 am bc65c1db: Merge "Do not assign InputMethod to non-input windows." into klp-dev
* commit 'bc65c1dbccfe936856e9a2c4066c1ec9115140e2':
  Do not assign InputMethod to non-input windows.
2013-09-17 15:15:41 -07:00
David Braun
345d491b77 Merge "Implement new method for handling SMS/MMS on the platform" into klp-dev 2013-09-17 22:14:54 +00:00
Craig Mautner
bc65c1dbcc Merge "Do not assign InputMethod to non-input windows." into klp-dev 2013-09-17 22:13:10 +00:00
Craig Mautner
22b9a5e0aa Do not assign InputMethod to non-input windows.
The InputMethod window was being assigned to the bottommost
window as a fall-through situation when no window could receive
input. This fix changes that so that if the bottommost window
cannot receive IME input then the InputMethod will be unassigned.

In most ANRs associated with bug 10689184 mInputMethodTarget
was assigned to the Wallpaper window and the InputMethod was
placed directly above it. When the ANR occurred the window that
was awaiting focused was then always placed immediately above the
InputMethod. This fix will keep that situation from happening.

Change-Id: Ic247e8132a907f2712a9f8a89e43c099142ec851
2013-09-17 14:50:56 -07:00
Craig Mautner
8e60a4a765 am e3c9ae67: am 16efe96c: Merge "Fix parenthetical error." into klp-dev
* commit 'e3c9ae67bb2ebf3f80c23674327cde6a873c671d':
  Fix parenthetical error.
2013-09-17 13:28:20 -07:00
Craig Mautner
e3c9ae67bb am 16efe96c: Merge "Fix parenthetical error." into klp-dev
* commit '16efe96cbc570ebd2fe7e823080ba4174fbb3cbe':
  Fix parenthetical error.
2013-09-17 13:25:41 -07:00
Craig Mautner
16efe96cbc Merge "Fix parenthetical error." into klp-dev 2013-09-17 20:21:40 +00:00
Dianne Hackborn
19eacd566e am 0c95b8c8: am 463850e0: Merge "Fix issue #10795385: System process crash reinstalling GEL -" into klp-dev
* commit '0c95b8c824f8c2282eedde3af2f83af357b00975':
  Fix issue #10795385: System process crash reinstalling GEL -
2013-09-17 11:12:30 -07:00
Dianne Hackborn
0c95b8c824 am 463850e0: Merge "Fix issue #10795385: System process crash reinstalling GEL -" into klp-dev
* commit '463850e0c658b37bbe29b9e9dec6ff7565bb883f':
  Fix issue #10795385: System process crash reinstalling GEL -
2013-09-17 11:09:32 -07:00
Dianne Hackborn
463850e0c6 Merge "Fix issue #10795385: System process crash reinstalling GEL -" into klp-dev 2013-09-17 18:08:00 +00:00
Dianne Hackborn
e56c2c3f05 Fix issue #10795385: System process crash reinstalling GEL -
NPE at com.android.server.am.ProcessRecord.resetPackageList(ProcessRecord.java:596)

Take care of some more cases now that baseProcessTracker can be null.

Change-Id: I394c0b7802788118c3ad6bcac5dfdd23eeda8d58
2013-09-17 11:03:10 -07:00
Craig Mautner
7504d7b24a Fix parenthetical error.
Mis-grouping of && and || from CL ag/360551.

Fixes bug 10798273.

Change-Id: Idbc77e03d09f7ad5fcf1a5de98c6c14f0c63a6e4
2013-09-17 10:50:53 -07:00
Craig Mautner
bf1217d751 am c37b3705: am fbd67258: Merge "More debugging for b/106899184" into klp-dev
* commit 'c37b3705d82f214e53ba5ec9391dcf274a68ba32':
  More debugging for b/106899184
2013-09-17 10:42:52 -07:00
Craig Mautner
c37b3705d8 am fbd67258: Merge "More debugging for b/106899184" into klp-dev
* commit 'fbd67258e13d919f83f66f4e8a948f86aa507c26':
  More debugging for b/106899184
2013-09-17 10:40:56 -07:00
Craig Mautner
fbd67258e1 Merge "More debugging for b/106899184" into klp-dev 2013-09-17 17:39:08 +00:00
Craig Mautner
b1885b8588 More debugging for b/106899184
Change-Id: I729a2c5bae087713765d782daaa7309ee6cd5b5a
2013-09-17 09:35:20 -07:00
Amith Yamasani
000ecdd3f5 am 6484c42e: am 33caca5c: Merge "Add a feature to specify if device admins are supported on the device" into klp-dev
* commit '6484c42eb44bfe8fc8d2972bfc564b96f0f7f16c':
  Add a feature to specify if device admins are supported on the device
2013-09-17 09:02:07 -07:00
Amith Yamasani
6484c42eb4 am 33caca5c: Merge "Add a feature to specify if device admins are supported on the device" into klp-dev
* commit '33caca5cd56ff41142cea121fabf5e30bebfb39f':
  Add a feature to specify if device admins are supported on the device
2013-09-17 08:58:57 -07:00
Amith Yamasani
33caca5cd5 Merge "Add a feature to specify if device admins are supported on the device" into klp-dev 2013-09-17 15:56:14 +00:00
Svetoslav
06c7f39f6f am e7d34086: am be0d9317: Merge "App UI freezes when printing. API clean up." into klp-dev
* commit 'e7d3408652dd6e997a3c5abfd5abc6855aa170c0':
  App UI freezes when printing. API clean up.
2013-09-16 19:32:41 -07:00
Svetoslav
e7d3408652 am be0d9317: Merge "App UI freezes when printing. API clean up." into klp-dev
* commit 'be0d9317e27b600eee7deb8f328358cdb38115c6':
  App UI freezes when printing. API clean up.
2013-09-16 19:30:50 -07:00
Svetoslav
be0d9317e2 Merge "App UI freezes when printing. API clean up." into klp-dev 2013-09-17 02:28:34 +00:00
Dianne Hackborn
693273dbeb am 9202e085: am a0d53c61: Merge "Fix issue #10779747: Calendar Storage crash observed..." into klp-dev
* commit '9202e085d29d4c27af8de9fcbc910245e9d18fc1':
  Fix issue #10779747: Calendar Storage crash observed...
2013-09-16 19:19:30 -07:00
Dianne Hackborn
9202e085d2 am a0d53c61: Merge "Fix issue #10779747: Calendar Storage crash observed..." into klp-dev
* commit 'a0d53c61886b683b0cc9dccdb5b6fe581356b920':
  Fix issue #10779747: Calendar Storage crash observed...
2013-09-16 19:16:41 -07:00
Christopher Tate
dd5c11e692 am 0ff08a60: am ca776158: Merge "Don\'t assume that transport unbind == transport invalid" into klp-dev
* commit '0ff08a6079f377d30b05d0f6bbf157058a626692':
  Don't assume that transport unbind == transport invalid
2013-09-16 19:16:02 -07:00
Christopher Tate
0ff08a6079 am ca776158: Merge "Don\'t assume that transport unbind == transport invalid" into klp-dev
* commit 'ca776158b7be48d8cba862fccf7b9709856ae61a':
  Don't assume that transport unbind == transport invalid
2013-09-16 19:13:14 -07:00
Dianne Hackborn
a0d53c6188 Merge "Fix issue #10779747: Calendar Storage crash observed..." into klp-dev 2013-09-17 02:12:58 +00:00
Christopher Tate
ca776158b7 Merge "Don't assume that transport unbind == transport invalid" into klp-dev 2013-09-17 02:10:40 +00:00
Dianne Hackborn
0d97cd1f6a Fix issue #10779747: Calendar Storage crash observed...
...while setting up a new user from settings.

The delayed service start stuff was too aggressive -- it would
allow a process to be killed between the an onReceive() that calls
startService() and that service being started.  This means that
apps that set up global state that they expect to remain set up
during that time could be lost.

This is the first part of a fix, which tightens up when we allow
services to be delayed.  Now we will immediately start the service
as long as it currently as a process running that is not in the
cached state.  (Previously we would delay if the process was in
the receiver state.)

This unfortunately means that our service start delay is much
less effective.  To address that, there will be a follow-on change
to tie broadcast delivery into this to see if we can delay the
finish of a broadcast as long as there are background services
starting in that process.

Change-Id: I2bba2295d10699ee3479375bbe87114b2cbb0826
2013-09-16 19:02:52 -07:00
Dianne Hackborn
5f318189f2 am bb7a51e1: am 8a7a93e2: Merge "Work on issue #10771346: runtime restart" into klp-dev
* commit 'bb7a51e1ef28e26a8ead2c0cf3d6880081526d52':
  Work on issue #10771346: runtime restart
2013-09-16 18:50:01 -07:00
Dianne Hackborn
bb7a51e1ef am 8a7a93e2: Merge "Work on issue #10771346: runtime restart" into klp-dev
* commit '8a7a93e20d8755602938a56d4a88398baf2359e4':
  Work on issue #10771346: runtime restart
2013-09-16 18:47:19 -07:00
Christopher Tate
a8de43fd8c Don't assume that transport unbind == transport invalid
We now expect that the transport service's host process will be
OOM-killed sometimes, but will come back automatically because we
still hold the binding.  So, we no longer drop it as the
expected-to-be-current transport when that happens.

Bug 10728767

Change-Id: I5e756e8942e7c4c3567632f10460ee31b9618d75
2013-09-16 18:14:52 -07:00
Svetoslav
2fbd2a7f07 App UI freezes when printing. API clean up.
1. The UI of a printing app was freezing a little when calling the print
   method since the print manager service was waiting for it to bind to the
   print spooler which generated the print job id (and the initial print
   job info really). Now the print manager service is responsible for job
   id generation and does not not wait for the print spooler to spin. Hence,
   the app UI is not blocked at all. Note that the print manager initiates
   the binding to the spooler and as soon as it completes the spooler shows
   the print UI which is hosted in its process. It is not possible to show
   the print UI before the system is bound to the spooler since during this
   binding the system passes a callback to the spooler so the latter can
   talk to the system.

2. Changed the print job id to be an opaque class allowing us to vary the
   way we generate print job ids in the future.

3. The queued print job state was hidden but the print job returned by the
   print method of the print manager is in that state. Now now hidden.

4. We were incorrecly removing print job infos if they are completed or
   cancelled. Doing that is problematic since the print job returned by
   the print method allows the app to query for the job info after the
   job has been say completed. Hence, an app can initiate printing and
   get a print job whose state is "created" and hold onto it until after
   the job is completed, now if the app asks for the print job info it
   will get an info in "created" state even though the job is "completed"
   since the spooler was not retaining the completed jobs. Now the spooler
   removes the PDF files for the completed and cancelled print jobs but
   keeps around the infos (also persisting them to disc) so it can answer
   questions about them. On first boot or switch to a user we purge the
   persisted print jobs in completed/cancelled state since they
   are obsolete - no app can have a handle to them.

5. Removed the print method that takes a file since we have a public
   PrintDocumentAdapter implementation for printing files. Once can
   instantiate a PrintFileDocumentAdapter and pass it to the print
   method. This class also allows overriding of the finish method to
   know when the data is spooled and deleted the file if desired, etc.

6. Replaced the wrong code to slice a large list of parcelables to
   use ParceledListSlice class.

bug:10748093

Change-Id: I1ebeeb47576e88fce550851cdd3e401fcede6e2b
2013-09-16 17:55:14 -07:00
Dianne Hackborn
50ef0b62f0 Work on issue #10771346: runtime restart
Haven't found the underlying cause, but this will give us more
information when we get into the bad state.

Change-Id: I9aebd3a025a7c0d931f43098461b64ee3c220746
2013-09-16 17:40:27 -07:00
Amith Yamasani
44a01b742c Add a feature to specify if device admins are supported on the device
Bug: 9520957

DevicePolicyManagerService will play dumb if the feature is not installed.

Continue to keep track of failed password attempts for keyguard's use.

Change-Id: I28d258dc09a8b4976b188da6f453d8daabcc4bdd
2013-09-16 17:24:06 -07:00
Matthew Williams
06485a7c6e Pending op fix didn't merge properly from KLP-dev.
Manually merge in Cl c/342668. Add another test to ensure that it
WAI.

Change-Id: Iae603328d525cc71e4e31ad30a13384efc50f823
2013-09-16 15:23:41 -07:00
Dianne Hackborn
df2dae01b0 am 40489be9: am 61158244: Merge "Implement issue #10691359: Kill long-running processes" into klp-dev
* commit '40489be90b7c145da75034f793932500f0e5d380':
  Implement issue #10691359: Kill long-running processes
2013-09-16 14:37:30 -07:00
Dianne Hackborn
40489be90b am 61158244: Merge "Implement issue #10691359: Kill long-running processes" into klp-dev
* commit '61158244b42df547ecf8ca145d539c814b154a4a':
  Implement issue #10691359: Kill long-running processes
2013-09-16 14:34:55 -07:00
Dianne Hackborn
61158244b4 Merge "Implement issue #10691359: Kill long-running processes" into klp-dev 2013-09-16 21:33:04 +00:00
Craig Mautner
afada2c7dc am 660a7fde: am deec7e48: Merge "Put next task on top of stack if top is finishing." into klp-dev
* commit '660a7fdef3c1ca8ce148a1978ad5c24d6a013bea':
  Put next task on top of stack if top is finishing.
2013-09-16 14:29:43 -07:00
Craig Mautner
660a7fdef3 am deec7e48: Merge "Put next task on top of stack if top is finishing." into klp-dev
* commit 'deec7e481a403749ec3977c946192abbc5c5501e':
  Put next task on top of stack if top is finishing.
2013-09-16 14:27:15 -07:00
Craig Mautner
deec7e481a Merge "Put next task on top of stack if top is finishing." into klp-dev 2013-09-16 21:21:11 +00:00
Dianne Hackborn
35f72be50b Implement issue #10691359: Kill long-running processes
We now have the activity manager kill long-running processes
during idle maintanence.

This involved adding some more information to the activity manager
about the current memory state, so that it could know if it really
should bother killing anything.  While doing this, I also improved
how we determine when memory is getting low by better ignoring cases
where processes are going away for other reasons (such as now idle
maintenance).  We now won't raise our memory state if either a process
is going away because we wanted it gone for another reason or the
total number of processes is not decreasing.

The idle maintanence killing also uses new per-process information
about whether the process has ever gone into the cached state since
the last idle maintenance, and the initial pss and current pss size
over its run time.

Change-Id: Iceaa7ffb2ad2015c33a64133a72a272b56dbad53
2013-09-16 14:05:34 -07:00