Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cf6c5758 authored by Craig Mautner's avatar Craig Mautner Committed by Android Git Automerger
Browse files

am 706708d5: Merge "Small step towards supporting multiple displays" into jb-mr1-dev

* commit '706708d5':
  Small step towards supporting multiple displays
parents 582c8cd3 706708d5
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@ import android.os.Process;
import android.os.RemoteException;
import android.util.Log;
import android.util.LogPrinter;
import android.view.Display;
import android.view.Gravity;
import android.view.IWindowSession;
import android.view.InputChannel;
@@ -612,8 +613,8 @@ public abstract class WallpaperService extends Service {
                        mLayout.windowAnimations =
                                com.android.internal.R.style.Animation_Wallpaper;
                        mInputChannel = new InputChannel();
                        if (mSession.add(mWindow, mWindow.mSeq, mLayout, View.VISIBLE, mContentInsets,
                                mInputChannel) < 0) {
                        if (mSession.addToDisplay(mWindow, mWindow.mSeq, mLayout, View.VISIBLE,
                            Display.DEFAULT_DISPLAY, mContentInsets, mInputChannel) < 0) {
                            Log.w(TAG, "Failed to add window while updating wallpaper surface.");
                            return;
                        }
+0 −1
Original line number Diff line number Diff line
@@ -25,7 +25,6 @@ import android.graphics.Bitmap;
import android.graphics.Point;
import android.graphics.Rect;
import android.os.IRemoteCallback;
import android.view.DisplayInfo;
import android.view.IApplicationToken;
import android.view.IOnKeyguardExitResult;
import android.view.IRotationWatcher;
+5 −0
Original line number Diff line number Diff line
@@ -37,8 +37,13 @@ interface IWindowSession {
    int add(IWindow window, int seq, in WindowManager.LayoutParams attrs,
            in int viewVisibility, out Rect outContentInsets,
            out InputChannel outInputChannel);
    int addToDisplay(IWindow window, int seq, in WindowManager.LayoutParams attrs,
            in int viewVisibility, in int layerStackId, out Rect outContentInsets,
            out InputChannel outInputChannel);
    int addWithoutInputChannel(IWindow window, int seq, in WindowManager.LayoutParams attrs,
            in int viewVisibility, out Rect outContentInsets);
    int addToDisplayWithoutInputChannel(IWindow window, int seq, in WindowManager.LayoutParams attrs,
            in int viewVisibility, in int layerStackId, out Rect outContentInsets);
    void remove(IWindow window);
    
    /**
+5 −5
Original line number Diff line number Diff line
@@ -248,7 +248,7 @@ public class Surface implements Parcelable {

    /** create a surface @hide */
    public Surface(SurfaceSession s,
            int pid, int display, int w, int h, int format, int flags)
            int pid, int displayId, int w, int h, int format, int flags)
        throws OutOfResourcesException {
        checkHeadless();

@@ -256,12 +256,12 @@ public class Surface implements Parcelable {
            mCreationStack = new Exception();
        }
        mCanvas = new CompatibleCanvas();
        init(s,pid,null,display,w,h,format,flags);
        init(s,pid,null,displayId,w,h,format,flags);
    }

    /** create a surface with a name @hide */
    public Surface(SurfaceSession s,
            int pid, String name, int display, int w, int h, int format, int flags)
            int pid, String name, int displayId, int w, int h, int format, int flags)
        throws OutOfResourcesException {
        checkHeadless();

@@ -269,7 +269,7 @@ public class Surface implements Parcelable {
            mCreationStack = new Exception();
        }
        mCanvas = new CompatibleCanvas();
        init(s,pid,name,display,w,h,format,flags);
        init(s,pid,name,displayId,w,h,format,flags);
        mName = name;
    }

@@ -508,7 +508,7 @@ public class Surface implements Parcelable {
    }
    
    private native void init(SurfaceSession s,
            int pid, String name, int display, int w, int h, int format, int flags)
            int pid, String name, int displayId, int w, int h, int format, int flags)
            throws OutOfResourcesException;

    private native void init(Parcel source);
+2 −2
Original line number Diff line number Diff line
@@ -459,8 +459,8 @@ public class SurfaceView extends View {
                    mWindow = new MyWindow(this);
                    mLayout.type = mWindowType;
                    mLayout.gravity = Gravity.START|Gravity.TOP;
                    mSession.addWithoutInputChannel(mWindow, mWindow.mSeq, mLayout,
                            mVisible ? VISIBLE : GONE, mContentInsets);
                    mSession.addToDisplayWithoutInputChannel(mWindow, mWindow.mSeq, mLayout,
                            mVisible ? VISIBLE : GONE, Display.DEFAULT_DISPLAY, mContentInsets);
                }
                
                boolean realSizeChanged;
Loading