71 Commits

Author SHA1 Message Date
Dianne Hackborn
0cd48879dc A little more wallpaper robustness.
- Recover if a live wallpaper is crashing repeatedly.
- Don't crash when someone tries to set a static wallpaper.
- Make the static wallpaper update correctly when the image changes.
2009-08-13 19:24:07 -07:00
Mathias Agopian
317a6280cc Surface::GPU and Surface::HARDWARE are now deprecated; they will be set automatically if needed.
this also ripples into the window manager API by making some constant there deprecated as well.
2009-08-13 18:19:32 -07:00
Dianne Hackborn
f21adf6fc1 Always have a wallpaper service running. 2009-08-13 17:14:39 -07:00
Dianne Hackborn
72c82ab992 Report wallpaper offset to the wallpaper, use this in the image wallpaper.
Wallpapers can now be just the size of the screen, and get told when their
scroll position should change to do the updating on their own.
2009-08-12 14:41:29 -07:00
Dianne Hackborn
c8a0a75e1c Implement support for scrolling a wallpaper.
This currently only works for a wallpaper that is larger than the
screen.  Set the scroll position with the new wallpaper API.  Right
now only does jump scrolls.
2009-08-11 10:03:16 -04:00
Dianne Hackborn
759a39e8d2 Live wallpapers become a little more real.
This adds a new theme for having a wallpaper, and fixes up the window manager
to do the right thing when transitioning between a windows with and without
wallpapers (between two windows with wallpapers is not yet addressed).

The wallpaper API now has callbacks to tell you when to start/stop animating.

Also fiddle the image wallpaper to be a little more interesting.
2009-08-09 17:20:27 -07:00
Dianne Hackborn
4c62fc0e1e Very primitive wallpapers in a surface.
This is all of the basic pieces:

- The WallpaperService now creates a surface with the window manager for its
  contents.
- There is a simple service that displays a bitmap.
- The wallpaper manager takes care of starting and stopping the service.
- The window manager knows about wallpaper windows and how to layer them with
  the windows that want to be shown on top of wallpaper.

Lots and lots of issues remain, but at this point you can actually write a
wallpaper service, select it in the UI, and see it behind an activity.
2009-08-08 22:13:46 -07:00
Android (Google) Code Review
a1bd466d5c am 89888b2d: Merge change 20038 into donut
Merge commit '89888b2d9dc2d1994a8236ffbce5aaefd6782bf3'

* commit '89888b2d9dc2d1994a8236ffbce5aaefd6782bf3':
  Remove debug code which reads the max_events_per_sec property on every touch event
2009-08-05 12:35:18 -07:00
Michael Chan
9f028e6d2b Remove debug code which reads the max_events_per_sec property on every touch event 2009-08-05 11:20:00 -07:00
Dianne Hackborn
88e1babcae am 20583ff9: Fix issue #2015611: layering problem when moving an activity to the foreground.
Merge commit '20583ff9d49257bd4ccc60e7b6337661e34ed887'

* commit '20583ff9d49257bd4ccc60e7b6337661e34ed887':
  Fix issue #2015611: layering problem when moving an activity to the foreground.
2009-07-27 22:14:41 -07:00
Dianne Hackborn
20583ff9d4 Fix issue #2015611: layering problem when moving an activity to the foreground.
"surface of singleTop acitivy is not added at the top, causing the activity is resumed
behind the top activity."
2009-07-27 21:51:05 -07:00
Dianne Hackborn
ddca3ee3e8 Add support for power keys, improve behavior of virtual keys.
The platform now knows how to deal with a platform key, which at this
point is "just like end call, but don't end a call."

Also improve the handling of virtual keys, to allow for canceling when
sliding off into the display and providing haptic feedback.

Finally fixes a bug where the raw x and y in motion event were not
always set which caused the status bar to not work.
2009-07-24 17:30:15 -07:00
Mitsuru Oshima
30b06eb8b9 am 589cebe2: * Use the scaled size for surface view instead of native. The surface will be always scaled by surface flinger in compatiblity mode. The original approach confused the app because the surface size and the view size were different. * a few clean up. remo
Merge commit '589cebe2d58591403de4a77077941c0454bc91bc'

* commit '589cebe2d58591403de4a77077941c0454bc91bc':
  * Use the scaled size for surface view instead of native. The surface will be always scaled
2009-07-23 23:58:16 -07:00
Mitsuru Oshima
589cebe2d5 * Use the scaled size for surface view instead of native. The surface will be always scaled
by surface flinger in compatiblity mode. The original approach confused the app because
 the surface size and the view size were different.
* a few clean up. removed unsed arguments, obsolete conditions from getTranslator()
 (expandable check was a bug)
2009-07-23 13:38:01 -07:00
Android (Google) Code Review
a8339dfec9 am 9fc20b0e: Merge change 8126 into donut
Merge commit '9fc20b0e381b5fe00b7049ef357c839cd05a33bf'

* commit '9fc20b0e381b5fe00b7049ef357c839cd05a33bf':
  First pass at reworking screen density/size APIs.
2009-07-21 19:03:53 -07:00
Dianne Hackborn
c4db95c077 First pass at reworking screen density/size APIs.
This changes the names of the directories in aapt, to what you see
in the list of DpiTest resources.  Also adds a new "long" configuration
for wide screens, which the platform sets appropriate, and introduces
a new kind of resizeability for not large but significantly larger
than normal screens which may have compatibility issues.
2009-07-21 18:28:42 -07:00
Android (Google) Code Review
fce2972c77 am 3b5449e9: Merge change 7862 into donut
Merge commit '3b5449e90247e77c173d7bbdd4d5e49ad856afe1'

* commit '3b5449e90247e77c173d7bbdd4d5e49ad856afe1':
  * Don't clip the display if LAYOUT_NO_LIMITS is specified (as with PhoneWindowmanager does)
2009-07-20 23:33:27 -07:00
Mitsuru Oshima
d2967e2616 * Don't clip the display if LAYOUT_NO_LIMITS is specified (as with PhoneWindowmanager does)
* FullScreen mode was not hiding status bar for app in compatibility mode
      * fixed fillsScreenLw to take compatibility window into account
    * Fixed the logic in needsBackgroundFiller to be consistent with other places.
    * Fix NPE in WindowManagerService#applyAnimationLocked  LayoutParam can be null.
2009-07-20 14:01:43 -07:00
Android (Google) Code Review
0fde7de9d6 am 54f09101: Merge change 7613 into donut
Merge commit '54f09101381fa63dca35ae4ea0ba3802ee863236'

* commit '54f09101381fa63dca35ae4ea0ba3802ee863236':
  * Use Fede In/Out animation if one of opening/closing apps is in compatibility mode.
2009-07-17 13:58:40 -07:00
Mitsuru Oshima
5a2b91dc14 * Use Fede In/Out animation if one of opening/closing apps is in compatibility mode.
* preserve compatibility window flag when the app updates window's layout params.
 * Added assertion in DEFAULT_COMPATIBILITY_INFO object to prevent unintentional modification.
 * A few minor updates
    * log/dump message improvement
    * Removed unnecessary method in FadeInOutAnimator
    * Fixed 100 char issue in WindwoManagerServer.java
2009-07-17 09:53:40 -07:00
Android (Google) Code Review
545f979bdb am b9bae58e: Merge change 7402 into donut
Merge commit 'b9bae58ecba8a25cc54dfd119a9edbeed6f230de'

* commit 'b9bae58ecba8a25cc54dfd119a9edbeed6f230de':
  Added fade-in out animation for compatible apps
2009-07-15 18:14:33 -07:00
Mitsuru Oshima
0a5d2c4691 Added fade-in out animation for compatible apps
(This CL only add this when the app on the top is in compatibility mode for now. I need some help to do the same
  when the closing app is in compatibility mode)
Refactored DimAnimator
2009-07-15 10:48:06 -07:00
Mitsuru Oshima
c3f60ddaea am 1ecf5d28: Re-implementation of large screen support using window manager. * added background filler surface to fill the outer rim. Using the same layer as dim surface because they never co-exists (in the same window) * clean up the obsolete code in Compatibilt
Merge commit '1ecf5d28817f0a051e77488380dcd5bc622ea169'

* commit '1ecf5d28817f0a051e77488380dcd5bc622ea169':
  Re-implementation of large screen support using window manager.
2009-07-08 15:59:16 -07:00
Mitsuru Oshima
1ecf5d2881 Re-implementation of large screen support using window manager.
* added background filler surface to fill the outer rim. Using the same layer as dim surface because
   they never co-exists (in the same window)
 * clean up the obsolete code in CompatibiltyMode/ViewRoot for support large screen support.
2009-07-08 15:21:30 -07:00
Dianne Hackborn
5d16cd0462 am d7cd29da: Add facility to run setup wizard after an update.
Merge commit 'd7cd29da91ccc0aba1f1097e19366f9ca36c7ce1'

* commit 'd7cd29da91ccc0aba1f1097e19366f9ca36c7ce1':
  Add facility to run setup wizard after an update.
2009-07-03 08:58:10 -07:00
Android (Google) Code Review
0d0012ef16 am 54af78a3: Merge change 5950 into donut
Merge commit '54af78a3f7064e04d7ebd64c985d4149f9f7b05c'

* commit '54af78a3f7064e04d7ebd64c985d4149f9f7b05c':
  Fix memory leaks in system_server
2009-07-02 15:23:56 -07:00
Dianne Hackborn
d7cd29da91 Add facility to run setup wizard after an update.
The system now keeps a tag of the last version (just an arbitrary string)
that the setup wizard was run for.  If this is different than the current
one in the setup wizard, then setup is launched at boot.

This introduces a new intent action for the part of the setup wizard that
gets run for an ungrade, which the system uses to find its current version
tag for comparing against what was last stored.  It is up to the launched
setup activity update the stored setting to reflect its current value,
once it is happy.
2009-07-01 20:20:47 -07:00
Suchi Amalapurapu
fff2fda019 Fix memory leaks in system_server
unlink DeathRecipients in a whole bunch of places to avoid memory leaks
2009-07-01 12:55:30 -07:00
Dianne Hackborn
6463ff2468 resolved conflicts for merge of 66c2942a to master 2009-06-30 16:52:32 -07:00
Android (Google) Code Review
f6ff591dec am 72eb0aca: Merge change 5483 into donut
Merge commit '72eb0acad5cffc57ce5006f6deab29ee259e461e'

* commit '72eb0acad5cffc57ce5006f6deab29ee259e461e':
  Expand support for different screen sizes.
2009-06-29 16:37:17 -07:00
Dianne Hackborn
2bd33d74ae Fix issue #1943706 (Applying the monkey to GoogleVoice causes SecurityException)
Fiddle around with event dispatching to remove calling permissions when we
enter event injection, and prevent callers from going to the PhoneWindowManager's
event processing code unless they are allowed at that point.
2009-06-26 18:59:01 -07:00
Dianne Hackborn
723738cfae Expand support for different screen sizes.
Applications can now declare that they support small, normal, or
large screens.  Resource selection can also be done based on these
sizes.  By default, pre-Donut apps are false for small and large,
and Donut or later apps are assumed to support all sizes.  In either
case they can use <supports-screens> in their manifest to declare
what they actually support.
2009-06-26 13:37:05 -07:00
Dianne Hackborn
a2aaa9e38f resolved conflicts for merge of 6edb3487 to master 2009-06-15 17:17:49 -07:00
Dianne Hackborn
cfaef699e1 Implement permission test for activity, window, service manager.
This also includes some changes to the window manager permission checks.  Almost all of these
are to make it most testable (through an exception on a permission failure), though there is
one permission check that needed to be added: updateOrientationFromAppTokens().
2009-06-15 14:35:07 -07:00
Eric Fischer
f40e1a5fa6 Fix botched merge from commit b61498d1ac8e25f0024dcde46b41bcf0d8336d89 2009-06-10 18:02:15 -07:00
Romain Guy
b61498d1ac resolved conflicts for merge of f31cbb to master 2009-06-10 16:30:18 -07:00
Romain Guy
06882f8eff Enable HierarchyViewer on debuggable builds, even if they're secure.
That will let us (finally) use the tool on userdebug builds.
2009-06-10 14:44:11 -07:00
Michael Chan
e10de97205 Throttle one last user activity call to 1/sec that was missed last time
modified:   services/java/com/android/server/WindowManagerService.java
2009-05-19 09:51:33 -07:00
Suchi Amalapurapu
ccee782cda am d1a93373: Add a new window flag to display a window when keyguard is shown.
Merge commit 'd1a9337380cf9f40f1aa095457b11242d483295d'

* commit 'd1a9337380cf9f40f1aa095457b11242d483295d':
  Add a new window flag to display a window when keyguard is shown.
2009-05-18 13:44:35 -07:00
Suchi Amalapurapu
d1a9337380 Add a new window flag to display a window when keyguard is shown. 2009-05-18 10:47:24 -07:00
Michael Chan
53071d6d15 Added LatencyTimer to ease latency measurements
new file:   core/java/android/os/LatencyTimer.java
	modified:   core/java/android/view/MotionEvent.java
	modified:   core/java/android/view/ViewRoot.java
	modified:   services/java/com/android/server/InputDevice.java
	modified:   services/java/com/android/server/KeyInputQueue.java
	modified:   services/java/com/android/server/WindowManagerService.java
2009-05-15 18:18:28 -07:00
Michael Chan
05d24afb61 Merge branch 'readonly-p4-donut' into donut 2009-05-06 17:39:50 -07:00
Michael Chan
e96440fa15 AI 148368: Decrease CPU usage by throttling touch events
We are decreasing CPU usage at the cost of event latency. Events are queued up
  and released to the app at the specified rate. You can
  experiment with different values via:
  adb shell setprop windowsmgr.max_events_per_sec 35
  The new value is picked up when you let go and retouch the screen. No
  reboot needed.
  Also the following changes were made after profiling:
  - In WindowManagerService, limit the call to userActivity() when we
  have a flood touch events.
  - In PowerManagerService, skip checking of permission if the caller
  is system user.
  - In PowerManagerService, integrated the functionality of gatherState()
  into reactivateWakeLocksLocked(). They loop through the same data
  structure and are called back to back.
  BUG=1692771

Automated import of CL 148368
2009-05-06 10:27:36 -07:00
Owen Lin
3413b8983a Let screenOrientation="behind" works as expected 2009-05-01 19:31:33 -07:00
Dianne Hackborn
1d442e0d99 More optimization of dumpsys output.
There are three major classes of changes here:

- Avoid writing lines where their values are often empty, false, or some other typical thing.
- Use partial writes to the PrintWriter to avoid creating temporary strings.
- Use StringBuilder where we need to generate real String objects (and where possible cache the result).
2009-04-22 18:03:21 -07:00
Dave Bort
cfe6524071 Remove references to android.util.Config
The semantics of Config.DEBUG will be changing soon, and all other
Config.* fields will become deprecated/hidden.
2009-04-09 14:51:04 -07:00
Dianne Hackborn
958b9adc08 AI 143899: am: CL 143896 Fix issue #1748954 and #1737952:
#1748954 (New status bar fades into all white background): FrameLayout wasn't updating its foreground drawable when its padding changed, which would happen as the status bar is shown and hidden.  To fix this I also ended up fixing a problem in the view debug stuff where we couldn't get a bitmap for a view that is the full screen size because it is too big...  actually I just went ahead and added another function to snapshot the view hierarchy which works a lot better for us anyway.
  #1737952 (Home screen icons overlap with the notification bar after exiting any camera app): Originally I punted this because it only happened in rare situations, but now that home is always portrait it happens a lot more so it is more important to fix.  This involved a few things to clean up hiding/showing the status bar:
  - We now determine when to hide and show it during layout, which allows us to do this at the time it is actually needed rather than during animation after we can actually catch it for the initial display of a window.  This required tweaking the layout API so the policy can request a second layout pass if needed.
  - When doing layout, we are now much more aggressive about skipping the layout of windows.  Basically anything that we know will be hidden in the near future is ignored for layout, so that it doesn't glitch as it is transfered out of the screen.  The theory being that it is better to leave it as it was originally placed while we are transitioning it out, than to switch it to something slightly more correct.
  Original author: hackbod
  Merged from: //branches/cupcake/...

Automated import of CL 143899
2009-03-31 18:00:36 -07:00
Dianne Hackborn
617f877c06 AI 143800: am: CL 143748 Fix issue #1743326 (More battery stats)
Adds stats for:
  - Number of raw user events that have happened in the system.
  - Number of times user activity has been reported, dividied by UID and type of activity.
  - Duration of screen brightness levels in 4 buckets.
  - Per-UID tracking of who has turned on Wifi and how long we can attribute it being on because of them.
  Original author: hackbod
  Merged from: //branches/cupcake/...

Automated import of CL 143800
2009-03-31 15:04:46 -07:00
Dianne Hackborn
321ae681ca AI 143173: am: CL 142879 Fix issue #1732012 (Only show screen rotation animation when triggered by sensor) -- set the new surface flag as appropriate.
Original author: hackbod
  Merged from: //branches/cupcake/...

Automated import of CL 143173
2009-03-27 16:16:03 -07:00
Dianne Hackborn
1e880dba10 AI 143169: am: CL 142870 Fix issue #1724917 (Applications (browser, maps, gmail) fail to retain their landscape state after coming out of sleep mode). We now rely on the listeners last known orientation, and make sure to clear it when enabling/disabling.
Also do most of the work for issue #1732012 (Only show screen rotation animation when triggered by sensor).  This just needs to be hooked up to the surface flinger API when that appears.
  Original author: hackbod
  Merged from: //branches/cupcake/...

Automated import of CL 143169
2009-03-27 16:04:08 -07:00