1173 Commits

Author SHA1 Message Date
Craig Mautner
4c6b3b1f2b Fix wrong synch object.
Fixes bug 8528754.

Change-Id: Idb09805b00c13b93ba1c6c65d86be9b76a7dd235
2013-04-02 13:19:12 -07:00
Kenny Root
232b4d60a6 resolved conflicts for merge of c16da6aa to master
Change-Id: Ibaaf2995def15573609562162902b3d73dd78ec0
2013-04-02 10:57:10 -07:00
Craig Mautner
e79d4268c0 Yet more movement from ActivityStack to Supervisor
- Remove redundant synchronize in ActivityStack.activityIdleInternal().
- Move startSpecificActivityLocked from ActivityStack to Supervisor.
- Move handleAppDiedLocked from Supervisor to ActivityStack.

Change-Id: Id746ab3bdff861b61182282bea1deb8fcf284084
2013-04-01 19:01:53 -07:00
Craig Mautner
2420ead032 More movement from ActivityStack to Supervisor
- Move showAskCompatModeDialogLocked from ActivityStack to
ActivityManagerService.
- Keep track of userId in ActivityStackSupervisor and initialize
new ActivityStacks with it.
- Move realStartActivityLocked to ActivityStackSupervisor except
for the part that actually updates the ActivityStack.

Change-Id: I7467302f1249fee2ea3cf027a49e0894c9a2213d
2013-04-01 17:31:37 -07:00
Craig Mautner
b0f7dc7588 Move performClearTaskLocked into TaskRecord.
Make TaskRecord responsible for clearing itself.

Change-Id: I03fa50aaec108ab7f071412785da59ad58243d87
2013-04-01 16:34:45 -07:00
Craig Mautner
23ac33bb85 Migrate activity starts into ActivityStackSupervisor.
Individual ActivityStacks should not be the place where stack
decisions are made.

Change-Id: If9c7a10e1127618c3ae008a0fea6e5943f776be4
2013-04-01 16:27:10 -07:00
Craig Mautner
20e7227454 Remove mFocusedStack from ActivityManagerService.
Use ActivityStackSupervisor.mMainStack in its place. Or, in cases
where multiple stacks must replace mFocusedStack, create new
methods in ActivityStackSupervisor that will replace it.

Change-Id: Ib0dda51e1043a6d5110e5a2914d695ef16bf9371
2013-04-01 13:57:18 -07:00
Christopher Tate
58d380d2af debuggerd now notifies the Activity Manager about native crashes
The Activity Manager sets up a permission-guarded domain socket, which
debuggerd connects to when a crash happens.  If this is successful,
the daemon then mirrors the logged crash report to that socket, then
closes it.

The Activity Manager parses the native crash dump supplied by debuggerd
and forwards it to the standard app-crashed code.  The UX result is
that users now see the normal "app has stopped unexpectedly" dialog
with "report" and "okay" options for native crashes, not just for
DVM-mediated crashes.

Bug 8322568

Change-Id: Ie1b279896c603bd74d82d6cfcfd66a8f231da134
2013-04-01 13:50:23 -07:00
Craig Mautner
e11f2b774b Minor refactors
- Eliminate unused mLooper.
- Rename isSleeping to isSleepingOrShuttingDown.
- Fix dump formats.

Change-Id: I4cfc99605ac34213bf9b705562f2c701810434fd
2013-04-01 13:06:11 -07:00
Craig Mautner
5496140428 Merge "Move mStacks to ActivityStackSupervisor" 2013-04-01 16:11:05 +00:00
Ben Cheng
1e2cd5b84c am 6a1033e3: am 3eba5ad1: Merge "Crank up the mOomMinFreeHigh values by 50%." into jb-mr2-dev
* commit '6a1033e3e0972caaf10e1efb00b240238959a3c9':
  Crank up the mOomMinFreeHigh values by 50%.
2013-03-28 13:06:06 -07:00
Craig Mautner
8d341efad0 Move mStacks to ActivityStackSupervisor
Lift all ActivityStack behaviors from ActivityManagerService.

Change-Id: I356f1c22fe31f0442ff5e363f62fe99b7bfd6153
2013-03-28 11:30:01 -07:00
Ben Cheng
b5cda42c57 Crank up the mOomMinFreeHigh values by 50%.
Devices with 1GB of RAM can benefit from more aggressive OOM killer.

BUG: 7972252
Change-Id: Id2b80c14a3cff195c17ef0d14c80b92394649d98
2013-03-27 17:36:13 -07:00
Dianne Hackborn
1a95a42c89 am 177543db: am 3bcc2fba: Merge "Fix issue #8470131: Process thrash kills battery" into jb-mr2-dev
* commit '177543db55f88f060d9a43df79afd6733cd565da':
  Fix issue #8470131: Process thrash kills battery
2013-03-26 17:28:19 -07:00
Dianne Hackborn
3bcc2fbaad Merge "Fix issue #8470131: Process thrash kills battery" into jb-mr2-dev 2013-03-27 00:24:04 +00:00
Craig Mautner
2219a1ba3d Modify primary ActivityStack accessing.
- Move mHomeStack to ActivityStackSupervisor.
- Move mMainStack to ActivityStackSupervisor.

Change-Id: I43522c9505f066b379ea172dd63663e78a0feece
2013-03-26 07:50:40 -07:00
Geremy Condra
98157242e2 am d6c1394d: am 51163e3b: Merge "Add seinfo parsing to PackageManagerService." into jb-mr2-dev
* commit 'd6c1394dd0046944e66d391ff0e099fb5ac57751':
  Add seinfo parsing to PackageManagerService.
2013-03-26 01:47:03 +00:00
Dianne Hackborn
a40cfeb55f Fix issue #8470131: Process thrash kills battery
Protect app widget broadcasts from abuse.

In this case the app was sending an APPWIDGET_UPDATE broadcast
without specifying a target, which (a) should not be allowed (you
should not be able to send updates to other apps), and (b) resulted
in every single potential app widget in the system being launched...
which was about 75 of them.

Change-Id: I9d48733610ce6d5a7c32e69a3e06b9f33bd79a34
2013-03-25 17:49:36 -07:00
Robert Craig
0f40dc923c Add seinfo parsing to PackageManagerService.
This patch set allows the PMS to parse the
mac_permissions.xml file which contains the
seinfo values. Each package that is installed
on the device will be assigned an seinfo value
based on policy. This seinfo value will help label
the app process and data directory.  Modifications
include adjustments to ApplicationInfo.java
to store the seinfo tag per package as well as
adjustments to installd to communicate the seinfo
tag to libselinux.

Change-Id: I61ad1ea12fb6a9a6d0b108ec163bc4bf4c954b58
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
2013-03-25 17:30:08 -07:00
Craig Mautner
00af9fe6ae Modify StackBox and TaskStack methods.
Also add dump() throughout.

Change-Id: I5369d2e71262645d9b1015bd4e72fad395cc7547
2013-03-25 09:13:41 -07:00
Craig Mautner
270843072c Introduce ActivityStackSupervisor.
- New coordinating class to juggle multiple ActivityStacks.
- First job: take singleton Keyguard dismiss behavior out of
ActivityStack.

Change-Id: I68e4b44411d3ec9401e86ac23703d6540dcb12e8
2013-03-25 08:06:16 -07:00
Dianne Hackborn
cf6e3d12a0 am 2cbf5fe4: am c3ab03a9: Merge "Fix issue #8436951 JB-MR2: Compatibility: Audible, Pandora, ..." into jb-mr2-dev
* commit '2cbf5fe4b81f2d79e27ffaa676f37f8dd6687aa8':
  Fix issue #8436951 JB-MR2: Compatibility: Audible, Pandora, ...
2013-03-21 22:03:01 +00:00
Dianne Hackborn
2ced96c544 Fix issue #8436951 JB-MR2: Compatibility: Audible, Pandora, ...
...Tune-In does not work since JWQ77

Instead of crashing the app for it being bad, just go ahead and
show a notification for it anyway that we make up.

You get what you deserve. :p

Change-Id: I92e32b9ff8835dabde63f8e08e991f72de0d0a92
2013-03-21 14:23:46 -07:00
Craig Mautner
82a09210b6 Merge "Complete removal of Task from DisplayContent." 2013-03-18 19:41:45 +00:00
Craig Mautner
e3a30a0305 Merge "Start moving Tasks from DisplayContent to TaskStack" 2013-03-18 19:20:22 +00:00
Craig Mautner
d9a22881fd Complete removal of Task from DisplayContent.
Moved Tasks into TaskStacks.

Change-Id: I3478dab4eab3a68d4d71a7a5bb2e65ba2394f2d7
2013-03-17 16:19:21 -07:00
Dianne Hackborn
d45bc55fe1 am 6acbd7c6: am bb131f52: Merge "Fix issue #8401553: It\'s possible to startForeground()..." into jb-mr2-dev
* commit '6acbd7c60a53154af3eb43e7219995c653e5fea4':
  Fix issue #8401553: It's possible to startForeground()...
2013-03-17 16:27:59 +00:00
Craig Mautner
c00204b4d1 Start moving Tasks from DisplayContent to TaskStack
- Create new classes for Stacks on WindowManager.
- Stop using DisplayContent methods and members:
    addAppToken(),
    removeAppToken(),
    setAppTaskId(),
    removeTask(),
    mTaskIdToDisplayContents,
    mTaskIdToTask.
- Start using WindowManagerService.createTask().
- Establish hierarchy of references: AppWindowToken=>Task=>
TaskStack=>StackBox=>DisplayContent.
- Clean up StackBox, TaskStack, and Task.

Change-Id: I798990aa7966784d22f4a43822087d8bb0404dd6
2013-03-15 22:44:29 -07:00
Dianne Hackborn
282add7bc3 Fix issue #8401553: It's possible to startForeground()...
...with no visible Notification

Don't allow a 0 icon resource.

Change-Id: I52e93533e6c45c6027ff3c185060cd54d087d077
2013-03-15 18:48:04 -07:00
Craig Mautner
64f2b1738a Add ActivityStack to PendingActivityLaunch
The task used by doPendingActivityLaunches is not known at the
time that the PendingActivityLaunch is created. Leading to an NPE.
Adding the ActivityStack to the PAL fixes this.

Fixes bug 8351149.

Change-Id: I64539b8f2e608128ef9d795c0739ef1de7a246d0
2013-03-11 11:40:31 -07:00
Christopher Tate
1ccdf0ee16 am 0de66314: am 6916c6ee: Merge "Do not hang in pm clear on an invalid package name" into jb-mr2-dev
* commit '0de6631450fedca4071513d90cfaa5eec4c57d6c':
  Do not hang in pm clear on an invalid package name
2013-03-08 02:08:50 +00:00
Christopher Tate
a83cab0001 Do not hang in pm clear on an invalid package name
The Activity Manager was not properly informing the observer that
the operation had concluded (unsuccessfully).

Bug 8222595

Change-Id: I8234e32d8edf4112c8c7a5e20e341d0b41e23014
2013-03-07 17:50:11 -08:00
Craig Mautner
d2328958de Prepare ActivityManagerService for multiple stacks.
- Replace mMainStack with mFocusedStack and mStacks.
- Remove stack from ActivityRecord.
- Add stack to TaskRecord.

Change-Id: I22e9ba34b12c2bd90806b14aafe063d5a2fe66ae
2013-03-06 13:57:26 -08:00
Craig Mautner
5854780df9 Remove all vestiges of mHistory.
Change-Id: I3e9140bcf57f2437d7611419477c410d487f29c1
2013-03-05 08:23:53 -08:00
Craig Mautner
778787728d Fix activity to task bugs
- Fix bug when task has been removed from mTaskHistory by
adding it back in at the top.
- Fix reparenting bug introduced by refactor of
resetTaskIfNeededLocked.

Change-Id: I93df2e62c6aed805fe888847dcf96a1fe0d7be26
2013-03-04 21:32:05 -08:00
Craig Mautner
70a86933b8 Convert mHistory to mTaskHistory (9)
- Convert startActivityLocked from mHistory to mTaskHistory.
- Fix NPE bug in resetTaskIfNeededLocked.

Change-Id: I1598446199634bb455bc06377248fe940d5cb9d4
2013-03-04 17:26:35 -08:00
Craig Mautner
a729a34ae6 Merge "Convert mHistory to mTaskHistory (8)" 2013-03-04 19:28:57 +00:00
Craig Mautner
a0dbf0ec01 Merge "Convert mHistory to mTaskHistory (7)" 2013-03-04 19:24:34 +00:00
Michael Wright
7ca095f095 am 32440aa2: Merge "Unify inputDispatchingTimedOut with keyDispatchingTimedOut" into jb-mr2-dev
* commit '32440aa25d958c8b82e7c17f784defc0a5860c0a':
  Unify inputDispatchingTimedOut with keyDispatchingTimedOut
2013-03-01 22:25:50 +00:00
Michael Wright
32440aa25d Merge "Unify inputDispatchingTimedOut with keyDispatchingTimedOut" into jb-mr2-dev 2013-03-01 22:20:46 +00:00
Michael Wright
7dd5bb18d4 Unify inputDispatchingTimedOut with keyDispatchingTimedOut
Bug: 8194916
Change-Id: Iac40108d848bcca77f49a7a49c57a095b3dbe9c9
2013-03-01 14:14:35 -08:00
Craig Mautner
aab647ed57 Convert mHistory to mTaskHistory (8)
- Convert findTaskToMoveToFrontLocked from mHistory to mTaskHistory.
- Convert getTasksLocked from mHistory to mTaskHistory.
- Convert unhandledBackLock from mHistory to mTaskHistory.
- Convert dumpActivitiesLocked from mHistory to mTaskHistory.
- Convert getDumpActivitiesLocked from mHistory to mTaskHistory.
- Convert restartPackage from mHistory to mTaskHistory.

Change-Id: Ica654a964e91f6c6dae92e7fe326bc08b5ad36ac
2013-02-28 17:45:07 -08:00
Craig Mautner
0247fc80c1 Convert mHistory to mTaskHistory (7)
- Remove TaskRecord from mTaskHistory and mTaskIdToTaskRecord when
last ActivityRecord is removed from it.
- Convert finishActivityLocked from mHistory to mTaskHistory.
- Convert navigateUpToLocked from mHistory to mTaskHistory.
- Convert removeHistoryRecordsForAppLocked from mHistory to
mTaskHistory.
- Convert moveHomeToFrontLocked from mHistory to mTaskHistory.

Change-Id: Ic632a8213f48dda1126c5e6853325a298b54f25f
2013-02-28 16:32:23 -08:00
Craig Mautner
9658b31509 Convert mHistory to mTaskHistory (6)
- Convert isInStackLocked from mHistory to mTaskHistory.
- Fix discrepancy between mHistory and mTaskHistory when all
activities in a task are finishing and a new one is being added.
mHistory was separating the task into two places in the stack,
mTaskHistory can't do that.
- Convert startActivityUncheckedLocked from mHistory to mTaskHistory.
- Convert finishTopRunningActivityLocked from mHistory to mTaskHistory.

Change-Id: I42b097c2f187d40ecd98b108794757063903218b
2013-02-28 12:32:11 -08:00
Craig Mautner
c458b7f8d3 Merge "Convert mHistory to mTaskHistory (5)" 2013-02-28 20:20:26 +00:00
Craig Mautner
1603077067 Convert mHistory to mTaskHistory (5)
- Remove commented out resetTaskIfNeededLocked.
- Remove mHistory from performClearTaskLocked(int, ActivityRecord).
- Remove mHistory from performClearTaskAtIndexLocked.
- Remove mHistory from performClearTaskLocked(int).
- Remove mHistory from getTaskAccessInfoLocked.

Change-Id: I3616147f9e9befa297f244dc4fd5d7b1e97300b3
2013-02-26 16:05:47 -08:00
Craig Mautner
5e7accf3cf Merge "Convert mHistory to mTaskHistory (4)" 2013-02-27 00:04:51 +00:00
Craig Mautner
000f002891 Convert mHistory to mTaskHistory (4)
- Remove mHistory from getTaskForActivityLocked.
- Remove mHistory from findTaskLocked.
- Remove mHistory from findActivityLocked.
- Minimize mHistory usage in switchUserLocked.
- Remove mHistory from resumeTopActivityLocked.
- Remove mHistory from validateAppTokensLocked.

Change-Id: I0cc7cf2f1b5a66a1e3b3a9baff7712a3f2f0d5c4
2013-02-26 15:04:29 -08:00
Craig Mautner
fd56e1d743 Merge "Convert mHistory to mTaskHistory (3)" 2013-02-26 22:23:10 +00:00
Michael Wright
9990e67b8c am 173bb615: Merge "Move stack dump off of InputDispatcher thread" into jb-mr2-dev
* commit '173bb61544fb41a10398606766f2bdf079ee02fc':
  Move stack dump off of InputDispatcher thread
2013-02-26 22:21:38 +00:00