13563 Commits

Author SHA1 Message Date
Kenny Root
6a0db59901 resolved conflicts for merge of e0b14ea7 to master
Change-Id: Ie018d3e2eba1eb2d655c153880e1951b68c2bd51
2013-12-13 15:59:51 -08:00
Amith Yamasani
d08eadd287 am aab51473: Merge "Fix bad xml generation due to mismatched start/end tags" into klp-modular-dev
* commit 'aab514738e346aae410a5a8339e2610a3b393bc6':
  Fix bad xml generation due to mismatched start/end tags
2013-12-13 22:57:39 +00:00
Kenny Root
e0b14ea70b am 31b9ec01: am 62d509d2: am 37c69fdd: Merge "Use java.util.Objects instead on internal API"
* commit '31b9ec01ff6087773cb35af6824a6422a0181afb':
  Use java.util.Objects instead on internal API
2013-12-13 22:23:33 +00: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
Amith Yamasani
aab514738e Merge "Fix bad xml generation due to mismatched start/end tags" into klp-modular-dev 2013-12-13 22:16:58 +00: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
Adam Lesinski
e89a9a3f93 Merge "Introduce a Lifecycle for system services" into klp-modular-dev 2013-12-13 18:33:24 +00:00
Amith Yamasani
ef38a10353 Fix bad xml generation due to mismatched start/end tags
This was causing a problem with lost policy permissions when global proxy was set for a user.

Extract all xml literals into constants to avoid such errors in the future.
Fix some minor line length issues.

Bug: 12065908
Change-Id: I11d532b4aaa978a09ac562fd6b9ddce1f699a03e
2013-12-13 09:05:26 -08:00
Adam Lesinski
ef2ea1faf6 Introduce a Lifecycle for system services
Cherry-picked from klp-modular-dev

Provide an abstract class for system services to extend from,
similar to the android.app.Service.

This will allow services to receive events in a uniform way,
and will allow services to be created and started in the
correct order regardless of whether or not a particular
service exists.

Similar to android.app.Service, services are meant to implement
Binder interfaces as inner classes. This prevents services from
having incestuous access to each other and makes them use the
public API.

Change-Id: Iaacfee8d5f080a28d7cc606761f4624673ed390f
2013-12-12 18:49:49 -08:00
Adam Lesinski
182f73fc4d Introduce a Lifecycle for system services
Provide an abstract class for system services to extend from,
similar to the android.app.Service.

This will allow services to receive events in a uniform way,
and will allow services to be created and started in the
correct order regardless of whether or not a particular
service exists.

Similar to android.app.Service, services are meant to implement
Binder interfaces as inner classes. This prevents services from
having incestuous access to each other and makes them use the
public API.

Change-Id: Iaacfee8d5f080a28d7cc606761f4624673ed390f
2013-12-12 16:35:11 -08:00
Robin Lee
c62cbd9c28 Merge "Simplify UsbDeviceManager.containsFunction()" 2013-12-12 09:18:05 +00:00
Todd Poynor
84c3d2a7de am c52afd25: am c95bb562: Add previous console on pstore to DropBox
* commit 'c52afd2532737872e97933ad1cfb214d4382091f':
  Add previous console on pstore to DropBox
2013-12-12 00:53:07 +00:00
Todd Poynor
c52afd2532 am c95bb562: Add previous console on pstore to DropBox
* commit 'c95bb562e8c67c258623fe70e8001a08e59b8c7d':
  Add previous console on pstore to DropBox
2013-12-12 00:49:42 +00:00
Todd Poynor
c95bb562e8 Add previous console on pstore to DropBox
Change-Id: I23c0213fe3d52280d7338ca62cb7e79b80a16cc6
2013-12-12 00:44:30 +00:00
Vinit Deshapnde
ffadfb9ffd Move Wifi/P2p service components under services
Some methods need to be public, since frameworks/base complies before
frameworks/base/services; and services takes build dependency on base.

Similar issue exists with WifiEnterpriseConfig constants.

Bug: 9907308
Change-Id: Ied0e3dee0b25c939067dbc66867a9814b3b3b68e
2013-12-11 16:06:49 -08:00
Craig Mautner
87b25acffb Merge "Put new Activity at frontOfTask" 2013-12-11 23:11:22 +00:00
Jim Miller
7267ed1b4b Fix memory leak caused by mismatched linkToDeath() in WindowManagerService
This fixes a bug where an allocated DeathRecipient in WindowManagerService
was holding a reference to keyguard binder interface after a call to
linkToDeath() without a matchin unlinkToDeath().

It was causing the keyguard side of the binder interface to stick around,
which in tern prevented the keyguard side from releasing its references.

The solution is to ensure matching linkToDeath()/unlinkToDeath() calls.

Fixes bug 11982048

Change-Id: I6959816b819ba953512c53675162195cbf1e0653
2013-12-10 16:48:13 -08:00
Craig Mautner
dab959d498 Put new Activity at frontOfTask
If all previous activities are finishing then a newly added activity
should be marked frontOfTask. Not doing so will cause the wrong
activity to be brought up next.

Fixes bug 12054192.
Fixes bug 11575233.

Change-Id: I663a4da62aa55359c2e970276a6c7cade557634f
2013-12-10 14:47:57 -08:00
Dianne Hackborn
4190fc52e1 Fix crash:
W/BinderNative(  667): Uncaught exception from death notification
W/BinderNative(  667): java.lang.ArrayIndexOutOfBoundsException: length=0; index=0
W/BinderNative(  667): 	at android.util.ArraySet.valueAt(ArraySet.java:301)
W/BinderNative(  667): 	at com.android.server.am.ActiveServices.killServicesLocked(ActiveServices.java:2069)
W/BinderNative(  667): 	at com.android.server.am.ActivityManagerService.cleanUpApplicationRecordLocked(ActivityManagerService.java:12412)
W/BinderNative(  667): 	at com.android.server.am.ActivityManagerService.handleAppDiedLocked(ActivityManagerService.java:3596)
W/BinderNative(  667): 	at com.android.server.am.ActivityManagerService.appDiedLocked(ActivityManagerService.java:3744)
W/BinderNative(  667): 	at com.android.server.am.ActivityManagerService$AppDeathRecipient.binderDied(ActivityManagerService.java:1024)
W/BinderNative(  667): 	at android.os.BinderProxy.sendDeathNotice(Binder.java:493)
W/BinderNative(  667): 	at dalvik.system.NativeStart.run(Native Method)

Change-Id: I5cd03187dfaa8ec25c7db34ad10e2b6c089c468c
2013-12-09 18:20:16 -08:00
Craig Mautner
bdc748af8c DO NOT MERGE: Eliminate StackBox.
StackBox is too constraining. Adding size and position to TaskStacks
directly makes stack positioning and management more flexible and
prepares for ActivityView.

Change-Id: I33c6b4e1c23a5a8069fd507c160bcb34e4d287b2
2013-12-09 15:15:34 -08:00
Amith Yamasani
09e9cdcece DO NOT MERGE : Move some system services to their own sub package.
(Cherry pick from master)

As a next step they can be moved into separate directories to be
built as separate modules that may or may not be included in a
particular configuration.

Moves AppWidgetService, BackupManagerService, ClipboardService, DevicePolicyMS,
and WallpaperMS.

Change-Id: Idd92871c1828bdde81d85fe99a9c87a22d53169d
2013-12-09 15:14:41 -08:00
Amith Yamasani
d50d41e4df DO NOT MERGE: Don't freak out if SystemUiService isn't available
Reducing dependencies on system services

Change-Id: Ifb1a3bfb9c8dda5e22ec698ddb588058d20bd566
2013-12-09 15:14:39 -08:00
Mike Lockwood
e63f6f7c8d DO NOT MERGE: Remove obsolete "headless" support
Change-Id: I829fe48e6ebcb819e260646bb19ac6ddfcf07f83
2013-12-09 15:14:37 -08:00
Dianne Hackborn
3732f8d078 Merge "Fix issue #12031685: Sticky Service Breakage in Android 4.4.1" 2013-12-09 19:29:54 +00:00
Dianne Hackborn
aa9875eb2d Fix issue #12031685: Sticky Service Breakage in Android 4.4.1
Got a little too aggressive about cleaning up service state; need to
avoid removing services from an app until we are in the second loop
doing the final cleanup, otherwise we can leave services around with
restarting their process.

Change-Id: I526a80285b4ef90c329db7c13442a27b9ad3585f
2013-12-09 11:26:11 -08:00
Lorenzo Colitti
4598ea4e5e am 263c4788: am 30253d7a: am 2daa0c93: Merge "Add address flags and scope to LinkAddress."
* commit '263c4788dcf45f104f8668fd6621d1a7c39689b9':
  Add address flags and scope to LinkAddress.
2013-12-09 18:34:44 +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
Robin Lee
c49ceff7f3 Simplify UsbDeviceManager.containsFunction()
This version handles cases like containsFunction("ab,a,b", "a") properly.

Change-Id: Iac44b93807f29c442759e1943f483b5ed797bc71
2013-12-06 16:42:10 +00:00
Nick Kralevich
6018d01427 am bf88b659: am 5fa89d55: am 6b8a3a52: am f7422885: Merge "Augment SELinuxMMAC functionality."
* commit 'bf88b659b6c02143b464c0551d4875f7911ed269':
  Augment SELinuxMMAC functionality.
2013-12-06 16:26:08 +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
Adam Powell
cfbe9be5b3 Add support for cross-activity scenes and transitions
* Add theme attributes for specifying a top-level TransitionManager
  for an activity window.

* Add window feature for automatic content transitions. This
  automatically assigns/creates a Scene for setContentView calls.

* Add named transitions. This allows apps to define APIs for
  handshake-agreements about which exit/entrance transitions to play.

* Add new transition type for ActivityOptions. This lets the system
  use ActivityOptions to communicate transition specifics and
  arguments to the called activity.

* Have ActivityManager pass appropriate ActivityOptions through to the
  called Activity. Have the called activity call back into the caller
  to let it know which transition of a possible requested set was
  chosen.

Still to do:

* Define and pass arguments for transitions. This will require
  defining a Parcelable version of TransitionValues and deciding how
  much leeway apps should have for these things.

* Determine how to appropriately filter the ActivityOptions bundle so
  that only appropriate data reaches the target.

* Determine if generalizing the auto-Scenes functionality to
  ViewGroups is appropriate.

Change-Id: I10684b926129ab2fbc1adec9ef31767237acae79
2013-12-05 10:06:19 -08:00
Dianne Hackborn
9f4c54c294 Merge "Fix issue #11536426: Permission denied when trying to launch..." 2013-12-03 21:04:09 +00:00
Nick Kralevich
0e5aeca7ba am 18c2736c: am a5a0de9f: am b6634304: Merge "Remove setEnforcingMode from SELinuxPolicyInstallReceiver."
* commit '18c2736cf0afc41e8ee602b7016e668ac267151e':
  Remove setEnforcingMode from SELinuxPolicyInstallReceiver.
2013-12-02 23:31:50 +00:00
Lorenzo Colitti
317d15c155 am 4806fdfb: am f226bc60: Merge "Use LinkAddress in address notifications."
* commit '4806fdfbd0fecf91584396fc0f620c97a05ab837':
  Use LinkAddress in address notifications.
2013-12-02 20:53:06 +00: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
Dianne Hackborn
06a06db5c4 Fix issue #11536426: Permission denied when trying to launch...
...an activity from a notification

We don't remove pending intents when updating an app, which is necessary
to keep app widgets and other things working.  However, when uninstalling
an app, we should clear out all of its pending intents.

Change-Id: I4b2980f407dbae6c2f4700ca8bc08f299f0a6dca
2013-12-02 10:46:29 -08: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