15293 Commits

Author SHA1 Message Date
Narayan Kamath
ce9418c59e am c797fd61: am c9e27802: am 7e296254: Merge "Fix broken XML parsing idiom."
* commit 'c797fd614d28a0c5c3aacbff325e9de572d7f091':
  Fix broken XML parsing idiom.
2014-01-07 10:10:45 +00:00
Narayan Kamath
c797fd614d am c9e27802: am 7e296254: Merge "Fix broken XML parsing idiom."
* commit 'c9e27802f049b9c3086770a7710b421ce33d2791':
  Fix broken XML parsing idiom.
2014-01-07 02:07:56 -08:00
Narayan Kamath
2ac3cb7aef Fix broken XML parsing idiom.
Code that expected a single top level element in an XML file
was doing something like :

while (type != START_TAG) { next(); }

This would loop forever when the XML being parsed was empty,
where each call to XmlPullParser.next() would return END_DOCUMENT.

bug: https://code.google.com/p/android/issues/detail?id=64173
Change-Id: I7543203e976a8999ae471a6c2d629249a87011bb
2014-01-06 11:31:35 +00:00
Todd Poynor
91ecb36df5 ActivityManagerService use lmkd low memory killer daemon -- DO NOT MERGE
Change-Id: Ie2f8af1e411c28d7f03be56c356ec39e1d71558e
2014-01-03 16:30:25 -08:00
Craig Mautner
46f618a7d9 am a8dfd5d8: am 4dcf1af3: am cccf2a33: Merge "Keydispatching timeout while finish Activity"
* commit 'a8dfd5d896b71faf87b03d27df6050284765fb21':
  Keydispatching timeout while finish Activity
2013-12-19 17:58:08 +00:00
Craig Mautner
a8dfd5d896 am 4dcf1af3: am cccf2a33: Merge "Keydispatching timeout while finish Activity"
* commit '4dcf1af3ed8dfa546e6cbf5ecfa66914a3fda883':
  Keydispatching timeout while finish Activity
2013-12-19 09:55:33 -08:00
Martin Wallgren
c8733b818d Keydispatching timeout while finish Activity
If there is input to be handled during finish activity we can get a
keydispatching timeout ANR. The reason is that finish activity is some
times not possible, and the activity is instead put on a finish queue.
The activity will then be finished sometime in the future. When we add
the activity to the finish queue, key dispatching is paused, and there
is an ANR timer waiting for it to be resumed again. Since it can take a
long time before the activity is actually finished, we need to resume
the key dispatching to avoid the ANR.

Change-Id: Icea4ab3b5ad05c8bfbadf8f5cece1a59ec621469
2013-12-19 13:24:00 +01:00
Greg Hackmann
0857992140 am 060ae1db: am eb0ca2b7: Merge "Add timerfd backend to AlarmManagerService"
* commit '060ae1db7bba39cb8171f4267b5de9538f1ab440':
  Add timerfd backend to AlarmManagerService
2013-12-17 18:19:04 +00:00
Greg Hackmann
153ec6cae7 am 3545433d: am 9f4e67c5: Merge "Clean up native AlarmManagerService tabs/spaces and unused parameter warnings"
* commit '3545433d052769417dcdd70bc59fbf31f9925ba4':
  Clean up native AlarmManagerService tabs/spaces and unused parameter warnings
2013-12-17 18:18:58 +00:00
Greg Hackmann
060ae1db7b am eb0ca2b7: Merge "Add timerfd backend to AlarmManagerService"
* commit 'eb0ca2b7bfd70fbbf2bd730b1c431faac21d0416':
  Add timerfd backend to AlarmManagerService
2013-12-17 10:15:33 -08:00
Greg Hackmann
3545433d05 am 9f4e67c5: Merge "Clean up native AlarmManagerService tabs/spaces and unused parameter warnings"
* commit '9f4e67c50b5c311adeaaf6135ef79214a46d0e26':
  Clean up native AlarmManagerService tabs/spaces and unused parameter warnings
2013-12-17 10:15:29 -08:00
Greg Hackmann
eb0ca2b7bf Merge "Add timerfd backend to AlarmManagerService" 2013-12-17 18:10:49 +00:00
Greg Hackmann
9f4e67c50b Merge "Clean up native AlarmManagerService tabs/spaces and unused parameter warnings" 2013-12-17 18:10:33 +00:00
Craig Mautner
38bcf6dc87 am 422d7003: am f431daa2: Merge "Fix to NullPointerException on move back in ActivityStack."
* commit '422d7003db8d26b5fa503aa294348d7b53621db1':
  Fix to NullPointerException on move back in ActivityStack.
2013-12-17 16:45:06 +00:00
Craig Mautner
422d7003db am f431daa2: Merge "Fix to NullPointerException on move back in ActivityStack."
* commit 'f431daa22811fdce9c4ec975d5d33121898b4f9b':
  Fix to NullPointerException on move back in ActivityStack.
2013-12-17 08:42:31 -08:00
Daniel 2 Olofsson
9cdf9e52d9 Fix to NullPointerException on move back in ActivityStack.
In ActivityTask.moveTaskToBackLocked NullPointerException may occur
when moving back with only current Activity in stack. This due to a
condition that may trigger despite a TaskRecord being null and then
attempt accessing the TaskRecord.mOnTopOfHome variable.

TaskRecord task may be set to null when no resumed activity remain.

Resolved by assuring that flag mOnTopOfHome is instead set to false
for current TaskRecord in case where there are no remaining activities
above home.

The above bug has already been corrected in the following commit,
ada62fca51d314cefe2c5da4e007df5b9abf320d, but it does not set the
cottect value to mTopOfHome for the current taks, see below.

Variable mOnTopOfHome will not be set to false in situations where
stack is of size 1 or less and task is null, perhaps from already
having finished current activity.

To avoid current TaskRecord maintaining value mOnTopOfHome to true
after launching Home this variable is set to false.

Impact should not be major due to correction earlier that makes sure
that there is always a TaskRecord.mOnTopOfHome set to true above Home
activity but if not correctly set for current task still gives a
possibility of bad behavior.

Change-Id: Ie86ad99c188aaa05b0de9d58eaa16c42b6fc4341
2013-12-17 11:35:23 +01:00
Greg Hackmann
a1d6f92f34 Add timerfd backend to AlarmManagerService
On devices without /dev/alarm, use a new backend based on timerfd.
timerfd has near-equivalent syscalls for the /dev/alarm ioctls we care
about, with two key differences:

1) /dev/alarm uses one fd for all clocks, while timerfd needs one fd per
clock type.

AlarmManagerService addresses this by replacing the fd (int) with an
opaque pointer (long) to the backend-specific state.

2) When the RTC changes, the /dev/alarm WAIT ioctl always returns, while
timerfd cancels (and signals events) only on specially-flagged RTC
timerfds.

The timerfd backend masks this by creating an extraneous RTC timerfd,
specifically so there's always something to signal on RTC changes.

Change-Id: I5aef867748298610347f6e1479dd8bf569495832
Signed-off-by: Greg Hackmann <ghackmann@google.com>
2013-12-16 16:23:51 -08:00
Kenny Root
31b9ec01ff am 62d509d2: am 37c69fdd: Merge "Use java.util.Objects instead on internal API"
* commit '62d509d24f91959b75219edd0ab1a6f22b82c600':
  Use java.util.Objects instead on internal API
2013-12-13 22:20:37 +00:00
Kenny Root
62d509d24f am 37c69fdd: Merge "Use java.util.Objects instead on internal API"
* commit '37c69fdd826f3973966430adc1abfbefc19bc16e':
  Use java.util.Objects instead on internal API
2013-12-13 14:17:29 -08:00
Kenny Root
e6585b32ea Use java.util.Objects instead on internal API
Not needed since java.util.Objects implements all the needed
functionality.

Change-Id: Icd31d49a9801d1705427f028e9ac927d58e7d34c
2013-12-13 13:40:30 -08:00
Greg Hackmann
32b4c0779e Clean up native AlarmManagerService tabs/spaces and unused parameter warnings
Change-Id: I64da1437dd0ed30957b43450c72b9d3797112a2e
Signed-off-by: Greg Hackmann <ghackmann@google.com>
2013-12-12 12:53:32 -08:00
Todd Poynor
c95bb562e8 Add previous console on pstore to DropBox
Change-Id: I23c0213fe3d52280d7338ca62cb7e79b80a16cc6
2013-12-12 00:44:30 +00:00
Lorenzo Colitti
30253d7a64 am 2daa0c93: Merge "Add address flags and scope to LinkAddress."
* commit '2daa0c93c4a0a9d18f4ef4486369fb8c90cd1ea2':
  Add address flags and scope to LinkAddress.
2013-12-09 10:28:19 -08:00
Lorenzo Colitti
2daa0c93c4 Merge "Add address flags and scope to LinkAddress." 2013-12-07 02:43:04 +00:00
Nick Kralevich
5fa89d5571 am 6b8a3a52: am f7422885: Merge "Augment SELinuxMMAC functionality."
* commit '6b8a3a52acf1c2722551f1ea1ce47831f87939cd':
  Augment SELinuxMMAC functionality.
2013-12-06 08:20:18 -08:00
Nick Kralevich
6b8a3a52ac am f7422885: Merge "Augment SELinuxMMAC functionality."
* commit 'f7422885a99c5d240f70c2f8227ae44abeea3e5c':
  Augment SELinuxMMAC functionality.
2013-12-06 08:17:23 -08:00
Robert Craig
99a626c271 Augment SELinuxMMAC functionality.
* No longer support a package name stanza outside of
  a signature tag. Package names, by themselves, have
  no security associated with them in Android and thus we
  should not be allowing or encouraging this
  type of policy.

* Allow for nested package name stanzas inside
  signature stanzas. There are cases where a finer
  distinction needs to be made among apps signed with
  the same cert. New code allows a different seinfo
  tag to be assigned to the listed package names
  signed by the parent cert. When a determination needs
  to be made concerning seinfo assignments, the inner
  seinfo tag takes precedence over the outer seinfo
  labels which are assigned to just the signature.

* Temp structures are now used to parse new policy files
  until the entire xml file is parsed and deemed correct,
  at which time the temp structures are copied over to the
  permanent class structures. This ensures that any structural
  errors with the policy will not result in partial loads.

* Valid stanzas look like the following with the inner
  package piece being optional.

   <signer signature="">
     <seinfo value=""/>
     <package name="">
       <seinfo value=""/>
     </package>
   <signer>

   <default>
     <seinfo value=""/>
   </default>

Change-Id: Ia204d71211776dcf9b2dcc86ad6d77c4ad39dc25
2013-12-06 08:51:20 -05:00
Lorenzo Colitti
64483947fd Add address flags and scope to LinkAddress.
This is necessary so that the framework can know whether an IPv6
address is likely to be usable (i.e., if it's global scope and
preferred). Also, it will simplify the address notification
methods in INetworkManagementEventObserver, which currently take
the address, the flags, and the scope as separate arguments.

1. Add flags and scope to the class and update the unit test.
   Use the IFA_F_* and RT_SCOPE_* constants defined by libcore.
   Since most callers don't know about flags and scope, provide
   constructors that default the flags to zero and determine the
   scope from the address. Addresses notified by the kernel will
   have these properly set. Make multicast addresses invalid.
   Update the class documentation.
2. Provide an isSameAddressAs() method that compares only the
   address and prefix information between two LinkAddress
   objects. This is necessary because an interface can't have
   two addresses with the same address/prefix but different
   flags.
3. Update LinkProperties's addLinkAddress and removeLinkAddress
   to identify existing addresses to add/remove using
   isSameAddressAs instead of implicit equals(). Specifically:
   - If addLinkAddress is called with an address that is already
     present, the existing address's flags and scope are updated.
     This allows, for example, an address on an interface to go
     from preferred to deprecated when it expires, without it
     having to be removed and re-added.
   - If removeLinkAddress is called with an address that is
     present but with different flags, it deletes that address
     instead of failing to find a match.
4. Update the INetworkManagementEventObserver address
   notification methods to take just a LinkAddress instead of
   LinkAddress, flags, and scope. While I'm at it, change the
   order of the arguments for consistency with the other
   functions in the interface.

Change-Id: Id8fe0f09a7e8f6bee1ea3b52102178b689a9336e
2013-12-06 13:54:35 +09:00
The Android Open Source Project
ebcb32f58a Merge commit 'bac61807d3bcfff957b358cb9ad77850bd373689' into HEAD
Change-Id: I29374270c8e0c2f2859efaf1d55af9f73da0f8d7
2013-12-05 13:10:46 -08:00
Nick Kralevich
a5a0de9f29 am b6634304: Merge "Remove setEnforcingMode from SELinuxPolicyInstallReceiver."
* commit 'b66343049bc56d29988a91d2d29d49861a469b84':
  Remove setEnforcingMode from SELinuxPolicyInstallReceiver.
2013-12-02 12:08:42 -08:00
Stephen Smalley
856df42a5a Remove setEnforcingMode from SELinuxPolicyInstallReceiver.
It never worked anyhow, at least in AOSP, as nothing checks that property,
and is pointless now that enforcing mode is set by init.

Change-Id: If05dd49963c5d7081e00039b5e378032bea0939b
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2013-12-02 14:38:31 -05:00
Lorenzo Colitti
4806fdfbd0 am f226bc60: Merge "Use LinkAddress in address notifications."
* commit 'f226bc606af9ce5aceff6b05fc4b0200c94cb248':
  Use LinkAddress in address notifications.
2013-11-26 17:56:45 -08:00
Lorenzo Colitti
c1c2378033 am 9d4ac970: Merge "Pass DNS server info notifications to observers."
* commit '9d4ac9703657142b190d3c256de7c3329e5a4b29':
  Pass DNS server info notifications to observers.
2013-11-26 08:38:48 -08:00
Lorenzo Colitti
6747ea1b1c am eede7e89: Merge "Minor cleanups to NetdCallbackReceiver.onEvent."
* commit 'eede7e89c94b3bb56c26aec137c53d592d3bc7c3':
  Minor cleanups to NetdCallbackReceiver.onEvent.
2013-11-26 08:38:45 -08:00
Lorenzo Colitti
aeefa69a88 am 8a234809: Merge "Use BaseNetworkObserver in Tethering."
* commit '8a234809e47106e445a4ddf2c70b9cd50d4c9348':
  Use BaseNetworkObserver in Tethering.
2013-11-26 08:38:40 -08:00
Lorenzo Colitti
5ad421a3d0 Use LinkAddress in address notifications.
Currently address{Updated,Removed} pass in the address as a
string such as "fe80::1/64". Use LinkAddresses instead, since
that's what it is.

This makes the code more robust in the unlikely case that netd
passes in an invalid string. In the future we can move flags and
scope into the LinkAddress itself and simplify the code further.

Bug: 9180552
Change-Id: I66599f9529cf421caa7676fdd0141bb110b8589e
2013-11-26 21:55:15 +09:00
Lorenzo Colitti
5ae4a531cc Pass DNS server info notifications to observers.
These are sent if the device receives IPv6 Router Advertisements
with DNS server configuration options. Currently, nothing listens
to them; in a future change we will use them as IPv6 DNS servers.

[Cherry-pick of 416740ad4d9132005a71dc0883334e852235a18a]

Bug: 9180552
Change-Id: I05000c0cd3867a68ab390102e8470b6912a9d3aa
2013-11-25 17:27:17 +09:00
Lorenzo Colitti
a9626c1c95 Minor cleanups to NetdCallbackReceiver.onEvent.
- Clean up identical error messages.
- Fix the array length check for InterfaceAddressChange.

[Cherry-pick of 59be800e7fe81842aa8c77b91319f58ab165983d]

Bug: 9180552
Change-Id: Id871f481445b530c3ad749725f1548df0e3a1228
2013-11-25 17:25:45 +09:00
Lorenzo Colitti
132fe8d27d Use BaseNetworkObserver in Tethering.
Tethering currently inherits from the AIDL interface
INetworkManagementEventObserver, so it has to provide no-op
implementations of all the interface's methods. Inherit from
BaseNetworkObserver and get rid of the no-ops.

[Cherry-pick of f4e90eac87bc31611ddd80c46fc924d35ce66c1c]

Bug: 9180552
Change-Id: I74859b0d77951005651aaaa418185857e40eeedb
2013-11-25 17:24:30 +09:00
The Android Open Source Project
dbccd44a63 Merge commit 'b873a17ce7be0a9771c24999adca6964431728f6' into HEAD
Change-Id: I938755073e70602cc8f51ce9bd420fdcf870cecd
2013-11-22 11:18:57 -08:00
Jeff Brown
2458681b3e am 263c4310: am ce468a35: Stop wifi display discovery when no longer needed.
* commit '263c431017c51fc51c85454a0f9cc7979001a3c1':
  Stop wifi display discovery when no longer needed.
2013-11-21 19:47:30 -08:00
Jeff Brown
ce468a35b3 Stop wifi display discovery when no longer needed.
Keep track of how many clients are requesting scans and scan
continuously until all of them are gone then explicitly terminate the
scan instead of letting it time out as before.

Suspend wifi display scans while connecting or connected to a remote
display.  This is handled by both the display manager and media router
since neither has complete information about what is happening.
Much of this code will no longer be needed once wifi display support
is integrated directly into the media router service.

Ensure that we don't attempt to scan or connect to wifi displays
while the wifi display feature is off.

Infer when a connection attempt fails and unselect the wifi display
route automatically so it doesn't appear to be connecting forever.

Fix issues around correctly canceling and retrying connection attempts.
Often we would cancel but not retry.

Improved connection reliability somewhat.  It seems that discovery must
already be in progress in order for a connection attempt to succeed.

Ensure QuickSettings uses exactly the same logic as the MediaRouteButton
to determine when the remote display tile should be made visible.

Bug: 11717053
Change-Id: I18afc977b0e8c26204b8c96adaa79f05225f7b6e
2013-11-21 19:32:59 -08:00
Craig Mautner
67ed39bbdb am 90192a61: am 0495f4ed: Merge "Make SurfaceView layers captured by screenshotApplications()"
* commit '90192a6165f37207fa8ceb15c07aa9582327c294':
  Make SurfaceView layers captured by screenshotApplications()
2013-11-21 18:43:43 -08:00
Dianne Hackborn
3d00483045 am 2c082ae3: am 90e9b1d3: Fix issue #11790471: Crash removed home buttons and notification bar/shade
* commit '2c082ae3d209aa590c1839d75436f7aa77b37125':
  Fix issue #11790471: Crash removed home buttons and notification bar/shade
2013-11-21 14:14:12 -08:00
Dianne Hackborn
90e9b1d3dc Fix issue #11790471: Crash removed home buttons and notification bar/shade
Whoops persistent processes are, well, persistent.  Don't remove
services from them.  We'll be keeping that process record around.

Change-Id: I29e9fb6f704efdf0caad5e0307a7adbb416eed3b
2013-11-21 12:56:03 -08:00
Craig Mautner
90192a6165 am 0495f4ed: Merge "Make SurfaceView layers captured by screenshotApplications()"
* commit '0495f4eded46efd7035ed672dc933ec6430b93fd':
  Make SurfaceView layers captured by screenshotApplications()
2013-11-21 08:50:05 -08:00
Sangkyu Lee
7ccba97417 Make SurfaceView layers captured by screenshotApplications()
Since SurfaceView layers are located below application layers,
SurfaceView is not captured by screenshotApplications()
when the application is running in fullscreen.

Moreover, ws.isFullscreen(dw, dh) returns mostly true
on the devices which do not use the navigation bar.

Change-Id: Ia1036c79054950384a97504714929fd85c8147de
Signed-off-by: Sangkyu Lee <sk82.lee@lge.com>
2013-11-21 15:20:33 +09:00
Christopher Tate
c8ea38fe18 am e3705342: am b0183f0a: Harden against transiently unavailable backup transports
* commit 'e3705342671d08b5cd94a0d69ef8099a2c3211f8':
  Harden against transiently unavailable backup transports
2013-11-19 11:48:50 -08:00
Christopher Tate
b0183f0ae3 Harden against transiently unavailable backup transports
The init & clear operations are particularly important to ensure
delivery when at all possible, so we retry those periodically
if the transport is unavailable when we first attempt them.

Now with 100% less build break.

Bug 11716868

Change-Id: I2af4e93788068cfac97c0a48d3568c561eefa23d
2013-11-19 11:24:46 -08:00
Craig Mautner
8ef1c53177 am be462aff: am 096de3c3: Merge "Notify apps when insets change." into klp-dev
* commit 'be462affdbe9f962c495d6eeabdad645aa9baf03':
  Notify apps when insets change.
2013-11-19 08:38:51 -08:00