14480 Commits

Author SHA1 Message Date
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
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
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
Dianne Hackborn
9210bc8554 Implement #10744011: Serialize running of background services
Added some code to the activity manager to keep track of
services that are launching and limit the number that can
be launched concurrently.  This only comes into play under
specific circumstances: when the service launch is a background
request (so timing is not important) and its process is not
already running at a high priority.

In this case, we have a list of services that are currently
launching and when that gets too big we start delaying the
launch of future services until currently launching ones are
finished.

There are some important tuning parameters for this: how many
background services we allow to launch concurrently (currently
1 on low-ram devices, 3 on other devices), and how long we
wait for a background service to run before consider it to be
a more long-running service and go on to the next pending
launch (currently set to 15 seconds).

Also while in here, did some cleanup of the service code:

- A little refactoring to make per-user data cleaner.
- Switch to ArrayMap.

Change-Id: I09f372eb5e0f81a8de7c64f8320af41e84b90aa3
2013-09-13 09:58:48 -07:00
Alex Klyubin
03ea04715c Fix formatting in clearApplicationUserData exception message.
Before:
  4539 does not have permission:android.permission.CLEAR_APP_USER_DATA to clear datafor process:com.android.chrome
After:
  PID 4539 does not have permission android.permission.CLEAR_APP_USER_DATA to clear data of package com.android.chrome

Change-Id: Ic466decb050e4fa7f3fee4098c4f2abdc6cedf5c
2013-09-13 09:51:42 -07:00
Jason Monk
6f8a68f49a Guarantee that PAC Local Proxy owns Port
This changes the PAC support to not broadcast the Proxy information until
the Local Proxy has started up and successfully bound to a port so that
the local proxy information can be guaranteed to be owned by the proxy.

Bug: 10459877
Change-Id: I175cd3388c758c55e341115e4a8241884b90d633
2013-09-13 09:53:26 -04:00
Svetoslav
651dd4e6ee Remove unneeded print APIs and update the min margins APIs.
1. Removed unneeded code in Resolution that was storing its
   label as resource and package name. We do not have predefined
   resolutions, therefore we always persist the label.

2. Renamed the print attribute margins to minMargins to reflect
   that these are the minimal margins the printer support. Updated
   the docs as well.

3. Renamed the create method of all builder to build.

bug:10727487

Change-Id: Ie72ab8aaa5215b8bd2853885011b3b4efa4deb2e
2013-09-12 16:58:58 -07:00
Svetoslav
25f17f295b Merge "Not change the print options on printer change if possible." into klp-dev 2013-09-12 22:38:35 +00:00
Jeff Brown
09652ac1db Merge "Allow phone to enter suspend with positive proximity." into klp-dev 2013-09-12 22:15:38 +00:00
Jeff Brown
ec0832133a Allow phone to enter suspend with positive proximity.
As part of the power manager rewrite in JB MR1, we removed the ability
for the phone to suspend with positive proximity because it was not
clear that the proximity sensor was always correctly registered as
a wake-up source.  The sensor service itself does not contain any
code to manage wake-ups.  Therefore proximity sensor based wake-up
relies on the sensor driver acquiring a timed wake lock when the
sensor reports a negative result.  This behavior is not very well
defined in the sensor HAL so there is a chance that it will not
work reliably on all devices.

This change adds a new config.xml resource to specify whether the
device should be allowed to suspend when the screen is off due to
positive proximity.  Devices that support this feature should set
the "config_suspendWhenScreenOffDueToProximity" resource to "true" in
their resource overlays.  The feature is disabled by default.

Bug: 9760828
Change-Id: Ic65ab7df0357271b133e2e44f5e35e7756e1e9e0
2013-09-12 14:37:21 -07:00
Svetoslav
cc65b0c325 Not change the print options on printer change if possible.
If the user selects some print options from the dialog and then
changes the printer to one that has the same capabilities the
selections in the UI should not change.

bug:10631856

Change-Id: Ia76ce58c446815e3498d2f4b4739dee62d11d96a
2013-09-12 14:29:53 -07:00
David Christie
baae82a853 Merge "Don't track LocationManager internal requests in AppOps (b/10725757). AppOps stats are used to populate the "apps recently using location" list in settings->location. There is no reason to show Android OS in that list simply because of internal location requests supporting other clients." into klp-dev 2013-09-12 20:39:31 +00:00
Vinit Deshapnde
b481dae2f5 Merge "Fix invalid Wifi Network system crash" into klp-dev 2013-09-12 20:28:57 +00:00
Svetoslav
ef2088a26a Merge "Handle print serivce crashes." into klp-dev 2013-09-12 20:24:40 +00:00
David Christie
9e9ce92541 Don't track LocationManager internal requests in AppOps (b/10725757).
AppOps stats are used to populate the "apps recently using location"
list in settings->location.  There is no reason to show Android OS
in that list simply because of internal location requests supporting
other clients.

Change-Id: I6908aa63deb19d22733b8d9cdae6ea5dbbea55e0
2013-09-12 13:19:53 -07:00
Robert Greenwalt
8f435baca8 Merge "Fix Wifi Batch Scanning" into klp-dev 2013-09-12 18:22:28 +00:00
Svetoslav
c6066799ad Handle print serivce crashes.
1. Now after a print service crashes we are bringing it to the same
    state of its lifecycle. For example, if a service does a discovery
    and crashes we recreate the discovery session call the start
    discovery method and so on.

2. Turned off debugging logs since we have fully fledged state dump.

bug:10697779

Change-Id: Id790537461428e96b197eef12258996bda2bd1ce
2013-09-12 10:52:26 -07:00
Jeff Brown
737d2c0b92 Merge "Ignore ON_AFTER_RELEASE for partial wake locks." into klp-dev 2013-09-12 04:03:31 +00:00
Robert Greenwalt
126755cf41 Fix Wifi Batch Scanning
Some parsing bugs, more debug logs, etc.

bug:9301872
Change-Id: I245ab00955e245be81a019750be0f8491aa505fd
2013-09-11 19:31:20 -07:00
Alex Ray
c333a3f7c6 Merge "consumer_ir: add length to get carrier freqs" into klp-dev 2013-09-12 01:55:27 +00:00
Ruben Brunk
91019c9ef3 Merge "Remove dependency on JNIHelp header side effects." into klp-dev 2013-09-12 00:01:28 +00:00
Alex Ray
5022f275e3 consumer_ir: add length to get carrier freqs
Change-Id: I2c1ac27e46c0bcfdfadef227a2fa79bdcf7085d4
2013-09-11 16:21:25 -07:00
destradaa
f8a910fbd5 Merge "Fix exceptions in the Flp Hal layer: - JNI exception accessing a geofence method with wrong signature - FlpHardwareProvider exception when the monitoring status contains no location information" into klp-dev 2013-09-11 21:15:34 +00:00
Jeff Sharkey
ceccceccff Merge changes Ib1274847,I2eb2a1bf into klp-dev
* changes:
  Fix SDK build.
  Request all tethering interfaces, fix corruption.
2013-09-11 20:16:59 +00:00
destradaa
839904eed8 Fix exceptions in the Flp Hal layer:
- JNI exception accessing a geofence method with wrong signature
- FlpHardwareProvider exception when the monitoring status contains no location information

Bug: 10691492
Change-Id: I1959712912af712dc9dc344f20afd1112da46efc
2013-09-11 12:42:51 -07:00
Tom O'Neill
706113fa2a Merge "Improve some javadoc related to isProviderEnabled() apis" into klp-dev 2013-09-11 19:20:16 +00:00
Alexander Ray
7563d42331 Merge "Add consumer IR framework" into klp-dev 2013-09-11 19:05:38 +00:00
Igor Murashkin
2cad64c0fb Merge "Surface: Change OutOfResourcesException to be a runtime exception" into klp-dev 2013-09-11 18:28:07 +00:00
Tom O'Neill
d5759437ee Improve some javadoc related to isProviderEnabled() apis
- LocationManager.isProviderEnabled() no longer throws SecurityException:
the caller could already circumvent the permission check by calling
Secure.isLocationProviderEnabled()

Change-Id: I5abd04264299671ed35ce4594b5be46d86378767
2013-09-11 11:03:03 -07:00
Yuhao Zheng
518c0afaea Merge "Fix for the toggle airplane mode hidden API" into klp-dev 2013-09-11 17:35:09 +00:00
Erik Gilling
51e95df8f2 Add consumer IR framework
Change-Id: I786c00db0cce61ef75e4edc24e90f2cdcba6dbfb
2013-09-11 09:52:47 -07:00
Yuhao Zheng
5530e4b5d4 Fix for the toggle airplane mode hidden API
Fix to https://googleplex-android-review.git.corp.google.com/#/c/356900/
Previous implementation throws SecurityException when the API is called from apps.
bug:10653570

Change-Id: I95ae6f07db74d881f1a8d3d40a6486105a068e90
2013-09-11 09:44:28 -07:00
Adam Skory
86d9c457de Merge "Revert services assist context in KitKat" into klp-dev 2013-09-11 11:27:50 +00:00
Adam Skory
7140a25f01 Revert services assist context in KitKat
Reverts extension to assist context API to query
foreground services for assist context data.

Also hides Intent.ACTION_VOICE_ASSIST because
nobody's actually using it yet.

Bug: 10461702
Change-Id: Idf6836adc659b434e11ebb2b98e8b814c94a7227
2013-09-11 12:04:58 +01:00
Jeff Sharkey
e4984bea95 Request all tethering interfaces, fix corruption.
netd now tracks statistics for tethered interfaces across tethering
sessions, so switch to asking for all tethering stats.  (Currently
we're double-counting all tethering data, ever since it started
tracking across sessions.)

Also catch OOME to handle corrupt stats files, which we then dump to
DropBox and then start over.

Bug: 5868832, 9796109
Change-Id: I2eb2a1bf01b993dd198597d770fe0e022466c6b9
2013-09-10 21:03:30 -07:00
Ruben Brunk
87eac99a21 Remove dependency on JNIHelp header side effects.
Bug: 10680559
Change-Id: I47870d6c48906e0a420c52b7bc5945ffe29c68a2
2013-09-10 20:47:43 -07:00
Jeff Brown
6eade79f90 Ignore ON_AFTER_RELEASE for partial wake locks.
This is a regression in the new power manager.  Apparently
some apps try to use ON_AFTER_RELEASE with partial wake locks
which doesn't make sense.  Ignore the flag just like we used to
prior to JB MR1.

Bug: 10336375
Change-Id: Ib307eb60201612ba9bb03dc4da3365aba0b4848d
2013-09-10 18:45:25 -07:00
Jeff Brown
2f1ef77c07 Merge "WirelessChargerDetector: Work around bad sensor timestamps." into klp-dev 2013-09-11 00:35:39 +00:00