14222 Commits

Author SHA1 Message Date
Matt Casey
77ece7b192 Merge "Extend assist context to foreground services" 2013-08-08 09:33:08 +00:00
Satoshi Kataoka
b3c21ac7c6 Reduce the transaction fee of getEnabledInputMethodSubtypeList
Bug: 8467480
Change-Id: If18cce8fbe567df51f29adcdcedff3f743460b8b
2013-08-08 11:32:31 +09:00
Jeff Brown
7a54069ad5 Merge "Dump information about recent input events." 2013-08-08 01:10:06 +00:00
Jeff Brown
1dc14aeb2f Merge "Fix propagation of display overscan information." 2013-08-08 01:09:42 +00:00
Jason Monk
602b232a06 Add PAC File support for proxy configuration
PAC (Proxy auto-config) files contain a single javascript function,
FindProxyForURL(url, host).  It gets called to determine what proxy should be
used for a specific request.

This adds PAC support to the system.  The ProxyProperties has been modified
to hold the PAC file when one is present.  The Proxy method
setHttpProxySystemProperty has been modified to insert a PacProxySelector
as the default ProxySelector when it is required.  This new ProxySelector
makes calls to the ConnectivityService to parse the PAC file.

The ConnectivityService and the WifiConfigStore have been modified to support
saving the extra PAC file data.

The ConnectivityService now has a class attached (PacProxyNative) that
interfaces to the native calls for PAC files.  The parsing of the PAC file
is handled by libpac (which is being added to external/) which utilizes
libv8 to parse the javascript.

As a fallback to applications that don't use the java ProxySelector,  the proxy
is setup to point to a local proxy server that will handle the pac parsing.

bug:10182711
Change-Id: I5eb8df893c632fd3e1b732385cb7720ad646f401
2013-08-07 21:01:39 -04:00
Ben Gruver
49660c7c24 Add support for broadcast intents
Change-Id: Icf61e7a202f489cb33b9fd95564285e48154b25b
2013-08-07 17:25:53 -07:00
Ben Gruver
f157b48eae Add support for matching explicit intents
This adds a <component-filter> tag for the intent firewall rules,
which adds another top-level filter similar to intent-filter, that
matches intents based on the resolved component they are being sent
to.

Previously, the existing <intent-filter> mechanism did not allow
filtering for explicit intents that had no action/data/etc. The
new <component-filter> functionality can be used for both implicit
and explicit intents.

Change-Id: I6a10e8bfae901931ed2174bca42ea25ac79804d8
2013-08-07 17:25:35 -07:00
Ben Gruver
f5323fee2a Pass in the ComponentName of the resolved service for service intents
Change-Id: I893035d5f2dba470d19a091c7a5945b13d9c9b67
2013-08-07 17:25:21 -07:00
Ben Gruver
b62237938e Add support for service intents
Change-Id: Ie090896b70bd6860181a021818fa6514d2e57a3f
(cherry picked from commit 8b028a6564d9e3af07e2424dc71d287550ebede7)
2013-08-08 00:14:00 +00:00
Ben Gruver
e64ff1b31a Merge "Improve the logic for determining whether the caller is a system app" 2013-08-08 00:09:23 +00:00
Jeff Brown
6876f32107 Dump information about recent input events.
To help track down ANRs, include more information about recent
events in the input dispatcher dumps.

Bug: 9774124
Change-Id: I94732f173d3518c2f4780668d2eb3ee9ae9fcb10
2013-08-07 16:48:06 -07:00
Jeff Brown
ef981a40aa Fix propagation of display overscan information.
Fix several problems in the way that the overscan was plumbed in
which could result in information not being delivered to applications.
There was also a violation of certain invariants regarding the
immutability of returned DisplayInfo objects.

Bug: 10213771
Change-Id: I21184a14305e44278b5e81353bf95d511e8517fb
2013-08-07 14:33:50 -07:00
Jeff Brown
18ec40c44c Merge "Destroy surfaces when display is removed." 2013-08-07 21:32:32 +00:00
Ben Gruver
dd72c9ed55 Improve the logic for determining whether the caller is a system app
Bug: 10024554
Change-Id: I742e918840a98dd83d713bdf7a43a919674e65fe
2013-08-07 13:59:17 -07:00
Mathias Agopian
9fb9a1c5c1 Merge "Fix a bug where window animation could be janky" 2013-08-07 20:36:26 +00:00
Craig Mautner
2eb15342be Destroy surfaces when display is removed.
Fixes bug 10226153.

Change-Id: I4eb8b14258985768d36745260ad4e62ba6c78844
2013-08-07 13:13:35 -07:00
Mathias Agopian
9c72281d97 Fix a bug where window animation could be janky
SurfaceControl.closeTransaction() will block until the transaction
takes effect and this happens at the next vsync -- in practice
it means this call blocks for ~15ms.

Immediately after that we ask the choreographer to schedule the
next frame, which will happen at the next vsync. depending the
timing, this would cause the window manager to animate at 30 fps
instead of 60.

This is fixed here by calling the choreographer before we
call closeTransaction().

In the near future, we should be able to fix this by using
an offseted vsync for the window manager and it won't need
closeTransaction() to block at all.

Bug: 10209014
Change-Id: I33d0c5ecfc25154b2859f3023a8cda6e641826bf
2013-08-07 12:07:24 -07:00
Todd Poynor
df89ca3308 batteryservice: add battery current now and charge counter data
Available for retrieval via future APIs if desired.  Dumped by dumpsys.
Not added to batterystats or ACTION_BATTERY_CHANGED intents at this point.

Also fixes a formatting problem in the existing dumpsys output for voltage.

Change-Id: I5320b19035914256fb872c13095c09c648dd522a
2013-08-07 18:33:12 +00:00
Craig Mautner
9a04435e5f Merge "Compare tasks not activities." 2013-08-07 18:26:49 +00:00
Craig Mautner
d0f964f93f Compare tasks not activities.
In order to determine if the topmost activity needs to be moved out
of the way, compare its task to the task of the source activity
rather than compare the activities themeselves.

Fixes bug 10182783.

Change-Id: Idd4542d7ddce8b7586ee47f100366bc47e07d54f
2013-08-07 11:16:33 -07:00
Amith Yamasani
d8e974931e Merge "Try again to cleanup all blocked apps" 2013-08-07 18:10:23 +00:00
Amith Yamasani
5e486f59c7 Try again to cleanup all blocked apps
Since the Restrictions feature was removed, some cleanup code was
added to unblock apps. But the cleanup is causing some runtime exceptions
due to happening too early in the boot up sequence. Moved the cleanup
to after boot_completed broadcast is received.

Bug: 10212758
Change-Id: Id42eff16b54c24ea48cf8b3a81f77ea801264edd
2013-08-07 11:06:44 -07:00
Dianne Hackborn
feca78f7af Merge "Start adding IPC calls to retrieve proc stat data." 2013-08-07 17:15:05 +00:00
Dianne Hackborn
23fb6e8418 Start adding IPC calls to retrieve proc stat data.
Also fix a bug where we were not correctly unparcelling service
duration data.

Change-Id: Ie9113b2e3a747622441b1939ffc45edb5803a10f
2013-08-07 10:08:22 -07:00
Craig Mautner
dee8bf0eb5 Create SurfaceSession before creating DimLayer.
Fixes "java.lang.IllegalArgumentException: session must not be null"

Change-Id: Id7e77a44e59e5169ed8944682ab79783631182dd
2013-08-07 09:24:11 -07:00
Ken Wakasa
c3a1914bd7 Revert "Reduce the transaction fee of getEnabledInputMethodSubtypeList"
This reverts commit e9a6f9713ca48aab9a6c87e0645cb0a0af946a11.

Change-Id: I611d31086d4f02aae5c7021ac92975bd92a59f34
2013-08-07 15:03:24 +00:00
Satoshi Kataoka
e9a6f9713c Reduce the transaction fee of getEnabledInputMethodSubtypeList
Bug: 8467480
Change-Id: Ic1fddfe433e097041fcb09d1fd341d77d7d8b13b
2013-08-07 17:12:58 +09:00
Adam Skory
dfc7fd7818 Extend assist context to foreground services
Add Service.onProvideAssistData(Bundle) which will be
called on foreground Services that have the new attr
in their manifest of provideAssistData = true;

Rename private reference to e.g. "getTopActivityExtras"
as "getAssistContextExtras" - do not rename the relevant
permission, since it is already public.

In ActivityManagerService, request extras both from the
top activity and from any foreground services with the
above attribute. Extend PendingActivityExtras as
PendingAssistExtras with a list of Services from which
extras are expected.

Reduce the timeout to or reporting extras from 4 sec to
just 500 ms.

Bug: 9526331
Change-Id: Ia03b96e8189033a68ae9c514c8cea0199a19bce8
2013-08-07 02:20:44 +01:00
Craig Mautner
9d808b1f48 Add home StackBox to all DisplayContent.
Each display needs a stack and a stack box to contain windows.

Fixes bug 10161525.

Change-Id: Ic617cdf5a082ae68f0589e826ecbb37d8fba52ac
2013-08-06 18:07:13 -07:00
Ben Gruver
57e76b405f Add the inadvertently missing SCHEME string value provider
Change-Id: I70ce104efac23c3776596571e48ee195be958373
2013-08-06 17:25:27 -07:00
Dianne Hackborn
614b4c4cd4 Merge "Refactor ProcessStats, ProcessTracker." 2013-08-06 21:32:42 +00:00
Dianne Hackborn
d2932243e3 Refactor ProcessStats, ProcessTracker.
ProcessStats is now called ProcessCpuTracker.

ProcessTracker is now ProcessStatsService, and its inner State
class is broken out into a separate top-level ProcessStats class.
This ProcessStats is moved to the framework, so we will be able
to use it elsewhere.

Change-Id: I6a127bcb835b6b474b72647c0b99b82c2137e5c5
2013-08-06 13:54:07 -07:00
Ben Gruver
0dff706489 Merge "Read intent firewall rules from any xml file in the ifw directory" 2013-08-06 20:02:30 +00:00
Craig Mautner
4373232037 Merge "Extend clearing of mLastPausedActivity." 2013-08-06 19:56:50 +00:00
Amith Yamasani
aac3954414 Merge "Remove restrictions PIN for all users" 2013-08-06 18:20:55 +00:00
Amith Yamasani
350962ca82 Remove restrictions PIN for all users
Bug: 10200097
Change-Id: I4d95cd49a21e8f4f6b2c141d1205f81622c395b5
2013-08-06 11:18:53 -07:00
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
Craig Mautner
0f922749f4 Extend clearing of mLastPausedActivity.
Add more locations where mLastPausedActivity must be set null before
calling resumeTopActivityLocked().

Also separate the "No History" activity from mLastPausedActivity by
adding mLastNoHistoryActivity. This is necessary because now
mLastPausedActivity will be null when mLastNoHistoryActivity
is checked.

Continues to fix bug 10022212.

Change-Id: Ida543b0638c865127691dc51a6e0635062539659
2013-08-06 08:44:42 -07: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