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

Commit 6b48da61 authored by Ricardo Cerqueira's avatar Ricardo Cerqueira
Browse files

QCOM-related cleanups

* Hide qcom-specific methods from the API
* Disable service classes
* Fix media-recorder start/stop for non-qcoms

Change-Id: I42b1acb5c732182663fea89039f57e775afb3ebe
parent 6afa5c05
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -22833,7 +22833,6 @@ package android.view {
    method public android.graphics.Canvas lockCanvas(android.graphics.Rect) throws java.lang.IllegalArgumentException, android.view.Surface.OutOfResourcesException;
    method public void readFromParcel(android.os.Parcel);
    method public void release();
    method public void setStereoscopic3DFormat(int format);
    method public void unlockCanvas(android.graphics.Canvas);
    method public void unlockCanvasAndPost(android.graphics.Canvas);
    method public void writeToParcel(android.os.Parcel, int);
@@ -22867,10 +22866,6 @@ package android.view {
    field public static final deprecated int SURFACE_TYPE_HARDWARE = 1; // 0x1
    field public static final deprecated int SURFACE_TYPE_NORMAL = 0; // 0x0
    field public static final deprecated int SURFACE_TYPE_PUSH_BUFFERS = 3; // 0x3
    field public static final int STEREOSCOPIC_3D_FORMAT_SIDE_BY_SIDE_HALF_L_R = 65536; // 0x10000
    field public static final int STEREOSCOPIC_3D_FORMAT_TOP_BOTTOM   = 131072; // 0x20000
    field public static final int STEREOSCOPIC_3D_FORMAT_INTERLEAVED  = 262144; // 0x40000
    field public static final int STEREOSCOPIC_3D_FORMAT_SIDE_BY_SIDE_R_L = 524288; // 0x80000
  }
  public static class SurfaceHolder.BadSurfaceTypeException extends java.lang.RuntimeException {
+1 −0
Original line number Diff line number Diff line
@@ -110,6 +110,7 @@ public class Power
     * Activate/DeActivate Unstable Memory block
     *
     * @param on Whether you want Activate(true) or DeActive(False)
     * @hide
     */
    public static native int SetUnstableMemoryState(boolean on);
}
+6 −0
Original line number Diff line number Diff line
@@ -76,10 +76,16 @@ public class Surface implements Parcelable {
        return lockCanvasNative(dirty);
    }

    /**
     * @hide
     */
    public void setStereoscopic3DFormat(int format) {
        setStereoscopic3DFormatNative(format);
    }

    /**
     * @hide
     */
    private native void setStereoscopic3DFormatNative(int format);

    /** unlock the surface and asks a page flip */
+4 −0
Original line number Diff line number Diff line
@@ -47,18 +47,22 @@ public interface SurfaceHolder {

    /**
     * Stereoscopic Side-by-Side Half 3D format
     * @hide
     */
    public static final int STEREOSCOPIC_3D_FORMAT_SIDE_BY_SIDE_HALF_L_R = 0x10000;
    /**
     * Stereoscopic Top Bottom 3D format
     * @hide
     */
    public static final int STEREOSCOPIC_3D_FORMAT_TOP_BOTTOM   = 0x20000;
    /**
     * Stereoscopic Interleaved 3D format
     * @hide
     */
    public static final int STEREOSCOPIC_3D_FORMAT_INTERLEAVED  = 0x40000;
    /**
     * Stereoscopic Side-by-Side Full 3D format
     * @hide
     */
    public static final int STEREOSCOPIC_3D_FORMAT_SIDE_BY_SIDE_R_L = 0x80000;

+23 −18
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import android.hardware.Camera;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
import android.os.SystemProperties;
import android.util.Log;
import android.view.Surface;
import android.app.Application;
@@ -677,6 +678,7 @@ public class MediaRecorder
    public native void native_stop() throws IllegalStateException;

    public void start() throws IllegalStateException {
        if (SystemProperties.QCOM_HARDWARE) {
            try {
                Application application = ActivityThread.currentApplication();
                if (application != null) {
@@ -688,11 +690,13 @@ public class MediaRecorder
            } catch (Exception exception) {
                Log.e(TAG, "Unable to vote to turn io_is_busy off.");
            }
        }

        native_start();
    }

    public void stop() throws IllegalStateException {
        if (SystemProperties.QCOM_HARDWARE) {
            try {
                Application application = ActivityThread.currentApplication();
                if (application != null) {
@@ -704,6 +708,7 @@ public class MediaRecorder
            } catch (Exception exception) {
                Log.e(TAG, "Unable to withdraw io_is_busy off vote.");
            }
        }

        native_stop();
    }
Loading