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
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
To help track down ANRs, include more information about recent
events in the input dispatcher dumps.
Bug: 9774124
Change-Id: I94732f173d3518c2f4780668d2eb3ee9ae9fcb10
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
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
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
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
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
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
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
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
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
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
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
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