15543 Commits

Author SHA1 Message Date
Craig Mautner
991146f8ef Don't null class member before using it.
Changing the order of detachStack() and usage of mDisplayContent
fixes NPE.

Fixes bug 12823709.

Change-Id: I04760b1d6fd5d3ffc49b99ca4acb47bf7e61cb46
2014-02-13 11:12:42 -08:00
Craig Mautner
d14fa78dc8 am 0af894d2: Merge "Update DimLayer sizes on rotation." into klp-modular-dev
* commit '0af894d25133890e7765e6c582b3ac4829070de8':
  Update DimLayer sizes on rotation.
2014-02-13 19:05:18 +00:00
Craig Mautner
0af894d251 Merge "Update DimLayer sizes on rotation." into klp-modular-dev 2014-02-13 19:02:02 +00:00
Craig Mautner
b660b9d8cf Update DimLayer sizes on rotation.
Required replumbing and updating the TaskStack bounds calculations
to match the new separation of TaskStack from DisplayContent.

Fixes bug 12780687.

Change-Id: I061c92831c06f4eb3e673ad6296e721b0c0f3202
2014-02-13 10:59:16 -08:00
Wink Saville
27bf55c815 am 16c0b295: am bba3a694: Merge "Telephony API extension v2"
* commit '16c0b295ef069e128a4e01fd2f72da06784950a1':
  Telephony API extension v2
2014-02-13 08:44:55 +00:00
Wink Saville
bba3a694b8 Merge "Telephony API extension v2" 2014-02-13 04:26:33 +00:00
Craig Mautner
d3df99c474 am 4b79f838: Merge "Add debug for 12987986." into klp-modular-dev
* commit '4b79f8380c47b0da89348e1115ea70e7898997ca':
  Add debug for 12987986.
2014-02-12 23:48:15 +00:00
Craig Mautner
4b79f8380c Merge "Add debug for 12987986." into klp-modular-dev 2014-02-12 23:44:56 +00:00
Craig Mautner
1646832219 Add debug for 12987986.
For bug 12987986.

Change-Id: Idc122ba369ad7566e3fee290955bf91b0f610ae1
2014-02-12 15:43:40 -08:00
Craig Mautner
8dfda07dd4 am 731c30c1: Merge "Don\'t add windows from exiting app tokens twice." into klp-modular-dev
* commit '731c30c17dac51e2279f8f789a647c61bd55028b':
  Don't add windows from exiting app tokens twice.
2014-02-12 21:01:47 +00:00
Craig Mautner
731c30c17d Merge "Don't add windows from exiting app tokens twice." into klp-modular-dev 2014-02-12 20:56:36 +00:00
Craig Mautner
ac90c19cab Don't add windows from exiting app tokens twice.
If an apptoken's removal has been delayed then it will be in both
mExitingAppTokens and the stack's tasks. When rebuilding the windows
the windows from that apptoken will get added twice. This change
skips adding those windows from apptokens that have already been
added from mExitingAppTokens.

Change-Id: I55f94b7dbef36aeacb390b91fbe82426eaac5458
2014-02-12 12:37:17 -08:00
John Spurlock
ae5708db9d am c4aee98a: Improve error handling in listener services.
* commit 'c4aee98a62f400dd9f6f964d26d739d409212775':
  Improve error handling in listener services.
2014-02-12 19:36:25 +00:00
John Spurlock
c4aee98a62 Improve error handling in listener services.
Check explicitly for null listeners in NMS, throwing
IllegalArgumentException (on the small list of exceptions
that survive RPC boundaries) with a message.

Normally this situation is caused by listeners that attempt to
perform NM-related actions before they are bound.  Check for
this case in the base NLS class and avoid the call to NM if we
know it will fail.

Although it's tempting to throw an IllegalStateException on the
client side, preserve the existing semantics for backwards-compatibility
purposes.  That is, silently fail (or return null) - and provide a
log warning.

Bug:12805707
Change-Id: I0d92fd0d460a8592e8a23fd8fd718ae2ba3bd4c7
2014-02-12 14:31:36 -05:00
Nick Kralevich
dd3d95f182 resolved conflicts for merge of 4ad93639 to klp-modular-dev-plus-aosp
Change-Id: I7ad222301ec0b863d48a1a9a839469436c385ea0
2014-02-12 11:05:59 -08:00
Jeff Brown
be83e4a08e am 38f96e50: Add support for injecting events into ActivityContainers. (DO NOT MERGE)
* commit '38f96e5020b3e82b98fe97b0be363a5ad185860f':
  Add support for injecting events into ActivityContainers. (DO NOT MERGE)
2014-02-12 00:37:24 +00:00
Jeff Brown
38f96e5020 Add support for injecting events into ActivityContainers. (DO NOT MERGE)
Modified ActivityView to inject touch events it receives back into
its activity container.  The container then injects the event into
the input system along with the display id of the underlying virtual
display.

Enhanced the input system to support concurrent dispatch of touch
events on multiple displays which is required for this to work.

Change-Id: I9cf1870db3be6f99a52ed9a1e3ceafe42c940093
2014-02-11 14:43:04 -08:00
Dianne Hackborn
67754d93c4 Merge "Runtime resource overlay, iteration 2" 2014-02-11 21:29:58 +00:00
Narayan Kamath
a9d171bd5b am 5c770dfb: am b823bd45: Merge "Use long to store pointers in ConsumerIrService"
* commit '5c770dfba2846ee173d147fd974f8e9f073c1534':
  Use long to store pointers in ConsumerIrService
2014-02-11 16:34:08 +00:00
Narayan Kamath
b823bd4560 Merge "Use long to store pointers in ConsumerIrService" 2014-02-11 14:29:09 +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
1b51c9cb96 Merge "Make SystemService constructor take a Context." into klp-modular-dev 2014-02-11 04:12:02 +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
Craig Mautner
2d6b55aaa9 am 312ba86b: Change task removal sequence
* commit '312ba86b476fa1d83864a7d465135cc9a4e94ad8':
  Change task removal sequence
2014-02-11 02:20:15 +00:00
Craig Mautner
312ba86b47 Change task removal sequence
- Remove task after removing activity. Removing the task before
removing the activity led to problems when the task was still needed.

- In WindowManager wait for activity manager to remove the task.
Previously was automatically removing the task when the last activity
was removed.

Fixes bug 12957434.

Change-Id: I7f6b1f09a2e2a845f177f337769075c9376f8bdb
2014-02-10 17:55:01 -08:00
Rickard Helldin
5fb5df0013 Fix, MountService now only sends one onShutDownComplete
The event onShutDownComplete are sent only when all
volumes are shutdown. (Not one for every volume.)

Change-Id: I6af521ee8285ca581efac7d3c5f013dfbff3ee30
2014-02-10 23:21:25 +09:00
Craig Mautner
779d204abe am 9ef471f7: Don\'t remove Activities and Tasks until animation done
* commit '9ef471f7f2f59de032d7cb9c3c7241486109979e':
  Don't remove Activities and Tasks until animation done
2014-02-07 23:37:53 +00:00
Christopher Tate
88daefd407 am 379bb6ed: am ff27e6bc: Merge "Use canonical path for /vendor/app"
* commit '379bb6ed4ea4de035569b04018f84d7ce95a8036':
  Use canonical path for /vendor/app
2014-02-07 23:37:03 +00:00
Christopher Tate
ff27e6bc44 Merge "Use canonical path for /vendor/app" 2014-02-07 23:30:24 +00:00
Craig Mautner
9ef471f7f2 Don't remove Activities and Tasks until animation done
Just like stacks and displays, activities and tasks need to stick
around until animations have completed.

Change-Id: I54fe8f6855d60cbc3a25cbc6e762defd5ac50bf5
2014-02-07 13:11:47 -08:00
Ashok Bhat
0d552f7d8b Use long to store pointers in ConsumerIrService
Change-Id: I4e6562b7dc09f87ad80b1e862b614a370d37feb5
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
2014-02-07 18:12:23 +00:00
Dan Sandler
9e07c1c4f3 am 6b1f3acd: am 6ea720ba: Merge "Make sure to turn off led after pulse()"
* commit '6b1f3acdf0f0806c0b3826d1c4ea43bd6cc6f021':
  Make sure to turn off led after pulse()
2014-02-07 16:05:31 +00:00
Dan Sandler
6ea720bacb Merge "Make sure to turn off led after pulse()" 2014-02-07 15:59:08 +00:00
Craig Mautner
43ef013cbd am 38f7dcd7: DO NOT MERGE. Test for Configuration differences before changing.
* commit '38f7dcd7dcb5d98d86f19f3c4725aea89f9792ff':
  DO NOT MERGE. Test for Configuration differences before changing.
2014-02-06 20:29:49 +00:00
Craig Mautner
38f7dcd7dc DO NOT MERGE. Test for Configuration differences before changing.
Changing Configuration first and then testing for changes yields a
result indicating no change.

Fixes bug 12904769.

Change-Id: If7e39e843f15b1143d9877497d595511afabd020
2014-02-06 12:27:20 -08:00
Adam Lesinski
a5a93f559d am 7f416631: Merge "Check feature bits before loading optional services" into klp-modular-dev
* commit '7f416631413e75a1756bd316a2e1906725d72f24':
  Check feature bits before loading optional services
2014-02-06 20:16:30 +00:00
Adam Lesinski
7f41663141 Merge "Check feature bits before loading optional services" into klp-modular-dev 2014-02-06 20:13:21 +00:00
Craig Mautner
14d74b8236 am 1bf2b873: Defer detach until animations are complete.
* commit '1bf2b873470d2ba8a4ac218da73516cc2b20aa76':
  Defer detach until animations are complete.
2014-02-06 01:00:35 +00:00
Craig Mautner
481b54be1a am dc548483: Move activities from DisplayContent to TaskStack
* commit 'dc548483ae90ba26ad9e2e2cb79f4673140edb49':
  Move activities from DisplayContent to TaskStack
2014-02-06 01:00:32 +00:00
Craig Mautner
1bf2b87347 Defer detach until animations are complete.
Allowing the detach of ActivityStack from DisplayContent to happen
immediately was causing all sorts of problems associated with not
having a Display to complete the animations.

Waiting for animations to complete before either the detach or the
display removal fixes those problems.

Change-Id: I8a5663bfac5c3c1084ff4fcc451e0e38e8080265
2014-02-05 15:37:40 -08:00
Craig Mautner
dc548483ae Move activities from DisplayContent to TaskStack
Now that activities and tasks can be detached from a display do not
keep their state within the DisplayContent class. All such state is
now moved to the TaskStack class with this change.

Change-Id: Ie6b1811e9ec3f545782bad8c3461bd4f2d336b93
2014-02-05 13:35:24 -08:00
Adam Lesinski
898c13df7b Check feature bits before loading optional services
At startup, we check with PackageManager whether a system service is
available before attempting to load it. A system service is available
if its associated feature (similar to hardware features) is present.
This does not remove unavailable services from the compiled jar.

Change-Id: I13571805083aa4e65519a74acb52efd17b9fb3d7
2014-02-05 19:26:40 +00:00
Craig Mautner
323601475e am df88d730: Add IIntentSender to ActivityContainer.startActivity
* commit 'df88d73092c62a1a3cd2b2056ca63ae2e70cc238':
  Add IIntentSender to ActivityContainer.startActivity
2014-02-04 23:38:28 +00:00
Craig Mautner
df88d73092 Add IIntentSender to ActivityContainer.startActivity
PendingIntents and IntentSenders can now be launched. Still does not
work once the host activity has been paused and resumed.

Window manager TaskStacks now exist independently of Displays and app
windows persist after Displays are removed below them. Attaching the
stack to a new Display does not yet restore the windows to it.

Fixes bug 12747909.

Change-Id: I509007ee23fda400b353f483cf6ecce08177763b
2014-02-04 15:10:13 -08:00
Mårten Kongstad
48d22323ce Runtime resource overlay, iteration 2
Support any number of overlay packages. Support any target package.

UPDATED PACKAGE MATCHING
------------------------
In Runtime resource overlay, iteration 1, only a single overlay package
was considered. Package matching was based on file paths:
/vendor/overlay/system/framework-res.apk corresponded to
/system/framework-res.apk. Introduce a more flexible matching scheme
where any package is an overlay package if its manifest includes

    <overlay targetPackage="com.target.package"/>

For security reasons, an overlay package must fulfill certain criteria
to take effect: see below.

THE IDMAP TOOL AND IDMAP FILES
------------------------------
Idmap files are created by the 'idmap' binary; idmap files must be
present when loading packages. For the Android system, Zygote calls
'idmap' as part of the resource pre-loading. For application packages,
'idmap' is invoked via 'installd' during package installation (similar
to 'dexopt').

UPDATED FLOW
------------
The following is an outline of the start-up sequences for the Android
system and Android apps. Steps marked with '+' are introduced by this
commit.

Zygote initialization
   Initial AssetManager object created
+    idmap --scan creates idmaps for overlays targeting 'android', \
           stores list of overlays in /data/resource-cache/overlays.list
   AssetManager caches framework-res.apk
+  AssetManager caches overlay packages listed in overlays.list

Android boot
   New AssetManager's ResTable acquired
     AssetManager re-uses cached framework-res.apk
+    AssetManager re-uses cached 'android' overlays (if any)

App boot
   ActivityThread prepares AssetManager to load app.apk
+  ActivityThread prepares AssetManager to load app overlays (if any)
   New AssetManager's ResTable acquired as per Android boot

SECURITY
--------
Overlay packages are required to be pre-loaded (in /vendor/overlay).
These packages are trusted by definition. A future iteration of runtime
resource overlay may add support for downloaded overlays, which would
likely require target and overlay signatures match for the overlay to
be trusted.

LOOKUP PRIORITY
---------------
During resource lookup, packages are sequentially queried to provide a
best match, given the constraints of the current configuration. If any
package provide a better match than what has been found so far, it
replaces the previous match. The target package is always queried last.

When loading a package with more than one overlay, the order in which
the overlays are added become significant if several packages overlay
the same resource.

Had downloaded overlays been supported, the install time could have been
used to determine the load order. Regardless, for pre-installed
overlays, the install time is randomly determined by the order in which
the Package Manager locates the packages during initial boot. To support
a well-defined order, pre-installed overlay packages are expected to
define an additional 'priority' attribute in their <overlay> tags:

    <overlay targetPackage="com.target.package" priority="1234"/>

Pre-installed overlays are loaded in order of their priority attributes,
sorted in ascending order.

Assigning the same priority to several overlays targeting the same base
package leads to undefined behaviour. It is the responsibility of the
vendor to avoid this.

The following example shows the ResTable and PackageGroups after loading
an application and two overlays. The resource lookup framework will
query the packages in the order C, B, A.

        +------+------+-     -+------+------+
        | 0x01 |      |  ...  |      | 0x7f |
        +------+------+-     -+------+------+
            |                           |
        "android"                Target package A
                                        |
                       Pre-installed overlay B (priority 1)
                                        |
                       Pre-installed overlay C (priority 2)

Change-Id: If49c963149369b1957f7d2303b3dd27f669ed24e
2014-02-03 11:20:30 +01: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
Hui Lu
3cab7fc1b8 Merge "Add proxy as another network." into klp-modular-dev 2014-01-30 22:58:48 +00:00
Hui Lu
1c5624a012 Add proxy as another network.
Change-Id: I70cb6ac5604c4f0d6a752a291c40de2445ae98bb
2014-01-30 17:26:18 -05: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
Johan Redestig
41a17c2e72 Use canonical path for /vendor/app
It wasn't possible to start apps installed in /vendor/app
on a device where /vendor was a symbolic link to /system/vendor.
This is currently the default configuration for android (see
init.rc)

During installation a dex file is created at:
/data/dalvik-cache/vendor@app@blah.blah.apk@classes.dex

But dalvik would fail to start this app with the following error:
I/dalvikvm( 3453): Unable to open or create cache for /system/vendor/app/blah.apk \
(/data/dalvik-cache/system@vendor@app@blah.blah.apk@classes.dex)

Note that dalvik were trying to start /system/vendor/app while the
app was installed in /vendor. There was a conflict between the
package manager and dalvik on how to interpret paths. This change
makes the package manager consistent with dalvik.

Change-Id: I1c7e3c3ae45f97dd742cbf06f7965a7405c821a7
2014-01-30 09:45:23 +01:00