15730 Commits

Author SHA1 Message Date
Craig Mautner
7426684948 Restore parameter lost in merge.
Fixes build.

Change-Id: I40489334ca5dc10d0041b78a82535c41e13def11
2013-12-19 13:02:30 -08:00
Craig Mautner
ff288f7f57 resolved conflicts for merge of b7bba718 to master
Change-Id: Ibbac3f6e3eda0149ae9446d6baed1d1bee5138ac
2013-12-19 10:55:17 -08:00
Craig Mautner
ed6649f89f 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-19 10:51:23 -08:00
Craig Mautner
b7bba718a8 Merge "Pair ActivityStacks with Displays" into klp-modular-dev 2013-12-19 18:29:50 +00:00
Craig Mautner
8a4c62e3fa am b905a37c: am 46f618a7: am a8dfd5d8: am 4dcf1af3: am cccf2a33: Merge "Keydispatching timeout while finish Activity"
* commit 'b905a37c7a18e8ad98497dea5ab7bd016e3c995d':
  Keydispatching timeout while finish Activity
2013-12-19 18:03:58 +00:00
Craig Mautner
b905a37c7a am 46f618a7: am a8dfd5d8: am 4dcf1af3: am cccf2a33: Merge "Keydispatching timeout while finish Activity"
* commit '46f618a7d9dde8e668666e0c582d88ddfea759d9':
  Keydispatching timeout while finish Activity
2013-12-19 18:00:40 +00: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
Svetoslav
48df8b8528 Merge "Removed print services not fully cleaned up." 2013-12-19 01:36:36 +00:00
Svetoslav
dbcc95d4d8 Removed print services not fully cleaned up.
1. When a print services is removed it is removed from the
   installed and enabled services but not from the active
   ones while it should.

2. If a package has more than one print service (very rare
   but possible) we are executing the "make everything right"
   code for each of them which is not very optimal.

Change-Id: I7f6fc4eef10b6757d3b2ede33eb298c3399c3ff7
2013-12-18 17:35:43 -08:00
Craig Mautner
a909969386 am 525680d2: Merge "Fix loop limits." into klp-modular-dev
* commit '525680d2bff686ecbddeb84f7f493f8bb31e670d':
  Fix loop limits.
2013-12-19 00:47:34 +00:00
Craig Mautner
704e40b8ba Fix loop limits.
Fixes bug 12207606.

Change-Id: I9b450d2bc2a72a1f6581147f8930188f34c85299
2013-12-18 16:43:51 -08:00
Craig Mautner
4a1cb22056 Pair ActivityStacks with Displays
- Introduce concept of ActivityStacks residing on Displays and able
to be decoupled and moved around.
- Add a new interface, IActivityContainer for clients to handle
ActivityStacks.
- Abandon ordering of stacks based on mStackState and instead use
ActivityDisplayInfo.stacks<ActivityStack> ordering.

Progress towards closing bug 12078972.

Change-Id: I7785b61c26dc17f432a4803eebee07c7415fcc1f
2013-12-18 15:08:15 -08:00
David Christie
b084fef18e Clear cached locations when location providers disabled
Bug: 12118307

Change-Id: I0fa509791281038b8546d0648f4e17091ccf9c80
2013-12-18 14:35:06 -08:00
Narayan Kamath
65048bdce7 Remove data dirs if a new install fails dexopt.
We'd otherwise leave the data dirs & native libraries
lying around. This will leave the app permanently broken
because the next install of the app will fail with
INSTALL_FAILED_UID_CHANGED.

Also remove an unnecessary instance variable.

Change-Id: I50e08623f646a89bc166bded6a43e17c17930e58
2013-12-18 14:27:36 +00:00
Greg Hackmann
10df052c6a am f1bdbdd1: resolved conflicts for merge of 08579921 to klp-modular-dev
* commit 'f1bdbdd1bea9662f6731b7a366de1f602f43e5a9':
  Add timerfd backend to AlarmManagerService
2013-12-17 20:09:09 +00:00
Greg Hackmann
f1bdbdd1be resolved conflicts for merge of 08579921 to klp-modular-dev
Change-Id: I08e9f9a2d2185ccf0c41a87c8527ea7e02ac3117
2013-12-17 11:56:22 -08:00
Greg Hackmann
2f735d8dc8 am 552eba80: am 153ec6ca: am 3545433d: am 9f4e67c5: Merge "Clean up native AlarmManagerService tabs/spaces and unused parameter warnings"
* commit '552eba80ef8f48204e77129dd99581d8f0ac3831':
  Clean up native AlarmManagerService tabs/spaces and unused parameter warnings
2013-12-17 18:24:40 +00:00
Greg Hackmann
552eba80ef am 153ec6ca: am 3545433d: am 9f4e67c5: Merge "Clean up native AlarmManagerService tabs/spaces and unused parameter warnings"
* commit '153ec6cae7db2053c71541af8973244f0dbf6d4a':
  Clean up native AlarmManagerService tabs/spaces and unused parameter warnings
2013-12-17 18:22:24 +00: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
3cf234a639 am 4e09cb9b: am 38bcf6dc: am 422d7003: am f431daa2: Merge "Fix to NullPointerException on move back in ActivityStack."
* commit '4e09cb9bf6165f68b42549772b74596ceb6198fe':
  Fix to NullPointerException on move back in ActivityStack.
2013-12-17 16:51:58 +00:00
Craig Mautner
4e09cb9bf6 am 38bcf6dc: am 422d7003: am f431daa2: Merge "Fix to NullPointerException on move back in ActivityStack."
* commit '38bcf6dc8784625eb4b68634450c578719346669':
  Fix to NullPointerException on move back in ActivityStack.
2013-12-17 16:48:46 +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
Craig Mautner
3b475fefa3 Fix incorrect setting of TaskRecord.frontOfTask DO NOT MERGE
When Intent.FLAG_ACTIVITY_REORDER_TO_FRONT was set the TaskRecord
member frontOfTask was being set true incorrectly for the top
activity. It should only be true for the bottom activity. This fix
ensures that frontOfTask is always set correctly for all activities by
consoldating it into one method.

Fixes bug 12171535.

Change-Id: If982dad3c81b2b816adc5d89e7e0496923098a70
2013-12-16 16:56:19 -08: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
Craig Mautner
1aa9d0d3f6 Fix incorrect setting of TaskRecord.frontOfTask
When Intent.FLAG_ACTIVITY_REORDER_TO_FRONT was set the TaskRecord
member frontOfTask was being set true incorrectly for the top
activity. It should only be true for the bottom activity. This fix
ensures that frontOfTask is always set correctly for all activities by
consoldating it into one method.

Fixes bug 12171535.

Change-Id: If982dad3c81b2b816adc5d89e7e0496923098a70
2013-12-16 16:06:30 -08:00
Alan Viverette
ee17f0b557 Merge "Refactor display adjustments into their own utils class" 2013-12-16 23:49:35 +00:00
Alan Viverette
f242659afc Refactor display adjustments into their own utils class
Change-Id: Iddc413d7841d44b00e06ed1c5a02d54eb60858df
2013-12-16 13:45:39 -08:00
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
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
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