6520 Commits

Author SHA1 Message Date
Michael Wright
99e2308884 am 150e0e87: Merge "fix return value scale of notifyANR()"
* commit '150e0e87e1faa01f927cfe8c7110ef843612a1df':
  fix return value scale of notifyANR()
2015-04-15 11:10:58 +00:00
baik.han
def340d45e fix return value scale of notifyANR()
fix return value scale of notifyANR()
from milliseconds to nanoseconds when windowState is not null
This prevent unintended frequent method calls of notifyANR()
in a very short time.

Change-Id: Icc1f363b3ed3538821a42c080809567473bfb833
Signed-off-by: Baik Han <baik.han@lge.com>
2015-04-15 10:21:05 +09:00
Olawale Ogunwale
6159f6eb23 am 4406568e: Merge "Check caller status precisely when registering receiver."
* commit '4406568ebac6f6bbf627aeb6909b409d948cecf4':
  Check caller status precisely when registering receiver.
2015-04-10 20:37:00 +00:00
Olawale Ogunwale
4406568eba Merge "Check caller status precisely when registering receiver." 2015-04-10 20:14:54 +00:00
Nick Kralevich
a55ec9c2ab am 08d76a94: Merge "Impose an ordering on created SELinuxMMAC Policy objects."
* commit '08d76a946b898af28f3c8125cdf4966195b718fb':
  Impose an ordering on created SELinuxMMAC Policy objects.
2015-04-10 16:31:23 +00:00
Nick Kralevich
08d76a946b Merge "Impose an ordering on created SELinuxMMAC Policy objects." 2015-04-10 16:10:27 +00:00
riddle_hsu
b15506f95e Check caller status precisely when registering receiver.
Fine tune commit 9ac9609f.
Because process may reuse same process record to restart.
It is better to check below conditions to skip:
1. Simple dead and has been cleaned.
 => .thread will be null
2.The process has restarted with new pid but has not attached yet.
 => .thread will be null
3.The process has restarted and attached.
 => The IBinder will be different

Change-Id: Ic052f5025558ca93e1a6ab11bca61fe995126bb9
2015-04-10 15:41:19 +00:00
Robert Craig
4caa6b1efb Impose an ordering on created SELinuxMMAC Policy objects.
Imposing an order on Policy objects allows us to extend the
policy writers ability to union mac_permissions.xml files.
Policy developers can now create new mac_permissions.xml
entries under their device specific directories. This is
in contrast to current methods which only allow differing
stanzas to appear outside the base mac_permissions.xml.

Also, report on stanzas with duplicate input selectors and
treat these as errors. There are some ambiguities that can
arise otherwise.

Lastly, impose an XOR condition on signer stanzas w.r.t seinfo
and package tags. This finer distinction helps the union feature
of policy to become clearer and simpler to code.

Change-Id: Idd86df8ad9a63d1b8ba6e8270670814ca6cee8d2
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
2015-04-10 11:14:37 -04:00
Mathieu Chartier
56a6d371bd am da164973: Merge "Add dalvik subitems for -d in dumpsys meminfo "Total PSS by category""
* commit 'da164973f35aa32e44d0b9336deef28df5b13544':
  Add dalvik subitems for -d in dumpsys meminfo "Total PSS by category"
2015-04-09 23:36:06 +00:00
Mathieu Chartier
537691fc2d Add dalvik subitems for -d in dumpsys meminfo "Total PSS by category"
Example output of "adb shell dumpsys meminfo -d":

Total PSS by category:
   193605 kB: Dalvik
               87561 kB: .Heap
               77863 kB: .LOS
               15333 kB: .Zygote
               12848 kB: .NonMoving
                6770 kB: .GC
                2597 kB: .LinearAlloc
                1180 kB: .JITCache
                1180 kB: .IndirectRef
   103936 kB: EGL mtrack
   101827 kB: Native

Bug: 17643507

(cherry picked from commit 546edc5a31bb5a843048e11d8afb0b1f6441ddb4)

Change-Id: If34627cf93ba5305b428d2278f350a2649d63d5e
2015-04-09 15:53:17 -07:00
Jeff Sharkey
e000118549 am 1d3c77a2: Merge "Start passing volume UUID to installd."
* commit '1d3c77a21e9c8fc59200b42503d9f0effd3f1551':
  Start passing volume UUID to installd.
2015-04-09 21:57:41 +00:00
Jeff Sharkey
1d3c77a21e Merge "Start passing volume UUID to installd." 2015-04-09 21:41:12 +00:00
Jeff Sharkey
790a4ecac7 Start passing volume UUID to installd.
This change adds new method overloads to provide volume UUID.  The
older methods remain for now, and pass through the "null" UUID to
reference internal storage.

Follows the existing pattern where null arguments are passed as "!".

Bug: 19993667
Change-Id: Ia1b7c8550cabc13e4f6e1182eabb650f2c33e44f
2015-04-09 14:19:07 -07:00
Richard Uhler
7f7571308d am f324d245: Merge "Reuse dexopt method for both dex2oat and patchoat."
* commit 'f324d245fdd07ac14ab312d1a5fa04a4e8dfcceb':
  Reuse dexopt method for both dex2oat and patchoat.
2015-04-09 14:31:10 +00:00
Richard Uhler
f324d245fd Merge "Reuse dexopt method for both dex2oat and patchoat." 2015-04-09 14:13:29 +00:00
Olawale Ogunwale
343e291b67 am e8a3c320: Merge "Prevent windows from freezing screen while timeout"
* commit 'e8a3c320e658f6c7f8d1db3d8ad3c3f189c0f54e':
  Prevent windows from freezing screen while timeout
2015-04-09 00:32:45 +00:00
tiger_huang
951e27f344 Prevent windows from freezing screen while timeout
The original logic lets windows be able to freeze screen again (by
setting win.mOrientationChanging=true) after WINDOW_FREEZE_TIMEOUT is
triggered before mInnerFields.mOrientationChangeComplete is set to
true. In this case, we would lose the protection of
WINDOW_FREEZE_TIMEOUT. If the app never finishes drawing the window,
the screen would keep freezing that the user cannot operate the
device.

Change-Id: I45a0a9e4b3f8d5b0b0043229bfa4890236ae8ab2
2015-04-08 16:10:04 +00:00
Olawale Ogunwale
380415b643 am 1bdbce29: Merge "[ActivityManager] Finish the failed-to-pause activity"
* commit '1bdbce295cd7978e50b5444420ed222ec6c6281c':
  [ActivityManager] Finish the failed-to-pause activity
2015-04-08 13:09:42 +00:00
Olawale Ogunwale
1bdbce295c Merge "[ActivityManager] Finish the failed-to-pause activity" 2015-04-08 12:51:12 +00:00
louis_chang
047dfd40fd [ActivityManager] Finish the failed-to-pause activity
Symptom:
In some scenario, the mPausingActivity may be replaced by other
activity. When previous activity paused, the completePausedLocked()
won't be invoked because it is no longer the mPausingActivity. If
the activity is also pending to finish, it would never be done
because the activity kept in PAUSING state. Since the activity's
window also remain visible and is above on Wallpaper, user would
see it when back to home.

Solution:
Finish the failed-to-pause activity if the activity is pending to
finish.

A Real Case:
(1) Screen turn off
(2) The top activity T1 crashed
(3) When finish activity T1, the next top activity T2 will be
    scheduled to resume and pause (due to screen off).
(4) The activity T2 is also set to finishing due to T1 crashed.
(5) Before T2 paused and before paused timeout occurs, there has
    a new process started which brings up the next top activity T3
    to resume and pause. So the pausing activity is now replaced.
(6) When activity T2 paused, it cannot completed the pause operation
    T2 will remain in PAUSING and finishing state with its window
    visible. The process won't be killed because the oomadj stays
    at 1 (Visible).

Change-Id: Ib10fded891b21c774b26a93071c717fa50516e22
2015-04-08 16:35:55 +08:00
Fyodor Kupolov
77e46d214d am 6a17f601: Merge "Unnecessary dexopt in installPackageLI"
* commit '6a17f60166082227a5a644f9114db46a0ade73f0':
  Unnecessary dexopt in installPackageLI
2015-04-07 18:24:55 +00:00
Fyodor Kupolov
6a17f60166 Merge "Unnecessary dexopt in installPackageLI" 2015-04-07 18:03:35 +00:00
Olawale Ogunwale
bde7e467ac am d229f442: Merge "Add a timeout state to frozen windows"
* commit 'd229f442d5b8c2e600eaa4daeec0e771631ed83d':
  Add a timeout state to frozen windows
2015-04-07 17:35:53 +00:00
Craig Mautner
3aacbbc025 Add a timeout state to frozen windows
When an activity stops drawing following a rotation the rotation
screenshot would become stuck on top of all the other windows. The
timeout was being acknowledged but mWindowsFreezingScreen was set to
true which kept stopFreezingDisplayLocked() from dismissing the
screen rotation animation.

By changing mWindowsFreezingScreen from a two state variable to a
three state variable, including a timeout state we allow
stopFreezingDisplayLocked() to continue and dismiss the screen
rotation animtion.

This change also reduces the APP_FREEZING_TIMOEOUT from 5 seconds to
2 seconds.

Bug: 15664090

Change-Id: Ida5aca002a82ec8fe1ea99f0ced814c5c8f01a95
2015-04-07 09:14:36 -07:00
Olawale Ogunwale
a9418c241f am 8928c727: Merge "[ActivityManager] Improve task order of getRunningTasks."
* commit '8928c7271bee4b31e94b3d9e8e6e756d5aa2bcff':
  [ActivityManager] Improve task order of getRunningTasks.
2015-04-07 13:02:37 +00:00
Olawale Ogunwale
8928c7271b Merge "[ActivityManager] Improve task order of getRunningTasks." 2015-04-07 12:45:38 +00:00
Olawale Ogunwale
43293fa800 am 437db610: Merge "[ActivityManager] Do not add service to reschedule after removing users."
* commit '437db6106b20d5a81f12a93593b5f623b3159f19':
  [ActivityManager] Do not add service to reschedule after removing users.
2015-04-07 03:55:38 +00:00
Olawale Ogunwale
437db6106b Merge "[ActivityManager] Do not add service to reschedule after removing users." 2015-04-07 03:36:30 +00:00
riddle_hsu
ddc74155c9 [ActivityManager] Improve task order of getRunningTasks.
Symptom:
During switching task in same stack, the first result
of getRunningTasks will be the behind stack's top task.
e.g.
 App Task X is starting task Y, the first entry may be home.

Root Cause:
TaskRecord's lastActiveTime is updated when pausing
or resuming. When X task launch a new task Y, Y is
on the top of task history, before X complete pause,
Y's lastActiveTime will be 0 because it is a new task.
Then when comparing the front task with other stack,
other stack will be regarded as the newer one.

Solution:
If the stack is focused stack, give the top task with the last time.

Change-Id: I0adc07608e03d333e0120a0dbc52a0fbbbb12f34
2015-04-07 11:30:09 +08:00
Fyodor Kupolov
36b26adde8 Unnecessary dexopt in installPackageLI
When a new package is created, installNewPackageLI does not need to call
dexopt, since it has already been made.

Bug: 19550105
Bug: 20087446
Change-Id: If6b05bea590eea5f95efebb22a67ccd8cdf632c2
2015-04-06 19:04:08 -07:00
Matthew Williams
679572ca96 am 0b3673c4: am 20baa9d9: am 28358eae: Merge "Fixing to fail android.JobScheduler.TimingConstraintsTest#testSchedulePeriodic in TV test." into lmp-mr1-dev
* commit '0b3673c4d39c07779081ef2eaf8705cbad1ee04c':
  Fixing to fail android.JobScheduler.TimingConstraintsTest#testSchedulePeriodic in TV test.
2015-04-06 20:53:26 +00:00
Matthew Williams
0b3673c4d3 am 20baa9d9: am 28358eae: Merge "Fixing to fail android.JobScheduler.TimingConstraintsTest#testSchedulePeriodic in TV test." into lmp-mr1-dev
* commit '20baa9d944ccb504d0fdf7ce2e553bca9ca2f672':
  Fixing to fail android.JobScheduler.TimingConstraintsTest#testSchedulePeriodic in TV test.
2015-04-06 20:43:30 +00:00
Matthew Williams
20baa9d944 am 28358eae: Merge "Fixing to fail android.JobScheduler.TimingConstraintsTest#testSchedulePeriodic in TV test." into lmp-mr1-dev
* commit '28358eaed2e1858fcba7991cbd7199a25d160471':
  Fixing to fail android.JobScheduler.TimingConstraintsTest#testSchedulePeriodic in TV test.
2015-04-06 20:30:29 +00:00
Matthew Williams
28358eaed2 Merge "Fixing to fail android.JobScheduler.TimingConstraintsTest#testSchedulePeriodic in TV test." into lmp-mr1-dev 2015-04-06 20:22:22 +00:00
Robert Greenwalt
778f47e5af am 069f4cbc: Merge "Fix memory leak in Connectivity Service when phone app crashes"
* commit '069f4cbccb651d98e4c50eca4698624ea089804d':
  Fix memory leak in Connectivity Service when phone app crashes
2015-04-06 17:54:18 +00:00
Robert Greenwalt
069f4cbccb Merge "Fix memory leak in Connectivity Service when phone app crashes" 2015-04-06 17:34:51 +00:00
Olawale Ogunwale
1d065987eb am 47c1cf4b: Merge "[ActivityManager] Fix ServiceRecord leakage"
* commit '47c1cf4b35616059409a0674382c2318494e877b':
  [ActivityManager] Fix ServiceRecord leakage
2015-04-06 15:44:31 +00:00
Olawale Ogunwale
adedb407c5 am 655ef081: Merge "[ActivityManager] Examine bad process before clean up application record"
* commit '655ef08144ec0b71a98b6b3a38e50c6b346ae467':
  [ActivityManager] Examine bad process before clean up application record
2015-04-06 15:44:24 +00:00
Olawale Ogunwale
694a8ef938 am baedbfbb: Merge "[ProcessStas] fix index out of bounds when add duration."
* commit 'baedbfbbb1181829bcffb1be3732b6f26a315bd8':
  [ProcessStas] fix index out of bounds when add duration.
2015-04-06 15:44:08 +00:00
Olawale Ogunwale
47c1cf4b35 Merge "[ActivityManager] Fix ServiceRecord leakage" 2015-04-06 15:25:04 +00:00
Olawale Ogunwale
655ef08144 Merge "[ActivityManager] Examine bad process before clean up application record" 2015-04-06 15:24:41 +00:00
Olawale Ogunwale
baedbfbbb1 Merge "[ProcessStas] fix index out of bounds when add duration." 2015-04-06 15:23:30 +00:00
Olawale Ogunwale
972099c752 am 1d359daa: Merge "Remove the window whose client process has died or become zombie"
* commit '1d359daa607042417d095aaa83b78befc1b5f8a3':
  Remove the window whose client process has died or become zombie
2015-04-04 16:29:32 +00:00
Maunik Shah
4b647f4c4d Fix memory leak in Connectivity Service when phone app crashes
Upon crash of com.android.phone process, NetworkFactoryInfo is
not getting removed from HashMap and will get accumulated on
every start of the process.

Change-Id: Iafde28daddfc82728c03208522682b1efc85a121
2015-04-04 21:48:24 +05:30
Olawale Ogunwale
1d359daa60 Merge "Remove the window whose client process has died or become zombie" 2015-04-04 16:12:40 +00:00
Richard Uhler
7b08b35bde Reuse dexopt method for both dex2oat and patchoat.
Change-Id: Ib9a6373f98474f1242367b5285086251a9d580e5
2015-04-03 13:53:03 -07:00
Wale Ogunwale
fce4220b88 am 5fd6b139: am 4a7967ad: am f61aee97: Merge "[DO NOT MERGE] Fixed NPE when trying to animate a window without display" into lmp-mr1-dev
* commit '5fd6b139033bcaab52921473ab3998725e157002':
  [DO NOT MERGE] Fixed NPE when trying to animate a window without display
2015-04-03 00:36:56 +00:00
Wale Ogunwale
5fd6b13903 am 4a7967ad: am f61aee97: Merge "[DO NOT MERGE] Fixed NPE when trying to animate a window without display" into lmp-mr1-dev
* commit '4a7967ad9ac76d8b9d6285bc367c33d1b6c83235':
  [DO NOT MERGE] Fixed NPE when trying to animate a window without display
2015-04-03 00:26:49 +00:00
Wale Ogunwale
4a7967ad9a am f61aee97: Merge "[DO NOT MERGE] Fixed NPE when trying to animate a window without display" into lmp-mr1-dev
* commit 'f61aee97adf4e543e82289511c6127bcfa53151c':
  [DO NOT MERGE] Fixed NPE when trying to animate a window without display
2015-04-03 00:15:26 +00:00
Wale Ogunwale
70e12aa123 [DO NOT MERGE] Fixed NPE when trying to animate a window without display
In some cases it is possible for the AppToken.allAppWindows list to
get out of sync with the list of windows known to WMS if the client
doesn't call Session.remove(Window). This can lead to an NPE when
the animation threads runs and the display for the window has been
removed.

Bug: 19972099
Change-Id: Ifdf9ff2364b96757bba0539394c4a682f64577c9
2015-04-02 16:38:52 -07:00