14515 Commits

Author SHA1 Message Date
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
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
Yuhao Zheng
69ea666520 am af672998: Merge "Fix Settings app crash while enabling tethering" into klp-dev
* commit 'af672998af7fb0bba90f7d56504584a63ff189fa':
  Fix Settings app crash while enabling tethering
2013-09-16 13:39:35 -07:00
Yuhao Zheng
af672998af Merge "Fix Settings app crash while enabling tethering" into klp-dev 2013-09-16 20:36:50 +00:00
Vinit Deshapnde
664b5df781 am 7354b834: Merge "Fix an NPE in WifiService" into klp-dev
* commit '7354b834fc53a9d1885553aea58f632df16a5655':
  Fix an NPE in WifiService
2013-09-16 13:29:05 -07:00
Yuhao Zheng
8c461c6fc6 Fix Settings app crash while enabling tethering
While enabling Portable Wifi hotspot in Settings, a null WifiConfiguration
is provided. This null config is on purpose and meanful, and it should bypass
the validation test to avoid the NullPointerException.

Bug: 10780414

Change-Id: Ic507ecae463946c925b3d5fb5a1d185b37db410f
2013-09-16 13:24:04 -07:00
Craig Mautner
7dd9fdfca0 Put next task on top of stack if top is finishing.
In the case where the top task is finishing and another task is
launching make sure that the next task will be launched once the
top task actually completes pausing.

In the case of b/10550460 the top task, Dialtacts, was finishing
but had not yet completed pausing. It was configured to return to
the home screen (mLaunchHomeTaskNext true) but because its finishing
flag was set all the tests we have thought that the InCallActivity
task was the top task. When it finally did complete the
mLaunchHomeTaskNext flag caused the home activity to be started
instead of the InCallActivity.

If the InCallActivity task had been moved above the Dialtacts task
at the time it was judged to be the top task the home activity
would not have been launched when Dialtacts completed. This fix
moves the judged top task over the finishing top task.

Fixes bug 10550460.

Change-Id: I14052ad2282008679b560dd7fb16b216664ec24d
2013-09-16 13:05:41 -07:00
Vinit Deshapnde
ffec332727 Fix an NPE in WifiService
The check to validate incoming configurations is flagging a correct
API usage as well - which doesn't provide any configuration to test.
Fixing code to accommodate this.

Bug: 10749041

Change-Id: I972f0edbdfa14aaa3edb34e4c6784b436c288383
2013-09-16 12:41:12 -07:00
Christopher Tate
88b244151a am 06dc8484: Fix handling of privileged permissions on update
* commit '06dc8484b4bf4028eed1e289b1d441eecaa22edf':
  Fix handling of privileged permissions on update
2013-09-15 18:51:43 -07:00
Christopher Tate
06dc8484b4 Fix handling of privileged permissions on update
When a bundled app is upgraded, only reprocess ungranted 'system'
permissions if the bundled apk is privileged.

Also adds the 'privileged' flag to the dumpsys flag summary.

Bug 10503183

Change-Id: Ic6560fc904e5970fc871a155c898744a6607f851
2013-09-15 17:51:04 -07:00
Craig Mautner
e932a69f16 am dc333542: Merge "Add debug logging for b/10689184." into klp-dev
* commit 'dc3335429acf184cf67d022de6fe286c3672663a':
  Add debug logging for b/10689184.
2013-09-15 14:50:39 -07:00
Craig Mautner
dc3335429a Merge "Add debug logging for b/10689184." into klp-dev 2013-09-15 21:47:52 +00:00
Craig Mautner
5845812780 Add debug logging for b/10689184.
Focus is now on focus. Remove logging when fixed.

Change-Id: Ic0cd2d6bd4e65dac9dd40f4745dd12fb84f687ce
2013-09-15 14:18:54 -07:00
Svetoslav Ganov
b30e185b44 am 4244d66a: Merge changes Id0a67846,I20b57d66 into klp-dev
* commit '4244d66a122258adc86a8d757d3fe5f9588a59f8':
  Print system may get stuck bound to a print service
  Spooler should not crash if print service config activities are not exported.
2013-09-15 11:48:10 -07:00
Svetoslav Ganov
4244d66a12 Merge changes Id0a67846,I20b57d66 into klp-dev
* changes:
  Print system may get stuck bound to a print service
  Spooler should not crash if print service config activities are not exported.
2013-09-15 18:46:02 +00:00
Svetoslav Ganov
de4fa2dfe2 Print system may get stuck bound to a print service
1. If a print service dies, is restarted and at the time of the
   restart the service has neither print jobs nor a discovery
   serssion it gets stuck into a bound state. Now it unbinds if
   after binding and ensuring it is in the lifecycle state right
   before the death there are no active print jobs and no discovery
   session.

   Also when a print service dies we fail all of its print jobs
   but did not update the service that all of its print jobs are
   handled, i.e. it has no active print jobs.

2. Fixed a null pointer exception in UserState

bug:10696723

Change-Id: Id0a67846093fca5d4c1e10843eaf6aa90169d942
2013-09-15 02:58:14 -07:00
Wink Saville
cf61854471 am 78d0cf79: Merge "Tighten condition for calling checkMobileProvisioning." into klp-dev
* commit '78d0cf7958dfde7951ed1a2c0317e04d6b41f4f3':
  Tighten condition for calling checkMobileProvisioning.
2013-09-14 11:21:07 -07:00
Wink Saville
78d0cf7958 Merge "Tighten condition for calling checkMobileProvisioning." into klp-dev 2013-09-14 18:19:39 +00:00
Maggie Benthall
b964e5edff am f5aba5ad: Merge "CA cert monitoring: add notifications and actions for dialog" into klp-dev
* commit 'f5aba5ad1e09829a13bd0ad4912e45ff3d773176':
  CA cert monitoring: add notifications and actions for dialog
2013-09-14 11:02:43 -07:00
Maggie Benthall
f5aba5ad1e Merge "CA cert monitoring: add notifications and actions for dialog" into klp-dev 2013-09-14 18:00:13 +00:00
Wink Saville
127beffb05 Tighten condition for calling checkMobileProvisioning.
Add the condition that the connected network needs to be TYPE_MOBILE.
This eliminates checking on connecting to secondary networks like
FOTA, MMS, SUPL ...

This reduces unnecessary attempts to bring up multiple connections at
the same time. Especially in the light of the trouble we're having with HFA
on Sprint, where we don't want to connect to any other network until HFA
has completed.

Bug: 10758001
Change-Id: Id294536b70304a51de4752bc1a4ffac734f10f1a
2013-09-14 09:04:53 -07:00
Svetoslav Ganov
860f8a6b66 Spooler should not crash if print service config activities are not exported.
1. If a print service does not export its activities for settings and
   adding printers the print spooler ignores them instead of crashing.
   Also if the service is not enabled its activities are now ignored.

2. Added a dedicated permission for a print service to optionally
   protect its settings and add printer activities such that only the
   system can bind to them.

3. Fixed a crash in the print dialog if its content is detached
   from the window and animators are running.

bug:10680224

Change-Id: I20b57d6622a15f9b2352ba78d04c44e67b316a15
2013-09-14 01:00:55 -07:00
David Christie
691a3191e3 am 5f68f717: Merge "Strip names out of externally supplied WorkSources to WifiManager (b/10710007)." into klp-dev
* commit '5f68f717019433ce4fa284386ba48bd1b571073a':
  Strip names out of externally supplied WorkSources to WifiManager (b/10710007).
2013-09-13 18:06:56 -07:00
David Christie
5f68f71701 Merge "Strip names out of externally supplied WorkSources to WifiManager (b/10710007)." into klp-dev 2013-09-14 01:02:40 +00:00
David Christie
6ab2284c98 Strip names out of externally supplied WorkSources to WifiManager (b/10710007).
Change-Id: I69bd7ce9e942c2f9327415b2821d805e1b50a1a4
2013-09-13 17:34:40 -07:00
Christopher Tate
5de041193c am 0f8ec44b: Merge "Prune shared users that the system declares but does not use" into klp-dev
* commit '0f8ec44b13487f5726cab77eb79cac016e090b25':
  Prune shared users that the system declares but does not use
2013-09-13 17:22:24 -07:00
Dianne Hackborn
0af9fb526b am 236afa0d: Merge "Fix issue #10747324: adb install hangs" into klp-dev
* commit '236afa0d8b3e146c97801bd72a224b0908cd93f9':
  Fix issue #10747324: adb install hangs
2013-09-13 17:16:13 -07:00
Craig Mautner
f6f36a95a2 am 540421ba: Merge "When launching home activity, make sure it is top." into klp-dev
* commit '540421ba984655b07f2b70bae1db9ae1bc3052aa':
  When launching home activity, make sure it is top.
2013-09-13 17:15:58 -07:00
Dianne Hackborn
f3b4cf7d01 am 28eeb420: Merge "Implement #10749688: Improve low memory reporting" into klp-dev
* commit '28eeb42012018bfa3cffc77e9a970e8f5c13f70b':
  Implement #10749688: Improve low memory reporting
2013-09-13 17:15:23 -07:00
Wink Saville
12d3f488e7 am 7770dcc3: Merge "checkMobileProvisioning should not block." into klp-dev
* commit '7770dcc3d351a494d0f5fe44feb776cc512e9b18':
  checkMobileProvisioning should not block.
2013-09-13 17:14:15 -07:00
Jason Monk
f9464838fe am 312c495f: Merge "Guarantee that PAC Local Proxy owns Port" into klp-dev
* commit '312c495f4b8d002264772f61fe1fa3ef87bf3e52':
  Guarantee that PAC Local Proxy owns Port
2013-09-13 17:14:10 -07:00
Christopher Tate
fcda3283d2 am 7560c256: Merge "Add hidden API for querying available \'home\' activities" into klp-dev
* commit '7560c256ecacb5fa3904ec5c957e88331328f38b':
  Add hidden API for querying available 'home' activities
2013-09-13 17:14:00 -07:00
Christopher Tate
0f8ec44b13 Merge "Prune shared users that the system declares but does not use" into klp-dev 2013-09-14 00:11:48 +00:00
Dianne Hackborn
236afa0d8b Merge "Fix issue #10747324: adb install hangs" into klp-dev 2013-09-14 00:04:43 +00:00
Dianne Hackborn
2e46bb5d88 Fix issue #10747324: adb install hangs
Dumb typo was clearing the wrong service array, causing
us to sometimes forget we were launching a service.

Change-Id: Ie1aba0e07d19e85a104a5985e3cead5f28a0556a
2013-09-13 17:01:26 -07:00
Christopher Tate
86b391cd03 Prune shared users that the system declares but does not use
Bug 10184643

Change-Id: I72c5177c621c24fac34bf8744eb6c5108b6d3464
2013-09-13 16:58:36 -07:00
Craig Mautner
540421ba98 Merge "When launching home activity, make sure it is top." into klp-dev 2013-09-13 23:33:17 +00:00
Dianne Hackborn
28eeb42012 Merge "Implement #10749688: Improve low memory reporting" into klp-dev 2013-09-13 23:06:07 +00:00
Dianne Hackborn
8e69257a9c Implement #10749688: Improve low memory reporting
This significantly reworks the logging we do when
all cached processes are killed:

- We now collect the list of processes in-place so we
  have a snapshot of exactly when the low memory situation
  happened.
- In that snapshot we include the key process state: oom
  adj, proc state, adj reasons.
- The report then asynchronously collects pss information
  for those processes.
- The ultimate data printed to the log looks like a mix
  between the "dumpsys meminfo" and "dumpsys activity"
  output.  This code no longer uses "dumpsys meminfo"
  itself, so some of that data is no longer included,
  in particular pss organized by allocation type.

In doing this, I realized that the existing code that is
supposed to run "procstats" is not currently working.  And
at that point I realized, really, when we are collecting
this pss data we'd really like to include all those native
processes using ghod-only-knows how much RAM.  And guess
what, we have a list of processes available in
ProcessCpuTracker.

So we now also collect and print information for native
processes, and we also do this for "dumpsys meminfo" which
really seems like a good thing when we are printing summaries
of all pss and such.

I also improved the code for reading /proc/meminfo to be
able to load all the interesting fields from there, and
am now printing that as well.

Change-Id: I9e7d13e9c07a8249c7a7e12e5433973b2c0fdc11
2013-09-13 16:02:01 -07:00
Craig Mautner
a82aa09ba3 When launching home activity, make sure it is top.
Because recents sits on the same stack as launcher it can sometimes be
above launcher. When we were launching home activity because the flag
told us to we would sometimes launch recents instead. This fix makes
sure that the home activity is on the top when it is supposed to be
launched next.

Previously this was fixed by having recents move itself to the back
of the stack after it launched an activity (b/9750207 and ag/336019).
But that solution caused the AppTransition to be set to
TRANSIT_TASK_TO_BACK which left the SOFT_INPUT_IS_FORWARD_NAVIGATION
flag unset. This in turn caused IMEs to remain unlaunched when
returning from recents (b/10240567).

Fixes bug 10240567.

Change-Id: I35c6619af0e68d0e6d9ab87cad06ea7c27e11e27
2013-09-13 15:46:51 -07:00
Christopher Tate
a5ec4d4b54 am 5daf77d0: am ac39c604: Merge "Fix formatting in clearApplicationUserData exception message."
* commit '5daf77d00d0fd93f24f9dc6013ee838411e9adf9':
  Fix formatting in clearApplicationUserData exception message.
2013-09-13 15:05:31 -07:00
Christopher Tate
5daf77d00d am ac39c604: Merge "Fix formatting in clearApplicationUserData exception message."
* commit 'ac39c604d6df8631922c2295b3341cd561f172a5':
  Fix formatting in clearApplicationUserData exception message.
2013-09-13 15:02:06 -07:00
Wink Saville
7770dcc3d3 Merge "checkMobileProvisioning should not block." into klp-dev 2013-09-13 20:59:16 +00:00
Jason Monk
312c495f4b Merge "Guarantee that PAC Local Proxy owns Port" into klp-dev 2013-09-13 20:31:54 +00:00
Maggie Benthall
0469f41010 CA cert monitoring: add notifications and actions for dialog
In DevicePolicyManagementService, on boot and when certs are installed,
post notification to tell the user that their traffic may be
monitored.
Have QuickSettings use the MonitoringCertInfoActivity instead
of building the dialog itself.

Bug: 10633199

Change-Id: Ie4b97295a9fc25867c87872feccdb17f4bea071d
2013-09-13 15:46:30 -04:00
Wink Saville
d95ccc5c6a checkMobileProvisioning should not block.
In checkMobileProvisioning the call to mdst.isProvisioningNetwork() is
a blocking call and during monkey testing without SIM this is causing
ANR's. Move the initial test for provisioning into isMobileOk so
checkMobileProvisioning doesn't block.

If mobile is not supported return CMP_RESULT_NO_CONNECTION.

Cleaned up some debug.

Bug: 10674404
Change-Id: I10a0e922cd6ea9790f66e2083f37e68cb0a8861f
2013-09-13 12:40:11 -07:00
Christopher Tate
a2a0850de8 Add hidden API for querying available 'home' activities
To support improved home-app selection UX in Settings.

Bug 9958444

Change-Id: I106090784618bf7bea6fce28f4f9b9fb8480d310
2013-09-13 12:16:00 -07:00