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

Commit 289f090a authored by Diego Perez's avatar Diego Perez
Browse files

Adding missing SurfaceView methods

Some methods were not implemented in the mock SurfaceView and they were
causing some custom components to fail on the preview.

Bug: http://b.android.com/158592
Test: This is a mock class, not tested.
Change-Id: Id8faa7e6b5edf1238b02ae07f3dd59dc6539cb62
parent 6b87b3df
Loading
Loading
Loading
Loading
+14 −0
Original line number Original line Diff line number Diff line
@@ -21,6 +21,7 @@ import com.android.layoutlib.bridge.MockView;
import android.content.Context;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Canvas;
import android.graphics.Rect;
import android.graphics.Rect;
import android.graphics.Region;
import android.util.AttributeSet;
import android.util.AttributeSet;


/**
/**
@@ -49,6 +50,19 @@ public class SurfaceView extends MockView {
        super(context, attrs, defStyleAttr, defStyleRes);
        super(context, attrs, defStyleAttr, defStyleRes);
    }
    }


    public boolean gatherTransparentRegion(Region region) {
      return false;
    }

    public void setZOrderMediaOverlay(boolean isMediaOverlay) {
    }

    public void setZOrderOnTop(boolean onTop) {
    }

    public void setSecure(boolean isSecure) {
    }

    public SurfaceHolder getHolder() {
    public SurfaceHolder getHolder() {
        return mSurfaceHolder;
        return mSurfaceHolder;
    }
    }