am 2a5006c1: am c916c044: Merge change 24099 into eclair

Merge commit '2a5006c195c9635a66158bf6b3212351ea5232dc'

* commit '2a5006c195c9635a66158bf6b3212351ea5232dc':
  Fix issue #2095422: Some fades from opaque to transparent don't work
This commit is contained in:
Dianne Hackborn
2009-09-08 16:01:08 -07:00
committed by Android Git Automerger
5 changed files with 130 additions and 38 deletions

View File

@@ -377,6 +377,7 @@ public abstract class WallpaperService extends Service {
if (!mCreated) {
mLayout.type = mIWallpaperEngine.mWindowType;
mLayout.gravity = Gravity.LEFT|Gravity.TOP;
mLayout.setTitle(WallpaperService.this.getClass().getName());
mLayout.windowAnimations =
com.android.internal.R.style.Animation_Wallpaper;
mSession.add(mWindow, mLayout, View.VISIBLE, mContentInsets);
@@ -558,7 +559,7 @@ public abstract class WallpaperService extends Service {
mSession.remove(mWindow);
} catch (RemoteException e) {
}
mSurfaceHolder.mSurface.clear();
mSurfaceHolder.mSurface.release();
mCreated = false;
}
}

View File

@@ -181,7 +181,7 @@ public class Surface implements Parcelable {
public Surface(SurfaceSession s,
int pid, int display, int w, int h, int format, int flags)
throws OutOfResourcesException {
mCanvas = new Canvas();
mCanvas = new CompatibleCanvas();
init(s,pid,display,w,h,format,flags);
}
@@ -271,8 +271,12 @@ public class Surface implements Parcelable {
*/
public native boolean isValid();
/** Call this free the surface up. {@hide} */
public native void clear();
/** Free all server-side state associated with this surface and
* release this object's reference. {@hide} */
public native void destroy();
/** Release the local reference to the server-side surface. @hide */
public native void release();
/** draw into a surface */
public Canvas lockCanvas(Rect dirty) throws OutOfResourcesException, IllegalArgumentException
@@ -400,6 +404,4 @@ public class Surface implements Parcelable {
throws OutOfResourcesException;
private native void init(Parcel source);
private native void release();
}

View File

@@ -1575,7 +1575,7 @@ public final class ViewRoot extends Handler implements ViewParent,
if (mUseGL) {
destroyGL();
}
mSurface.clear();
mSurface.release();
try {
sWindowSession.remove(mWindow);
@@ -2532,7 +2532,7 @@ public final class ViewRoot extends Handler implements ViewParent,
}
}
mSurface.clear();
mSurface.release();
}
if (mAdded) {
mAdded = false;