2836 Commits

Author SHA1 Message Date
Adam Powell
4a5c9e941a am 68ec033b: am 75958c29: am 3a153c0d: Merge "Fix a bug in submenu presenter priority handling" into klp-dev
* commit '68ec033b7c9ea28155bbb007b01d5dbce2239392':
  Fix a bug in submenu presenter priority handling
2014-03-13 18:02:08 +00:00
Adam Powell
68ec033b7c am 75958c29: am 3a153c0d: Merge "Fix a bug in submenu presenter priority handling" into klp-dev
* commit '75958c298477a3d1e556c4fe36e516b9e828c311':
  Fix a bug in submenu presenter priority handling
2014-03-13 10:01:15 +00:00
Justin Koh
c48701a134 am 641d8aff: Merge "Fix possible invalid pointer index in swipe dismiss." into klp-modular-dev
* commit '641d8aff87cbb9ed5e84ce849e0da3d3962b5eb3':
  Fix possible invalid pointer index in swipe dismiss.
2014-03-12 00:47:20 +00:00
Justin Koh
df4ee5c8ac Fix possible invalid pointer index in swipe dismiss.
Fix possible invalid pointer index in swipe dismiss: exit out if the pointer
index is -1. Also allow user to cancel this if in swipe mode.

Change-Id: I0f623ced0287679be8dd5c93ab6c67504b82fe9b
2014-03-11 16:27:25 -07:00
Benoit Goby
6835033af4 am c6f0b54d: Merge "Add CAP_BLOCK_SUSPEND to system server" into klp-modular-dev
* commit 'c6f0b54d695b49966a13bb196800a985ac6ce212':
  Add CAP_BLOCK_SUSPEND to system server
2014-03-10 19:02:54 +00:00
Adam Powell
190909f2c1 Fix a bug in submenu presenter priority handling
Now that overflow menus and the PhoneWindow-level ListMenuPresenter
can coexist, make sure that ListMenuPresenter handles submenus spawned
by itself. Introduce an internal API for menus to prefer a specific
presenter when performing item actions.

Bug 11979407

Change-Id: Id0b8fcbb8b310cbb3a63a1e5ea7a89de5d53f86f
2014-03-10 10:30:59 -07:00
Benoit Goby
a26d08e612 Add CAP_BLOCK_SUSPEND to system server
With linux 3.5 and above, CAP_BLOCK_SUSPEND is needed to take a
suspend blocker.

CAP_BLOCK_SUSPEND has aleady been added in master.

Change-Id: Ibd4b1f8498c3c4a7b69ea9fc68311546a8f0ecda
2014-03-08 00:17:43 +00:00
Adam Powell
f175b19aaa Merge "Fix a bug where OnTouchListeners in action views could be removed" into klp-dev 2014-03-07 23:28:19 +00:00
Jeff Brown
c969450acd am 840c8474: Merge "Add config_supportAutoRotation." into klp-modular-dev
* commit '840c84749a6066b436db4dc94c3e3929a8440575':
  Add config_supportAutoRotation.
2014-03-07 10:43:52 +00:00
Jeff Brown
840c84749a Merge "Add config_supportAutoRotation." into klp-modular-dev 2014-03-07 04:40:10 +00:00
Jeff Brown
bcdfc62ae3 Add config_supportAutoRotation.
On some products, it may not make sense to use the accelerometer
to perform auto-rotation.  In that case, the product's config.xml
framework resource overlay should set config_supportAutoRotation
to false.

Setting this to false also disables auto-rotation settings.

Bug: 13211999
Change-Id: If9d7d72f2a2c576b14a4ff0afb61ea52c42c3357
2014-03-06 19:57:59 -08:00
Adam Powell
c9e5f540a9 Fix a bug where OnTouchListeners in action views could be removed
ActionMenuPresenter should only replace the touch listener when binding
a generated item view.

Bug 12470259

Change-Id: I8c4c6110065605225a20cb7ed872255282085661
2014-03-06 17:57:05 -08:00
Dianne Hackborn
cb15c7a83b More on issue #12031685 (DO NOT MERGE)
Integrate from master:

Fix issue #13065185: Frequent runtime restarts on launching...

..."Hill Climb Racing" app

A service is in use when it is in the restarting state.

Change-Id: Iffdea96f867f89089e7ad07b4b1bef056951a5e8
2014-03-06 17:39:11 -08:00
Christopher Tate
7a4e519eda am 8106dce7: am a6c59158: am f63ae644: am 1e995c76: Merge "Update PackageMonitor to recognize new \'replacing\' semantics" into klp-dev
* commit '8106dce705ba69d5bc0ccafa8e21068216f42a5f':
  Update PackageMonitor to recognize new 'replacing' semantics
2014-03-05 01:05:31 +00:00
Christopher Tate
8106dce705 am a6c59158: am f63ae644: am 1e995c76: Merge "Update PackageMonitor to recognize new \'replacing\' semantics" into klp-dev
* commit 'a6c59158761423551941f6ed338a117658e581ad':
  Update PackageMonitor to recognize new 'replacing' semantics
2014-03-05 01:00:50 +00:00
Christopher Tate
a6c5915876 am f63ae644: am 1e995c76: Merge "Update PackageMonitor to recognize new \'replacing\' semantics" into klp-dev
* commit 'f63ae644a80ef2d0bd7bfb448eebb19691e4b6ec':
  Update PackageMonitor to recognize new 'replacing' semantics
2014-03-05 00:57:18 +00:00
Will Haldean Brown
11c51608ee am bd79652a: Merge "Add swipe-to-dismiss support to PhoneWindow." into klp-modular-dev
* commit 'bd79652a9afeee1e81f0f51d11e5869091f58af9':
  Add swipe-to-dismiss support to PhoneWindow.
2014-03-04 21:27:11 +00:00
Will Haldean Brown
ca6234e084 Add swipe-to-dismiss support to PhoneWindow.
This adds a new window feature -- FEATURE_SWIPE_TO_DISMISS -- and a
theme attribute to activate that feature. When the feature is
activated, a SwipeDismissLayout is inflated as the DecorView layout.
SwipeDismissLayout intercepts touch events and steals ones that are
large swipes to the right if its children don't. PhoneWindow registers
handlers that listen for these swipe events, translate the window when
necessary, and finish the activity at the end of the gesture.

Change-Id: I512e758f3c3ffd3b353dba3b911c0e80a88d6f5f
2014-03-04 09:26:15 -08:00
Christopher Tate
88c908323a Update PackageMonitor to recognize new 'replacing' semantics
The ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE broadcast now uses the
EXTRA_REPLACING intent extra when it is sent as part of an upgrade operation
on a forward-locked application.  Update PackageMonitor to recognize this
new information and express it appropriately to the observer.

Bug 11988313

Cherry-pick from master.

Change-Id: Iecea1876ffc918f23f9fa5845f1f89ed8d740dd5
2014-03-03 17:40:41 -08:00
Adam Lesinski
1c532c2e2d am 4b07b26e: Merge "Make UsbService optional" into klp-modular-dev
* commit '4b07b26e8654df52ca80bb2165ebdf9352ab9337':
  Make UsbService optional
2014-02-19 19:41:26 +00:00
Adam Lesinski
2cb6c60c0d Make UsbService optional
Tweaked the services Android.mk to build dependencies
when building with mm[m].

Change-Id: I6dad511c652bcacc085f27ede5f8f22a6982c6bd
2014-02-18 14:57:09 -08:00
Jeff Brown
ae254a8d71 am 3048191b: Remove onCreate() method that should not be there.
* commit '3048191b4cf9eff7a72b84065dec2b3dd1e89b3c':
  Remove onCreate() method that should not be there.
2014-02-14 09:14:15 +00:00
Jeff Brown
3048191b4c Remove onCreate() method that should not be there.
Change-Id: I8355dd78f910afa9895d2fa00cb627a0885d9eec
2014-02-13 23:26:59 -08:00
Dave Platt
34cc9f9056 am 53c7608a: am a3c3533b: Merge "Finish fixing Zygote descriptor leakage problem"
* commit '53c7608aefb0ed754394e571cac02e96ad6fcdb3':
  Finish fixing Zygote descriptor leakage problem
2014-02-12 23:10:36 +00:00
Jeff Brown
25df673b84 am 1b51c9cb: Merge "Make SystemService constructor take a Context." into klp-modular-dev
* commit '1b51c9cb96fe2a0818289857a016521eed1ec183':
  Make SystemService constructor take a Context.
2014-02-11 08:18:34 +00:00
Jeff Brown
b880d880c6 Make SystemService constructor take a Context.
This change simplifies the process of initializing a SystemService
by folding the onCreate() step back into the constructor.  It removes
some ambuiguity about what work should happen in the constructor and
should make it possible for services to retain most of their final
fields after refactoring into the new pattern.

Change-Id: I25f41af0321bc01898658ab44b369f9c5d16800b
2014-02-10 20:01:43 -08:00
Dave Platt
89d4c897a0 Finish fixing Zygote descriptor leakage problem
In order to prevent Zygote descriptors from leaking into the child
environment, they should be closed by the forked-off child process
before the child switches to the application UID.  These changes close
the descriptors via dup2(), substituting a descriptor open to
/dev/null in their place; this allows the Zygote Java code to close
the FileDescriptor objects cleanly.

This is a multi-project change: dalvik, art, libcore, frameworks/base,
and external/sepolicy are affected.  The CLs need to be approved
together, lest the build break or the software fail to boot.

Round 2: indent change

Bug: 12114500
Change-Id: I090402136a8a8b7d6aad6eb153026e85d7cf6ad3
2014-02-06 13:24:38 -08:00
Narayan Kamath
dfd1aa4331 resolved conflicts for merge of 2cd0563c to klp-modular-dev-plus-aosp
Change-Id: Ia28df1c1aa084959ed9289bfe90e7f6a4bffb8a2
2014-01-31 12:57:24 +00:00
Brian Carlstrom
c6c633608a frameworks/base: Rename persist.sys.dalvik.vm.lib to allow new default
Bug: 12798969
Change-Id: Ibb7ed86867e4dca53ad7fe33326b08e6f5e664c4
2014-01-30 13:16:48 -08:00
Jeff Brown
4ccb823a9f Refactor display manager service to new pattern.
Transform DisplayManagerService into a SystemService and start cleaning
up other local services that it uses from window manager and input manager.

Clean up service thread initialization.

Remove unnecessary static variables from ActivityManagerService.

It's starting to become clear that we really need a better way to manage
service dependencies.  Boot phases don't quite cut it.

Change-Id: If319dbd7cbfbd4812fe55ece969e818d4b20755b
2014-01-16 22:16:42 -08:00
Jeff Brown
6f357d3284 Start untangling system server early bootstrapping.
Refactored SystemServer to get rid of a bunch of legacy cruft related
to how the ServerThread used to be started up.

Create system context first when system server starts.  This removes
the tangled initialization order dependency that forced us to start
the activity manager service before most anything else.

Moved factory test related constants into the FactoryTest class.

Partially migrated Installer, ActivityManagerService, and
PowerManagerService to the new SystemService pattern.  There's more
work to be done here, particularly around the lifecycle of the
power manager.

Bug: 12172368
Change-Id: Ia527dd56e3b3fd90f9eeb41289dbe044921230d4
2014-01-16 11:24:58 -08:00
Adam Powell
efc3bb0612 Fix a bug where OnTouchListeners in action views could be removed
ActionMenuPresenter should only replace the touch listener when binding
a generated item view.

Bug 12470259

Change-Id: I8c4c6110065605225a20cb7ed872255282085661
2014-01-10 10:16:27 -08:00
Adam Lesinski
66e9b1e117 Merge "Move SystemService code to frameworks/base/core" into klp-modular-dev 2014-01-07 20:53:20 +00:00
Dave Platt
bd9acc2218 am e966e577: am 02f042dd: Fix socket descriptor leak from Zygote to child app
* commit 'e966e5774ad8d478bc89b541bcac3740fe267d18':
  Fix socket descriptor leak from Zygote to child app
2014-01-07 11:53:07 -08:00
Dave Platt
02f042ddd9 Fix socket descriptor leak from Zygote to child app
Due to an API change in LocalSocket, Zygote must now
manually close the FileDescriptor it created when it
registered a LocalServerSocket.  The LocalSocket.close()
routine will no longer do so.

Bug: 12114500

(cherry picked from commit 70ef29b04ee4ef7d7acfec79041dbe800961195e)

Change-Id: Ief23a3c99e007dc4aa6f94dfb47a1b2b6c854dad
2014-01-06 13:59:20 -08:00
Narayan Kamath
f748257eee XmlUtils#readThisMapXml should handle null keys.
Both readThisValueXml & writeThisValueXml have been
implemented to handle values with "null" names.

Change readThisMapXml to allow such names as well, and
map them to the null key in the resulting HashMap.
readThisListXml and readThisSetXml already support
null names.

bug: https://code.google.com/p/android/issues/detail?id=63463

Change-Id: I1c93976656e45e7733113eb67d29b6bad5d25f1f
2014-01-06 11:18:21 +00:00
Adam Lesinski
b102b2cc73 Move SystemService code to frameworks/base/core
Paves the way for building services without needing to see the
rest of frameworks/base/services.

Change-Id: I8ac4bc9d25471e96076cd888c1fc24b918d8911f
2013-12-20 13:27:38 -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
Narayan Kamath
bea98dc245 Merge "Fix inconsistency in LoggingPrintStream." 2013-12-10 09:30:57 +00:00
Narayan Kamath
b0c7c914eb Fix inconsistency in LoggingPrintStream.
LoggingPrintStream prints "null" for null strings from
print(String) but throws an NPE from println(String).

Fix this by delegating to the underlying builder (and avoiding
the "fast" path when the input String == null)

bug: https://code.google.com/p/android/issues/detail?id=63380
Change-Id: I89c5c12db6ed5af8037d46f67369b38c5b4cbc9f
2013-12-09 11:21:26 +00:00
Lorenzo Colitti
2daa0c93c4 Merge "Add address flags and scope to LinkAddress." 2013-12-07 02:43:04 +00: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
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
The Android Open Source Project
dbccd44a63 Merge commit 'b873a17ce7be0a9771c24999adca6964431728f6' into HEAD
Change-Id: I938755073e70602cc8f51ce9bd420fdcf870cecd
2013-11-22 11:18:57 -08:00
Christopher Tate
461febadc4 am 64397749: am 22010817: Merge "Handle backup transport registration dynamically" into klp-dev
* commit '64397749effa088dcea3799fc8440845c5a1c193':
  Handle backup transport registration dynamically
2013-11-14 18:41:02 -08:00
Christopher Tate
22010817b9 Merge "Handle backup transport registration dynamically" into klp-dev 2013-11-15 02:34:38 +00:00
Christopher Tate
cefba58d14 Handle backup transport registration dynamically
Bug 11369873

Change-Id: I9bbdcc21ce25159c6645690123b5d03c553b0ddc
2013-11-14 18:13:25 -08:00
Jeff Brown
d216944765 am 2bced6dc: am a7a46a66: Merge "Update cast screen strings." into klp-dev
* commit '2bced6dcb53c1743d6d11ffcb213206a07a63737':
  Update cast screen strings.
2013-11-14 17:35:00 -08:00