14854 Commits

Author SHA1 Message Date
Vinit Deshapnde
2b862e5e75 Fix incorrect VPN time
First, startTime's default value is -1 and not 0, so use it to test
if the startTime is set. Also, startTime isn't being set when connecting
legacy VPN; this change fixes that too.


Bug: 10985174
Change-Id: Ibf52b8f489b18c96efba501b76aa73e9a9e0e3e8
2013-10-02 11:50:39 -07:00
Craig Mautner
638ead32b9 am 76027655: am 93cb8f6b: Merge "Create new window-side task on demand." into klp-dev
* commit '76027655fba1e3a3d548380767a7a8989a2cfc3d':
  Create new window-side task on demand.
2013-10-02 10:52:48 -07:00
Craig Mautner
93cb8f6b78 Merge "Create new window-side task on demand." into klp-dev 2013-10-02 17:45:47 +00:00
Craig Mautner
31482a7fe1 Create new window-side task on demand.
The activity manager can create a new task under certain
circumstances in resetTargetTaskIfNeededLocked(). In that case the
window manager was not told to create a new task. This fix creates the
task in window manager when it recognizes that there is a new task
required.

Fixes bug 10412588.

Change-Id: Ife9ecfeb7f53f9df5950322c9359c836adc258a2
2013-10-02 10:35:17 -07:00
Craig Mautner
8c3e643dc4 am 611fb917: am 09be37b2: Merge "Add debuggging for 10858941." into klp-dev
* commit '611fb91723718526a9d20fce92135b2e32fc3a8b':
  Add debuggging for 10858941.
2013-10-02 09:37:29 -07:00
Dianne Hackborn
1d536848af am 239dc099: am 164371fb: Fix issue #11005453: [SUW] G+ profile creation for new user broken
* commit '239dc099a0d56eba3c7a537df23ef3c5046b2667':
  Fix issue #11005453: [SUW] G+ profile creation for new user broken
2013-10-02 09:37:26 -07:00
Adam Lesinski
234c6c8aaf am ff7cba54: am 42e9b631: Merge "Make room for new public flags" into klp-dev
* commit 'ff7cba54fc87509c94567d19c672693329868f7e':
  Make room for new public flags
2013-10-02 09:37:13 -07:00
Jeff Brown
0f7f648f1a am 9601b51c: am 42544cf8: Merge "Track wireless charger detector timeout explicitly." into klp-dev
* commit '9601b51cd96b99ff7e016e09f3c25d3b59f56602':
  Track wireless charger detector timeout explicitly.
2013-10-02 09:37:10 -07:00
Amith Yamasani
a48f2419ce am 0ba4a29c: am 86519dd5: Merge "Use correct method for sparsearray lookup" into klp-dev
* commit '0ba4a29c97a8835bdff589c4187ac69d136f0a6a':
  Use correct method for sparsearray lookup
2013-10-02 09:36:45 -07:00
Craig Mautner
9814cf73d4 am 0e1daee3: am 66de7f4f: Merge "Fixes to handleAppDiedLocked." into klp-dev
* commit '0e1daee3a60dd6e36e4fa26eb35b31423f4f7547':
  Fixes to handleAppDiedLocked.
2013-10-02 09:36:19 -07:00
Svetoslav Ganov
bf4e84724f am fddc4bfe: am b1cd745f: Merge "Fail print jobs targeted to unavailable services." into klp-dev
* commit 'fddc4bfed524df4f6245721c3ebc82ba2afbcf89':
  Fail print jobs targeted to unavailable services.
2013-10-02 09:36:13 -07:00
Craig Mautner
c5495c93e5 am eba784f0: am 3c98926b: Merge "Add a timeout for removing starting windows." into klp-dev
* commit 'eba784f0847a1d7c747603994d09937dcfdc0671':
  Add a timeout for removing starting windows.
2013-10-02 09:35:49 -07:00
Jeff Sharkey
7f60e70e81 am 666b998b: am 364fc14f: Merge "Detect wedged ContentProviders, treat as ANR." into klp-dev
* commit '666b998b67fe7bb6fc11dd6d683a18b5690afd39':
  Detect wedged ContentProviders, treat as ANR.
2013-10-02 09:35:14 -07:00
Craig Mautner
09be37b2d3 Merge "Add debuggging for 10858941." into klp-dev 2013-10-02 05:04:07 +00:00
Craig Mautner
323f78001d Add debuggging for 10858941.
Change-Id: I0517ccd9a83ef19a9002d61dbebf36d0120e1f63
2013-10-01 21:16:22 -07:00
Dianne Hackborn
164371fb75 Fix issue #11005453: [SUW] G+ profile creation for new user broken
The main problem here was a mistake when turning a single process
structure to a multi-package-process structure with a common
process.  When we cloned the original process state, if there were
any services already created for the process for that package, they
would be left with their process pointer still referencing the
original now common process instead of the package-specific process,
allowing the active counts to get bad.  Now we switch any of those
processes over to the new package-specific process.

There was also another smaller issue with how ServiceRecord is
associated with a ServiceState -- we could be waiting for an
old ServiceRecord to be destroyed while at the same time creating
a new ServiceRecord for that same service class.  These would share
the same ServiceState, so when the old record finally finished
destroying itself it would trample over whatever the new service
is doing.

This is fixed by changing the model to instead of using an "active"
reference count, we have an object identifying the current owner
of the ServiceState.  Then when the old ServiceRecord is cleaning
up, we know if it is still the owner at that point.

Also some other small things along the way -- new Log.wtfStack()
method that is convenient, new suite of Slog.wtf methods, fixed
some services to use Slog.wtf when catching exceptions being
returned to the caller so that we actually know about them.

Change-Id: I75674ce38050b6423fd3c6f43d1be172b470741f
2013-10-01 20:51:12 -07:00
Adam Lesinski
42e9b63100 Merge "Make room for new public flags" into klp-dev 2013-10-02 01:55:09 +00:00
Adam Lesinski
6a591f5859 Make room for new public flags
Moved two hidden flags to private

bug:11033280
Change-Id: Icca867b073aff643eefdaf84df68de86bb6b05ac
2013-10-01 18:48:20 -07:00
Jeff Brown
42544cf843 Merge "Track wireless charger detector timeout explicitly." into klp-dev 2013-10-02 01:47:55 +00:00
Jeff Brown
dbcc8a22de Track wireless charger detector timeout explicitly.
Previously we relied on having a continue stream of sensor
events from which to detect whether the device is moving or
at rest.  However, if the sensor HAL is broken in some way
then we might not receive enough sensor events to actually
finish the detection process.  When this happens, we'll
just sit there holding a wakelock indefinitely.

Instead of relying on the sensor event stream, post a delayed
message to explicitly finish detection.

Bug: 10769163
Change-Id: Ia2ed66fe5e7c41a8832df76da9104c13554e1398
2013-10-01 16:42:16 -07:00
Amith Yamasani
86519dd5bb Merge "Use correct method for sparsearray lookup" into klp-dev 2013-10-01 23:35:21 +00:00
Craig Mautner
66de7f4fa0 Merge "Fixes to handleAppDiedLocked." into klp-dev 2013-10-01 21:44:13 +00:00
Svetoslav Ganov
b1cd745fd2 Merge "Fail print jobs targeted to unavailable services." into klp-dev 2013-10-01 21:30:53 +00:00
Craig Mautner
51277a8521 Fixes to handleAppDiedLocked.
- Call in all circumstances but only set launchHomeTaskNext for
  focused stack. Previous version didn't call handleAppDiedLocked for
  non-focused stack.

- Rearrange logic to run down the top task and make sure that all
  remaining activities belong to the dying app. Previous version just
  looked at the top non-finishing activity and based its behavior on
  that.

Fixes bug 11029560.

Change-Id: Ic3a7c873c4c975577d6b390a8955ff41729bdfde
2013-10-01 14:28:23 -07:00
Amith Yamasani
540b659304 Use correct method for sparsearray lookup
Should fix the array index out of bounds. valueAt() is when we have the
index, not the key.

Bug: 11014210
Change-Id: Icb53fe763782befbd5de1b3df6630b87cda72e84
2013-10-01 13:45:58 -07:00
Craig Mautner
3c98926bf2 Merge "Add a timeout for removing starting windows." into klp-dev 2013-10-01 20:35:01 +00:00
Craig Mautner
68cc241e8d Add a timeout for removing starting windows.
If two activities are started at the same time the first activity can
add a starting window but never start. In that case there is no event
that will clear the starting window. This change adds a 10 second
timeout for the starting window to be cleared after which it will
clear the starting window automatically.

Fixes bug 10797865.

Change-Id: I1d59c3058c63367ff688d426474e8a6f006b2e0d
2013-10-01 10:39:43 -07:00
Jeff Sharkey
7aa7601c09 Detect wedged ContentProviders, treat as ANR.
All ContentProvider calls are currently blocking, making it hard for
an app to recover when a remote provider is wedged.  This change adds
hidden support to ContentProviderClient to timeout remote calls,
treating them as ANRs.  This behavior is disabled by default.

Update DocumentsUI to use a 20 second timeout whenever interacting
with a storage provider.

Bug: 10993301, 10819461, 10852518
Change-Id: I10fa3c425c6a7225fff9cb7a0a07659028230cd3
2013-10-01 09:50:41 -07:00
Svetoslav Ganov
db85ad56ad Fail print jobs targeted to unavailable services.
It is possible that a print job is scheduled for handling, i.e. it is
queued, after the target print service is uninstalled or disabled.
In case like this we fail the print job with an appropriate error
message. Now the user can cancel the job when he/she sees the notification
or the status in the print settings. Trying to restart such a job will
end up failing it again with the same error message. So the user will
just have to canel the print job.

This apporach quarantees that the user is informed for the failure and
also is much simpler than trying to update the UI when print job's
target serivce is uninstalled. For example, the settings UI has to
be updated as well as the notifications. Also due to the async nature
of the system this we cannot completely avoid having a restart option
for a print job whose target service is gone. This scenario is very
unlikely but still we have to handle it.

bug:11012251

Change-Id: Id8c8c3cff75e0b6325552676b130ff1406edc069
2013-10-01 07:49:06 -07:00
Matthew Williams
0e0f600379 am 508a57f5: Merge "Remove blocking from SM before boot completed." into klp-dev
* commit '508a57f58f873efcabc4d771b5f11285193685f6':
  Remove blocking from SM before boot completed.
2013-10-01 05:26:42 -07:00
Craig Mautner
7d4e6365fb am 312ab4bd: Merge "Don\'t display hidden activities over home screen." into klp-dev
* commit '312ab4bd2928b152e1f7732a1699677b7df54b2f':
  Don't display hidden activities over home screen.
2013-09-30 17:32:19 -07:00
Carlos Valdivia
d8d900086a am d6957d5f: Merge "Prevent authenticators from using Settings to launch arbitrary activities." into klp-dev
* commit 'd6957d5f8ddf3b542996955bf2d6efe0e9804ef4':
  Prevent authenticators from using Settings to  launch arbitrary activities.
2013-09-30 17:11:14 -07:00
Dianne Hackborn
e2a67ac27b am 57d96f0e: Merge "Fix issue #10948509: Crash in procstats when there is no data" into klp-dev
* commit '57d96f0e92e8af842878660a8271e65cec2426d3':
  Fix issue #10948509: Crash in procstats when there is no data
2013-09-30 17:10:55 -07:00
Craig Mautner
92af22f0d0 am 564e8e6f: Merge "Ensure correct window ordering." into klp-dev
* commit '564e8e6f548951c9fe5825aaad327b9ffbeece82':
  Ensure correct window ordering.
2013-09-30 17:10:43 -07:00
Craig Mautner
5b291397e1 am 64ce6b78: Merge "Don\'t kill home process with the rest of its package." into klp-dev
* commit '64ce6b78ccb8522a6147843f4206a5b128571b03':
  Don't kill home process with the rest of its package.
2013-09-30 17:10:39 -07:00
Craig Mautner
75a3b301e9 am 5a0c54a5: Merge "Remove home package name methods." into klp-dev
* commit '5a0c54a5112612777becd7a0f12f74cf720c1b7f':
  Remove home package name methods.
2013-09-30 17:10:36 -07:00
Svetoslav
82d2d7e4b0 am c6568719: Merge "Ignore historical printer records for installed services" into klp-dev
* commit 'c6568719671206e726f260fad390680f7fb0ee9e':
  Ignore historical printer records for installed services
2013-09-30 17:10:21 -07:00
Jim Miller
a192253bf2 am fb2e3c8d: Merge "Fix permissions on WindowManagerService.showAssistant()" into klp-dev
* commit 'fb2e3c8d47c162166a029a97d68ad3bedff89cce':
  Fix permissions on WindowManagerService.showAssistant()
2013-09-30 17:10:11 -07:00
Svetoslav Ganov
b84aa9fee3 am b415525a: Merge "Print job files and print job records not always cleaned up." into klp-dev
* commit 'b415525a16074b6dc8e295655648b7c7c1074bbb':
  Print job files and print job records not always cleaned up.
2013-09-30 17:10:08 -07:00
Craig Mautner
98b96d2c42 am 16e6e203: Merge "Centralize handleAppDied and fix return to home." into klp-dev
* commit '16e6e203c0c86a1cbc1a7c1cf20cb5447f705a32':
  Centralize handleAppDied and fix return to home.
2013-09-30 17:10:02 -07:00
Craig Mautner
768836b116 am 231bd6c5: Merge "Dismiss keyguard when resuming visible activities" into klp-dev
* commit '231bd6c514f15cb0b42a04d4fc7fc9631c743686':
  Dismiss keyguard when resuming visible activities
2013-09-30 17:07:07 -07:00
Jason Monk
915015a797 am da51d36c: Merge "Fix Sending PAC Broadcast before downloaded" into klp-dev
* commit 'da51d36c74f62a1c50f3960919cb74c5da178cd2':
  Fix Sending PAC Broadcast before downloaded
2013-09-30 17:06:23 -07:00
Craig Mautner
5c60d6b657 am c449613e: Merge "Revert behavior to perform onResume." into klp-dev
* commit 'c449613ec6ffed7b4605a6708a3341ab2dd5320f':
  Revert behavior to perform onResume.
2013-09-30 16:42:11 -07:00
Matthew Williams
508a57f58f Merge "Remove blocking from SM before boot completed." into klp-dev 2013-09-30 21:46:59 +00:00
Matthew Williams
8704fc3dae Remove blocking from SM before boot completed.
Bug: 10916655
Add a stash where the SyncHandler can copy and place
msgs rather than run them. After boot is complete
we iterate through the stash in order and send the
messages off.

Change-Id: I9c175ee79fe60952346003a29225b8687979b44e
2013-09-30 11:20:53 -07:00
Craig Mautner
312ab4bd29 Merge "Don't display hidden activities over home screen." into klp-dev 2013-09-30 18:20:48 +00:00
Carlos Valdivia
d6957d5f8d Merge "Prevent authenticators from using Settings to launch arbitrary activities." into klp-dev 2013-09-30 17:35:45 +00:00
Craig Mautner
19d112d836 Don't display hidden activities over home screen.
Fixes jank exposed in 10881705. Specifically background activity
animating up along with translucent activity. Repro steps on manta:

1. From home start Settings.
2. Press home.
3. From home start Downloads (translucent activity that takes 85% of
screen).
4. Observe that as Downloads zooms up the 15% boundary that should be
dimly transparent are showing Settings.

The cause was that there is a finishing activity in the Downloads task
that was used to launch the DownloadsActivity. The existence of that
activity kept the logic from recognizing that the home activity was
behind the DownloadsActivity, not the Settings activity.

This fix descends through all of the activities in a task sitting on
home and makes sure that they only keep home from showing if such
activities are not finishing and visible.

Change-Id: I607afce6b0000b4db634f2ce40a6c37fcee369d7
2013-09-30 10:34:55 -07:00
Dianne Hackborn
57d96f0e92 Merge "Fix issue #10948509: Crash in procstats when there is no data" into klp-dev 2013-09-30 00:21:48 +00:00
Dianne Hackborn
cb4285537b Fix issue #10948509: Crash in procstats when there is no data
Not dealing with the case where there is a null list.

Also fixed some bugs I found while looking at this:

- When resetting the stats, we would use a newly computed time stamp
  for the total durations rather than the one we used to reset the
  proc/service entries.  This would result in them being able to be
  slightly > 100%.
- There was a bug in how we split a single process state into its
  per-package representation, where we would but the cloned process
  state into the new package's entry (instead of properly for its
  own package entry), to be immediately overwritten by the new
  process state we make for that package.  This could result in
  bad data for processes that have multiple packages.
- There was a bug in resetting service stats, where we wouldn't
  update the overall run timestamp, allowing that time to sometimes
  be > 100%.
- There was a bug in computing pss data for processes with multiple
  packages, where the pss data was not distributed across all of the
  activity per-package process states.
- There was a bug in computing the zram information that would cause
  it to compute the wrong value, and then never be displayed.

Finally a little code refactoring so that ProcessState and ServiceState
can now share a common implementation for the table of duration values.

Change-Id: I5e0f4e9107829b81f395dad9419c33257b4f8902
2013-09-29 17:14:15 -07:00