9386 Commits

Author SHA1 Message Date
Dianne Hackborn
183ce028f1 Fix issue #6761130: Clearing app data in settings does not clear app's USB storage
The package manager calls to clear data / clear cache were not also
having default container service clear the data on external storage.  Now
they do.

Change-Id: Ib5e5eb6adf2cac5a4cc094cc1a02ac8cfb6a2edf
2012-06-29 15:00:21 -07:00
Dianne Hackborn
cfb0f40903 Merge "Fix issue #6745498: Cannot view consecutive event details from agenda view" into jb-dev 2012-06-28 15:33:53 -07:00
Dianne Hackborn
45a25bcfc9 Fix issue #6745498: Cannot view consecutive event details from agenda view
- There was a long-standing bug when using FLAG_ACTIVITY_REORDER_TO_FRONT
where we could find and use an activity that is currently finishing.
- There was a recently introduced bug where activities being destroyed
would not be removed from the history stack at the time they are done
being destroyed, allowing the above bug to be exposed.
- Removing a task would not kill any processes associated with the app
that had a different name from the app itself.

Change-Id: I4401ab6d348a69e1ac4fb8f719d2c69d5a78e567
2012-06-28 13:49:17 -07:00
Craig Mautner
4fa4648515 Merge "Update dumpsys power output." into jb-dev 2012-06-28 09:56:47 -07:00
Craig Mautner
672083b88a Update dumpsys power output.
A little more detail on the animation state. For aid in debugging
b/6720247.

Change-Id: Ibfabf7fc8822ccb74bb83e2fd8e53004691dcd76
2012-06-26 17:42:17 -07:00
Dianne Hackborn
3bb98aec93 Merge "Fix issue #6730064: When turning off Nakasi, it very often..." into jb-dev 2012-06-26 16:36:36 -07:00
Dianne Hackborn
ea401541c5 Fix issue #6730064: When turning off Nakasi, it very often...
...turns itself immediately back on.

The ON_AFTER_RELEASE flag is documented to not turn the screen on if
it is currently off.

Unfortunately, it didn't seem to actually do this -- it would just
cause a userActivity() call, which turns on the screen if it is
currently off.

Fix this by adding yet another boolean to that function to tell it
to not poke user activity if the screen is off.  (Yes the number of
booleans on it is now insane, and should be cleaned up after we
get through JB.)

Bug: 6730064
Change-Id: I850dfbc777c7668d08b7d63f42a293e22b878256
2012-06-26 14:44:08 -07:00
Kenny Root
c17f92ce04 Merge "Use removePackageLI instead of removing mPackages" into jb-dev 2012-06-26 10:34:44 -07:00
Nick Kralevich
ab294eeb20 Merge "DevicePolicyManagerService: dump less" into jb-dev 2012-06-25 18:43:56 -07:00
Nick Kralevich
be00b41014 DevicePolicyManagerService: dump less
Reduce the amount of unnecessary information emitted from
the DevicePolicyManagerService.

Bug: 6732364
Change-Id: I639f6beab8471bdbe41ce6cd3a5a378acaf678b2
2012-06-25 17:39:12 -07:00
Dianne Hackborn
9e608c1218 Merge "Fix issue #6381224: Initial emulator boot fails and shows a blank black screen." into jb-dev 2012-06-25 17:35:49 -07:00
Dianne Hackborn
17990395bc Merge "Fix issue #6717667: expanded notification actions don't work on the lock screen" into jb-dev 2012-06-25 17:35:36 -07:00
Dianne Hackborn
fca66cd828 Merge "DO NOT MERGE Fix issue #6697105: App launching sometimes has random pauses" into jb-dev 2012-06-25 17:35:21 -07:00
Kenny Root
eca64b3914 Use removePackageLI instead of removing mPackages
When adding an system app via OTA, trying to remove it from mPackages
directly doesn't work. The ContentProviders and other things aren't
removed and point to the hidden system app's applicationInfo instead of
the updated app.

Bug: 6685263
Change-Id: I487cf518e0e3c60fae736e9b974617023a7dee8d
2012-06-25 16:39:45 -07:00
Dianne Hackborn
1927ae8a56 Fix issue #6717667: expanded notification actions don't work on the lock screen
FLAG_ACTIVITY_CLOSE_SYSTEM_DIALOGS was a mistake.

Instead, and the infrastructure for the status bar to take care
of closing and hiding things itself when you press these buttons,
just like it does for the main Intent of the notification.

Bug: 6717667
Change-Id: I1b22186e0cedc05f46a1a3ec78053a72afaf61b1
2012-06-25 14:28:48 -07:00
Dianne Hackborn
42e620caf0 Fix issue #6381224: Initial emulator boot fails and shows a blank black screen.
Make sure that all cases where we remove an activity from the history
stack, we call resumeTopActivityLocked() to cause the home activity
to be launched if the stack is now empty.

Also fixed a problem where some timeouts would not be removed when destroying
an activity, and a race condition in boot that would cause the
PhoneWindowManager to initially start out with the home key not working.

Bug: 6381224
Change-Id: If046bb01aed624b0d9ee3bbaaba68ed6b98fd1d0
2012-06-25 14:27:41 -07:00
Jeff Brown
780c46fc91 Don't wait until boot timeout if there is no wallpaper.
When launching only core apps, the wallpaper service
is not started.  Without this change the WM waits
up to 30 seconds for the wallpaper window to be created even
though it will never happen.  This introduces a significant
delay before the boot animation is dismissed so the user can
enter a decryption password.

Bug: 6263070
Change-Id: Ia975127a0bf09cf99818f7cc4fd6c0264b740ec6
2012-06-24 13:51:41 -07:00
Jeff Brown
08a746a0c6 Don't enable input dispatch until display enabled.
Bug: 6263070
Change-Id: I05d036fc1d9ec06d164d6743d45bb3f199cfab47
2012-06-24 12:23:58 -07:00
Hiroshi Lockheimer
5beeb04b52 Merge "Don't display based on a dummy animation." into jb-dev 2012-06-22 15:33:15 -07:00
Craig Mautner
9c5bf3b36f Don't display based on a dummy animation.
The Starting window was being made visible early because the app
token had the dummy animation set. When the real animation started
the Starting window picked it up and became transparent causing
the underlying window to become visible again => jank.

Fixes bug 6691421.

Change-Id: I95fe88d2887760e6da3adedeb6be300eb6755283
2012-06-22 15:19:13 -07:00
Michael Jurka
ab779e0bb2 Merge "Increase bitmap memory cap for widgets (Bug 6597440)" into jb-dev 2012-06-22 14:38:12 -07:00
Winson Chung
e92aad432a Increase bitmap memory cap for widgets (Bug 6597440)
Change-Id: I4149b8c5f204f10ebf0ef1f8d03709c0559178d0
2012-06-22 14:12:39 -07:00
Dianne Hackborn
357d99c61d DO NOT MERGE Fix issue #6697105: App launching sometimes has random pauses
In the course of the window manager refactoring into a separate
layout state, we introduced a bad interaction between the two
sides of the world.  This resulting in multiple hops needed between
the two sides after an application has said it is finished drawing
its window, until the window/app transition is actually started.
Especially since these hops require going through the anim side
which is vsynced (so will delay its operation until the next frame),
this could introduce a notable delay until the window is first shown.

Fix this by re-arranging the code to make one straight path from
when a window reports it is shown to us starting the app transition
that is waiting for it.  This change also includes various improvements
to debugging code that was done while working on it.

Change-Id: I7883674052da1a58df89cd1d9b8d754843cdd3db
2012-06-22 12:50:50 -07:00
Dianne Hackborn
0b9b053ce6 Merge "Don't crash in window manager if we fail getting .apk resources." into jb-dev 2012-06-22 10:38:45 -07:00
Craig Mautner
f412095686 Fix starting window problems.
Three problems fixed:
1. When one Activity took over for another Activity not all of the
starting window state was being copied over. Now copying over more
parameters.

2. When the visibility of an Activity was being changed the dummy
animation was overwriting the existing animation. If that animation
was the starting window animating then it started over when the
dummy animation was assigned. Now the dummy animation no longer
replaces an existing starting window animation.

3. The test for whether to animate away the starting window only
looked to see if the Activity had already drawn a window but did
not include the starting window. This caused the starting window
to immediately be hidden when the Activity was removed if no
windows were drawn, thereby exposing the fading window behind.
Now the starting window is included in the hasAppShownWindows test
and is animated away if it is exposed.

Fixes bug 6691421.

Change-Id: I4d32a1546c201652574a44d9e7f2752f1f1eb5a6
2012-06-21 18:25:39 -07:00
Dianne Hackborn
0b800190d7 Don't crash in window manager if we fail getting .apk resources.
This normally shouldn't noramlly happen, but it can in the case of
bug 6647334 (crash in LoadedApk.makeApplication) where the package
manager information becomes inconsistent, and it could also happen
if an app was uninstalled or started updating at just the right
time during a launch.

Bug: 6647334
Change-Id: Iba22efe1d646cdac46099b2135466309577dfa54
2012-06-21 15:29:36 -07:00
Dianne Hackborn
f530ac323b Fix issue #6700897: Activity paused by activating the...
...lock screen does not response to onNewIntent()

We now keep activities stopped even while the lock screen is
displayed.  (We used to keep them stopped while the screen was
off, and then resume the top activity when the screen was turned
on even though they are covered by the lock screen.)

When a new intent is being delivered to an application, if it
is not resumed it is held in a pending list until the next
time the activity is resumed.  Unfortunately that means for
the case where the activity is being held stopped due to the
screen off or lock screen, it will not receive any new intents,
even though it is at the top of the stack.

Fix this by adding an additional condition that allows the new
intent to be delivered immediately if the activity manager is
sleeping and the target activity is at the top of the stack.

Also some debug output improvements, since pending new intents
were not being included in the debug output, making it impossible
to see we were in that situation.

Change-Id: I5df82ac21657f1c82e05fd8bf21474e883f44e6f
2012-06-21 14:17:48 -07:00
Jeff Brown
8e306a68e8 Don't reset brightness to 0 on initial boot.
Bug: 6705012
Change-Id: I8114fda081784abbe720d5eaa637aa5234b5a947
2012-06-20 19:46:32 -07:00
satok
56802678a7 Merge "Workaround: Never reset the default IME if the system is not ready" into jb-dev 2012-06-20 13:01:09 -07:00
Charles Chen
d0d3a85065 Merge "Fixing gesture recognition configuration in TouchExplorer." into jb-dev 2012-06-20 12:12:07 -07:00
Dianne Hackborn
0fa4d30b03 Merge "Fix issue #6686339: 2 taps required to launch notification..." into jb-dev 2012-06-20 12:06:38 -07:00
satok
4c0e7152e7 Workaround: Never reset the default IME if the system is not ready
Bug: 6685037
Change-Id: Ifb311f85154beadd4787ec73669bedfdf1f5172d
2012-06-21 02:22:24 +09:00
Dianne Hackborn
6e2281d44c Fix issue #6686339: 2 taps required to launch notification...
...or settings from lock screen

When a window is drawn, the code to determine whether it should now
be shown was calling WindowState.isReadyForDisplay().  Part of the
condition of this function is that it is not ready if a policy is
forcing the window to be hidden -- which is the case when the lock
screen is shown.  As a result, we wouldn't show the window at that
point, so wouldn't tell the activity manager that the token's windows
are visibible, and wouldn't tell the lock screen to go away.

This adds a new variation WindowState.isReadyForDisplayIgnoringKeyguard(),
which is the same as the original method but ignores the policy visibility
for app windows.  This allows windows to be go through the complete
path of handling when the window is finally drawn and telling the
activity manager about it, even if behind the lock screen.  By making it
a separate function, we don't impact any other code that is calling the
old function and may be relying on its behavior.

Also cleaned up a little of the dumpsys output.  Most important, the
new ANR section is now moved to the top, since we want
"adb shell dumpsys window" to still give a nice summary of what we
normally care about -- the window stack and important global state.

Change-Id: Ica3ea85ce46f3f5f5cd2cc30fbd9de13d3885a57
2012-06-19 17:54:24 -07:00
Casey Burkhardt
ea6fbc0981 Fixing gesture recognition configuration in TouchExplorer.
This fix adjusts the sensitivity of the gesture recognizer by
eliminating gesture rotation in the recognition process.

Bug:6697119
Change-Id: Ic767f513c05210b27e583338c4f0adcaa1c4c625
2012-06-19 16:31:54 -07:00
Craig Mautner
5785e05d44 Merge "Clear sendingToBottom when animation is complete." into jb-dev 2012-06-19 15:08:41 -07:00
Craig Mautner
3f99fde465 Clear sendingToBottom when animation is complete.
Was counting on moving the app to the top to clear the flag
indicating that the app was being sent to the bottom. Since this
did not always happen the sendingToBottom flag was occasionally
left set. In this case the focus was skipped for that app and
consequently input was never propagated to it.

This fix clears the sendingToBottom flag each time the app
animations are completed.

Fixes bug 6691421.

Change-Id: I6f851dc5bedca95182db8490d87c876a71ad5fde
2012-06-19 14:10:01 -07:00
Jeff Sharkey
0abe556d28 Handle SCREEN_ON/OFF broadcasts without blocking.
NetworkPolicy currently uses a single background thread to process
various broadcasts.  When processing other broadcasts, this thread
can block our handling of SCREEN_ON/OFF, which are sent as ordered
broadcasts.

This change moves SCREEN_ON/OFF handling to the main thread, and
dispatches a one-way message to the background thread, allowing the
ordered broadcast to always proceed.

Bug: 6677047
Change-Id: I52de2c7b75beb8059bb87e123689ba4a9c4ae349
2012-06-19 13:32:22 -07:00
Craig Mautner
89f5a4624b Merge "More paths for turning on screen immediately." into jb-dev 2012-06-18 18:01:53 -07:00
Craig Mautner
75fc9de258 More paths for turning on screen immediately.
This fix forces the path through the updateLightsLocked method to turn
the screen on immediately if mWaitingForFirstLightSensor is true. Also
do not clear mWaitingForFirstLightSensor if mPreparingForScreenOn
is true. Wait until it turns false.

Fixes bug 6612418.

Change-Id: I03407e748cce4906a73de1f15df1654649b133c4
2012-06-18 16:53:27 -07:00
Dianne Hackborn
1991850de7 Merge "Implement issue #6680894: Provide a way to configure app defaults..." into jb-dev 2012-06-18 16:19:56 -07:00
Dianne Hackborn
fc8b7fe026 Implement issue #6680894: Provide a way to configure app defaults...
...for a smoother OOB experience

Way provided.

Put your defaults in system/etc/preferred-apps/*.xml.

Figure out what to put there with "adb shell dumpsys package preferred-xml".

Bug: 6680894
Change-Id: Ia06bb0061876274a5f80bf06d1ba5ad155edc323
2012-06-18 15:38:12 -07:00
Jeff Brown
ee17241487 Fix an NPE and possible unsynchronized call of Locked method.
Bug: 6680398
Change-Id: Id5ef4fa82b2a5ef5e9c3934ca95156143f91e5e2
2012-06-18 12:59:13 -07:00
Jeff Brown
d7a04de167 Capture window manager's last ANR state in bug report.
Currently just grabbing the window state but we could grab
other things as part of the last ANR report.

Bug: 6680398
Change-Id: I23aa70907b1bdcb21c8acc556fde196ca790ef6a
2012-06-17 15:55:46 -07:00
Jeff Brown
22aa512026 Capture input dispatcher's last ANR state in bug report.
Some ANR bugs are very difficult to localize because by the time
the bug report has been captured, the relevant information is
gone.  Work around this by capturing a log of the input dispatcher's
state at the exact time of the ANR before anything has changed
and include this information in the bug report.

Also fixed a nit related to some format strings that had
improper field widths specified.

Bug: 6680398
Change-Id: I5323bf18ec5e47a767cd053209753cc46852bf4c
2012-06-17 15:51:30 -07:00
Dianne Hackborn
2fe8fb276c Fix issue #6664140: Time to lock should work even Stay awake...
...in Developer options is on

Don't respect stay awake while on as long as a time to lock limit
is being enforced.  When we start enforcing one, make sure the
setting is off (since we won't be respecting it anyway).

Bug: 6664140
Change-Id: Id07cb528afa0c64c7766341841c51771f507121d
2012-06-15 17:23:16 -07:00
Dianne Hackborn
6e3d6daa37 Fix issue #6636731: Mariner animation ring gets stuck
Weren't cleaning out any ActivityOptions that are still attached
to a finishing activity.

Bug: 6636731
Change-Id: If0520bbcbf1d4ce19d46ff769918893cefda9c87
2012-06-15 12:12:56 -07:00
Dianne Hackborn
734f0214ec Merge "Help out issue #6654729: CAB + screen off during playback" into jb-dev 2012-06-14 21:33:48 -07:00
Dianne Hackborn
b80395c17d Help out issue #6654729: CAB + screen off during playback
People generally expect, if they are using FLAG_KEEP_SCREEN_ON,
that the screen won't immediately dim after it is cleared, even
if it has been passed the user activity timeout since the last
user interaction.  So include the flag to reset the user activity
timeout when releasing its wake lock.

Change-Id: If7a8fea8faef3edbf13dff10a2f248adc9e3ff0b
2012-06-14 19:38:20 -07:00
Christopher Tate
0e44a6beea Merge "Don't finish noHistory="true" activities behind the lock screen" into jb-dev 2012-06-14 19:35:58 -07:00
Christopher Tate
7661bc6c5a Merge "Run the screen on/off broadcasts at foreground priority" into jb-dev 2012-06-14 17:34:28 -07:00