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

Commit 1fe7143a authored by Luca Stefani's avatar Luca Stefani
Browse files

Merge remote-tracking branch 'aosp/pie-gsi' into lineage-16.0-pie-gsi

* aosp/pie-gsi: (50 commits)
  Fix merge problems with cherry-picking "Add notification settings to backup&restore" change into pi-dev
  Stop invoke initAppOps in Camera default constructor.
  [RESTRICT AUTOMERGE] Careful with screenshots containing secure layers!
  HwBlob: s/malloc/calloc/
  [RESTRICT AUTOMERGE]: Exclude secure layers from most screenshots taken by the system server.
  Revert "DO NOT MERGE Refactor passwords/pins/patterns to byte[]"
  Revert "DO NOT MERGE Make a copy of data stored in LockSettingsStorage cache"
  Fix ExifInterface for .heic when meta is at the end
  Add cross user permission check - areNotificationsEnabledForPackage
  Limit IsSeparateProfileChallengeAllowed to system callers
  Added missing permission check to isPackageDeviceAdminOnAnyUser.
  Add cross user permission check - areNotificationsEnabledForPackage
  Limit IsSeparateProfileChallengeAllowed to system callers
  Added missing permission check to isPackageDeviceAdminOnAnyUser.
  Add cross user permission check - areNotificationsEnabledForPackage
  [RESTRICT_AUTOMERGE]: Add cross user permission check - areNotificationsEnabledForPackage
  Limit IsSeparateProfileChallengeAllowed to system callers
  Limit IsSeparateProfileChallengeAllowed to system callers
  [RESTRICT AUTOMERGE]: Add cross user permission check - areNotificationsEnabledForPackage
  [RESTRICT AUTOMERGE] Added missing permission check to isPackageDeviceAdminOnAnyUser.
  ...

Change-Id: If1505a52445115853b2633049958a498467fb384
parents 60ed54d8 4cf1c0fb
Loading
Loading
Loading
Loading
+34 −1
Original line number Diff line number Diff line
@@ -882,7 +882,10 @@ public class Camera {
     *
     * @throws RuntimeException if starting preview fails; usually this would be
     *    because of a hardware or other low-level error, or because release()
     *    has been called on this Camera instance.
     *    has been called on this Camera instance. The QCIF (176x144) exception
     *    mentioned in {@link Parameters#setPreviewSize setPreviewSize} and
     *    {@link Parameters#setPictureSize setPictureSize} can also cause this
     *    exception be thrown.
     */
    public native final void startPreview();

@@ -3144,6 +3147,16 @@ public class Camera {
         * orientation should also be considered while setting picture size and
         * thumbnail size.
         *
         * Exception on 176x144 (QCIF) resolution:
         * Camera devices usually have a fixed capability for downscaling from
         * larger resolution to smaller, and the QCIF resolution sometimes
         * is not fully supported due to this limitation on devices with
         * high-resolution image sensors. Therefore, trying to configure a QCIF
         * preview size with any picture or video size larger than 1920x1080
         * (either width or height) might not be supported, and
         * {@link #setParameters(Camera.Parameters)} might throw a
         * RuntimeException if it is not.
         *
         * @param width  the width of the pictures, in pixels
         * @param height the height of the pictures, in pixels
         * @see #setDisplayOrientation(int)
@@ -3189,6 +3202,16 @@ public class Camera {
         * preview can be different from the resolution of the recorded video
         * during video recording.</p>
         *
         * <p>Exception on 176x144 (QCIF) resolution:
         * Camera devices usually have a fixed capability for downscaling from
         * larger resolution to smaller, and the QCIF resolution sometimes
         * is not fully supported due to this limitation on devices with
         * high-resolution image sensors. Therefore, trying to configure a QCIF
         * video resolution with any preview or picture size larger than
         * 1920x1080  (either width or height) might not be supported, and
         * {@link #setParameters(Camera.Parameters)} will throw a
         * RuntimeException if it is not.</p>
         *
         * @return a list of Size object if camera has separate preview and
         *         video output; otherwise, null is returned.
         * @see #getPreferredPreviewSizeForVideo()
@@ -3483,6 +3506,16 @@ public class Camera {
         * <p>Applications need to consider the display orientation. See {@link
         * #setPreviewSize(int,int)} for reference.</p>
         *
         * <p>Exception on 176x144 (QCIF) resolution:
         * Camera devices usually have a fixed capability for downscaling from
         * larger resolution to smaller, and the QCIF resolution sometimes
         * is not fully supported due to this limitation on devices with
         * high-resolution image sensors. Therefore, trying to configure a QCIF
         * picture size with any preview or video size larger than 1920x1080
         * (either width or height) might not be supported, and
         * {@link #setParameters(Camera.Parameters)} might throw a
         * RuntimeException if it is not.</p>
         *
         * @param width  the width for pictures, in pixels
         * @param height the height for pictures, in pixels
         * @see #setPreviewSize(int,int)
+13 −1
Original line number Diff line number Diff line
@@ -2130,6 +2130,12 @@ public final class CameraCharacteristics extends CameraMetadata<CameraCharacteri
     * </table>
     * <p>Refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} for additional
     * mandatory stream configurations on a per-capability basis.</p>
     * <p>Exception on 176x144 (QCIF) resolution: camera devices usually have a fixed capability for
     * downscaling from larger resolution to smaller, and the QCIF resolution sometimes is not
     * fully supported due to this limitation on devices with high-resolution image sensors.
     * Therefore, trying to configure a QCIF resolution stream together with any other
     * stream larger than 1920x1080 resolution (either width or height) might not be supported,
     * and capture session creation will fail if it is not.</p>
     * <p>This key is available on all devices.</p>
     *
     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
@@ -2325,6 +2331,12 @@ public final class CameraCharacteristics extends CameraMetadata<CameraCharacteri
     * ratio 4:3, and the JPEG encoder alignment requirement is 16, the maximum JPEG size will be
     * 3264x2448.</li>
     * </ul>
     * <p>Exception on 176x144 (QCIF) resolution: camera devices usually have a fixed capability on
     * downscaling from larger resolution to smaller ones, and the QCIF resolution can sometimes
     * not be fully supported due to this limitation on devices with high-resolution image
     * sensors. Therefore, trying to configure a QCIF resolution stream together with any other
     * stream larger than 1920x1080 resolution (either width or height) might not be supported,
     * and capture session creation will fail if it is not.</p>
     * <p>This key is available on all devices.</p>
     *
     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
@@ -3182,7 +3194,7 @@ public final class CameraCharacteristics extends CameraMetadata<CameraCharacteri
     * <li><code>LEVEL_3</code> devices additionally support YUV reprocessing and RAW image capture, along
     *   with additional output stream configurations.</li>
     * <li><code>EXTERNAL</code> devices are similar to <code>LIMITED</code> devices with exceptions like some sensor or
     *   lens information not reorted or less stable framerates.</li>
     *   lens information not reported or less stable framerates.</li>
     * </ul>
     * <p>See the individual level enums for full descriptions of the supported capabilities.  The
     * {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} entry describes the device's capabilities at a
+8 −0
Original line number Diff line number Diff line
@@ -433,6 +433,14 @@ public abstract class CameraDevice implements AutoCloseable {
     * target combinations with sizes outside of these guarantees, but this can only be tested for
     * by attempting to create a session with such targets.</p>
     *
     * <p>Exception on 176x144 (QCIF) resolution:
     * Camera devices usually have a fixed capability for downscaling from larger resolution to
     * smaller, and the QCIF resolution sometimes is not fully supported due to this
     * limitation on devices with high-resolution image sensors. Therefore, trying to configure a
     * QCIF resolution stream together with any other stream larger than 1920x1080 resolution
     * (either width or height) might not be supported, and capture session creation will fail if it
     * is not.</p>
     *
     * @param outputs The new set of Surfaces that should be made available as
     *                targets for captured image data.
     * @param callback The callback to notify about the status of the new capture session.
+22 −4
Original line number Diff line number Diff line
@@ -521,9 +521,10 @@ public class SurfaceTextureRenderer {
        clearState();
    }

    private void makeCurrent(EGLSurface surface) {
    private void makeCurrent(EGLSurface surface)
            throws LegacyExceptionUtils.BufferQueueAbandonedException {
        EGL14.eglMakeCurrent(mEGLDisplay, surface, surface, mEGLContext);
        checkEglError("makeCurrent");
        checkEglDrawError("makeCurrent");
    }

    private boolean swapBuffers(EGLSurface surface)
@@ -557,6 +558,17 @@ public class SurfaceTextureRenderer {
        }
    }

    private void checkEglDrawError(String msg)
            throws LegacyExceptionUtils.BufferQueueAbandonedException {
        int error;
        if ((error = EGL14.eglGetError()) == EGL14.EGL_BAD_NATIVE_WINDOW) {
            throw new LegacyExceptionUtils.BufferQueueAbandonedException();
        }
        if ((error = EGL14.eglGetError()) != EGL14.EGL_SUCCESS) {
            throw new IllegalStateException(msg + ": EGL error: 0x" + Integer.toHexString(error));
        }
    }

    private void checkEglError(String msg) {
        int error;
        if ((error = EGL14.eglGetError()) != EGL14.EGL_SUCCESS) {
@@ -709,8 +721,14 @@ public class SurfaceTextureRenderer {
        if (mConversionSurfaces.size() > 0) {
            configureEGLPbufferSurfaces(mConversionSurfaces);
        }

        try {
            makeCurrent((mSurfaces.size() > 0) ? mSurfaces.get(0).eglSurface :
                mConversionSurfaces.get(0).eglSurface);
        } catch (LegacyExceptionUtils.BufferQueueAbandonedException e) {
                Log.w(TAG, "Surface abandoned, skipping configuration... ", e);
        }

        initializeGLState();
        mSurfaceTexture = new SurfaceTexture(getTextureId());

@@ -798,9 +816,9 @@ public class SurfaceTextureRenderer {
        }
        for (EGLSurfaceHolder holder : mConversionSurfaces) {
            if (LegacyCameraDevice.containsSurfaceId(holder.surface, targetSurfaceIds)) {
                makeCurrent(holder.eglSurface);
                // glReadPixels reads from the bottom of the buffer, so add an extra vertical flip
                try {
                    makeCurrent(holder.eglSurface);
                    drawFrame(mSurfaceTexture, holder.width, holder.height,
                            (mFacing == CameraCharacteristics.LENS_FACING_FRONT) ?
                                    FLIP_TYPE_BOTH : FLIP_TYPE_VERTICAL);
+0 −2
Original line number Diff line number Diff line
@@ -120,8 +120,6 @@ interface IConnectivityManager

    LegacyVpnInfo getLegacyVpnInfo(int userId);

    VpnInfo[] getAllVpnInfo();

    boolean updateLockdownVpn();
    boolean isAlwaysOnVpnPackageSupported(int userId, String packageName);
    boolean setAlwaysOnVpnPackage(int userId, String packageName, boolean lockdown);
Loading