13009 Commits

Author SHA1 Message Date
Irfan Sheriff
63f1e2fb6b Merge "Add API to control scan always mode" into jb-mr2-dev 2013-03-20 15:49:20 +00:00
Lorenzo Colitti
4aa9bcf414 Reset connections on all stacked interfaces.
Bug: 8276725
Change-Id: I7fe99c6ea123037cef3e89e3c2c17ed43cc0b1ea
2013-03-20 19:22:58 +09:00
Irfan Sheriff
9f3d55056f Merge "Fix reading sleep policy" into jb-mr2-dev 2013-03-19 22:48:13 +00:00
Irfan Sheriff
9f2e83135c Fix reading sleep policy
Bug: 8418823
Change-Id: I432b0a1a7a13dcdd834f6a1c943b06937444f406
2013-03-19 14:32:11 -07:00
John Michelau
116415271b Fix Watchdog HeartbeatHandler to run on correct thread
The HeartbeatHandler for the System Server Watchdog has been running
on the wrong thread due to a race condition in initialization.  It's
designed to run on ServerThread, so that it can catch lockups in the
main looper of the System Server.  It has been running on
ActivityManagerThread instead, so it does not detect lockups on the
ServerThread as it should.

ActivityManagerService is calling Watchdog.getInstance() before
ServerThread calls Watchdog.getInstance().init(), so the handler is
being bound to the ActivityManagerThread instead of the ServerThread.

Explicitly bind HeartbeatHandler to ServerThread, so that the Watchdog
catches lockups on this critical thread.

Change-Id: Iccb184ac3adb817feb86ed4ee0e50e443bf74636
2013-03-19 14:39:33 -05:00
Elliott Hughes
6d3b13384e am c9fe40ea: am 71558f1f: Merge "Fix times in debugging output to use H rather than k."
* commit 'c9fe40ead549ff18393c0cc5c6e3bd67548f9da6':
  Fix times in debugging output to use H rather than k.
2013-03-19 10:13:34 -07:00
Nick Kralevich
515c20beb1 Merge "PackageManagerService: honor requestedPermissionsRequired" into jb-mr2-dev 2013-03-19 15:45:23 +00:00
Irfan Sheriff
1ef840cdc7 Add API to control scan always mode
Bug: 8141918
Change-Id: I1e5e45e514726c2cbfd86e747123e477e00fd7ed
2013-03-19 07:44:47 -07:00
Craig Mautner
aea8b0e571 am 7f7ac5b4: am fda1bff8: Merge "Correct the target app token for input method window"
* commit '7f7ac5b4a86be479bdede226fd4a2bddcd8a9a2b':
  Correct the target app token for input method window
2013-03-18 17:50:32 -07:00
Elliott Hughes
64a277d837 Fix times in debugging output to use H rather than k.
Bug: 8359981
Change-Id: I4fccf3ed7e469b77f6e755dacbcd025005390505
2013-03-18 17:47:22 -07:00
Nick Kralevich
1cd6c6ecdf PackageManagerService: honor requestedPermissionsRequired
Don't automatically grant all normal/dangerous permissions. Instead,
check the value of requestedPermissionsRequired to see if it's required.

If the permission is not required, then only grant it if the permission
was previously granted to the application.

Change-Id: I86b1fae530c006d353f9fa22137598bc88253805
2013-03-18 13:59:04 -07:00
Craig Mautner
2fc8ad1fe6 Merge "Properly close Surface when done." into jb-mr2-dev 2013-03-18 20:57:26 +00:00
Craig Mautner
e50d7fcd97 Properly close Surface when done.
Surface.destroy was not being called. Leading to warning from
StrictMode.

Fixes bug 8388527.

Change-Id: I472fb57ed2c3f6389e53d8f020f3b22b2d0740c8
2013-03-18 10:06:21 -07:00
Lorenzo Colitti
952e4805f7 Merge "Framework changes for 464xlat." into jb-mr2-dev 2013-03-18 16:41:58 +00:00
Carrie Xu
5c97184c3a Correct the target app token for input method window
The root cause is:
There is a defect in window manager service: When a new
activity that can be ime target is added into window manager
but the Z order of input method window don't need to be
changed, then the target app token of input method window
would not be updated to new one. This defect may cause that
the layer of input method window is calculated incorrectly.

The solution:
Correct the target app token for input method window.

Change-Id: I008311e3c9b1cf5fc320b614d8675c183c506d50
2013-03-18 11:45:14 +09:00
Lorenzo Colitti
d9b3d55152 Catch RuntimeException in NMService notifications
Currently, NetworkManagementService only catches RemoteExceptions
when calling the BaseNetworkObserver notification methods (e.g.,
interfaceStatusChanged). However, if the observer is in the same
process, unchecked exceptions can occur as well.

When this happens, finishBroadcast does not get called, and no
further notifications can be sent, because any attempt to do so
fails with a "beginBroadcast() called while already in a
broadcast" exception.

Fix this by catching RuntimeException as well.

Bug: 8397534
Bug: 8276725
Change-Id: Icd6f32128707244978943c48a9ea3a2b952a2957
2013-03-17 03:21:35 +09:00
Dianne Hackborn
bb131f52da Merge "Fix issue #8401553: It's possible to startForeground()..." into jb-mr2-dev 2013-03-16 01:59:29 +00:00
Dianne Hackborn
282add7bc3 Fix issue #8401553: It's possible to startForeground()...
...with no visible Notification

Don't allow a 0 icon resource.

Change-Id: I52e93533e6c45c6027ff3c185060cd54d087d077
2013-03-15 18:48:04 -07:00
Craig Mautner
8dfe99ce20 Merge "Catch BadTokenException and continue." into jb-mr2-dev 2013-03-15 18:59:51 +00:00
Craig Mautner
e4bbb1cc45 Catch BadTokenException and continue.
BadTokenException is a normal consequence of swapping IMEs while there
is a DO_SHOW_SOFT_INPUT message in the IIMethodWrapper queue. This
race condition cannot be avoided without an unacceptable lock down of
InputMethodManagerService.

Fixes bug 8387663.
Fixes bug 8263462.

Change-Id: I2c21573cf972145ab08e66604cdb9344139a3f31
2013-03-15 11:38:44 -07:00
Lorenzo Colitti
e78aa89647 Merge "Set routes from stacked links as well." into jb-mr2-dev 2013-03-15 17:14:43 +00:00
Lorenzo Colitti
13c9fdefde Framework changes for 464xlat.
1. Add a Nat464Xlat service that ConnectivityService can use
   to start and stop clat. When clat is started, the service
   waits for the clat interface to come up and then calls
   ConnectivityService to add the appropriate routes.
2. Make ConnectivityService start clat when an IPv6-only mobile
   interface is connected. We only support clat on mobile for
   now.
3. Make tethering use the interface that has the IPv4 default
   route insted of using the base interface of the
   LinkProperties. This allows us to tether to a stacked
   interface, which is needed for tethering with 464xlat.

Bug: 8276725
Change-Id: I24480af69ee280f504399062638af0836a56268e
2013-03-15 14:41:55 +09:00
Lorenzo Colitti
f83d90c667 Set routes from stacked links as well.
Currently, ConnectivityService adds and removes routes to/from
the routing table only based on the LinkProperties's routes.
Make it update routes based on the stacked links as well.

Bug: 8276725
Change-Id: I9a2adf537af5a04de0aaab3780afbcc3bb5c6acb
2013-03-15 14:35:38 +09:00
Wink Saville
33c5857c54 Merge "Revert "Fail fast if somebody is adding default routes"" into jb-mr2-dev 2013-03-15 05:07:41 +00:00
Wink Saville
7b5fd05d4e Revert "Fail fast if somebody is adding default routes"
This reverts commit 6f210bd0191e1936bbc1f036912c6efc4ea69475

Mako wouldn't boot for me, reverting for now.

Change-Id: Ie92d6bf77811e7257e86d65e1e15e1973c027cd7
2013-03-15 05:07:04 +00:00
Robert Greenwalt
bb5b7a2649 Merge "Fail fast if somebody is adding default routes" into jb-mr2-dev 2013-03-14 23:02:28 +00:00
Irfan Sheriff
11aefad94d Add support for scan always available mode
Modify WifiService to add a controller to track the various
desired states and let the WifiStatemachine actually control
the bring up.

Bug: 8141918

Change-Id: I6e98fd5a29b43c3c50c315eff5255cd0a3eaebcd
2013-03-14 13:55:56 -07:00
Robert Greenwalt
6f210bd019 Fail fast if somebody is adding default routes
bug:2655011
Change-Id: I25da940e024825bc6e1d1ac5fe7b0d951609c1c1
2013-03-14 13:16:04 -07:00
Craig Mautner
67bea2ef32 Merge "Remove WindowManager messages from remote queue." into jb-mr2-dev 2013-03-14 16:48:53 +00:00
Craig Mautner
ca0ac718cb Remove WindowManager messages from remote queue.
When a new IME is attached it is not enough to remove the
WindowManager messages from the local queue, but the ones in
the previous IME queue must also be removed.

Fixes bug 8263462.

Change-Id: I9e916c6052a83dc7691bcba0b6ab8328b9b7cc36
2013-03-14 09:43:02 -07:00
Mathias Agopian
86e1bc7305 fix CloseGuard usage in Surface
Bug: 8375415
Change-Id: I03e9f318c2ad586f4bd93b280557ada66121d275
2013-03-13 18:21:11 -07:00
Craig Mautner
6efb4c746f Put debug back in for b/b8263462.
Previous CL did not fix.

Change-Id: Ief9e8f519480fa41248d53e5b0187c9657f00b79
2013-03-13 11:12:26 -07:00
Dianne Hackborn
53149acf7b Merge "Implement limited shared libraries in apks." into jb-mr2-dev 2013-03-12 23:03:59 +00:00
Craig Mautner
274323ce8f Remove old show/hide messages on new ime (DO NOT MERGE)
The previous show/hide messages in the queue were still trying
to be honored even after a new ime was attached.

Fixes bug 8263462.

Change-Id: Iee60dbd1d58542f73aedeac5ccb54cddeb5d5dfe
2013-03-12 14:44:59 -07:00
Dianne Hackborn
c895be7bc6 Implement limited shared libraries in apks.
You can now declare shared libraries in apks that are
on the system image.  This is like the existing mechanism
of using raw jar files as shared libraries, but since they
are contained in an apk the library can actually be updated
from the Play Store.  And this even (mostly) works.

There are some deliberate limitations on this feature.  A
new shared library *must* be declared by an apk on the system
image.  Installing an update to a system image apk does not
allow you to add new shared libraries; they must be defined
by everything on the base system image.  This allows us to
get rid of a lot of ugly edge cases (shared libraries that were
there disappearing after an update is uninstalled for example)
and give some brakes on apps that happen to be pre-installed
on devices from being able to throw in new shared libraries
after the fact.

In working on this, I ran into a recently introduced bug where
uninstalling updated to system apps would fail.  This was done
to allow for the new restricted users that don't have all
system apps, but conflicts with the existing semantics for
uninstalling system apps.  To fix this I added a new uninstall
flag that lets you switch on the new mode if desired.

Also to implement the desired logic for limitations on declaring
new shared libraries in app updates, I needed to slightly tweak
the initial boot to keep the Package object for hidden system
packages associated with their PackageSetting, so we can look at
it to determine which shared libraries are allowed.  I think
this is probably more right than it was before -- we already
need to parse the package anyway, so we have it, and when you
install an update to a system app we are in this same state
until you reboot anyway.

And having this fixed also allowed me to fix another bug where
we wouldn't grant a new permission to an updated app if its
system image version is updated to request the permission but
its version is still older than whatever is currently installed
as an update.  So that's good.

Also add new sample code showing the implementation of an apk
shared library and a client app using it.

Change-Id: I8ccca8f3c3bffd036c5968e22bd7f8a73e69be22
2013-03-12 12:51:38 -07:00
Daniel Sandler
1d280ee958 Merge "Accumulate updates to notifications before archiving." into jb-mr2-dev 2013-03-12 15:53:45 +00:00
Michael Wright
b13eb3e789 Merge changes I674b9804,If2d2e37b into jb-mr2-dev
* changes:
  Add touch navigation input source
  Add InputDevice#isFromSource convenience method
2013-03-12 01:03:23 +00:00
Michael Wright
e7a9ae8ba0 Add touch navigation input source
Bug: 8276741
Change-Id: I674b9804bf9ae76d694ae7073b54a7d43474a43c
2013-03-11 17:58:22 -07:00
Lorenzo Colitti
2adea7ff3b Remove redundant parameter to modifyRoute
modifyRoute takes both an interface name and a LinkProperties.
This is redundant because all callers get the interface name
from the LinkProperties. Make modifyRoute get the interface
name from the LinkProperties instead.

Change-Id: I41ba8e0a10241c2f1107204fcaca2be74556042b
2013-03-12 07:39:59 +09:00
Lorenzo Colitti
de96589113 Merge "Always specify an interface for host routes." into jb-mr2-dev 2013-03-11 17:22:25 +00:00
Lorenzo Colitti
e167135976 Always specify an interface for host routes.
Change-Id: I05b4d87e7d7e8237c6f4a70f1fedae00f416f581
2013-03-08 16:41:25 -08:00
Christopher Tate
294b512eca DO NOT MERGE - Full backup/restore now handles OBBs sensibly
OBB backup/ restore is no longer handled within the target app
process.  This is done to avoid having to require that OBB-using
apps have full read/write permission for external storage.

The new OBB backup service is a new component running in the
same app as the already-existing shared storage backup agent.
The backup infrastructure delegates backup/restore of apps'
OBB contents to this component (because the system process
may not itself read/write external storage).

From the command line, OBB backup is enabled by using new
-obb / -noobb flags with adb backup.  The default is noobb.

Finally, a couple of nit fixes:

- buffer-size mismatch between the writer and reader of chunked
  file data has been corrected; now the reading side won't be
  issuing an extra pipe read per chunk.

- bu now explicitly closes the transport socket fd after
  adopting it. This was benign but triggered a logged
  warning about leaked fds.

(Cherrypicked)

Change-Id: I471f6348abcccb7bf1e1710b7beda9f23de53e14
2013-03-08 15:08:10 -08:00
Christopher Tate
a83cab0001 Do not hang in pm clear on an invalid package name
The Activity Manager was not properly informing the observer that
the operation had concluded (unsuccessfully).

Bug 8222595

Change-Id: I8234e32d8edf4112c8c7a5e20e341d0b41e23014
2013-03-07 17:50:11 -08:00
Daniel Sandler
23d7c70032 Accumulate updates to notifications before archiving.
By only adding notifications to the archive when they are
removed we batch up multiple updates and only store the
final version. Some data is lost in this process, but we
save tons of memory storing otherwise redundant /
uninteresting data (e.g. each step of a download).

Change-Id: I008afefc1242bb7c433d45da2c36fcc626dd3706
2013-03-07 16:32:06 -05:00
Daniel Sandler
9f3443c55c Merge "Properly support USER_ALL in notification listener API." into jb-mr2-dev 2013-03-07 20:46:09 +00:00
Daniel Sandler
21ca44d67b Properly support USER_ALL in notification listener API.
Listeners should be notified for any notification if they
register for USER_ALL, or for any notification posted to
USER_ALL.

Bug: 8328357
Change-Id: Ib5024d41287090d1a390539a015d8cb4dfa854a7
2013-03-07 14:01:22 -05:00
Santos Cordon
73ff7d8e64 Obfuscate any phone numbers that pass through the event log.
bug: 8203219
Change-Id: I455849cab9b2a8e08889cf44d1799448846c9151
2013-03-06 19:02:49 -08:00
Mathias Agopian
b1d90c8f60 fix JNI use of incStrong/decStrong
Change-Id: Ia11b404dea483dc19bbc30f4d7bcff516655e180
2013-03-06 17:48:20 -08:00
Jeff Sharkey
94d7ddb4b5 Use enabled/enabledSetting from PackageParser.
PackageParser.updateApplicationInfo() has already interpreted the
various COMPONENT_ENABLED flags for us, no need to clobber them.

Bug: 8331767
Change-Id: If1363c5651a2f0326ee60e92517cfc0e6f256699
2013-03-06 15:10:57 -08:00
Craig Mautner
cc947fdc2d Merge "Add window leak check and possible recovery." into jb-mr2-dev 2013-03-06 18:40:48 +00:00