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

Commit 478ccaa7 authored by Diego Wilson's avatar Diego Wilson Committed by Automerger Merge Worker
Browse files

Merge "Add an option for vendors to provide a camera extensions proxy" into sc-dev am: b4d7c251

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15001230

Change-Id: I5fe831778e57a8735b828fb6090194313a745f83
parents 2eb975f8 b4d7c251
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
import android.content.pm.PackageManager;
import android.graphics.ImageFormat;
import android.hardware.camera2.extension.IAdvancedExtenderImpl;
import android.hardware.camera2.extension.ICameraExtensionsProxyService;
@@ -32,6 +33,7 @@ import android.hardware.camera2.params.StreamConfigurationMap;
import android.os.ConditionVariable;
import android.os.IBinder;
import android.os.RemoteException;
import android.os.SystemProperties;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.util.Log;
@@ -235,6 +237,19 @@ public final class CameraExtensionCharacteristics {
            if (mConnection == null) {
                Intent intent = new Intent();
                intent.setClassName(PROXY_PACKAGE_NAME, PROXY_SERVICE_NAME);
                String vendorProxyPackage = SystemProperties.get(
                    "ro.vendor.camera.extensions.package");
                String vendorProxyService = SystemProperties.get(
                    "ro.vendor.camera.extensions.service");
                if (!vendorProxyPackage.isEmpty() && !vendorProxyService.isEmpty()) {
                  Log.v(TAG,
                      "Choosing the vendor camera extensions proxy package: "
                      + vendorProxyPackage);
                  Log.v(TAG,
                      "Choosing the vendor camera extensions proxy service: "
                      + vendorProxyService);
                  intent.setClassName(vendorProxyPackage, vendorProxyService);
                }
                mInitFuture = new InitializerFuture();
                mConnection = new ServiceConnection() {
                    @Override