Add Discord community version (64-bit only)

- Added realracing3-community.apk (71.57 MB)
- Removed 32-bit support (armeabi-v7a)
- Only includes arm64-v8a libraries
- Decompiled source code included
- Added README-community.md with analysis
This commit is contained in:
2026-02-18 15:48:36 -08:00
parent c19eb3d7ff
commit c080f0d97f
26930 changed files with 2529574 additions and 0 deletions

View File

@@ -0,0 +1,110 @@
package com.google.ar.core;
import androidx.annotation.NonNull;
import com.google.ar.core.exceptions.FatalException;
/* loaded from: classes3.dex */
public class Anchor {
long nativeHandle;
final long nativeSymbolTableHandle;
private final Session session;
public enum CloudAnchorState {
NONE(0),
TASK_IN_PROGRESS(1),
SUCCESS(2),
ERROR_INTERNAL(-1),
ERROR_NOT_AUTHORIZED(-2),
ERROR_SERVICE_UNAVAILABLE(-3),
ERROR_RESOURCE_EXHAUSTED(-4),
ERROR_HOSTING_DATASET_PROCESSING_FAILED(-5),
ERROR_CLOUD_ID_NOT_FOUND(-6),
ERROR_RESOLVING_LOCALIZATION_NO_MATCH(-7),
ERROR_RESOLVING_SDK_VERSION_TOO_OLD(-8),
ERROR_RESOLVING_SDK_VERSION_TOO_NEW(-9),
ERROR_HOSTING_SERVICE_UNAVAILABLE(-10);
final int nativeCode;
CloudAnchorState(int i) {
this.nativeCode = i;
}
@NonNull
public static CloudAnchorState forNumber(int i) {
for (CloudAnchorState cloudAnchorState : values()) {
if (cloudAnchorState.nativeCode == i) {
return cloudAnchorState;
}
}
throw new FatalException("Unexpected value for native CloudAnchorState, value=" + i);
}
public boolean isError() {
return this.nativeCode < 0;
}
}
public Anchor() {
this.session = null;
this.nativeHandle = 0L;
this.nativeSymbolTableHandle = 0L;
}
public Anchor(long j, Session session) {
this.session = session;
this.nativeHandle = j;
this.nativeSymbolTableHandle = session.nativeSymbolTableHandle;
}
private native void nativeDetach(long j, long j2);
private native String nativeGetCloudAnchorId(long j, long j2);
private native int nativeGetCloudAnchorState(long j, long j2);
private native Pose nativeGetPose(long j, long j2);
private native int nativeGetTrackingState(long j, long j2);
private static native void nativeReleaseAnchor(long j, long j2);
public void detach() {
nativeDetach(this.session.nativeWrapperHandle, this.nativeHandle);
}
public boolean equals(Object obj) {
return (obj instanceof Anchor) && ((Anchor) obj).nativeHandle == this.nativeHandle;
}
public void finalize() throws Throwable {
long j = this.nativeHandle;
if (j != 0) {
nativeReleaseAnchor(this.nativeSymbolTableHandle, j);
}
super.finalize();
}
@NonNull
public String getCloudAnchorId() {
return nativeGetCloudAnchorId(this.session.nativeWrapperHandle, this.nativeHandle);
}
@NonNull
public CloudAnchorState getCloudAnchorState() {
return CloudAnchorState.forNumber(nativeGetCloudAnchorState(this.session.nativeWrapperHandle, this.nativeHandle));
}
public Pose getPose() {
return nativeGetPose(this.session.nativeWrapperHandle, this.nativeHandle);
}
@NonNull
public TrackingState getTrackingState() {
return TrackingState.forNumber(nativeGetTrackingState(this.session.nativeWrapperHandle, this.nativeHandle));
}
public int hashCode() {
return Long.valueOf(this.nativeHandle).hashCode();
}
}

View File

@@ -0,0 +1,152 @@
package com.google.ar.core;
import android.app.Activity;
import android.content.Context;
import androidx.annotation.NonNull;
import com.google.ar.core.exceptions.FatalException;
import com.google.ar.core.exceptions.UnavailableDeviceNotCompatibleException;
import com.google.ar.core.exceptions.UnavailableUserDeclinedInstallationException;
/* loaded from: classes3.dex */
public class ArCoreApk {
/* JADX WARN: Failed to restore enum class, 'enum' modifier and super class removed */
/* JADX WARN: Unknown enum class pattern. Please report as an issue! */
public static class Availability {
final int nativeCode;
public static final Availability UNKNOWN_ERROR = new a();
public static final Availability UNKNOWN_CHECKING = new b();
public static final Availability UNKNOWN_TIMED_OUT = new c();
public static final Availability UNSUPPORTED_DEVICE_NOT_CAPABLE = new d();
public static final Availability SUPPORTED_NOT_INSTALLED = new e();
public static final Availability SUPPORTED_APK_TOO_OLD = new f();
public static final Availability SUPPORTED_INSTALLED = new g();
private static final /* synthetic */ Availability[] $VALUES = $values();
private static /* synthetic */ Availability[] $values() {
return new Availability[]{UNKNOWN_ERROR, UNKNOWN_CHECKING, UNKNOWN_TIMED_OUT, UNSUPPORTED_DEVICE_NOT_CAPABLE, SUPPORTED_NOT_INSTALLED, SUPPORTED_APK_TOO_OLD, SUPPORTED_INSTALLED};
}
private Availability(String str, int i, int i2) {
this.nativeCode = i2;
}
@NonNull
public static Availability forNumber(int i) {
for (Availability availability : values()) {
if (availability.nativeCode == i) {
return availability;
}
}
throw new FatalException("Unexpected value for native Availability, value=" + i);
}
public static Availability valueOf(String str) {
return (Availability) Enum.valueOf(Availability.class, str);
}
public static Availability[] values() {
return (Availability[]) $VALUES.clone();
}
public boolean isSupported() {
return false;
}
public boolean isTransient() {
return false;
}
public boolean isUnknown() {
return false;
}
public boolean isUnsupported() {
return false;
}
}
public enum InstallBehavior {
REQUIRED(0),
OPTIONAL(1);
final int nativeCode;
InstallBehavior(int i) {
this.nativeCode = i;
}
@NonNull
public static InstallBehavior forNumber(int i) {
for (InstallBehavior installBehavior : values()) {
if (installBehavior.nativeCode == i) {
return installBehavior;
}
}
throw new FatalException("Unexpected value for native InstallBehavior, value=" + i);
}
}
public enum InstallStatus {
INSTALLED(0),
INSTALL_REQUESTED(1);
final int nativeCode;
InstallStatus(int i) {
this.nativeCode = i;
}
@NonNull
public static InstallStatus forNumber(int i) {
for (InstallStatus installStatus : values()) {
if (installStatus.nativeCode == i) {
return installStatus;
}
}
throw new FatalException("Unexpected value for native InstallStatus, value=" + i);
}
}
public enum UserMessageType {
APPLICATION(0),
FEATURE(1),
USER_ALREADY_INFORMED(2);
final int nativeCode;
UserMessageType(int i) {
this.nativeCode = i;
}
@NonNull
public static UserMessageType forNumber(int i) {
for (UserMessageType userMessageType : values()) {
if (userMessageType.nativeCode == i) {
return userMessageType;
}
}
throw new FatalException("Unexpected value for native UserMessageType, value=" + i);
}
}
@NonNull
public static ArCoreApk getInstance() {
return j.a();
}
@NonNull
public Availability checkAvailability(Context context) {
throw new UnsupportedOperationException("Stub");
}
@NonNull
public InstallStatus requestInstall(Activity activity, boolean z) throws UnavailableDeviceNotCompatibleException, UnavailableUserDeclinedInstallationException {
throw new UnsupportedOperationException("Stub");
}
@NonNull
public InstallStatus requestInstall(Activity activity, boolean z, InstallBehavior installBehavior, UserMessageType userMessageType) throws UnavailableDeviceNotCompatibleException, UnavailableUserDeclinedInstallationException {
throw new UnsupportedOperationException("Stub");
}
}

View File

@@ -0,0 +1,73 @@
package com.google.ar.core;
import android.app.Activity;
import android.content.Context;
import android.util.Log;
import com.google.ar.core.ArCoreApk;
import com.google.ar.core.annotations.UsedByNative;
import com.google.ar.core.exceptions.ResourceExhaustedException;
import com.google.ar.core.exceptions.UnavailableApkTooOldException;
import com.google.ar.core.exceptions.UnavailableArcoreNotInstalledException;
import com.google.ar.core.exceptions.UnavailableDeviceNotCompatibleException;
import com.google.ar.core.exceptions.UnavailableSdkTooOldException;
import com.google.ar.core.exceptions.UnavailableUserDeclinedInstallationException;
import java.util.HashMap;
import java.util.Map;
@UsedByNative("arcoreapk.cc")
/* loaded from: classes3.dex */
final class ArCoreApkJniAdapter {
public static final Map a;
static {
HashMap hashMap = new HashMap();
a = hashMap;
hashMap.put(IllegalArgumentException.class, Integer.valueOf(ae.ERROR_INVALID_ARGUMENT.G));
hashMap.put(ResourceExhaustedException.class, Integer.valueOf(ae.ERROR_RESOURCE_EXHAUSTED.G));
hashMap.put(UnavailableArcoreNotInstalledException.class, Integer.valueOf(ae.UNAVAILABLE_ARCORE_NOT_INSTALLED.G));
hashMap.put(UnavailableDeviceNotCompatibleException.class, Integer.valueOf(ae.UNAVAILABLE_DEVICE_NOT_COMPATIBLE.G));
hashMap.put(UnavailableApkTooOldException.class, Integer.valueOf(ae.UNAVAILABLE_APK_TOO_OLD.G));
hashMap.put(UnavailableSdkTooOldException.class, Integer.valueOf(ae.UNAVAILABLE_SDK_TOO_OLD.G));
hashMap.put(UnavailableUserDeclinedInstallationException.class, Integer.valueOf(ae.UNAVAILABLE_USER_DECLINED_INSTALLATION.G));
}
private ArCoreApkJniAdapter() {
}
public static int a(Throwable th) {
Log.e("ARCore-ArCoreApkJniAdapter", "Exception details:", th);
Class<?> cls = th.getClass();
Map map = a;
return map.containsKey(cls) ? ((Integer) map.get(cls)).intValue() : ae.ERROR_FATAL.G;
}
@UsedByNative("arcoreapk.cc")
public static int checkAvailability(Context context) {
try {
return ArCoreApk.getInstance().checkAvailability(context).nativeCode;
} catch (Throwable th) {
a(th);
return ArCoreApk.Availability.UNKNOWN_ERROR.nativeCode;
}
}
@UsedByNative("arcoreapk.cc")
public static int requestInstall(Activity activity, boolean z, int[] iArr) throws UnavailableDeviceNotCompatibleException, UnavailableUserDeclinedInstallationException {
try {
iArr[0] = ArCoreApk.getInstance().requestInstall(activity, z).nativeCode;
return ae.SUCCESS.G;
} catch (Throwable th) {
return a(th);
}
}
@UsedByNative("arcoreapk.cc")
public static int requestInstallCustom(Activity activity, boolean z, int i, int i2, int[] iArr) throws UnavailableDeviceNotCompatibleException, UnavailableUserDeclinedInstallationException {
try {
iArr[0] = ArCoreApk.getInstance().requestInstall(activity, z, ArCoreApk.InstallBehavior.forNumber(i), ArCoreApk.UserMessageType.forNumber(i2)).nativeCode;
return ae.SUCCESS.G;
} catch (Throwable th) {
return a(th);
}
}
}

View File

@@ -0,0 +1,112 @@
package com.google.ar.core;
import android.graphics.Rect;
import android.media.Image;
import com.google.ar.core.exceptions.FatalException;
import java.nio.ByteBuffer;
/* loaded from: classes3.dex */
public class ArImage extends com.google.ar.core.dependencies.b {
long nativeHandle;
private final long nativeSymbolTableHandle;
private final Session session;
public ArImage(Session session, long j) {
this.session = session;
this.nativeHandle = j;
this.nativeSymbolTableHandle = session.nativeSymbolTableHandle;
}
private native void nativeClose(long j, long j2);
/* JADX INFO: Access modifiers changed from: private */
public native ByteBuffer nativeGetBuffer(long j, long j2, int i);
private native int nativeGetFormat(long j, long j2);
private native int nativeGetHeight(long j, long j2);
private native int nativeGetNumberOfPlanes(long j, long j2);
/* JADX INFO: Access modifiers changed from: private */
public native int nativeGetPixelStride(long j, long j2, int i);
/* JADX INFO: Access modifiers changed from: private */
public native int nativeGetRowStride(long j, long j2, int i);
private native long nativeGetTimestamp(long j, long j2);
private native int nativeGetWidth(long j, long j2);
public static native void nativeLoadSymbols();
@Override // android.media.Image, java.lang.AutoCloseable
public void close() {
nativeClose(this.nativeSymbolTableHandle, this.nativeHandle);
this.nativeHandle = 0L;
}
@Override // android.media.Image
public Rect getCropRect() {
return new Rect(0, 0, getWidth(), getHeight());
}
@Override // android.media.Image
public int getFormat() {
int nativeGetFormat = nativeGetFormat(this.session.nativeWrapperHandle, this.nativeHandle);
if (nativeGetFormat != -1) {
return nativeGetFormat;
}
throw new FatalException("Unknown error in ArImage.getFormat().");
}
@Override // android.media.Image
public int getHeight() {
int nativeGetHeight = nativeGetHeight(this.session.nativeWrapperHandle, this.nativeHandle);
if (nativeGetHeight != -1) {
return nativeGetHeight;
}
throw new FatalException("Unknown error in ArImage.getHeight().");
}
@Override // android.media.Image
public Image.Plane[] getPlanes() {
int nativeGetNumberOfPlanes = nativeGetNumberOfPlanes(this.session.nativeWrapperHandle, this.nativeHandle);
if (nativeGetNumberOfPlanes == -1) {
throw new FatalException("Unknown error in ArImage.getPlanes().");
}
k[] kVarArr = new k[nativeGetNumberOfPlanes];
for (int i = 0; i < nativeGetNumberOfPlanes; i++) {
kVarArr[i] = new k(this, this.nativeHandle, i);
}
return kVarArr;
}
@Override // android.media.Image
public long getTimestamp() {
long nativeGetTimestamp = nativeGetTimestamp(this.session.nativeWrapperHandle, this.nativeHandle);
if (nativeGetTimestamp != -1) {
return nativeGetTimestamp;
}
throw new FatalException("Unknown error in ArImage.getTimestamp().");
}
@Override // android.media.Image
public int getWidth() {
int nativeGetWidth = nativeGetWidth(this.session.nativeWrapperHandle, this.nativeHandle);
if (nativeGetWidth != -1) {
return nativeGetWidth;
}
throw new FatalException("Unknown error in ArImage.getWidth().");
}
@Override // android.media.Image
public void setCropRect(Rect rect) {
throw new UnsupportedOperationException("This is a read-only image.");
}
@Override // android.media.Image
public void setTimestamp(long j) {
throw new UnsupportedOperationException("This is a read-only image.");
}
}

View File

@@ -0,0 +1,108 @@
package com.google.ar.core;
import androidx.annotation.NonNull;
import java.nio.ByteBuffer;
import java.nio.FloatBuffer;
import java.nio.ShortBuffer;
import java.util.Collection;
/* loaded from: classes3.dex */
public class AugmentedFace extends TrackableBase {
private static final String TAG = "ARCore-AugmentedFace";
private FloatBuffer normalsBuffer;
private FloatBuffer textureCoordinatesBuffer;
private ShortBuffer triangleIndicesBuffer;
private FloatBuffer verticesBuffer;
public enum RegionType {
NOSE_TIP(0),
FOREHEAD_LEFT(1),
FOREHEAD_RIGHT(2);
final int nativeCode;
RegionType(int i) {
this.nativeCode = i;
}
}
public AugmentedFace() {
super(0L, null);
}
private native Pose nativeGetCenterPose(long j, long j2);
private native ByteBuffer nativeGetMeshNormalsByteBuffer(long j, long j2);
private native ByteBuffer nativeGetMeshTextureCoordinatesByteBuffer(long j, long j2);
private native ByteBuffer nativeGetMeshTriangleIndicesByteBuffer(long j, long j2);
private native ByteBuffer nativeGetMeshVerticesByteBuffer(long j, long j2);
private native Pose nativeGetRegionPose(long j, long j2, int i);
@Override // com.google.ar.core.TrackableBase, com.google.ar.core.Trackable
@NonNull
public /* bridge */ /* synthetic */ Anchor createAnchor(Pose pose) {
return super.createAnchor(pose);
}
@Override // com.google.ar.core.TrackableBase
public /* bridge */ /* synthetic */ boolean equals(Object obj) {
return super.equals(obj);
}
@Override // com.google.ar.core.TrackableBase, com.google.ar.core.Trackable
@NonNull
public /* bridge */ /* synthetic */ Collection getAnchors() {
return super.getAnchors();
}
public Pose getCenterPose() {
return nativeGetCenterPose(this.session.nativeWrapperHandle, this.nativeHandle);
}
public FloatBuffer getMeshNormals() {
return this.normalsBuffer;
}
public FloatBuffer getMeshTextureCoordinates() {
return this.textureCoordinatesBuffer;
}
public ShortBuffer getMeshTriangleIndices() {
return this.triangleIndicesBuffer;
}
public FloatBuffer getMeshVertices() {
return this.verticesBuffer;
}
public Pose getRegionPose(RegionType regionType) {
return nativeGetRegionPose(this.session.nativeWrapperHandle, this.nativeHandle, regionType.nativeCode);
}
@Override // com.google.ar.core.TrackableBase, com.google.ar.core.Trackable
@NonNull
public /* bridge */ /* synthetic */ TrackingState getTrackingState() {
return super.getTrackingState();
}
@Override // com.google.ar.core.TrackableBase
public /* bridge */ /* synthetic */ int hashCode() {
return super.hashCode();
}
public void populateMeshData() {
this.verticesBuffer = Session.directByteBufferOrDefault(nativeGetMeshVerticesByteBuffer(this.session.nativeWrapperHandle, this.nativeHandle)).asFloatBuffer();
this.normalsBuffer = Session.directByteBufferOrDefault(nativeGetMeshNormalsByteBuffer(this.session.nativeWrapperHandle, this.nativeHandle)).asFloatBuffer();
this.textureCoordinatesBuffer = Session.directByteBufferOrDefault(nativeGetMeshTextureCoordinatesByteBuffer(this.session.nativeWrapperHandle, this.nativeHandle)).asFloatBuffer();
this.triangleIndicesBuffer = Session.directByteBufferOrDefault(nativeGetMeshTriangleIndicesByteBuffer(this.session.nativeWrapperHandle, this.nativeHandle)).asShortBuffer();
}
public AugmentedFace(long j, Session session) {
super(j, session);
populateMeshData();
}
}

View File

@@ -0,0 +1,100 @@
package com.google.ar.core;
import androidx.annotation.NonNull;
import com.google.ar.core.exceptions.FatalException;
import java.util.Collection;
/* loaded from: classes3.dex */
public class AugmentedImage extends TrackableBase {
public enum TrackingMethod {
NOT_TRACKING(0),
FULL_TRACKING(1),
LAST_KNOWN_POSE(2);
final int nativeCode;
TrackingMethod(int i) {
this.nativeCode = i;
}
@NonNull
public static TrackingMethod forNumber(int i) {
for (TrackingMethod trackingMethod : values()) {
if (trackingMethod.nativeCode == i) {
return trackingMethod;
}
}
throw new FatalException("Unexpected value for native TrackingMethod, value=" + i);
}
}
public AugmentedImage(long j, Session session) {
super(j, session);
}
private native Pose nativeGetCenterPose(long j, long j2);
private native float nativeGetExtentX(long j, long j2);
private native float nativeGetExtentZ(long j, long j2);
private native int nativeGetIndex(long j, long j2);
private native String nativeGetName(long j, long j2);
private native int nativeGetTrackingMethod(long j, long j2);
@Override // com.google.ar.core.TrackableBase, com.google.ar.core.Trackable
@NonNull
public /* bridge */ /* synthetic */ Anchor createAnchor(Pose pose) {
return super.createAnchor(pose);
}
@Override // com.google.ar.core.TrackableBase
public /* bridge */ /* synthetic */ boolean equals(Object obj) {
return super.equals(obj);
}
@Override // com.google.ar.core.TrackableBase, com.google.ar.core.Trackable
@NonNull
public /* bridge */ /* synthetic */ Collection getAnchors() {
return super.getAnchors();
}
public Pose getCenterPose() {
return nativeGetCenterPose(this.session.nativeWrapperHandle, this.nativeHandle);
}
public float getExtentX() {
return nativeGetExtentX(this.session.nativeWrapperHandle, this.nativeHandle);
}
public float getExtentZ() {
return nativeGetExtentZ(this.session.nativeWrapperHandle, this.nativeHandle);
}
public int getIndex() {
return nativeGetIndex(this.session.nativeWrapperHandle, this.nativeHandle);
}
public String getName() {
return nativeGetName(this.session.nativeWrapperHandle, this.nativeHandle);
}
@NonNull
public TrackingMethod getTrackingMethod() {
return TrackingMethod.forNumber(nativeGetTrackingMethod(this.session.nativeWrapperHandle, this.nativeHandle));
}
@Override // com.google.ar.core.TrackableBase, com.google.ar.core.Trackable
@NonNull
public /* bridge */ /* synthetic */ TrackingState getTrackingState() {
return super.getTrackingState();
}
@Override // com.google.ar.core.TrackableBase
public /* bridge */ /* synthetic */ int hashCode() {
return super.hashCode();
}
}

View File

@@ -0,0 +1,105 @@
package com.google.ar.core;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.ColorMatrix;
import android.graphics.ColorMatrixColorFilter;
import android.graphics.Paint;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.nio.ByteBuffer;
import java.nio.channels.Channels;
/* loaded from: classes3.dex */
public class AugmentedImageDatabase {
long nativeHandle;
private final long nativeSymbolTableHandle;
private final Session session;
public AugmentedImageDatabase(Session session) {
this(session, nativeCreate(session.nativeWrapperHandle));
}
public static ByteBuffer convertBitmapToGrayscaleDirectBuffer(Bitmap bitmap) {
ColorMatrix colorMatrix = new ColorMatrix();
colorMatrix.setSaturation(0.0f);
ColorMatrixColorFilter colorMatrixColorFilter = new ColorMatrixColorFilter(colorMatrix);
Paint paint = new Paint();
paint.setColorFilter(colorMatrixColorFilter);
Bitmap createBitmap = Bitmap.createBitmap(bitmap.getWidth(), bitmap.getHeight(), Bitmap.Config.ARGB_8888);
new Canvas(createBitmap).drawBitmap(bitmap, 0.0f, 0.0f, paint);
ByteBuffer allocateDirect = ByteBuffer.allocateDirect(bitmap.getWidth() * bitmap.getHeight());
for (int i = 0; i < bitmap.getHeight(); i++) {
for (int i2 = 0; i2 < bitmap.getWidth(); i2++) {
allocateDirect.put((bitmap.getWidth() * i) + i2, (byte) Color.red(createBitmap.getPixel(i2, i)));
}
}
return allocateDirect;
}
public static AugmentedImageDatabase deserialize(Session session, InputStream inputStream) throws IOException {
return new AugmentedImageDatabase(session, nativeDeserialize(session.nativeWrapperHandle, loadDirectByteBuffer(inputStream)));
}
private static ByteBuffer loadDirectByteBuffer(InputStream inputStream) throws IOException {
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(Math.max(32, inputStream.available()));
byte[] bArr = new byte[8192];
while (true) {
int read = inputStream.read(bArr);
if (read == -1) {
byte[] byteArray = byteArrayOutputStream.toByteArray();
ByteBuffer allocateDirect = ByteBuffer.allocateDirect(byteArray.length);
allocateDirect.put(byteArray);
return allocateDirect;
}
byteArrayOutputStream.write(bArr, 0, read);
}
}
private native int nativeAddImage(long j, long j2, String str, ByteBuffer byteBuffer, int i, int i2, int i3);
private native int nativeAddImageWithPhysicalSize(long j, long j2, String str, ByteBuffer byteBuffer, int i, int i2, int i3, float f);
private static native long nativeCreate(long j);
private static native long nativeDeserialize(long j, ByteBuffer byteBuffer);
private native int nativeGetNumImages(long j, long j2);
private native void nativeReleaseDatabase(long j, long j2);
private native ByteBuffer nativeSerialize(long j, long j2);
public int addImage(String str, Bitmap bitmap) {
return nativeAddImage(this.session.nativeWrapperHandle, this.nativeHandle, str, convertBitmapToGrayscaleDirectBuffer(bitmap), bitmap.getWidth(), bitmap.getHeight(), bitmap.getWidth());
}
public void finalize() throws Throwable {
long j = this.nativeHandle;
if (j != 0) {
nativeReleaseDatabase(this.nativeSymbolTableHandle, j);
}
super.finalize();
}
public int getNumImages() {
return nativeGetNumImages(this.session.nativeWrapperHandle, this.nativeHandle);
}
public void serialize(OutputStream outputStream) throws IOException {
Channels.newChannel(outputStream).write(nativeSerialize(this.session.nativeWrapperHandle, this.nativeHandle));
}
public AugmentedImageDatabase(Session session, long j) {
this.session = session;
this.nativeHandle = j;
this.nativeSymbolTableHandle = session.nativeSymbolTableHandle;
}
public int addImage(String str, Bitmap bitmap, float f) {
return nativeAddImageWithPhysicalSize(this.session.nativeWrapperHandle, this.nativeHandle, str, convertBitmapToGrayscaleDirectBuffer(bitmap), bitmap.getWidth(), bitmap.getHeight(), bitmap.getWidth(), f);
}
}

View File

@@ -0,0 +1,19 @@
package com.google.ar.core;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
/* renamed from: com.google.ar.core.r, reason: case insensitive filesystem */
/* loaded from: classes3.dex */
public final class C1373r extends AnimatorListenerAdapter {
public final /* synthetic */ InstallActivity a;
public C1373r(InstallActivity installActivity) {
this.a = installActivity;
}
@Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
public final void onAnimationEnd(Animator animator) {
this.a.showSpinner();
}
}

View File

@@ -0,0 +1,99 @@
package com.google.ar.core;
import androidx.annotation.NonNull;
/* loaded from: classes3.dex */
public class Camera {
private static final String TAG = "ARCore-Camera";
long nativeHandle;
private final long nativeSymbolTableHandle;
private final Session session;
public Camera() {
this.session = null;
this.nativeHandle = 0L;
this.nativeSymbolTableHandle = 0L;
}
public Camera(Session session, Frame frame) {
this.session = session;
this.nativeHandle = nativeAcquireCamera(session.nativeWrapperHandle, frame.nativeHandle);
this.nativeSymbolTableHandle = session.nativeSymbolTableHandle;
}
private static native long nativeAcquireCamera(long j, long j2);
private native long nativeCreateCameraIntrinsics(long j);
private native Pose nativeDisplayOrientedPose(long j, long j2);
private native void nativeGetImageIntrinsics(long j, long j2, long j3);
private native Pose nativeGetPose(long j, long j2);
private native void nativeGetProjectionMatrix(long j, long j2, float[] fArr, int i, float f, float f2);
private native void nativeGetTextureIntrinsics(long j, long j2, long j3);
private native int nativeGetTrackingFailureReason(long j, long j2);
private native int nativeGetTrackingState(long j, long j2);
private native void nativeGetViewMatrix(long j, long j2, float[] fArr, int i);
private static native void nativeReleaseCamera(long j, long j2);
public boolean equals(Object obj) {
return (obj instanceof Camera) && ((Camera) obj).nativeHandle == this.nativeHandle;
}
public void finalize() throws Throwable {
long j = this.nativeHandle;
if (j != 0) {
nativeReleaseCamera(this.nativeSymbolTableHandle, j);
}
super.finalize();
}
public Pose getDisplayOrientedPose() {
return nativeDisplayOrientedPose(this.session.nativeWrapperHandle, this.nativeHandle);
}
public CameraIntrinsics getImageIntrinsics() {
CameraIntrinsics cameraIntrinsics = new CameraIntrinsics(nativeCreateCameraIntrinsics(this.session.nativeWrapperHandle), this.session);
nativeGetImageIntrinsics(this.session.nativeWrapperHandle, this.nativeHandle, cameraIntrinsics.nativeHandle);
return cameraIntrinsics;
}
public Pose getPose() {
return nativeGetPose(this.session.nativeWrapperHandle, this.nativeHandle);
}
public void getProjectionMatrix(float[] fArr, int i, float f, float f2) {
nativeGetProjectionMatrix(this.session.nativeWrapperHandle, this.nativeHandle, fArr, i, f, f2);
}
public CameraIntrinsics getTextureIntrinsics() {
CameraIntrinsics cameraIntrinsics = new CameraIntrinsics(nativeCreateCameraIntrinsics(this.session.nativeWrapperHandle), this.session);
nativeGetTextureIntrinsics(this.session.nativeWrapperHandle, this.nativeHandle, cameraIntrinsics.nativeHandle);
return cameraIntrinsics;
}
@NonNull
public TrackingFailureReason getTrackingFailureReason() {
return TrackingFailureReason.forNumber(nativeGetTrackingFailureReason(this.session.nativeWrapperHandle, this.nativeHandle));
}
@NonNull
public TrackingState getTrackingState() {
return TrackingState.forNumber(nativeGetTrackingState(this.session.nativeWrapperHandle, this.nativeHandle));
}
public void getViewMatrix(float[] fArr, int i) {
nativeGetViewMatrix(this.session.nativeWrapperHandle, this.nativeHandle, fArr, i);
}
public int hashCode() {
return Long.valueOf(this.nativeHandle).hashCode();
}
}

View File

@@ -0,0 +1,197 @@
package com.google.ar.core;
import android.util.Range;
import android.util.Size;
import androidx.annotation.NonNull;
import com.google.ar.core.exceptions.FatalException;
import java.util.EnumSet;
/* loaded from: classes3.dex */
public class CameraConfig {
long nativeHandle;
private final long nativeSymbolTableHandle;
private final Session session;
public enum DepthSensorUsage {
REQUIRE_AND_USE(1),
DO_NOT_USE(2);
final int nativeCode;
DepthSensorUsage(int i) {
this.nativeCode = i;
}
@NonNull
public static EnumSet<DepthSensorUsage> forBitFlags(int i) {
EnumSet<DepthSensorUsage> noneOf = EnumSet.noneOf(DepthSensorUsage.class);
for (DepthSensorUsage depthSensorUsage : values()) {
if ((depthSensorUsage.nativeCode & i) != 0) {
noneOf.add(depthSensorUsage);
}
}
return noneOf;
}
@NonNull
public static DepthSensorUsage forNumber(int i) {
for (DepthSensorUsage depthSensorUsage : values()) {
if (depthSensorUsage.nativeCode == i) {
return depthSensorUsage;
}
}
throw new FatalException("Unexpected value for native DepthSensorUsage, value=" + i);
}
}
public enum FacingDirection {
BACK(0),
FRONT(1);
final int nativeCode;
FacingDirection(int i) {
this.nativeCode = i;
}
@NonNull
public static FacingDirection forNumber(int i) {
for (FacingDirection facingDirection : values()) {
if (facingDirection.nativeCode == i) {
return facingDirection;
}
}
throw new FatalException("Unexpected value for native FacingDirection, value=" + i);
}
}
public enum StereoCameraUsage {
REQUIRE_AND_USE(1),
DO_NOT_USE(2);
final int nativeCode;
StereoCameraUsage(int i) {
this.nativeCode = i;
}
@NonNull
public static EnumSet<StereoCameraUsage> forBitFlags(int i) {
EnumSet<StereoCameraUsage> noneOf = EnumSet.noneOf(StereoCameraUsage.class);
for (StereoCameraUsage stereoCameraUsage : values()) {
if ((stereoCameraUsage.nativeCode & i) != 0) {
noneOf.add(stereoCameraUsage);
}
}
return noneOf;
}
@NonNull
public static StereoCameraUsage forNumber(int i) {
for (StereoCameraUsage stereoCameraUsage : values()) {
if (stereoCameraUsage.nativeCode == i) {
return stereoCameraUsage;
}
}
throw new FatalException("Unexpected value for native StereoCameraUsage, value=" + i);
}
}
public enum TargetFps {
TARGET_FPS_30(1),
TARGET_FPS_60(2);
final int nativeCode;
TargetFps(int i) {
this.nativeCode = i;
}
public static EnumSet<TargetFps> forBitFlags(int i) {
EnumSet<TargetFps> noneOf = EnumSet.noneOf(TargetFps.class);
for (TargetFps targetFps : values()) {
if ((targetFps.nativeCode & i) != 0) {
noneOf.add(targetFps);
}
}
return noneOf;
}
}
public CameraConfig() {
this.session = null;
this.nativeHandle = 0L;
this.nativeSymbolTableHandle = 0L;
}
public CameraConfig(Session session, long j) {
this.session = session;
this.nativeHandle = j;
this.nativeSymbolTableHandle = session.nativeSymbolTableHandle;
}
private static native void nativeDestroyCameraConfig(long j, long j2);
private native String nativeGetCameraId(long j, long j2);
private native int nativeGetDepthSensorUsage(long j, long j2);
private native int nativeGetFacingDirection(long j, long j2);
private native void nativeGetFpsRange(long j, long j2, int[] iArr);
private native void nativeGetImageDimensions(long j, long j2, int[] iArr);
private native int nativeGetStereoCameraUsage(long j, long j2);
private native void nativeGetTextureDimensions(long j, long j2, int[] iArr);
public void finalize() throws Throwable {
long j = this.nativeHandle;
if (j != 0) {
nativeDestroyCameraConfig(this.nativeSymbolTableHandle, j);
this.nativeHandle = 0L;
}
super.finalize();
}
public String getCameraId() {
return nativeGetCameraId(this.session.nativeWrapperHandle, this.nativeHandle);
}
@NonNull
public DepthSensorUsage getDepthSensorUsage() {
return DepthSensorUsage.forNumber(nativeGetDepthSensorUsage(this.session.nativeWrapperHandle, this.nativeHandle));
}
@NonNull
public FacingDirection getFacingDirection() {
return FacingDirection.forNumber(nativeGetFacingDirection(this.session.nativeWrapperHandle, this.nativeHandle));
}
@NonNull
public Range<Integer> getFpsRange() {
int[] iArr = new int[2];
nativeGetFpsRange(this.session.nativeWrapperHandle, this.nativeHandle, iArr);
return new Range<>(Integer.valueOf(iArr[0]), Integer.valueOf(iArr[1]));
}
@NonNull
public Size getImageSize() {
int[] iArr = new int[2];
nativeGetImageDimensions(this.session.nativeWrapperHandle, this.nativeHandle, iArr);
return new Size(iArr[0], iArr[1]);
}
@NonNull
public StereoCameraUsage getStereoCameraUsage() {
return StereoCameraUsage.forNumber(nativeGetStereoCameraUsage(this.session.nativeWrapperHandle, this.nativeHandle));
}
@NonNull
public Size getTextureSize() {
int[] iArr = new int[2];
nativeGetTextureDimensions(this.session.nativeWrapperHandle, this.nativeHandle, iArr);
return new Size(iArr[0], iArr[1]);
}
}

View File

@@ -0,0 +1,114 @@
package com.google.ar.core;
import androidx.annotation.NonNull;
import com.google.ar.core.CameraConfig;
import java.util.EnumSet;
import java.util.Iterator;
/* loaded from: classes3.dex */
public class CameraConfigFilter {
private static final String TAG = "CameraConfigFilter";
long nativeHandle;
private final long nativeSymbolTableHandle;
private final Session session;
public CameraConfigFilter() {
this.session = null;
this.nativeHandle = 0L;
this.nativeSymbolTableHandle = 0L;
}
public CameraConfigFilter(Session session) {
this.session = session;
this.nativeHandle = nativeCreateCameraConfigFilter(session.nativeWrapperHandle);
this.nativeSymbolTableHandle = session.nativeSymbolTableHandle;
}
private static native long nativeCreateCameraConfigFilter(long j);
private static native void nativeDestroyCameraConfigFilter(long j, long j2);
private native int nativeGetDepthSensorUsage(long j, long j2);
private native int nativeGetFacingDirection(long j, long j2);
private native int nativeGetStereoCameraUsage(long j, long j2);
private native int nativeGetTargetFps(long j, long j2);
private native void nativeSetDepthSensorUsage(long j, long j2, int i);
private native void nativeSetFacingDirection(long j, long j2, int i);
private native void nativeSetStereoCameraUsage(long j, long j2, int i);
private native void nativeSetTargetFps(long j, long j2, int i);
public void finalize() throws Throwable {
long j = this.nativeHandle;
if (j != 0) {
nativeDestroyCameraConfigFilter(this.nativeSymbolTableHandle, j);
this.nativeHandle = 0L;
}
super.finalize();
}
@NonNull
public EnumSet<CameraConfig.DepthSensorUsage> getDepthSensorUsage() {
return CameraConfig.DepthSensorUsage.forBitFlags(nativeGetDepthSensorUsage(this.session.nativeWrapperHandle, this.nativeHandle));
}
@NonNull
public CameraConfig.FacingDirection getFacingDirection() {
return CameraConfig.FacingDirection.forNumber(nativeGetFacingDirection(this.session.nativeWrapperHandle, this.nativeHandle));
}
@NonNull
public EnumSet<CameraConfig.StereoCameraUsage> getStereoCameraUsage() {
return CameraConfig.StereoCameraUsage.forBitFlags(nativeGetStereoCameraUsage(this.session.nativeWrapperHandle, this.nativeHandle));
}
@NonNull
public EnumSet<CameraConfig.TargetFps> getTargetFps() {
return CameraConfig.TargetFps.forBitFlags(nativeGetTargetFps(this.session.nativeWrapperHandle, this.nativeHandle));
}
@NonNull
public CameraConfigFilter setDepthSensorUsage(EnumSet<CameraConfig.DepthSensorUsage> enumSet) {
Iterator<E> it = enumSet.iterator();
int i = 0;
while (it.hasNext()) {
i |= ((CameraConfig.DepthSensorUsage) it.next()).nativeCode;
}
nativeSetDepthSensorUsage(this.session.nativeWrapperHandle, this.nativeHandle, i);
return this;
}
@NonNull
public CameraConfigFilter setFacingDirection(CameraConfig.FacingDirection facingDirection) {
nativeSetFacingDirection(this.session.nativeWrapperHandle, this.nativeHandle, facingDirection.nativeCode);
return this;
}
@NonNull
public CameraConfigFilter setStereoCameraUsage(EnumSet<CameraConfig.StereoCameraUsage> enumSet) {
Iterator<E> it = enumSet.iterator();
int i = 0;
while (it.hasNext()) {
i |= ((CameraConfig.StereoCameraUsage) it.next()).nativeCode;
}
nativeSetStereoCameraUsage(this.session.nativeWrapperHandle, this.nativeHandle, i);
return this;
}
@NonNull
public CameraConfigFilter setTargetFps(EnumSet<CameraConfig.TargetFps> enumSet) {
Iterator<E> it = enumSet.iterator();
int i = 0;
while (it.hasNext()) {
i |= ((CameraConfig.TargetFps) it.next()).nativeCode;
}
nativeSetTargetFps(this.session.nativeWrapperHandle, this.nativeHandle, i);
return this;
}
}

View File

@@ -0,0 +1,66 @@
package com.google.ar.core;
/* loaded from: classes3.dex */
public class CameraIntrinsics {
long nativeHandle;
private final long nativeSymbolTableHandle;
private final Session session;
public CameraIntrinsics() {
this.nativeHandle = 0L;
this.session = null;
this.nativeSymbolTableHandle = 0L;
}
public CameraIntrinsics(long j, Session session) {
this.nativeHandle = j;
this.session = session;
this.nativeSymbolTableHandle = session.nativeSymbolTableHandle;
}
private native void nativeDestroyCameraIntrinsics(long j, long j2);
private native void nativeGetFocalLength(long j, long j2, float[] fArr, int i);
private native void nativeGetImageDimensions(long j, long j2, int[] iArr, int i);
private native void nativeGetPrincipalPoint(long j, long j2, float[] fArr, int i);
public void finalize() throws Throwable {
long j = this.nativeHandle;
if (j != 0) {
nativeDestroyCameraIntrinsics(this.nativeSymbolTableHandle, j);
}
super.finalize();
}
public float[] getFocalLength() {
float[] fArr = new float[2];
getFocalLength(fArr, 0);
return fArr;
}
public int[] getImageDimensions() {
int[] iArr = new int[2];
getImageDimensions(iArr, 0);
return iArr;
}
public float[] getPrincipalPoint() {
float[] fArr = new float[2];
getPrincipalPoint(fArr, 0);
return fArr;
}
public void getFocalLength(float[] fArr, int i) {
nativeGetFocalLength(this.session.nativeWrapperHandle, this.nativeHandle, fArr, i);
}
public void getImageDimensions(int[] iArr, int i) {
nativeGetImageDimensions(this.session.nativeWrapperHandle, this.nativeHandle, iArr, i);
}
public void getPrincipalPoint(float[] fArr, int i) {
nativeGetPrincipalPoint(this.session.nativeWrapperHandle, this.nativeHandle, fArr, i);
}
}

View File

@@ -0,0 +1,384 @@
package com.google.ar.core;
import androidx.annotation.NonNull;
import com.google.ar.core.exceptions.FatalException;
/* loaded from: classes3.dex */
public class Config {
private static final String TAG = "ARCore-Config";
long nativeHandle;
final long nativeSymbolTableHandle;
final Session session;
public enum AugmentedFaceMode {
DISABLED(0),
MESH3D(2);
final int nativeCode;
AugmentedFaceMode(int i) {
this.nativeCode = i;
}
@NonNull
public static AugmentedFaceMode forNumber(int i) {
for (AugmentedFaceMode augmentedFaceMode : values()) {
if (augmentedFaceMode.nativeCode == i) {
return augmentedFaceMode;
}
}
throw new FatalException("Unexpected value for native AugmentedFaceMode, value=" + i);
}
}
public enum CloudAnchorMode {
DISABLED(0),
ENABLED(1);
final int nativeCode;
CloudAnchorMode(int i) {
this.nativeCode = i;
}
@NonNull
public static CloudAnchorMode forNumber(int i) {
for (CloudAnchorMode cloudAnchorMode : values()) {
if (cloudAnchorMode.nativeCode == i) {
return cloudAnchorMode;
}
}
throw new FatalException("Unexpected value for native AnchorHostingMode, value=" + i);
}
}
public enum DepthMode {
DISABLED(0),
AUTOMATIC(1),
RAW_DEPTH_ONLY(3);
final int nativeCode;
DepthMode(int i) {
this.nativeCode = i;
}
@NonNull
public static DepthMode forNumber(int i) {
for (DepthMode depthMode : values()) {
if (depthMode.nativeCode == i) {
return depthMode;
}
}
throw new FatalException("Unexpected value for native DepthMode, value=" + i);
}
}
public enum FocusMode {
FIXED(0),
AUTO(1);
final int nativeCode;
FocusMode(int i) {
this.nativeCode = i;
}
@NonNull
public static FocusMode forNumber(int i) {
for (FocusMode focusMode : values()) {
if (focusMode.nativeCode == i) {
return focusMode;
}
}
throw new FatalException("Unexpected value for native FocusMode, value=" + i);
}
}
public enum GeospatialMode {
DISABLED(0),
ENABLED(2);
final int nativeCode;
GeospatialMode(int i) {
this.nativeCode = i;
}
@NonNull
public static GeospatialMode forNumber(int i) {
for (GeospatialMode geospatialMode : values()) {
if (geospatialMode.nativeCode == i) {
return geospatialMode;
}
}
throw new FatalException("Unexpected value for native GeospatialMode, value=" + i);
}
}
public enum InstantPlacementMode {
DISABLED(0),
LOCAL_Y_UP(2);
final int nativeCode;
InstantPlacementMode(int i) {
this.nativeCode = i;
}
public static InstantPlacementMode forNumber(int i) {
for (InstantPlacementMode instantPlacementMode : values()) {
if (instantPlacementMode.nativeCode == i) {
return instantPlacementMode;
}
}
throw new FatalException("Unexpected value for native InstantPlacementMode, value=" + i);
}
}
public enum LightEstimationMode {
DISABLED(0),
AMBIENT_INTENSITY(1),
ENVIRONMENTAL_HDR(2);
final int nativeCode;
LightEstimationMode(int i) {
this.nativeCode = i;
}
@NonNull
public static LightEstimationMode forNumber(int i) {
for (LightEstimationMode lightEstimationMode : values()) {
if (lightEstimationMode.nativeCode == i) {
return lightEstimationMode;
}
}
throw new FatalException("Unexpected value for native LightEstimationMode, value=" + i);
}
}
public enum PlaneFindingMode {
DISABLED(0),
HORIZONTAL(1),
VERTICAL(2),
HORIZONTAL_AND_VERTICAL(3);
final int nativeCode;
PlaneFindingMode(int i) {
this.nativeCode = i;
}
@NonNull
public static PlaneFindingMode forNumber(int i) {
for (PlaneFindingMode planeFindingMode : values()) {
if (planeFindingMode.nativeCode == i) {
return planeFindingMode;
}
}
throw new FatalException("Unexpected value for native PlaneFindingMode, value=" + i);
}
}
public enum UpdateMode {
BLOCKING(0),
LATEST_CAMERA_IMAGE(1);
final int nativeCode;
UpdateMode(int i) {
this.nativeCode = i;
}
@NonNull
public static UpdateMode forNumber(int i) {
for (UpdateMode updateMode : values()) {
if (updateMode.nativeCode == i) {
return updateMode;
}
}
throw new FatalException("Unexpected value for native UpdateMode, value=" + i);
}
}
public Config() {
this.session = null;
this.nativeHandle = 0L;
this.nativeSymbolTableHandle = 0L;
}
public Config(Session session) {
this.session = session;
this.nativeHandle = nativeCreate(session.nativeWrapperHandle);
this.nativeSymbolTableHandle = session.nativeSymbolTableHandle;
}
private static native long nativeCreate(long j);
private static native void nativeDestroy(long j, long j2);
private native int nativeGetAugmentedFaceMode(long j, long j2);
private native long nativeGetAugmentedImageDatabase(long j, long j2);
private native int nativeGetCloudAnchorMode(long j, long j2);
private native int nativeGetDepthMode(long j, long j2);
private native int nativeGetFocusMode(long j, long j2);
private native int nativeGetGeospatialMode(long j, long j2, long j3);
private native int nativeGetInstantPlacementMode(long j, long j2);
private native int nativeGetLightEstimationMode(long j, long j2);
private native int nativeGetPlaneFindingMode(long j, long j2);
private native int nativeGetUpdateMode(long j, long j2);
private native void nativeSetAugmentedFaceMode(long j, long j2, int i);
private native void nativeSetAugmentedImageDatabase(long j, long j2, long j3);
private native void nativeSetCloudAnchorMode(long j, long j2, int i);
private native void nativeSetDepthMode(long j, long j2, int i);
private native void nativeSetFocusMode(long j, long j2, int i);
private native void nativeSetGeospatialMode(long j, long j2, long j3, int i);
private native void nativeSetInstantPlacementMode(long j, long j2, int i);
private native void nativeSetLightEstimationMode(long j, long j2, int i);
private native void nativeSetPlaneFindingMode(long j, long j2, int i);
private native void nativeSetUpdateMode(long j, long j2, int i);
public void finalize() throws Throwable {
long j = this.nativeHandle;
if (j != 0) {
nativeDestroy(this.nativeSymbolTableHandle, j);
}
super.finalize();
}
@NonNull
public AugmentedFaceMode getAugmentedFaceMode() {
return AugmentedFaceMode.forNumber(nativeGetAugmentedFaceMode(this.session.nativeWrapperHandle, this.nativeHandle));
}
@NonNull
public AugmentedImageDatabase getAugmentedImageDatabase() {
return new AugmentedImageDatabase(this.session, nativeGetAugmentedImageDatabase(this.session.nativeWrapperHandle, this.nativeHandle));
}
@NonNull
public CloudAnchorMode getCloudAnchorMode() {
return CloudAnchorMode.forNumber(nativeGetCloudAnchorMode(this.session.nativeWrapperHandle, this.nativeHandle));
}
@NonNull
public DepthMode getDepthMode() {
return DepthMode.forNumber(nativeGetDepthMode(this.session.nativeWrapperHandle, this.nativeHandle));
}
@NonNull
public FocusMode getFocusMode() {
return FocusMode.forNumber(nativeGetFocusMode(this.session.nativeWrapperHandle, this.nativeHandle));
}
@NonNull
public GeospatialMode getGeospatialMode() {
return GeospatialMode.forNumber(nativeGetGeospatialMode(this.nativeSymbolTableHandle, this.session.nativeWrapperHandle, this.nativeHandle));
}
@NonNull
public InstantPlacementMode getInstantPlacementMode() {
return InstantPlacementMode.forNumber(nativeGetInstantPlacementMode(this.session.nativeWrapperHandle, this.nativeHandle));
}
@NonNull
public LightEstimationMode getLightEstimationMode() {
return LightEstimationMode.forNumber(nativeGetLightEstimationMode(this.session.nativeWrapperHandle, this.nativeHandle));
}
@NonNull
public PlaneFindingMode getPlaneFindingMode() {
return PlaneFindingMode.forNumber(nativeGetPlaneFindingMode(this.session.nativeWrapperHandle, this.nativeHandle));
}
@NonNull
public UpdateMode getUpdateMode() {
return UpdateMode.forNumber(nativeGetUpdateMode(this.session.nativeWrapperHandle, this.nativeHandle));
}
@NonNull
public Config setAugmentedFaceMode(AugmentedFaceMode augmentedFaceMode) {
nativeSetAugmentedFaceMode(this.session.nativeWrapperHandle, this.nativeHandle, augmentedFaceMode.nativeCode);
return this;
}
@NonNull
public Config setAugmentedImageDatabase(AugmentedImageDatabase augmentedImageDatabase) {
nativeSetAugmentedImageDatabase(this.session.nativeWrapperHandle, this.nativeHandle, augmentedImageDatabase == null ? 0L : augmentedImageDatabase.nativeHandle);
return this;
}
@NonNull
public Config setCloudAnchorMode(CloudAnchorMode cloudAnchorMode) {
nativeSetCloudAnchorMode(this.session.nativeWrapperHandle, this.nativeHandle, cloudAnchorMode.nativeCode);
return this;
}
@NonNull
public Config setDepthMode(DepthMode depthMode) {
nativeSetDepthMode(this.session.nativeWrapperHandle, this.nativeHandle, depthMode.nativeCode);
return this;
}
@NonNull
public Config setFocusMode(FocusMode focusMode) {
nativeSetFocusMode(this.session.nativeWrapperHandle, this.nativeHandle, focusMode.nativeCode);
return this;
}
@NonNull
public Config setGeospatialMode(GeospatialMode geospatialMode) {
nativeSetGeospatialMode(this.nativeSymbolTableHandle, this.session.nativeWrapperHandle, this.nativeHandle, geospatialMode.nativeCode);
return this;
}
@NonNull
public Config setInstantPlacementMode(InstantPlacementMode instantPlacementMode) {
nativeSetInstantPlacementMode(this.session.nativeWrapperHandle, this.nativeHandle, instantPlacementMode.nativeCode);
return this;
}
@NonNull
public Config setLightEstimationMode(LightEstimationMode lightEstimationMode) {
nativeSetLightEstimationMode(this.session.nativeWrapperHandle, this.nativeHandle, lightEstimationMode.nativeCode);
return this;
}
@NonNull
public Config setPlaneFindingMode(PlaneFindingMode planeFindingMode) {
nativeSetPlaneFindingMode(this.session.nativeWrapperHandle, this.nativeHandle, planeFindingMode.nativeCode);
return this;
}
@NonNull
public Config setUpdateMode(UpdateMode updateMode) {
nativeSetUpdateMode(this.session.nativeWrapperHandle, this.nativeHandle, updateMode.nativeCode);
return this;
}
public Config(Session session, long j) {
this.session = session;
this.nativeHandle = j;
this.nativeSymbolTableHandle = session.nativeSymbolTableHandle;
}
}

View File

@@ -0,0 +1,31 @@
package com.google.ar.core;
import androidx.annotation.NonNull;
import com.google.ar.core.exceptions.FatalException;
/* loaded from: classes3.dex */
public enum Coordinates2d {
TEXTURE_TEXELS(0),
TEXTURE_NORMALIZED(1),
IMAGE_PIXELS(2),
IMAGE_NORMALIZED(3),
OPENGL_NORMALIZED_DEVICE_COORDINATES(6),
VIEW(7),
VIEW_NORMALIZED(8);
final int nativeCode;
Coordinates2d(int i) {
this.nativeCode = i;
}
@NonNull
public static Coordinates2d forNumber(int i) {
for (Coordinates2d coordinates2d : values()) {
if (coordinates2d.nativeCode == i) {
return coordinates2d;
}
}
throw new FatalException("Unexpected value for native Coordinates2d, value=" + i);
}
}

View File

@@ -0,0 +1,39 @@
package com.google.ar.core;
import androidx.annotation.NonNull;
import java.util.Collection;
/* loaded from: classes3.dex */
public class DepthPoint extends TrackableBase {
public DepthPoint(long j, Session session) {
super(j, session);
}
@Override // com.google.ar.core.TrackableBase, com.google.ar.core.Trackable
@NonNull
public /* bridge */ /* synthetic */ Anchor createAnchor(Pose pose) {
return super.createAnchor(pose);
}
@Override // com.google.ar.core.TrackableBase
public /* bridge */ /* synthetic */ boolean equals(Object obj) {
return super.equals(obj);
}
@Override // com.google.ar.core.TrackableBase, com.google.ar.core.Trackable
@NonNull
public /* bridge */ /* synthetic */ Collection getAnchors() {
return super.getAnchors();
}
@Override // com.google.ar.core.TrackableBase, com.google.ar.core.Trackable
@NonNull
public /* bridge */ /* synthetic */ TrackingState getTrackingState() {
return super.getTrackingState();
}
@Override // com.google.ar.core.TrackableBase
public /* bridge */ /* synthetic */ int hashCode() {
return super.hashCode();
}
}

View File

@@ -0,0 +1,106 @@
package com.google.ar.core;
import androidx.annotation.NonNull;
import com.google.ar.core.exceptions.FatalException;
import java.util.Collection;
/* loaded from: classes3.dex */
public class Earth extends TrackableBase {
public enum EarthState {
ENABLED(0),
ERROR_INTERNAL(-1),
ERROR_GEOSPATIAL_MODE_DISABLED(-2),
ERROR_NOT_AUTHORIZED(-3),
ERROR_RESOURCE_EXHAUSTED(-4),
ERROR_APK_VERSION_TOO_OLD(-5);
final int nativeCode;
EarthState(int i) {
this.nativeCode = i;
}
@NonNull
public static EarthState forNumber(int i) {
for (EarthState earthState : values()) {
if (earthState.nativeCode == i) {
return earthState;
}
}
throw new FatalException("Unexpected value for native EarthState, value=" + i);
}
}
public Earth(long j, Session session) {
super(j, session);
}
private native long nativeCreateAnchor(long j, long j2, double d, double d2, double d3, float f, float f2, float f3, float f4);
private native long nativeGetCameraGeospatialPose(long j, long j2);
private native int nativeGetEarthState(long j, long j2);
private native int nativeGetTrackingState(long j, long j2);
private native void nativeReleaseEarth(long j, long j2);
@NonNull
public Anchor createAnchor(double d, double d2, double d3, float f, float f2, float f3, float f4) {
return new Anchor(nativeCreateAnchor(this.session.nativeWrapperHandle, this.nativeHandle, d, d2, d3, f, f2, f3, f4), this.session);
}
@Override // com.google.ar.core.TrackableBase
public /* bridge */ /* synthetic */ boolean equals(Object obj) {
return super.equals(obj);
}
@Override // com.google.ar.core.TrackableBase
public void finalize() throws Throwable {
long j = this.nativeHandle;
if (j != 0) {
nativeReleaseEarth(this.nativeSymbolTableHandle, j);
this.nativeHandle = 0L;
}
super.finalize();
}
@Override // com.google.ar.core.TrackableBase, com.google.ar.core.Trackable
@NonNull
public /* bridge */ /* synthetic */ Collection getAnchors() {
return super.getAnchors();
}
@NonNull
public GeospatialPose getCameraGeospatialPose() {
return new GeospatialPose(nativeGetCameraGeospatialPose(this.session.nativeWrapperHandle, this.nativeHandle), this.session);
}
@NonNull
public EarthState getEarthState() {
return EarthState.forNumber(nativeGetEarthState(this.session.nativeWrapperHandle, this.nativeHandle));
}
@Override // com.google.ar.core.TrackableBase, com.google.ar.core.Trackable
@NonNull
public TrackingState getTrackingState() {
return TrackingState.forNumber(nativeGetTrackingState(this.session.nativeWrapperHandle, this.nativeHandle));
}
@Override // com.google.ar.core.TrackableBase
public /* bridge */ /* synthetic */ int hashCode() {
return super.hashCode();
}
@NonNull
public Anchor createAnchor(double d, double d2, double d3, float[] fArr) {
return new Anchor(nativeCreateAnchor(this.session.nativeWrapperHandle, this.nativeHandle, d, d2, d3, fArr[0], fArr[1], fArr[2], fArr[3]), this.session);
}
@Override // com.google.ar.core.TrackableBase, com.google.ar.core.Trackable
@Deprecated
public Anchor createAnchor(Pose pose) {
throw new IllegalArgumentException("Earth does not support createAnchor using a Pose. Use createAnchor with Geospatial coordinates instead.");
}
}

View File

@@ -0,0 +1,259 @@
package com.google.ar.core;
import android.media.Image;
import android.view.MotionEvent;
import androidx.annotation.NonNull;
import com.google.ar.core.exceptions.NotYetAvailableException;
import java.nio.ByteBuffer;
import java.nio.FloatBuffer;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.UUID;
/* loaded from: classes3.dex */
public class Frame {
static final ArrayList<Anchor> ANCHORS_EMPTY_LIST = new ArrayList<>();
static final ArrayList<Plane> PLANES_EMPTY_LIST = new ArrayList<>();
private static final String TAG = "ARCore-Frame";
private LightEstimate lightEstimate;
long nativeHandle;
final long nativeSymbolTableHandle;
final Session session;
public Frame() {
this.nativeHandle = 0L;
this.session = null;
this.nativeSymbolTableHandle = 0L;
}
public Frame(Session session) {
this(session, nativeCreateFrame(session.nativeWrapperHandle));
}
private List<HitResult> convertNativeHitResultsToList(long[] jArr) {
ArrayList arrayList = new ArrayList(jArr.length);
for (long j : jArr) {
HitResult hitResult = new HitResult(j, this.session);
if (hitResult.getTrackable() != null) {
arrayList.add(hitResult);
}
}
return Collections.unmodifiableList(arrayList);
}
private native long nativeAcquireCameraImage(long j, long j2);
private native long nativeAcquireDepthImage(long j, long j2);
private native long nativeAcquireDepthImage16Bits(long j, long j2);
private native long nativeAcquireImageMetadata(long j, long j2);
private native long nativeAcquireRawDepthConfidenceImage(long j, long j2);
private native long nativeAcquireRawDepthImage(long j, long j2);
private native long nativeAcquireRawDepthImage16Bits(long j, long j2);
private native long[] nativeAcquireTrackData(long j, long j2, byte[] bArr);
private native long[] nativeAcquireUpdatedAnchors(long j, long j2);
private static native long nativeCreateFrame(long j);
private static native void nativeDestroyFrame(long j, long j2);
private native long nativeGetAndroidCameraTimestamp(long j, long j2);
private native Pose nativeGetAndroidSensorPose(long j, long j2);
private native int nativeGetCameraTextureName(long j, long j2);
private native void nativeGetLightEstimate(long j, long j2, long j3);
private native long nativeGetTimestamp(long j, long j2);
private native boolean nativeHasDisplayGeometryChanged(long j, long j2);
private native void nativeRecordTrackData(long j, long j2, byte[] bArr, byte[] bArr2);
private native void nativeTransformCoordinates2dFloatArrayOrBuffer(long j, long j2, int i, Object obj, int i2, Object obj2);
private native void nativeTransformDisplayUvCoords(long j, long j2, FloatBuffer floatBuffer, FloatBuffer floatBuffer2);
@NonNull
public Image acquireCameraImage() throws NotYetAvailableException {
return new ArImage(this.session, nativeAcquireCameraImage(this.session.nativeWrapperHandle, this.nativeHandle));
}
@NonNull
@Deprecated(forRemoval = true)
public Image acquireDepthImage() throws NotYetAvailableException {
return new ArImage(this.session, nativeAcquireDepthImage(this.session.nativeWrapperHandle, this.nativeHandle));
}
@NonNull
public Image acquireDepthImage16Bits() throws NotYetAvailableException {
return new ArImage(this.session, nativeAcquireDepthImage16Bits(this.session.nativeWrapperHandle, this.nativeHandle));
}
@NonNull
public PointCloud acquirePointCloud() {
return new PointCloud(this.session, nativeAcquirePointCloud(this.session.nativeWrapperHandle, this.nativeHandle));
}
@NonNull
public Image acquireRawDepthConfidenceImage() throws NotYetAvailableException {
return new ArImage(this.session, nativeAcquireRawDepthConfidenceImage(this.session.nativeWrapperHandle, this.nativeHandle));
}
@NonNull
@Deprecated(forRemoval = true)
public Image acquireRawDepthImage() throws NotYetAvailableException {
return new ArImage(this.session, nativeAcquireRawDepthImage(this.session.nativeWrapperHandle, this.nativeHandle));
}
@NonNull
public Image acquireRawDepthImage16Bits() throws NotYetAvailableException {
return new ArImage(this.session, nativeAcquireRawDepthImage16Bits(this.session.nativeWrapperHandle, this.nativeHandle));
}
public void finalize() throws Throwable {
long j = this.nativeHandle;
if (j != 0) {
nativeDestroyFrame(this.nativeSymbolTableHandle, j);
this.nativeHandle = 0L;
}
super.finalize();
}
public long getAndroidCameraTimestamp() {
return nativeGetAndroidCameraTimestamp(this.session.nativeWrapperHandle, this.nativeHandle);
}
public Pose getAndroidSensorPose() {
return nativeGetAndroidSensorPose(this.session.nativeWrapperHandle, this.nativeHandle);
}
@NonNull
public Camera getCamera() {
return new Camera(this.session, this);
}
public int getCameraTextureName() {
return nativeGetCameraTextureName(this.session.nativeWrapperHandle, this.nativeHandle);
}
@NonNull
public ImageMetadata getImageMetadata() throws NotYetAvailableException {
return new ImageMetadata(nativeAcquireImageMetadata(this.session.nativeWrapperHandle, this.nativeHandle), this.session);
}
@NonNull
public LightEstimate getLightEstimate() {
if (this.lightEstimate == null) {
this.lightEstimate = new LightEstimate(this.session);
}
nativeGetLightEstimate(this.session.nativeWrapperHandle, this.nativeHandle, this.lightEstimate.nativeHandle);
return this.lightEstimate;
}
public long getTimestamp() {
return nativeGetTimestamp(this.session.nativeWrapperHandle, this.nativeHandle);
}
@NonNull
public Collection<Anchor> getUpdatedAnchors() {
Session session = this.session;
return session.convertNativeAnchorsToCollection(nativeAcquireUpdatedAnchors(session.nativeWrapperHandle, this.nativeHandle));
}
@NonNull
public Collection<TrackData> getUpdatedTrackData(UUID uuid) {
ByteBuffer wrap = ByteBuffer.wrap(new byte[16]);
wrap.putLong(uuid.getMostSignificantBits());
wrap.putLong(uuid.getLeastSignificantBits());
Session session = this.session;
return session.convertNativeTrackDataToCollection(nativeAcquireTrackData(session.nativeWrapperHandle, this.nativeHandle, wrap.array()));
}
@NonNull
public <T extends Trackable> Collection<T> getUpdatedTrackables(Class<T> cls) {
af a = af.a(cls);
if (a == af.UNKNOWN_TO_JAVA) {
return Collections.emptyList();
}
return this.session.convertNativeTrackablesToCollection(cls, nativeAcquireUpdatedTrackables(this.session.nativeWrapperHandle, this.nativeHandle, a.j));
}
public boolean hasDisplayGeometryChanged() {
return nativeHasDisplayGeometryChanged(this.session.nativeWrapperHandle, this.nativeHandle);
}
@NonNull
public List<HitResult> hitTest(float f, float f2) {
return convertNativeHitResultsToList(nativeHitTest(this.session.nativeWrapperHandle, this.nativeHandle, f, f2));
}
@NonNull
public List<HitResult> hitTestInstantPlacement(float f, float f2, float f3) {
return convertNativeHitResultsToList(nativeHitTestInstantPlacement(this.session.nativeWrapperHandle, this.nativeHandle, f, f2, f3));
}
public native long nativeAcquirePointCloud(long j, long j2);
public native long[] nativeAcquireUpdatedTrackables(long j, long j2, int i);
public native long[] nativeHitTest(long j, long j2, float f, float f2);
public native long[] nativeHitTestInstantPlacement(long j, long j2, float f, float f2, float f3);
public native long[] nativeHitTestRay(long j, long j2, float[] fArr, int i, float[] fArr2, int i2);
public void recordTrackData(UUID uuid, ByteBuffer byteBuffer) {
ByteBuffer wrap = ByteBuffer.wrap(new byte[16]);
wrap.putLong(uuid.getMostSignificantBits());
wrap.putLong(uuid.getLeastSignificantBits());
if (byteBuffer.hasArray() && byteBuffer.arrayOffset() == 0) {
nativeRecordTrackData(this.session.nativeWrapperHandle, this.nativeHandle, wrap.array(), byteBuffer.array());
return;
}
byte[] bArr = new byte[byteBuffer.remaining()];
byteBuffer.get(bArr);
nativeRecordTrackData(this.session.nativeWrapperHandle, this.nativeHandle, wrap.array(), bArr);
}
public void transformCoordinates2d(Coordinates2d coordinates2d, FloatBuffer floatBuffer, Coordinates2d coordinates2d2, FloatBuffer floatBuffer2) {
nativeTransformCoordinates2dFloatArrayOrBuffer(this.session.nativeWrapperHandle, this.nativeHandle, coordinates2d.nativeCode, floatBuffer, coordinates2d2.nativeCode, floatBuffer2);
}
@Deprecated
public void transformDisplayUvCoords(FloatBuffer floatBuffer, FloatBuffer floatBuffer2) {
if (!floatBuffer.isDirect() || !floatBuffer2.isDirect()) {
throw new IllegalArgumentException("transformDisplayUvCoords currently requires direct buffers.");
}
nativeTransformDisplayUvCoords(this.session.nativeWrapperHandle, this.nativeHandle, floatBuffer, floatBuffer2);
}
public Frame(Session session, long j) {
this.session = session;
this.nativeHandle = j;
this.nativeSymbolTableHandle = session.nativeSymbolTableHandle;
}
public void transformCoordinates2d(Coordinates2d coordinates2d, float[] fArr, Coordinates2d coordinates2d2, float[] fArr2) {
nativeTransformCoordinates2dFloatArrayOrBuffer(this.session.nativeWrapperHandle, this.nativeHandle, coordinates2d.nativeCode, fArr, coordinates2d2.nativeCode, fArr2);
}
@NonNull
public List<HitResult> hitTest(MotionEvent motionEvent) {
return hitTest(motionEvent.getX(), motionEvent.getY());
}
@NonNull
public List<HitResult> hitTest(float[] fArr, int i, float[] fArr2, int i2) {
return convertNativeHitResultsToList(nativeHitTestRay(this.session.nativeWrapperHandle, this.nativeHandle, fArr, i, fArr2, i2));
}
}

View File

@@ -0,0 +1,69 @@
package com.google.ar.core;
import com.google.ar.core.annotations.UsedByNative;
@UsedByNative("session_jni_wrapper.cc")
/* loaded from: classes3.dex */
public class GeospatialPose {
long nativeHandle;
final long nativeSymbolTableHandle;
private final Session session;
public GeospatialPose(long j, Session session) {
this.session = session;
this.nativeHandle = j;
this.nativeSymbolTableHandle = session.nativeSymbolTableHandle;
}
private static native void nativeDestroy(long j, long j2);
private native double nativeGetAltitude(long j, long j2);
private native double nativeGetHeading(long j, long j2);
private native double nativeGetHeadingAccuracy(long j, long j2);
private native double nativeGetHorizontalAccuracy(long j, long j2);
private native double nativeGetLatitude(long j, long j2);
private native double nativeGetLongitude(long j, long j2);
private native double nativeGetVerticalAccuracy(long j, long j2);
public void finalize() throws Throwable {
long j = this.nativeHandle;
if (j != 0) {
nativeDestroy(this.nativeSymbolTableHandle, j);
}
super.finalize();
}
public double getAltitude() {
return nativeGetAltitude(this.session.nativeWrapperHandle, this.nativeHandle);
}
public double getHeading() {
return nativeGetHeading(this.session.nativeWrapperHandle, this.nativeHandle);
}
public double getHeadingAccuracy() {
return nativeGetHeadingAccuracy(this.session.nativeWrapperHandle, this.nativeHandle);
}
public double getHorizontalAccuracy() {
return nativeGetHorizontalAccuracy(this.session.nativeWrapperHandle, this.nativeHandle);
}
public double getLatitude() {
return nativeGetLatitude(this.session.nativeWrapperHandle, this.nativeHandle);
}
public double getLongitude() {
return nativeGetLongitude(this.session.nativeWrapperHandle, this.nativeHandle);
}
public double getVerticalAccuracy() {
return nativeGetVerticalAccuracy(this.session.nativeWrapperHandle, this.nativeHandle);
}
}

View File

@@ -0,0 +1,62 @@
package com.google.ar.core;
/* loaded from: classes3.dex */
public class HitResult {
long nativeHandle;
private final long nativeSymbolTableHandle;
private final Session session;
public HitResult() {
this.session = null;
this.nativeHandle = 0L;
this.nativeSymbolTableHandle = 0L;
}
public HitResult(long j, Session session) {
this.session = session;
this.nativeHandle = j;
this.nativeSymbolTableHandle = session.nativeSymbolTableHandle;
}
private native long nativeCreateAnchor(long j, long j2);
private static native void nativeDestroyHitResult(long j, long j2);
private native float nativeGetDistance(long j, long j2);
private native Pose nativeGetPose(long j, long j2);
public Anchor createAnchor() {
return new Anchor(nativeCreateAnchor(this.session.nativeWrapperHandle, this.nativeHandle), this.session);
}
public boolean equals(Object obj) {
return (obj instanceof HitResult) && ((HitResult) obj).nativeHandle == this.nativeHandle;
}
public void finalize() throws Throwable {
long j = this.nativeHandle;
if (j != 0) {
nativeDestroyHitResult(this.nativeSymbolTableHandle, j);
}
super.finalize();
}
public float getDistance() {
return nativeGetDistance(this.session.nativeWrapperHandle, this.nativeHandle);
}
public Pose getHitPose() {
return nativeGetPose(this.session.nativeWrapperHandle, this.nativeHandle);
}
public Trackable getTrackable() {
return this.session.createTrackable(nativeAcquireTrackable(this.session.nativeWrapperHandle, this.nativeHandle));
}
public int hashCode() {
return Long.valueOf(this.nativeHandle).hashCode();
}
public native long nativeAcquireTrackable(long j, long j2);
}

View File

@@ -0,0 +1,11 @@
package com.google.ar.core;
/* loaded from: classes3.dex */
public class ImageFormat {
public static final int RGBA_FP16 = 22;
public static final int Y8 = 538982489;
public static final int YUV_420_888 = 35;
private ImageFormat() {
}
}

View File

@@ -0,0 +1,356 @@
package com.google.ar.core;
import android.util.Rational;
import com.google.ar.core.exceptions.FatalException;
import com.google.ar.core.exceptions.MetadataNotFoundException;
/* loaded from: classes3.dex */
public class ImageMetadata {
public static final int BLACK_LEVEL_LOCK = 1441792;
private static final int BLACK_LEVEL_START = 1441792;
public static final int COLOR_CORRECTION_ABERRATION_MODE = 3;
public static final int COLOR_CORRECTION_GAINS = 2;
public static final int COLOR_CORRECTION_MODE = 0;
private static final int COLOR_CORRECTION_START = 0;
public static final int COLOR_CORRECTION_TRANSFORM = 1;
public static final int CONTROL_AE_ANTIBANDING_MODE = 65536;
public static final int CONTROL_AE_EXPOSURE_COMPENSATION = 65537;
public static final int CONTROL_AE_LOCK = 65538;
public static final int CONTROL_AE_MODE = 65539;
public static final int CONTROL_AE_PRECAPTURE_TRIGGER = 65542;
public static final int CONTROL_AE_REGIONS = 65540;
public static final int CONTROL_AE_STATE = 65567;
public static final int CONTROL_AE_TARGET_FPS_RANGE = 65541;
public static final int CONTROL_AF_MODE = 65543;
public static final int CONTROL_AF_REGIONS = 65544;
public static final int CONTROL_AF_STATE = 65568;
public static final int CONTROL_AF_TRIGGER = 65545;
public static final int CONTROL_AWB_LOCK = 65546;
public static final int CONTROL_AWB_MODE = 65547;
public static final int CONTROL_AWB_REGIONS = 65548;
public static final int CONTROL_AWB_STATE = 65570;
public static final int CONTROL_CAPTURE_INTENT = 65549;
public static final int CONTROL_EFFECT_MODE = 65550;
public static final int CONTROL_MODE = 65551;
public static final int CONTROL_POST_RAW_SENSITIVITY_BOOST = 65576;
public static final int CONTROL_SCENE_MODE = 65552;
private static final int CONTROL_START = 65536;
public static final int CONTROL_VIDEO_STABILIZATION_MODE = 65553;
private static final int DEPTH_START = 1638400;
public static final int EDGE_MODE = 196608;
private static final int EDGE_START = 196608;
private static final int FLASH_INFO_START = 327680;
public static final int FLASH_MODE = 262146;
private static final int FLASH_START = 262144;
public static final int FLASH_STATE = 262149;
public static final int HOT_PIXEL_MODE = 393216;
private static final int HOT_PIXEL_START = 393216;
private static final int INFO_START = 1376256;
public static final int JPEG_GPS_COORDINATES = 458752;
public static final int JPEG_GPS_PROCESSING_METHOD = 458753;
public static final int JPEG_GPS_TIMESTAMP = 458754;
public static final int JPEG_ORIENTATION = 458755;
public static final int JPEG_QUALITY = 458756;
private static final int JPEG_START = 458752;
public static final int JPEG_THUMBNAIL_QUALITY = 458757;
public static final int JPEG_THUMBNAIL_SIZE = 458758;
public static final int LENS_APERTURE = 524288;
public static final int LENS_FILTER_DENSITY = 524289;
public static final int LENS_FOCAL_LENGTH = 524290;
public static final int LENS_FOCUS_DISTANCE = 524291;
public static final int LENS_FOCUS_RANGE = 524296;
private static final int LENS_INFO_START = 589824;
public static final int LENS_INTRINSIC_CALIBRATION = 524298;
public static final int LENS_OPTICAL_STABILIZATION_MODE = 524292;
public static final int LENS_POSE_ROTATION = 524294;
public static final int LENS_POSE_TRANSLATION = 524295;
public static final int LENS_RADIAL_DISTORTION = 524299;
private static final int LENS_START = 524288;
public static final int LENS_STATE = 524297;
public static final int NOISE_REDUCTION_MODE = 655360;
private static final int NOISE_REDUCTION_START = 655360;
public static final int REQUEST_PIPELINE_DEPTH = 786441;
private static final int REQUEST_START = 786432;
public static final int SCALER_CROP_REGION = 851968;
private static final int SCALER_START = 851968;
private static final int SECTION_BLACK_LEVEL = 22;
private static final int SECTION_COLOR_CORRECTION = 0;
private static final int SECTION_CONTROL = 1;
private static final int SECTION_DEPTH = 25;
private static final int SECTION_EDGE = 3;
private static final int SECTION_FLASH = 4;
private static final int SECTION_FLASH_INFO = 5;
private static final int SECTION_HOT_PIXEL = 6;
private static final int SECTION_INFO = 21;
private static final int SECTION_JPEG = 7;
private static final int SECTION_LENS = 8;
private static final int SECTION_LENS_INFO = 9;
private static final int SECTION_NOISE_REDUCTION = 10;
private static final int SECTION_REQUEST = 12;
private static final int SECTION_SCALER = 13;
private static final int SECTION_SENSOR = 14;
private static final int SECTION_SENSOR_INFO = 15;
private static final int SECTION_SHADING = 16;
private static final int SECTION_STATISTICS = 17;
private static final int SECTION_STATISTICS_INFO = 18;
private static final int SECTION_SYNC = 23;
private static final int SECTION_TONEMAP = 19;
public static final int SENSOR_DYNAMIC_BLACK_LEVEL = 917532;
public static final int SENSOR_DYNAMIC_WHITE_LEVEL = 917533;
public static final int SENSOR_EXPOSURE_TIME = 917504;
public static final int SENSOR_FRAME_DURATION = 917505;
public static final int SENSOR_GREEN_SPLIT = 917526;
private static final int SENSOR_INFO_START = 983040;
public static final int SENSOR_NEUTRAL_COLOR_POINT = 917522;
public static final int SENSOR_NOISE_PROFILE = 917523;
public static final int SENSOR_ROLLING_SHUTTER_SKEW = 917530;
public static final int SENSOR_SENSITIVITY = 917506;
private static final int SENSOR_START = 917504;
public static final int SENSOR_TEST_PATTERN_DATA = 917527;
public static final int SENSOR_TEST_PATTERN_MODE = 917528;
public static final int SENSOR_TIMESTAMP = 917520;
public static final int SHADING_MODE = 1048576;
private static final int SHADING_START = 1048576;
public static final int STATISTICS_FACE_DETECT_MODE = 1114112;
public static final int STATISTICS_FACE_IDS = 1114116;
public static final int STATISTICS_FACE_LANDMARKS = 1114117;
public static final int STATISTICS_FACE_RECTANGLES = 1114118;
public static final int STATISTICS_FACE_SCORES = 1114119;
public static final int STATISTICS_HOT_PIXEL_MAP = 1114127;
public static final int STATISTICS_HOT_PIXEL_MAP_MODE = 1114115;
private static final int STATISTICS_INFO_START = 1179648;
public static final int STATISTICS_LENS_SHADING_MAP = 1114123;
public static final int STATISTICS_LENS_SHADING_MAP_MODE = 1114128;
public static final int STATISTICS_SCENE_FLICKER = 1114126;
private static final int STATISTICS_START = 1114112;
public static final int SYNC_FRAME_NUMBER = 1507328;
private static final int SYNC_START = 1507328;
private static final String TAG = "ARCore-ImageMetadata";
public static final int TONEMAP_CURVE_BLUE = 1245184;
public static final int TONEMAP_CURVE_GREEN = 1245185;
public static final int TONEMAP_CURVE_RED = 1245186;
public static final int TONEMAP_GAMMA = 1245190;
public static final int TONEMAP_MODE = 1245187;
public static final int TONEMAP_PRESET_CURVE = 1245191;
private static final int TONEMAP_START = 1245184;
private static final int TYPE_BYTE = 0;
private static final int TYPE_DOUBLE = 4;
private static final int TYPE_FLOAT = 2;
private static final int TYPE_INT = 1;
private static final int TYPE_LONG = 3;
private static final int TYPE_RATIONAL = 5;
private final long nativeHandle;
private final long nativeSymbolTableHandle;
private final Session session;
private final n sketchEntry;
public ImageMetadata() {
this.session = null;
this.nativeHandle = 0L;
this.nativeSymbolTableHandle = 0L;
this.sketchEntry = null;
}
public ImageMetadata(long j, Session session) {
this.session = session;
this.nativeHandle = j;
this.nativeSymbolTableHandle = session.nativeSymbolTableHandle;
this.sketchEntry = new n();
}
private void getMetdataEntry(int i, n nVar) {
long nativeGetMetadataEntry = nativeGetMetadataEntry(this.session.nativeWrapperHandle, this.nativeHandle, i);
nVar.a = nativeGetMetadataEntry;
if (nativeGetMetadataEntry == 0) {
throw new IllegalArgumentException(String.format("Invalid ImageMetadata key: %1$d", Integer.valueOf(i)));
}
nVar.b = nativeGetMetadataEntryValueType(this.session.nativeWrapperHandle, nativeGetMetadataEntry);
nVar.c = nativeGetMetadataEntryValueCount(this.session.nativeWrapperHandle, nVar.a);
}
private native void nativeDestroyMetadataEntry(long j, long j2);
private native long[] nativeGetAllKeys(long j, long j2);
private native byte[] nativeGetByteArrayFromMetadataEntry(long j, long j2);
private native byte nativeGetByteFromMetadataEntry(long j, long j2);
private native double[] nativeGetDoubleArrayFromMetadataEntry(long j, long j2);
private native double nativeGetDoubleFromMetadataEntry(long j, long j2);
private native float[] nativeGetFloatArrayFromMetadataEntry(long j, long j2);
private native float nativeGetFloatFromMetadataEntry(long j, long j2);
private native int[] nativeGetIntArrayFromMetadataEntry(long j, long j2);
private native int nativeGetIntFromMetadataEntry(long j, long j2);
private native long[] nativeGetLongArrayFromMetadataEntry(long j, long j2);
private native long nativeGetLongFromMetadataEntry(long j, long j2);
private native long nativeGetMetadataEntry(long j, long j2, int i);
private native int nativeGetMetadataEntryValueCount(long j, long j2);
private native int nativeGetMetadataEntryValueType(long j, long j2);
private native Rational[] nativeGetRationalArrayFromMetadataEntry(long j, long j2);
private native Rational nativeGetRationalFromMetadataEntry(long j, long j2);
public static native void nativeLoadSymbols();
private static native void nativeReleaseImageMetadata(long j, long j2);
public void finalize() throws Throwable {
long j = this.nativeHandle;
if (j != 0) {
nativeReleaseImageMetadata(this.nativeSymbolTableHandle, j);
}
super.finalize();
}
public byte getByte(int i) throws MetadataNotFoundException {
getMetdataEntry(i, this.sketchEntry);
n nVar = this.sketchEntry;
if (nVar.b != 0 || nVar.c != 1) {
throw new IllegalArgumentException(String.format("Wrong return type for ImageMetadata key: %1$d.", Integer.valueOf(i)));
}
byte nativeGetByteFromMetadataEntry = nativeGetByteFromMetadataEntry(this.session.nativeWrapperHandle, nVar.a);
nativeDestroyMetadataEntry(this.session.nativeWrapperHandle, this.sketchEntry.a);
return nativeGetByteFromMetadataEntry;
}
public byte[] getByteArray(int i) throws MetadataNotFoundException {
getMetdataEntry(i, this.sketchEntry);
n nVar = this.sketchEntry;
if (nVar.b != 0) {
throw new IllegalArgumentException(String.format("Wrong return type for ImageMetadata key: %1$d.", Integer.valueOf(i)));
}
byte[] nativeGetByteArrayFromMetadataEntry = nativeGetByteArrayFromMetadataEntry(this.session.nativeWrapperHandle, nVar.a);
nativeDestroyMetadataEntry(this.session.nativeWrapperHandle, this.sketchEntry.a);
return nativeGetByteArrayFromMetadataEntry;
}
public double getDouble(int i) throws MetadataNotFoundException {
getMetdataEntry(i, this.sketchEntry);
n nVar = this.sketchEntry;
if (nVar.b != 4 || nVar.c != 1) {
throw new IllegalArgumentException(String.format("Wrong return type for ImageMetadata key: %1$d.", Integer.valueOf(i)));
}
double nativeGetDoubleFromMetadataEntry = nativeGetDoubleFromMetadataEntry(this.session.nativeWrapperHandle, nVar.a);
nativeDestroyMetadataEntry(this.session.nativeWrapperHandle, this.sketchEntry.a);
return nativeGetDoubleFromMetadataEntry;
}
public double[] getDoubleArray(int i) throws MetadataNotFoundException {
getMetdataEntry(i, this.sketchEntry);
n nVar = this.sketchEntry;
if (nVar.b != 4) {
throw new IllegalArgumentException(String.format("Wrong return type for ImageMetadata key: %1$d.", Integer.valueOf(i)));
}
double[] nativeGetDoubleArrayFromMetadataEntry = nativeGetDoubleArrayFromMetadataEntry(this.session.nativeWrapperHandle, nVar.a);
nativeDestroyMetadataEntry(this.session.nativeWrapperHandle, this.sketchEntry.a);
return nativeGetDoubleArrayFromMetadataEntry;
}
public float getFloat(int i) throws MetadataNotFoundException {
getMetdataEntry(i, this.sketchEntry);
n nVar = this.sketchEntry;
if (nVar.b != 2 || nVar.c != 1) {
throw new IllegalArgumentException(String.format("Wrong return type for ImageMetadata key: %1$d.", Integer.valueOf(i)));
}
float nativeGetFloatFromMetadataEntry = nativeGetFloatFromMetadataEntry(this.session.nativeWrapperHandle, nVar.a);
nativeDestroyMetadataEntry(this.session.nativeWrapperHandle, this.sketchEntry.a);
return nativeGetFloatFromMetadataEntry;
}
public float[] getFloatArray(int i) throws MetadataNotFoundException {
getMetdataEntry(i, this.sketchEntry);
n nVar = this.sketchEntry;
if (nVar.b != 2) {
throw new IllegalArgumentException(String.format("Wrong return type for ImageMetadata key: %1$d.", Integer.valueOf(i)));
}
float[] nativeGetFloatArrayFromMetadataEntry = nativeGetFloatArrayFromMetadataEntry(this.session.nativeWrapperHandle, nVar.a);
nativeDestroyMetadataEntry(this.session.nativeWrapperHandle, this.sketchEntry.a);
return nativeGetFloatArrayFromMetadataEntry;
}
public int getInt(int i) throws MetadataNotFoundException {
getMetdataEntry(i, this.sketchEntry);
n nVar = this.sketchEntry;
if (nVar.b != 1 || nVar.c != 1) {
throw new IllegalArgumentException(String.format("Wrong return type for ImageMetadata key: %1$d.", Integer.valueOf(i)));
}
int nativeGetIntFromMetadataEntry = nativeGetIntFromMetadataEntry(this.session.nativeWrapperHandle, nVar.a);
nativeDestroyMetadataEntry(this.session.nativeWrapperHandle, this.sketchEntry.a);
return nativeGetIntFromMetadataEntry;
}
public int[] getIntArray(int i) throws MetadataNotFoundException {
getMetdataEntry(i, this.sketchEntry);
n nVar = this.sketchEntry;
if (nVar.b != 1) {
throw new IllegalArgumentException(String.format("Wrong return type for ImageMetadata key: %1$d.", Integer.valueOf(i)));
}
int[] nativeGetIntArrayFromMetadataEntry = nativeGetIntArrayFromMetadataEntry(this.session.nativeWrapperHandle, nVar.a);
nativeDestroyMetadataEntry(this.session.nativeWrapperHandle, this.sketchEntry.a);
return nativeGetIntArrayFromMetadataEntry;
}
public long[] getKeys() {
long[] nativeGetAllKeys = nativeGetAllKeys(this.session.nativeWrapperHandle, this.nativeHandle);
if (nativeGetAllKeys != null) {
return nativeGetAllKeys;
}
throw new FatalException("Unknown error in ImageMetadata.getKeys().");
}
public long getLong(int i) throws MetadataNotFoundException {
getMetdataEntry(i, this.sketchEntry);
n nVar = this.sketchEntry;
if (nVar.b != 3 || nVar.c != 1) {
throw new IllegalArgumentException(String.format("Wrong return type for ImageMetadata key: %1$d, type: %2$d, count: %3$d.", Integer.valueOf(i), Integer.valueOf(this.sketchEntry.b), Integer.valueOf(this.sketchEntry.c)));
}
long nativeGetLongFromMetadataEntry = nativeGetLongFromMetadataEntry(this.session.nativeWrapperHandle, nVar.a);
nativeDestroyMetadataEntry(this.session.nativeWrapperHandle, this.sketchEntry.a);
return nativeGetLongFromMetadataEntry;
}
public long[] getLongArray(int i) throws MetadataNotFoundException {
getMetdataEntry(i, this.sketchEntry);
n nVar = this.sketchEntry;
if (nVar.b != 3) {
throw new IllegalArgumentException(String.format("Wrong return type for ImageMetadata key: %1$d.", Integer.valueOf(i)));
}
long[] nativeGetLongArrayFromMetadataEntry = nativeGetLongArrayFromMetadataEntry(this.session.nativeWrapperHandle, nVar.a);
nativeDestroyMetadataEntry(this.session.nativeWrapperHandle, this.sketchEntry.a);
return nativeGetLongArrayFromMetadataEntry;
}
public Rational getRational(int i) throws MetadataNotFoundException {
getMetdataEntry(i, this.sketchEntry);
n nVar = this.sketchEntry;
if (nVar.b != 5 || nVar.c != 1) {
throw new IllegalArgumentException(String.format("Wrong return type for ImageMetadata key: %1$d.", Integer.valueOf(i)));
}
Rational nativeGetRationalFromMetadataEntry = nativeGetRationalFromMetadataEntry(this.session.nativeWrapperHandle, nVar.a);
nativeDestroyMetadataEntry(this.session.nativeWrapperHandle, this.sketchEntry.a);
return nativeGetRationalFromMetadataEntry;
}
public Rational[] getRationalArray(int i) throws MetadataNotFoundException {
getMetdataEntry(i, this.sketchEntry);
n nVar = this.sketchEntry;
if (nVar.b != 5) {
throw new IllegalArgumentException(String.format("Wrong return type for ImageMetadata key: %1$d.", Integer.valueOf(i)));
}
Rational[] nativeGetRationalArrayFromMetadataEntry = nativeGetRationalArrayFromMetadataEntry(this.session.nativeWrapperHandle, nVar.a);
nativeDestroyMetadataEntry(this.session.nativeWrapperHandle, this.sketchEntry.a);
return nativeGetRationalArrayFromMetadataEntry;
}
}

View File

@@ -0,0 +1,219 @@
package com.google.ar.core;
import android.animation.ValueAnimator;
import android.annotation.TargetApi;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.DisplayMetrics;
import android.util.Log;
import android.view.ContextThemeWrapper;
import android.widget.ProgressBar;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.core.view.accessibility.AccessibilityEventCompat;
import com.google.ar.core.ArCoreApk;
import com.google.ar.core.annotations.UsedByReflection;
import com.google.ar.core.exceptions.FatalException;
import com.google.ar.core.exceptions.UnavailableDeviceNotCompatibleException;
import com.google.ar.core.exceptions.UnavailableUserDeclinedInstallationException;
import java.util.concurrent.atomic.AtomicReference;
@TargetApi(24)
@UsedByReflection("AndroidManifest.xml")
/* loaded from: classes3.dex */
public class InstallActivity extends Activity {
private static final int BOX_SIZE_DP = 280;
private static final int INSTALLING_TEXT_BOTTOM_MARGIN_DP = 30;
static final String INSTALL_BEHAVIOR_KEY = "behavior";
static final String MESSAGE_TYPE_KEY = "message";
private static final String TAG = "ARCore-InstallActivity";
private boolean finished;
private ArCoreApk.InstallBehavior installBehavior;
private boolean installStarted;
private ArCoreApk.UserMessageType messageType;
private boolean waitingForCompletion;
private final ContextThemeWrapper themeWrapper = new ContextThemeWrapper(this, android.R.style.Theme.Material.Light.Dialog.Alert);
private t lastEvent = t.CANCELLED;
/* JADX INFO: Access modifiers changed from: private */
public void animateToSpinner() {
DisplayMetrics displayMetrics = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);
int i = (int) (displayMetrics.density * 280.0f);
int width = getWindow().getDecorView().getWidth();
int height = getWindow().getDecorView().getHeight();
setContentView(new RelativeLayout(this));
getWindow().getDecorView().setMinimumWidth(i);
ValueAnimator ofFloat = ValueAnimator.ofFloat(0.0f, 1.0f);
ofFloat.setDuration(300L);
ofFloat.addUpdateListener(new q(this, width, i, height));
ofFloat.addListener(new C1373r(this));
ofFloat.start();
}
/* JADX INFO: Access modifiers changed from: private */
public void closeInstaller() {
startActivity(new Intent(this, (Class<?>) InstallActivity.class).setFlags(AccessibilityEventCompat.TYPE_VIEW_TARGETED_BY_SCROLL));
}
/* JADX INFO: Access modifiers changed from: private */
public void finishWithFailure(Exception exc) {
j.a().a = exc;
j.a().d();
this.finished = true;
super.finish();
}
private boolean isOptional() {
return this.installBehavior == ArCoreApk.InstallBehavior.OPTIONAL;
}
private void showEducationDialog() {
setContentView(R.layout.__arcore_education);
findViewById(R.id.__arcore_cancelButton).setOnClickListener(new p(this, 1));
if (!isOptional()) {
findViewById(R.id.__arcore_cancelButton).setVisibility(8);
}
findViewById(R.id.__arcore_continueButton).setOnClickListener(new p(this, 0));
TextView textView = (TextView) findViewById(R.id.__arcore_messageText);
t tVar = t.ACCEPTED;
ArCoreApk.UserMessageType userMessageType = ArCoreApk.UserMessageType.APPLICATION;
ArCoreApk.Availability availability = ArCoreApk.Availability.UNKNOWN_ERROR;
if (this.messageType.ordinal() != 1) {
textView.setText(R.string.__arcore_install_app);
} else {
textView.setText(R.string.__arcore_install_feature);
}
}
/* JADX INFO: Access modifiers changed from: private */
public void showSpinner() {
DisplayMetrics displayMetrics = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);
int i = (int) (displayMetrics.density * 280.0f);
getWindow().setLayout(i, i);
RelativeLayout relativeLayout = new RelativeLayout(this.themeWrapper);
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(-2, -2);
layoutParams.addRule(13);
ProgressBar progressBar = new ProgressBar(this.themeWrapper);
progressBar.setIndeterminate(true);
progressBar.setLayoutParams(layoutParams);
relativeLayout.addView(progressBar);
RelativeLayout.LayoutParams layoutParams2 = new RelativeLayout.LayoutParams(-2, -2);
layoutParams2.addRule(14);
layoutParams2.addRule(12);
layoutParams2.bottomMargin = (int) (displayMetrics.density * 30.0f);
TextView textView = new TextView(this.themeWrapper);
textView.setText(R.string.__arcore_installing);
textView.setLayoutParams(layoutParams2);
relativeLayout.addView(textView);
setContentView(relativeLayout);
getWindow().setLayout(i, i);
}
/* JADX INFO: Access modifiers changed from: private */
public void startInstaller() {
this.installStarted = true;
this.lastEvent = t.CANCELLED;
j.a().b(this).d(this, new s(this));
}
@Override // android.app.Activity
public void finish() {
finishWithFailure(new UnavailableUserDeclinedInstallationException());
}
@Override // android.app.Activity
public void onActivityResult(int i, int i2, Intent intent) {
super.onActivityResult(i, i2, intent);
StringBuilder sb = new StringBuilder();
sb.append("activityResult: ");
sb.append(i2);
}
@Override // android.app.Activity
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
try {
if (bundle != null) {
finishWithFailure(new FatalException("Install activity was suspended and recreated."));
return;
}
this.messageType = (ArCoreApk.UserMessageType) getIntent().getSerializableExtra("message");
ArCoreApk.InstallBehavior installBehavior = (ArCoreApk.InstallBehavior) getIntent().getSerializableExtra(INSTALL_BEHAVIOR_KEY);
this.installBehavior = installBehavior;
if (this.messageType == null || installBehavior == null) {
Log.e(TAG, "missing intent data.");
finishWithFailure(new FatalException("Install activity launched without config data."));
return;
}
setTheme(android.R.style.Theme.Material.Light.Dialog.Alert);
getWindow().requestFeature(1);
setFinishOnTouchOutside(isOptional());
if (this.messageType == ArCoreApk.UserMessageType.USER_ALREADY_INFORMED) {
showSpinner();
return;
}
AtomicReference atomicReference = new AtomicReference(ArCoreApk.Availability.UNKNOWN_CHECKING);
j.a().b(this).b(this, new o(atomicReference));
t tVar = t.ACCEPTED;
int ordinal = ((ArCoreApk.Availability) atomicReference.get()).ordinal();
if (ordinal == 0) {
Log.w(TAG, "Preliminary compatibility check failed.");
} else if (ordinal == 3) {
finishWithFailure(new UnavailableDeviceNotCompatibleException());
return;
}
showEducationDialog();
} catch (RuntimeException e) {
finishWithFailure(new FatalException("Exception starting install flow", e));
}
}
@Override // android.app.Activity
public void onDestroy() {
if (!this.finished) {
j.a().d();
}
super.onDestroy();
}
@Override // android.app.Activity
public void onNewIntent(Intent intent) {
}
@Override // android.app.Activity
public void onResume() {
super.onResume();
if (!this.installStarted) {
if (this.messageType == ArCoreApk.UserMessageType.USER_ALREADY_INFORMED) {
startInstaller();
}
} else {
if (this.finished) {
return;
}
synchronized (this) {
try {
t tVar = this.lastEvent;
if (tVar == t.CANCELLED) {
finish();
} else if (tVar == t.ACCEPTED) {
this.waitingForCompletion = true;
} else {
finishWithFailure(j.a().a);
}
} catch (Throwable th) {
throw th;
}
}
}
}
@Override // android.app.Activity
public void onSaveInstanceState(Bundle bundle) {
super.onSaveInstanceState(bundle);
bundle.putBoolean("didResume", true);
}
}

View File

@@ -0,0 +1,75 @@
package com.google.ar.core;
import androidx.annotation.NonNull;
import com.google.ar.core.exceptions.FatalException;
import java.util.Collection;
/* loaded from: classes3.dex */
public class InstantPlacementPoint extends TrackableBase {
public enum TrackingMethod {
NOT_TRACKING(0),
SCREENSPACE_WITH_APPROXIMATE_DISTANCE(1),
FULL_TRACKING(2);
final int nativeCode;
TrackingMethod(int i) {
this.nativeCode = i;
}
public static TrackingMethod fromNumber(int i) {
for (TrackingMethod trackingMethod : values()) {
if (trackingMethod.nativeCode == i) {
return trackingMethod;
}
}
throw new FatalException("Unexpected value for native InstantPlacementPoint TrackingMethod Mode, value=" + i);
}
}
public InstantPlacementPoint(long j, Session session) {
super(j, session);
}
private native Pose nativeGetPose(long j, long j2);
private native int nativeGetTrackingMethod(long j, long j2);
@Override // com.google.ar.core.TrackableBase, com.google.ar.core.Trackable
@NonNull
public /* bridge */ /* synthetic */ Anchor createAnchor(Pose pose) {
return super.createAnchor(pose);
}
@Override // com.google.ar.core.TrackableBase
public /* bridge */ /* synthetic */ boolean equals(Object obj) {
return super.equals(obj);
}
@Override // com.google.ar.core.TrackableBase, com.google.ar.core.Trackable
@NonNull
public /* bridge */ /* synthetic */ Collection getAnchors() {
return super.getAnchors();
}
public Pose getPose() {
return nativeGetPose(this.session.nativeWrapperHandle, this.nativeHandle);
}
@NonNull
public TrackingMethod getTrackingMethod() {
return TrackingMethod.fromNumber(nativeGetTrackingMethod(this.session.nativeWrapperHandle, this.nativeHandle));
}
@Override // com.google.ar.core.TrackableBase, com.google.ar.core.Trackable
@NonNull
public /* bridge */ /* synthetic */ TrackingState getTrackingState() {
return super.getTrackingState();
}
@Override // com.google.ar.core.TrackableBase
public /* bridge */ /* synthetic */ int hashCode() {
return super.hashCode();
}
}

View File

@@ -0,0 +1,120 @@
package com.google.ar.core;
import androidx.annotation.NonNull;
import com.google.ar.core.exceptions.FatalException;
/* loaded from: classes3.dex */
public class LightEstimate {
long nativeHandle;
private final long nativeSymbolTableHandle;
private final Session session;
public enum State {
NOT_VALID(0),
VALID(1);
final int nativeCode;
State(int i) {
this.nativeCode = i;
}
@NonNull
public static State forNumber(int i) {
for (State state : values()) {
if (state.nativeCode == i) {
return state;
}
}
throw new FatalException("Unexpected value for native LightEstimate.State, value=" + i);
}
}
public LightEstimate() {
this.nativeHandle = 0L;
this.session = null;
this.nativeSymbolTableHandle = 0L;
}
public LightEstimate(Session session) {
this.nativeHandle = 0L;
this.session = session;
this.nativeHandle = nativeCreateLightEstimate(session.nativeWrapperHandle);
this.nativeSymbolTableHandle = session.nativeSymbolTableHandle;
}
private ArImage[] convertNativeArImageCubemapToArray(long[] jArr) {
ArImage[] arImageArr = new ArImage[jArr.length];
for (int i = 0; i < jArr.length; i++) {
arImageArr[i] = new ArImage(this.session, jArr[i]);
}
return arImageArr;
}
private native long[] nativeAcquireEnvironmentalHdrCubeMap(long j, long j2);
private static native long nativeCreateLightEstimate(long j);
private static native void nativeDestroyLightEstimate(long j, long j2);
private native void nativeGetColorCorrection(long j, long j2, float[] fArr, int i);
private native void nativeGetEnvironmentalHdrAmbientSphericalHarmonics(long j, long j2, float[] fArr);
private native void nativeGetEnvironmentalHdrMainLightDirection(long j, long j2, float[] fArr);
private native void nativeGetEnvironmentalHdrMainLightIntensity(long j, long j2, float[] fArr);
private native float nativeGetPixelIntensity(long j, long j2);
private native int nativeGetState(long j, long j2);
private native long nativeGetTimestamp(long j, long j2);
public ArImage[] acquireEnvironmentalHdrCubeMap() {
return convertNativeArImageCubemapToArray(nativeAcquireEnvironmentalHdrCubeMap(this.session.nativeWrapperHandle, this.nativeHandle));
}
public void finalize() throws Throwable {
long j = this.nativeHandle;
if (j != 0) {
nativeDestroyLightEstimate(this.nativeSymbolTableHandle, j);
}
super.finalize();
}
public void getColorCorrection(float[] fArr, int i) {
nativeGetColorCorrection(this.session.nativeWrapperHandle, this.nativeHandle, fArr, i);
}
public float[] getEnvironmentalHdrAmbientSphericalHarmonics() {
float[] fArr = new float[27];
nativeGetEnvironmentalHdrAmbientSphericalHarmonics(this.session.nativeWrapperHandle, this.nativeHandle, fArr);
return fArr;
}
public float[] getEnvironmentalHdrMainLightDirection() {
float[] fArr = new float[3];
nativeGetEnvironmentalHdrMainLightDirection(this.session.nativeWrapperHandle, this.nativeHandle, fArr);
return fArr;
}
public float[] getEnvironmentalHdrMainLightIntensity() {
float[] fArr = new float[3];
nativeGetEnvironmentalHdrMainLightIntensity(this.session.nativeWrapperHandle, this.nativeHandle, fArr);
return fArr;
}
public float getPixelIntensity() {
return nativeGetPixelIntensity(this.session.nativeWrapperHandle, this.nativeHandle);
}
@NonNull
public State getState() {
return State.forNumber(nativeGetState(this.session.nativeWrapperHandle, this.nativeHandle));
}
public long getTimestamp() {
return nativeGetTimestamp(this.session.nativeWrapperHandle, this.nativeHandle);
}
}

View File

@@ -0,0 +1,124 @@
package com.google.ar.core;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.google.ar.core.exceptions.FatalException;
import java.nio.FloatBuffer;
import java.util.Collection;
/* loaded from: classes3.dex */
public class Plane extends TrackableBase {
public enum Type {
HORIZONTAL_UPWARD_FACING(0),
HORIZONTAL_DOWNWARD_FACING(1),
VERTICAL(2);
final int nativeCode;
Type(int i) {
this.nativeCode = i;
}
@NonNull
public static Type forNumber(int i) {
for (Type type : values()) {
if (type.nativeCode == i) {
return type;
}
}
throw new FatalException("Unexpected value for native Plane.Type, value=" + i);
}
}
public Plane() {
super(0L, null);
}
private native long nativeAcquireSubsumedBy(long j, long j2);
private native Pose nativeGetCenterPose(long j, long j2);
private native float nativeGetExtentX(long j, long j2);
private native float nativeGetExtentZ(long j, long j2);
private native float[] nativeGetPolygon(long j, long j2);
private native int nativeGetType(long j, long j2);
private native boolean nativeIsPoseInExtents(long j, long j2, Pose pose);
private native boolean nativeIsPoseInPolygon(long j, long j2, Pose pose);
@Override // com.google.ar.core.TrackableBase, com.google.ar.core.Trackable
@NonNull
public /* bridge */ /* synthetic */ Anchor createAnchor(Pose pose) {
return super.createAnchor(pose);
}
@Override // com.google.ar.core.TrackableBase
public /* bridge */ /* synthetic */ boolean equals(Object obj) {
return super.equals(obj);
}
@Override // com.google.ar.core.TrackableBase, com.google.ar.core.Trackable
@NonNull
public /* bridge */ /* synthetic */ Collection getAnchors() {
return super.getAnchors();
}
public Pose getCenterPose() {
return nativeGetCenterPose(this.session.nativeWrapperHandle, this.nativeHandle);
}
public float getExtentX() {
return nativeGetExtentX(this.session.nativeWrapperHandle, this.nativeHandle);
}
public float getExtentZ() {
return nativeGetExtentZ(this.session.nativeWrapperHandle, this.nativeHandle);
}
@NonNull
public FloatBuffer getPolygon() {
return FloatBuffer.wrap(nativeGetPolygon(this.session.nativeWrapperHandle, this.nativeHandle));
}
@Nullable
public Plane getSubsumedBy() {
long nativeAcquireSubsumedBy = nativeAcquireSubsumedBy(this.session.nativeWrapperHandle, this.nativeHandle);
if (nativeAcquireSubsumedBy == 0) {
return null;
}
return new Plane(nativeAcquireSubsumedBy, this.session);
}
@Override // com.google.ar.core.TrackableBase, com.google.ar.core.Trackable
@NonNull
public /* bridge */ /* synthetic */ TrackingState getTrackingState() {
return super.getTrackingState();
}
@NonNull
public Type getType() {
return Type.forNumber(nativeGetType(this.session.nativeWrapperHandle, this.nativeHandle));
}
@Override // com.google.ar.core.TrackableBase
public /* bridge */ /* synthetic */ int hashCode() {
return super.hashCode();
}
public boolean isPoseInExtents(Pose pose) {
return nativeIsPoseInExtents(this.session.nativeWrapperHandle, this.nativeHandle, pose);
}
public boolean isPoseInPolygon(Pose pose) {
return nativeIsPoseInPolygon(this.session.nativeWrapperHandle, this.nativeHandle, pose);
}
public Plane(long j, Session session) {
super(j, session);
}
}

View File

@@ -0,0 +1,28 @@
package com.google.ar.core;
import androidx.annotation.NonNull;
import com.google.ar.core.exceptions.FatalException;
/* loaded from: classes3.dex */
public enum PlaybackStatus {
NONE(0),
OK(1),
IO_ERROR(2),
FINISHED(3);
final int nativeCode;
PlaybackStatus(int i) {
this.nativeCode = i;
}
@NonNull
public static PlaybackStatus forNumber(int i) {
for (PlaybackStatus playbackStatus : values()) {
if (playbackStatus.nativeCode == i) {
return playbackStatus;
}
}
throw new FatalException("Unexpected value for native PlaybackStatus, value=" + i);
}
}

View File

@@ -0,0 +1,79 @@
package com.google.ar.core;
import androidx.annotation.NonNull;
import com.google.ar.core.exceptions.FatalException;
import java.util.Collection;
/* loaded from: classes3.dex */
public class Point extends TrackableBase {
public enum OrientationMode {
INITIALIZED_TO_IDENTITY(0),
ESTIMATED_SURFACE_NORMAL(1);
private final int nativeCode;
OrientationMode(int i) {
this.nativeCode = i;
}
@NonNull
public static OrientationMode forNumber(int i) {
for (OrientationMode orientationMode : values()) {
if (orientationMode.nativeCode == i) {
return orientationMode;
}
}
throw new FatalException("Unexpected value for native Point Orientation Mode, value=" + i);
}
}
public Point() {
super(0L, null);
}
private native int nativeGetOrientationMode(long j, long j2);
private native Pose nativeGetPose(long j, long j2);
@Override // com.google.ar.core.TrackableBase, com.google.ar.core.Trackable
@NonNull
public /* bridge */ /* synthetic */ Anchor createAnchor(Pose pose) {
return super.createAnchor(pose);
}
@Override // com.google.ar.core.TrackableBase
public /* bridge */ /* synthetic */ boolean equals(Object obj) {
return super.equals(obj);
}
@Override // com.google.ar.core.TrackableBase, com.google.ar.core.Trackable
@NonNull
public /* bridge */ /* synthetic */ Collection getAnchors() {
return super.getAnchors();
}
@NonNull
public OrientationMode getOrientationMode() {
return OrientationMode.forNumber(nativeGetOrientationMode(this.session.nativeWrapperHandle, this.nativeHandle));
}
public Pose getPose() {
return nativeGetPose(this.session.nativeWrapperHandle, this.nativeHandle);
}
@Override // com.google.ar.core.TrackableBase, com.google.ar.core.Trackable
@NonNull
public /* bridge */ /* synthetic */ TrackingState getTrackingState() {
return super.getTrackingState();
}
@Override // com.google.ar.core.TrackableBase
public /* bridge */ /* synthetic */ int hashCode() {
return super.hashCode();
}
public Point(long j, Session session) {
super(j, session);
}
}

View File

@@ -0,0 +1,76 @@
package com.google.ar.core;
import com.google.ar.core.exceptions.DeadlineExceededException;
import java.io.Closeable;
import java.nio.ByteBuffer;
import java.nio.FloatBuffer;
import java.nio.IntBuffer;
/* loaded from: classes3.dex */
public class PointCloud implements Closeable {
private long nativeHandle;
private final long nativeSymbolTableHandle;
private final Session session;
public PointCloud() {
this.nativeHandle = 0L;
this.session = null;
this.nativeSymbolTableHandle = 0L;
}
public PointCloud(Session session, long j) {
this.session = session;
this.nativeHandle = j;
this.nativeSymbolTableHandle = session.nativeSymbolTableHandle;
}
private native ByteBuffer nativeGetData(long j, long j2);
private native ByteBuffer nativeGetIds(long j, long j2);
private native long nativeGetTimestamp(long j, long j2);
private native void nativeReleasePointCloud(long j, long j2);
@Override // java.io.Closeable, java.lang.AutoCloseable
public void close() {
release();
}
public void finalize() throws Throwable {
long j = this.nativeHandle;
if (j != 0) {
nativeReleasePointCloud(this.nativeSymbolTableHandle, j);
}
super.finalize();
}
public void release() {
nativeReleasePointCloud(this.nativeSymbolTableHandle, this.nativeHandle);
this.nativeHandle = 0L;
}
public IntBuffer getIds() {
long j = this.nativeHandle;
if (j != 0) {
return Session.directByteBufferOrDefault(nativeGetIds(this.session.nativeWrapperHandle, j)).asIntBuffer();
}
throw new DeadlineExceededException();
}
public FloatBuffer getPoints() {
long j = this.nativeHandle;
if (j != 0) {
return Session.directByteBufferOrDefault(nativeGetData(this.session.nativeWrapperHandle, j)).asFloatBuffer();
}
throw new DeadlineExceededException();
}
public long getTimestamp() {
long j = this.nativeHandle;
if (j != 0) {
return nativeGetTimestamp(this.session.nativeWrapperHandle, j);
}
throw new DeadlineExceededException();
}
}

View File

@@ -0,0 +1,216 @@
package com.google.ar.core;
import androidx.annotation.NonNull;
import com.google.ar.core.annotations.UsedByNative;
import java.util.Locale;
@UsedByNative("session_jni_wrapper.cc")
/* loaded from: classes3.dex */
public class Pose {
public static final Pose IDENTITY = new Pose(new float[]{0.0f, 0.0f, 0.0f}, Quaternion.a);
@UsedByNative("session_jni_wrapper.cc")
private final Quaternion quaternion;
@UsedByNative("session_jni_wrapper.cc")
private final float[] translation;
private Pose(float f, float f2, float f3, float f4, float f5, float f6, float f7) {
this.quaternion = new Quaternion(f4, f5, f6, f7);
this.translation = new float[]{f, f2, f3};
}
@UsedByNative("session_jni_wrapper.cc")
private Pose(float[] fArr, Quaternion quaternion) {
this.translation = fArr;
this.quaternion = quaternion;
}
@NonNull
public static Pose makeInterpolated(Pose pose, Pose pose2, float f) {
if (f == 0.0f) {
return pose;
}
if (f == 1.0f) {
return pose2;
}
float[] fArr = new float[3];
for (int i = 0; i < 3; i++) {
fArr[i] = (pose.translation[i] * (1.0f - f)) + (pose2.translation[i] * f);
}
return new Pose(fArr, Quaternion.g(pose.quaternion, pose2.quaternion, f));
}
@NonNull
public static Pose makeRotation(float f, float f2, float f3, float f4) {
return new Pose(IDENTITY.translation, new Quaternion(f, f2, f3, f4));
}
@NonNull
public static Pose makeTranslation(float f, float f2, float f3) {
return new Pose(new float[]{f, f2, f3}, IDENTITY.quaternion);
}
@NonNull
public Pose compose(Pose pose) {
float[] fArr = new float[3];
Quaternion.i(this.quaternion, pose.translation, 0, fArr, 0);
float f = fArr[0];
float[] fArr2 = this.translation;
fArr[0] = f + fArr2[0];
fArr[1] = fArr[1] + fArr2[1];
fArr[2] = fArr[2] + fArr2[2];
return new Pose(fArr, this.quaternion.e(pose.quaternion));
}
@NonNull
public Pose extractRotation() {
return new Pose(IDENTITY.translation, this.quaternion);
}
public Pose extractTranslation() {
return new Pose(this.translation, IDENTITY.quaternion);
}
public Quaternion getQuaternion() {
return this.quaternion;
}
public float[] getRotationQuaternion() {
float[] fArr = new float[4];
getRotationQuaternion(fArr, 0);
return fArr;
}
public float[] getTransformedAxis(int i, float f) {
float[] fArr = new float[3];
getTransformedAxis(i, f, fArr, 0);
return fArr;
}
public float[] getTranslation() {
float[] fArr = new float[3];
getTranslation(fArr, 0);
return fArr;
}
public float[] getXAxis() {
return getTransformedAxis(0, 1.0f);
}
public float[] getYAxis() {
return getTransformedAxis(1, 1.0f);
}
public float[] getZAxis() {
return getTransformedAxis(2, 1.0f);
}
@NonNull
public Pose inverse() {
float[] fArr = new float[3];
Quaternion f = this.quaternion.f();
Quaternion.i(f, this.translation, 0, fArr, 0);
fArr[0] = -fArr[0];
fArr[1] = -fArr[1];
fArr[2] = -fArr[2];
return new Pose(fArr, f);
}
public float qw() {
return this.quaternion.a();
}
public float qx() {
return this.quaternion.b();
}
public float qy() {
return this.quaternion.c();
}
public float qz() {
return this.quaternion.d();
}
public float[] rotateVector(float[] fArr) {
float[] fArr2 = new float[3];
rotateVector(fArr, 0, fArr2, 0);
return fArr2;
}
public void toMatrix(float[] fArr, int i) {
this.quaternion.k(fArr, i);
float[] fArr2 = this.translation;
fArr[i + 12] = fArr2[0];
fArr[i + 13] = fArr2[1];
fArr[i + 14] = fArr2[2];
fArr[i + 3] = 0.0f;
fArr[i + 7] = 0.0f;
fArr[i + 11] = 0.0f;
fArr[i + 15] = 1.0f;
}
public String toString() {
return String.format(Locale.ENGLISH, "t:[x:%.3f, y:%.3f, z:%.3f], q:[x:%.2f, y:%.2f, z:%.2f, w:%.2f]", Float.valueOf(this.translation[0]), Float.valueOf(this.translation[1]), Float.valueOf(this.translation[2]), Float.valueOf(this.quaternion.b()), Float.valueOf(this.quaternion.c()), Float.valueOf(this.quaternion.d()), Float.valueOf(this.quaternion.a()));
}
public float[] transformPoint(float[] fArr) {
float[] fArr2 = new float[3];
transformPoint(fArr, 0, fArr2, 0);
return fArr2;
}
public float tx() {
return this.translation[0];
}
public float ty() {
return this.translation[1];
}
public float tz() {
return this.translation[2];
}
public Pose(float[] fArr, float[] fArr2) {
this(fArr[0], fArr[1], fArr[2], fArr2[0], fArr2[1], fArr2[2], fArr2[3]);
}
@NonNull
public static Pose makeRotation(float[] fArr) {
return makeRotation(fArr[0], fArr[1], fArr[2], fArr[3]);
}
@NonNull
public static Pose makeTranslation(float[] fArr) {
return makeTranslation(fArr[0], fArr[1], fArr[2]);
}
public void getRotationQuaternion(float[] fArr, int i) {
this.quaternion.h(fArr, i);
}
public void getTransformedAxis(int i, float f, float[] fArr, int i2) {
Quaternion quaternion = this.quaternion;
float[] fArr2 = {0.0f, 0.0f, 0.0f};
fArr2[i] = f;
Quaternion.i(quaternion, fArr2, 0, fArr, i2);
}
public void getTranslation(float[] fArr, int i) {
System.arraycopy(this.translation, 0, fArr, i, 3);
}
public void rotateVector(float[] fArr, int i, float[] fArr2, int i2) {
Quaternion.i(this.quaternion, fArr, i, fArr2, i2);
}
public void transformPoint(float[] fArr, int i, float[] fArr2, int i2) {
rotateVector(fArr, i, fArr2, i2);
for (int i3 = 0; i3 < 3; i3++) {
int i4 = i3 + i2;
fArr2[i4] = fArr2[i4] + this.translation[i3];
}
}
}

View File

@@ -0,0 +1,177 @@
package com.google.ar.core;
import com.google.ar.core.annotations.UsedByNative;
@UsedByNative("session_jni_wrapper.cc")
/* loaded from: classes3.dex */
class Quaternion {
public static final Quaternion a = new Quaternion();
@UsedByNative("session_jni_wrapper.cc")
private float x = 0.0f;
@UsedByNative("session_jni_wrapper.cc")
private float y = 0.0f;
@UsedByNative("session_jni_wrapper.cc")
private float z = 0.0f;
@UsedByNative("session_jni_wrapper.cc")
private float w = 1.0f;
public Quaternion() {
j(0.0f, 0.0f, 0.0f, 1.0f);
}
public static Quaternion g(Quaternion quaternion, Quaternion quaternion2, float f) {
float f2;
Quaternion quaternion3 = new Quaternion();
float f3 = (quaternion.x * quaternion2.x) + (quaternion.y * quaternion2.y) + (quaternion.z * quaternion2.z) + (quaternion.w * quaternion2.w);
if (f3 < 0.0f) {
Quaternion quaternion4 = new Quaternion(quaternion2);
f3 = -f3;
quaternion4.x = -quaternion4.x;
quaternion4.y = -quaternion4.y;
quaternion4.z = -quaternion4.z;
quaternion4.w = -quaternion4.w;
quaternion2 = quaternion4;
}
float acos = (float) Math.acos(f3);
float sqrt = (float) Math.sqrt(1.0f - (f3 * f3));
if (Math.abs(sqrt) > 0.001d) {
float f4 = 1.0f / sqrt;
f2 = ((float) Math.sin((1.0f - f) * acos)) * f4;
f = ((float) Math.sin(f * acos)) * f4;
} else {
f2 = 1.0f - f;
}
quaternion3.x = (quaternion.x * f2) + (quaternion2.x * f);
quaternion3.y = (quaternion.y * f2) + (quaternion2.y * f);
quaternion3.z = (quaternion.z * f2) + (quaternion2.z * f);
quaternion3.w = (f2 * quaternion.w) + (f * quaternion2.w);
float sqrt2 = (float) (1.0d / Math.sqrt((((r1 * r1) + (r2 * r2)) + (r4 * r4)) + (r3 * r3)));
quaternion3.x *= sqrt2;
quaternion3.y *= sqrt2;
quaternion3.z *= sqrt2;
quaternion3.w *= sqrt2;
return quaternion3;
}
public static void i(Quaternion quaternion, float[] fArr, int i, float[] fArr2, int i2) {
float f = fArr[i];
float f2 = fArr[i + 1];
float f3 = fArr[i + 2];
float f4 = quaternion.x;
float f5 = quaternion.y;
float f6 = quaternion.z;
float f7 = quaternion.w;
float f8 = ((f7 * f) + (f5 * f3)) - (f6 * f2);
float f9 = ((f7 * f2) + (f6 * f)) - (f4 * f3);
float f10 = ((f7 * f3) + (f4 * f2)) - (f5 * f);
float f11 = -f4;
float f12 = ((f * f11) - (f2 * f5)) - (f3 * f6);
float f13 = -f6;
float f14 = -f5;
fArr2[i2] = (((f8 * f7) + (f12 * f11)) + (f9 * f13)) - (f10 * f14);
fArr2[i2 + 1] = (((f9 * f7) + (f12 * f14)) + (f10 * f11)) - (f8 * f13);
fArr2[i2 + 2] = (((f10 * f7) + (f12 * f13)) + (f8 * f14)) - (f9 * f11);
}
public final float a() {
return this.w;
}
public final float b() {
return this.x;
}
public final float c() {
return this.y;
}
public final float d() {
return this.z;
}
public final Quaternion e(Quaternion quaternion) {
Quaternion quaternion2 = new Quaternion();
float f = this.x;
float f2 = quaternion.w;
float f3 = this.y;
float f4 = quaternion.z;
float f5 = this.z;
float f6 = quaternion.y;
float f7 = this.w;
quaternion2.x = (((f * f2) + (f3 * f4)) - (f5 * f6)) + (quaternion.x * f7);
float f8 = this.x;
float f9 = -f8;
float f10 = quaternion.x;
quaternion2.y = (f9 * f4) + (f3 * f2) + (f5 * f10) + (f6 * f7);
float f11 = quaternion.y;
float f12 = this.y;
quaternion2.z = ((f8 * f11) - (f12 * f10)) + (f5 * f2) + (f4 * f7);
quaternion2.w = (((f9 * f10) - (f12 * f11)) - (this.z * quaternion.z)) + (f7 * f2);
return quaternion2;
}
public final Quaternion f() {
return new Quaternion(-this.x, -this.y, -this.z, this.w);
}
public final void h(float[] fArr, int i) {
fArr[i] = this.x;
fArr[i + 1] = this.y;
fArr[i + 2] = this.z;
fArr[i + 3] = this.w;
}
public final void j(float f, float f2, float f3, float f4) {
this.x = f;
this.y = f2;
this.z = f3;
this.w = f4;
}
public final void k(float[] fArr, int i) {
float f = this.x;
float f2 = this.y;
float f3 = this.z;
float f4 = this.w;
float f5 = (f * f) + (f2 * f2) + (f3 * f3) + (f4 * f4);
float f6 = f5 > 0.0f ? 2.0f / f5 : 0.0f;
float f7 = f * f6;
float f8 = f2 * f6;
float f9 = f6 * f3;
float f10 = f4 * f7;
float f11 = f4 * f8;
float f12 = f4 * f9;
float f13 = f7 * f;
float f14 = f * f8;
float f15 = f * f9;
float f16 = f8 * f2;
float f17 = f2 * f9;
float f18 = f3 * f9;
fArr[i] = 1.0f - (f16 + f18);
fArr[i + 4] = f14 - f12;
fArr[i + 8] = f15 + f11;
fArr[i + 1] = f14 + f12;
fArr[i + 5] = 1.0f - (f18 + f13);
fArr[i + 9] = f17 - f10;
fArr[i + 2] = f15 - f11;
fArr[i + 6] = f17 + f10;
fArr[i + 10] = 1.0f - (f13 + f16);
}
public final String toString() {
return String.format("[%.3f, %.3f, %.3f, %.3f]", Float.valueOf(this.x), Float.valueOf(this.y), Float.valueOf(this.z), Float.valueOf(this.w));
}
@UsedByNative("session_jni_wrapper.cc")
public Quaternion(float f, float f2, float f3, float f4) {
j(f, f2, f3, f4);
}
public Quaternion(Quaternion quaternion) {
j(quaternion.x, quaternion.y, quaternion.z, quaternion.w);
}
}

View File

@@ -0,0 +1,30 @@
package com.google.ar.core;
/* loaded from: classes3.dex */
public final class R {
public static final class id {
public static int __arcore_cancelButton = 0x7f0a0006;
public static int __arcore_continueButton = 0x7f0a0007;
public static int __arcore_messageText = 0x7f0a0008;
}
public static final class layout {
public static int __arcore_education = 0x7f0d0000;
}
public static final class raw {
public static int keep_arcore = 0x7f110006;
}
public static final class string {
public static int __arcore_cancel = 0x7f120012;
public static int __arcore_continue = 0x7f120013;
public static int __arcore_install_app = 0x7f120014;
public static int __arcore_install_feature = 0x7f120015;
public static int __arcore_installing = 0x7f120016;
}
private R() {
}
}

View File

@@ -0,0 +1,109 @@
package com.google.ar.core;
import android.net.Uri;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
/* loaded from: classes3.dex */
public class RecordingConfig {
long nativeHandle;
private final long nativeSymbolTableHandle;
private final Session session;
public RecordingConfig() {
this.session = null;
this.nativeHandle = 0L;
this.nativeSymbolTableHandle = 0L;
}
public RecordingConfig(Session session) {
this.session = session;
this.nativeHandle = nativeCreateRecordingConfig(session.nativeWrapperHandle);
this.nativeSymbolTableHandle = session.nativeSymbolTableHandle;
}
private native void nativeAddTrack(long j, long j2, long j3);
private static native long nativeCreateRecordingConfig(long j);
private static native void nativeDestroyRecordingConfig(long j, long j2);
private native boolean nativeGetAutoStopOnPause(long j, long j2);
private native String nativeGetMp4DatasetFilePath(long j, long j2);
private native String nativeGetMp4DatasetUri(long j, long j2);
private native int nativeGetRecordingRotation(long j, long j2);
private native void nativeSetAutoStopOnPause(long j, long j2, boolean z);
private native void nativeSetMp4DatasetFilePath(long j, long j2, String str);
private native void nativeSetMp4DatasetUri(long j, long j2, String str);
private native void nativeSetRecordingRotation(long j, long j2, int i);
@NonNull
public RecordingConfig addTrack(Track track) {
nativeAddTrack(this.session.nativeWrapperHandle, this.nativeHandle, track.nativeHandle);
return this;
}
public void finalize() throws Throwable {
long j = this.nativeHandle;
if (j != 0) {
nativeDestroyRecordingConfig(this.nativeSymbolTableHandle, j);
this.nativeHandle = 0L;
}
super.finalize();
}
public boolean getAutoStopOnPause() {
return nativeGetAutoStopOnPause(this.session.nativeWrapperHandle, this.nativeHandle);
}
@Nullable
@Deprecated
public String getMp4DatasetFilePath() {
return nativeGetMp4DatasetFilePath(this.session.nativeWrapperHandle, this.nativeHandle);
}
@Nullable
public Uri getMp4DatasetUri() {
String nativeGetMp4DatasetUri = nativeGetMp4DatasetUri(this.session.nativeWrapperHandle, this.nativeHandle);
if (nativeGetMp4DatasetUri == null) {
return null;
}
return Uri.parse(nativeGetMp4DatasetUri);
}
public int getRecordingRotation() {
return nativeGetRecordingRotation(this.session.nativeWrapperHandle, this.nativeHandle);
}
@NonNull
public RecordingConfig setAutoStopOnPause(boolean z) {
nativeSetAutoStopOnPause(this.session.nativeWrapperHandle, this.nativeHandle, z);
return this;
}
@NonNull
@Deprecated
public RecordingConfig setMp4DatasetFilePath(String str) {
nativeSetMp4DatasetFilePath(this.session.nativeWrapperHandle, this.nativeHandle, str);
return this;
}
@NonNull
public RecordingConfig setMp4DatasetUri(Uri uri) {
nativeSetMp4DatasetUri(this.session.nativeWrapperHandle, this.nativeHandle, uri.toString());
return this;
}
@NonNull
public RecordingConfig setRecordingRotation(int i) {
nativeSetRecordingRotation(this.session.nativeWrapperHandle, this.nativeHandle, i);
return this;
}
}

View File

@@ -0,0 +1,27 @@
package com.google.ar.core;
import androidx.annotation.NonNull;
import com.google.ar.core.exceptions.FatalException;
/* loaded from: classes3.dex */
public enum RecordingStatus {
NONE(0),
OK(1),
IO_ERROR(2);
final int nativeCode;
RecordingStatus(int i) {
this.nativeCode = i;
}
@NonNull
public static RecordingStatus forNumber(int i) {
for (RecordingStatus recordingStatus : values()) {
if (recordingStatus.nativeCode == i) {
return recordingStatus;
}
}
throw new FatalException("Unexpected value for native RecordingStatus, value=" + i);
}
}

View File

@@ -0,0 +1,519 @@
package com.google.ar.core;
import android.content.Context;
import android.net.Uri;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.google.ar.core.Config;
import com.google.ar.core.annotations.UsedByNative;
import com.google.ar.core.exceptions.CameraNotAvailableException;
import com.google.ar.core.exceptions.FatalException;
import com.google.ar.core.exceptions.PlaybackFailedException;
import com.google.ar.core.exceptions.RecordingFailedException;
import com.google.ar.core.exceptions.UnavailableApkTooOldException;
import com.google.ar.core.exceptions.UnavailableArcoreNotInstalledException;
import com.google.ar.core.exceptions.UnavailableDeviceNotCompatibleException;
import com.google.ar.core.exceptions.UnavailableSdkTooOldException;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.EnumSet;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
/* loaded from: classes3.dex */
public class Session {
private static final String TAG = "ARCore-Session";
final m faceCache;
final long nativeSymbolTableHandle;
long nativeWrapperHandle;
private SharedCamera sharedCamera;
public enum Feature {
FRONT_CAMERA(1),
SHARED_CAMERA(1000);
final int nativeCode;
Feature(int i) {
this.nativeCode = i;
}
}
public enum FeatureMapQuality {
INSUFFICIENT(0),
SUFFICIENT(1),
GOOD(2);
final int nativeCode;
FeatureMapQuality(int i) {
this.nativeCode = i;
}
@NonNull
public static FeatureMapQuality forNumber(int i) {
for (FeatureMapQuality featureMapQuality : values()) {
if (featureMapQuality.nativeCode == i) {
return featureMapQuality;
}
}
throw new FatalException("Unexpected value for native FeatureMapQuality, value=" + i);
}
}
public Session() {
this.faceCache = new m();
this.sharedCamera = null;
this.nativeWrapperHandle = 0L;
this.nativeSymbolTableHandle = 0L;
}
@NonNull
@Deprecated
public static Session createForSharedCamera(Context context) throws UnavailableArcoreNotInstalledException, UnavailableApkTooOldException, UnavailableSdkTooOldException, UnavailableDeviceNotCompatibleException {
return new Session(context, EnumSet.of(Feature.SHARED_CAMERA));
}
public static ByteBuffer directByteBufferOrDefault(ByteBuffer byteBuffer) {
return byteBuffer == null ? ByteBuffer.allocateDirect(0).order(ByteOrder.nativeOrder()) : byteBuffer.order(ByteOrder.nativeOrder());
}
public static void loadDynamicSymbolsAfterSessionCreate() {
ArImage.nativeLoadSymbols();
ImageMetadata.nativeLoadSymbols();
}
private native long[] nativeAcquireAllAnchors(long j);
private native long nativeAcquireEarth(long j);
private native int nativeCheckModuleAvailability(long j, int i);
private native void nativeCloseSession(long j);
private native void nativeConfigure(long j, long j2);
private native long nativeCreateAnchor(long j, Pose pose);
private static native long nativeCreateSessionAndWrapperWithFeatures(Context context, int[] iArr) throws UnavailableArcoreNotInstalledException, UnavailableApkTooOldException, UnavailableSdkTooOldException, UnavailableDeviceNotCompatibleException;
public static native long nativeCreateSessionWrapperFromHandle(long j, long j2);
private native int nativeEstimateFeatureMapQualityForHosting(long j, Pose pose);
private native long nativeGetCameraConfig(long j);
private native void nativeGetConfig(long j, long j2);
private native int nativeGetPlaybackStatus(long j);
private native void nativeGetRandomAccessStats(long j, long j2);
private native int nativeGetRecordingStatus(long j);
private native long[] nativeGetSupportedCameraConfigs(long j);
private native long[] nativeGetSupportedCameraConfigsWithFilter(long j, long j2);
private native long nativeGetSymbolTable(long j);
private native long nativeHostCloudAnchor(long j, long j2);
private native long nativeHostCloudAnchorWithTtl(long j, long j2, int i);
private native boolean nativeIsSupported(long j, long j2);
private native void nativePause(long j);
private native void nativeRequestModuleInstallDeferred(long j, int[] iArr);
private native void nativeRequestModuleInstallImmediate(long j, int[] iArr);
private native long nativeResolveCloudAnchor(long j, String str);
private native void nativeResume(long j);
private native int nativeSetCameraConfig(long j, long j2);
private native void nativeSetCameraTextureName(long j, int i);
private native void nativeSetCameraTextureNames(long j, int[] iArr);
private native void nativeSetDisplayGeometry(long j, int i, int i2, int i3);
private native void nativeSetPlaybackDataset(long j, String str);
private native void nativeSetPlaybackDatasetUri(long j, String str);
private native void nativeStartRecording(long j, long j2);
private native void nativeStopRecording(long j);
private native void nativeUpdate(long j, long j2);
private void pauseSharedCameraIfInUse() {
SharedCamera sharedCamera = this.sharedCamera;
if (sharedCamera != null) {
sharedCamera.pause();
}
}
public static void throwExceptionFromArStatus(int i) throws Exception {
throwExceptionFromArStatus(null, i, null, null);
}
public void close() {
nativeCloseSession(this.nativeWrapperHandle);
}
public void configure(Config config) {
nativeConfigure(this.nativeWrapperHandle, config.nativeHandle);
}
@NonNull
public Collection<Anchor> convertNativeAnchorsToCollection(long[] jArr) {
ArrayList arrayList = new ArrayList(jArr.length);
for (long j : jArr) {
arrayList.add(new Anchor(j, this));
}
return Collections.unmodifiableList(arrayList);
}
@NonNull
public List<CameraConfig> convertNativeCameraConfigsToCollection(long[] jArr) {
ArrayList arrayList = new ArrayList(jArr.length);
for (long j : jArr) {
arrayList.add(new CameraConfig(this, j));
}
return Collections.unmodifiableList(arrayList);
}
public Collection<TrackData> convertNativeTrackDataToCollection(long[] jArr) {
ArrayList arrayList = new ArrayList(jArr.length);
for (long j : jArr) {
arrayList.add(new TrackData(j, this));
}
return Collections.unmodifiableList(arrayList);
}
public <T extends Trackable> Collection<T> convertNativeTrackablesToCollection(Class<T> cls, long[] jArr) {
ArrayList arrayList = new ArrayList(jArr.length);
for (long j : jArr) {
Trackable createTrackable = createTrackable(j);
if (createTrackable != null) {
arrayList.add(cls.cast(createTrackable));
}
}
return Collections.unmodifiableList(arrayList);
}
@NonNull
public Anchor createAnchor(Pose pose) {
return new Anchor(nativeCreateAnchor(this.nativeWrapperHandle, pose), this);
}
public Trackable createTrackable(long j) {
af afVar;
int internalGetType = TrackableBase.internalGetType(this.nativeWrapperHandle, j);
af[] values = af.values();
int length = values.length;
int i = 0;
while (true) {
if (i >= length) {
afVar = null;
break;
}
afVar = values[i];
if (afVar.j == internalGetType) {
break;
}
i++;
}
if (afVar == null) {
TrackableBase.internalReleaseNativeHandle(this.nativeSymbolTableHandle, j);
return null;
}
switch (afVar.ordinal()) {
case 0:
case 1:
return null;
case 2:
return new Plane(j, this);
case 3:
return new Point(j, this);
case 4:
return new AugmentedImage(j, this);
case 5:
return this.faceCache.a(j, this);
case 6:
return getEarth();
case 7:
return new DepthPoint(j, this);
case 8:
return new InstantPlacementPoint(j, this);
default:
throw null;
}
}
@NonNull
public FeatureMapQuality estimateFeatureMapQualityForHosting(Pose pose) {
return FeatureMapQuality.forNumber(nativeEstimateFeatureMapQualityForHosting(this.nativeWrapperHandle, pose));
}
public void finalize() throws Throwable {
long j = this.nativeWrapperHandle;
if (j != 0) {
nativeDestroySessionWrapper(j);
this.nativeWrapperHandle = 0L;
}
super.finalize();
}
@NonNull
public Collection<Anchor> getAllAnchors() {
return convertNativeAnchorsToCollection(nativeAcquireAllAnchors(this.nativeWrapperHandle));
}
@NonNull
public <T extends Trackable> Collection<T> getAllTrackables(Class<T> cls) {
af a = af.a(cls);
return a == af.UNKNOWN_TO_JAVA ? Collections.emptyList() : convertNativeTrackablesToCollection(cls, nativeAcquireAllTrackables(this.nativeWrapperHandle, a.j));
}
@NonNull
public CameraConfig getCameraConfig() {
return new CameraConfig(this, nativeGetCameraConfig(this.nativeWrapperHandle));
}
@NonNull
public Config getConfig() {
Config config = new Config(this);
getConfig(config);
return config;
}
@Nullable
public Earth getEarth() {
long nativeAcquireEarth = nativeAcquireEarth(this.nativeWrapperHandle);
if (nativeAcquireEarth != 0) {
return new Earth(nativeAcquireEarth, this);
}
return null;
}
@NonNull
public PlaybackStatus getPlaybackStatus() {
return PlaybackStatus.forNumber(nativeGetPlaybackStatus(this.nativeWrapperHandle));
}
@NonNull
public RecordingStatus getRecordingStatus() {
return RecordingStatus.forNumber(nativeGetRecordingStatus(this.nativeWrapperHandle));
}
@NonNull
public SharedCamera getSharedCamera() {
SharedCamera sharedCamera = this.sharedCamera;
if (sharedCamera != null) {
return sharedCamera;
}
throw new IllegalStateException("Shared camera is not in use, please create session using new Session(context, EnumSet.of(Session.Feature.SHARED_CAMERA)).");
}
@NonNull
@Deprecated
public List<CameraConfig> getSupportedCameraConfigs() {
return convertNativeCameraConfigsToCollection(nativeGetSupportedCameraConfigs(this.nativeWrapperHandle));
}
@NonNull
public Anchor hostCloudAnchor(Anchor anchor) {
return new Anchor(nativeHostCloudAnchor(this.nativeWrapperHandle, anchor.nativeHandle), this);
}
@NonNull
public Anchor hostCloudAnchorWithTtl(Anchor anchor, int i) {
return new Anchor(nativeHostCloudAnchorWithTtl(this.nativeWrapperHandle, anchor.nativeHandle, i), this);
}
public boolean isDepthModeSupported(Config.DepthMode depthMode) {
return nativeIsDepthModeSupported(this.nativeWrapperHandle, depthMode.nativeCode);
}
public boolean isGeospatialModeSupported(Config.GeospatialMode geospatialMode) {
return nativeIsGeospatialModeSupported(this.nativeWrapperHandle, geospatialMode.nativeCode);
}
public boolean isSharedCameraUsed() {
return this.sharedCamera != null;
}
@Deprecated
public boolean isSupported(Config config) {
return nativeIsSupported(this.nativeWrapperHandle, config.nativeHandle);
}
public native long[] nativeAcquireAllTrackables(long j, int i);
public native void nativeDestroySessionWrapper(long j);
public native long nativeGetSessionNativeHandle(long j);
public native boolean nativeIsDepthModeSupported(long j, int i);
public native boolean nativeIsGeospatialModeSupported(long j, int i);
public native long nativeReleaseSessionOwnership(long j);
public void pause() {
pauseSharedCameraIfInUse();
nativePause(this.nativeWrapperHandle);
}
@NonNull
public Anchor resolveCloudAnchor(String str) {
return new Anchor(nativeResolveCloudAnchor(this.nativeWrapperHandle, str), this);
}
public void resume() throws CameraNotAvailableException {
nativeResume(this.nativeWrapperHandle);
}
public void setCameraConfig(CameraConfig cameraConfig) {
nativeSetCameraConfig(this.nativeWrapperHandle, cameraConfig.nativeHandle);
}
public void setCameraTextureName(int i) {
nativeSetCameraTextureName(this.nativeWrapperHandle, i);
}
public void setDisplayGeometry(int i, int i2, int i3) {
nativeSetDisplayGeometry(this.nativeWrapperHandle, i, i2, i3);
}
@Deprecated
public void setPlaybackDataset(String str) throws PlaybackFailedException {
nativeSetPlaybackDataset(this.nativeWrapperHandle, str);
}
public void setPlaybackDatasetUri(Uri uri) throws PlaybackFailedException {
nativeSetPlaybackDatasetUri(this.nativeWrapperHandle, uri.toString());
}
public void startRecording(RecordingConfig recordingConfig) throws RecordingFailedException {
if (recordingConfig == null) {
throw new IllegalArgumentException();
}
nativeStartRecording(this.nativeWrapperHandle, recordingConfig.nativeHandle);
}
public void stopRecording() throws RecordingFailedException {
nativeStopRecording(this.nativeWrapperHandle);
}
@NonNull
public Frame update() throws CameraNotAvailableException {
Frame frame = new Frame(this);
nativeUpdate(this.nativeWrapperHandle, frame.nativeHandle);
return frame;
}
public Session(long j) {
this.faceCache = new m();
this.sharedCamera = null;
this.nativeWrapperHandle = j;
this.nativeSymbolTableHandle = nativeGetSymbolTable(j);
}
@UsedByNative("session_jni.cc")
public static void throwExceptionFromArStatus(String str, int i, String[] strArr, int[] iArr) throws Exception {
int i2;
for (ae aeVar : ae.values()) {
if (aeVar.G == i) {
Class cls = aeVar.H;
if (cls == null) {
return;
}
if (strArr == null || iArr == null || (i2 = strArr.length) != iArr.length) {
i2 = 0;
}
String str2 = aeVar.I;
if (str2 == null && str == null) {
throw ((Exception) cls.getConstructor(new Class[0]).newInstance(new Object[0]));
}
if (str2 != null) {
str = str == null ? str2 : str2.concat(str);
}
Exception exc = (Exception) cls.getConstructor(String.class).newInstance(str);
StackTraceElement[] stackTrace = exc.getStackTrace();
StackTraceElement[] stackTraceElementArr = new StackTraceElement[stackTrace.length + i2];
int i3 = 0;
while (i3 < i2) {
stackTraceElementArr[i3] = new StackTraceElement("ARCore", "native", strArr[i3], iArr[i3]);
i3++;
}
for (StackTraceElement stackTraceElement : stackTrace) {
stackTraceElementArr[i3] = stackTraceElement;
i3++;
}
exc.setStackTrace(stackTraceElementArr);
throw exc;
}
}
throw new FatalException("Unexpected error code: " + i);
}
public void setCameraTextureNames(int[] iArr) {
if (iArr == null || iArr.length == 0) {
throw new IllegalArgumentException("textureIds must be an array with at least 1 entry.");
}
nativeSetCameraTextureNames(this.nativeWrapperHandle, iArr);
}
public void getConfig(Config config) {
nativeGetConfig(this.nativeWrapperHandle, config.nativeHandle);
}
@NonNull
public List<CameraConfig> getSupportedCameraConfigs(CameraConfigFilter cameraConfigFilter) {
if (cameraConfigFilter == null) {
throw new IllegalArgumentException();
}
long[] nativeGetSupportedCameraConfigsWithFilter = nativeGetSupportedCameraConfigsWithFilter(this.nativeWrapperHandle, cameraConfigFilter.nativeHandle);
ArrayList arrayList = new ArrayList(nativeGetSupportedCameraConfigsWithFilter.length);
for (long j : nativeGetSupportedCameraConfigsWithFilter) {
arrayList.add(new CameraConfig(this, j));
}
return Collections.unmodifiableList(arrayList);
}
public Session(Context context) throws UnavailableArcoreNotInstalledException, UnavailableApkTooOldException, UnavailableSdkTooOldException, UnavailableDeviceNotCompatibleException {
this(context, EnumSet.noneOf(Feature.class));
}
public Session(Context context, Set<Feature> set) throws UnavailableArcoreNotInstalledException, UnavailableApkTooOldException, UnavailableSdkTooOldException, UnavailableDeviceNotCompatibleException, IllegalArgumentException {
this.faceCache = new m();
this.sharedCamera = null;
System.loadLibrary("arcore_sdk_jni");
int[] iArr = new int[set.size() + 1];
Iterator<Feature> it = set.iterator();
int i = 0;
while (it.hasNext()) {
iArr[i] = it.next().nativeCode;
i++;
}
iArr[i] = 0;
long nativeCreateSessionAndWrapperWithFeatures = nativeCreateSessionAndWrapperWithFeatures(context, iArr);
this.nativeWrapperHandle = nativeCreateSessionAndWrapperWithFeatures;
this.nativeSymbolTableHandle = nativeGetSymbolTable(nativeCreateSessionAndWrapperWithFeatures);
if (set.contains(Feature.SHARED_CAMERA)) {
this.sharedCamera = new SharedCamera(this);
}
loadDynamicSymbolsAfterSessionCreate();
}
}

View File

@@ -0,0 +1,56 @@
package com.google.ar.core;
import android.content.Context;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.Signature;
import android.os.Bundle;
import android.util.Log;
import com.google.ar.core.annotations.UsedByNative;
@UsedByNative("session_create.cc")
/* loaded from: classes3.dex */
final class SessionCreateJniHelper {
private SessionCreateJniHelper() {
}
@UsedByNative("session_create.cc")
public static boolean checkApkSignature(Context context) throws PackageManager.NameNotFoundException {
try {
PackageInfo packageInfo = context.getPackageManager().getPackageInfo("com.google.ar.core", 64);
Signature signature = new Signature("308203c7308202afa003020102021500dc286b43b4ea12039958a00a6655eb84720e46c9300d06092a864886f70d01010b05003074310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e205669657731143012060355040a130b476f6f676c6520496e632e3110300e060355040b1307416e64726f69643110300e06035504031307416e64726f6964301e170d3137303830343136353333375a170d3437303830343136353333375a3074310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e205669657731143012060355040a130b476f6f676c6520496e632e3110300e060355040b1307416e64726f69643110300e06035504031307416e64726f696430820122300d06092a864886f70d01010105000382010f003082010a02820101008998646f47fc333db09644c303104ed183e904e351152aa66a603b77f63389d45d6fcffae3c94fadf1f28038e265d697fea347327f9081a7f0b9074d5b148db5bf357c611a77f87f844a15068818bdcd5b21d187e93fa2551676170eedce04a150c35ec0a791eef507fa9b406573c36f6f207764842e5677e35a281a422659e91e26eb4fecfb053b5c936d0976c37f8757adb57a37953da5844ea350695854d343a61ad341b63a1c425d22855af7ebfee018e1736cee98536be5b9947f288e2a26f99eb9f91b5de93fecc513019d2e90f12b38610d1f02eaa81deca4ce91c19cbce36d6c3025ce2432b3d178616beafaf437c08451bc469c6bc6f4517a714a5b0203010001a350304e300c0603551d13040530030101ff301d0603551d0e0416041419a864c0f2618c67c803a23da909bc70521f269b301f0603551d2304183016801419a864c0f2618c67c803a23da909bc70521f269b300d06092a864886f70d01010b050003820101005403fc56fdefc440376a0337815002b96a15bffc2fe42de6c58f52fae4d80652e3704455b885409eef81ffbb4c44dba104b6b8e24c9e2e0e7a04338ee73baa5b71bfb4488f8e04bef3d0eaf7d43aa42b03b278c33cc1f0dd3802571624baa161d851fab37db4bc92b9094b6885dff62b400ecd81f069d56a1be1db46d8198c50c9628cdb6e38686ef640fd386775f50376f957e24ea45ed1942968f20c82f189607fdb22f11cfdfd0760a77a60ceb3416cfb3f48f13f9f83f3834a01001750a7c78bc1fd81f0b53a7c41dcba9f5a0118259d083c32bb9ebb84d645d6f6b9c31923d8ab70e7f0a25940ecc9f4945144419f86e8c421d3b99774f4b8f3d09262e7");
for (Signature signature2 : packageInfo.signatures) {
if (signature2.equals(signature)) {
return true;
}
Log.w("ARCore-SessionCreateJniHelper", "Signature mismatch. Expected '" + signature.toCharsString() + "' got '" + signature2.toCharsString() + "'");
}
return context.getPackageManager().getApplicationInfo(context.getPackageName(), 128).metaData.getBoolean("com.google.ar.core.disable_security_check", false);
} catch (PackageManager.NameNotFoundException unused) {
return true;
}
}
@UsedByNative("session_create.cc")
public static int getArCoreApkVersionCode(Context context) {
try {
return context.getPackageManager().getPackageInfo("com.google.ar.core", 0).versionCode;
} catch (PackageManager.NameNotFoundException e) {
Log.e("ARCore-SessionCreateJniHelper", "Could not load application package metadata", e);
return -1;
}
}
@UsedByNative("session_create.cc")
public static int getMinApkVersion(Context context) {
try {
Bundle bundle = context.getPackageManager().getApplicationInfo(context.getPackageName(), 128).metaData;
if (bundle.containsKey("com.google.ar.core.min_apk_version")) {
return bundle.getInt("com.google.ar.core.min_apk_version");
}
throw new RuntimeException("Application manifest must contain meta-data com.google.ar.core.min_apk_version");
} catch (PackageManager.NameNotFoundException e) {
throw new RuntimeException("Could not load application package metadata", e);
}
}
}

View File

@@ -0,0 +1,188 @@
package com.google.ar.core;
import android.graphics.SurfaceTexture;
import android.hardware.camera2.CameraCaptureSession;
import android.hardware.camera2.CameraDevice;
import android.media.Image;
import android.media.ImageReader;
import android.os.Handler;
import android.os.HandlerThread;
import android.view.Surface;
import java.util.ArrayList;
import java.util.List;
/* loaded from: classes3.dex */
public class SharedCamera {
private static final String TAG = "ArSdk-SharedCamera";
private final Session session;
private Handler sharedCameraHandler;
private final aj sharedCameraInfo = new aj(null);
private boolean cameraSharedWithAr = false;
public SharedCamera(Session session) {
HandlerThread handlerThread = new HandlerThread("SharedCameraHandlerThread");
handlerThread.start();
this.sharedCameraHandler = new Handler(handlerThread.getLooper());
this.session = session;
}
/* JADX INFO: Access modifiers changed from: private */
public void close() {
this.sharedCameraHandler.removeCallbacksAndMessages(null);
this.sharedCameraHandler.getLooper().quit();
this.sharedCameraHandler = null;
}
private ImageReader getCpuImageReader() {
return nativeSharedCameraGetImageReader(this.session.nativeWrapperHandle, this.sharedCameraInfo.b());
}
private ImageReader getCpuImageReaderMotionTracking() {
return nativeSharedCameraGetImageReaderMotionTracking(this.session.nativeWrapperHandle, this.sharedCameraInfo.b());
}
/* JADX INFO: Access modifiers changed from: private */
public Surface getGpuSurface() {
return nativeSharedCameraGetSurface(this.session.nativeWrapperHandle, this.sharedCameraInfo.b());
}
/* JADX INFO: Access modifiers changed from: private */
public SurfaceTexture getGpuSurfaceTexture() {
return nativeSharedCameraGetSurfaceTexture(this.session.nativeWrapperHandle, this.sharedCameraInfo.b());
}
public static /* synthetic */ void lambda$setDummyOnImageAvailableListener$0(ImageReader imageReader) {
Image acquireLatestImage = imageReader.acquireLatestImage();
if (acquireLatestImage != null) {
acquireLatestImage.close();
}
}
private native void nativeSharedCameraCaptureSessionActive(long j, CameraCaptureSession cameraCaptureSession);
private native void nativeSharedCameraCaptureSessionClosed(long j, CameraCaptureSession cameraCaptureSession);
private native void nativeSharedCameraCaptureSessionConfigureFailed(long j, CameraCaptureSession cameraCaptureSession);
private native void nativeSharedCameraCaptureSessionConfigured(long j, CameraCaptureSession cameraCaptureSession);
private native void nativeSharedCameraCaptureSessionReady(long j, CameraCaptureSession cameraCaptureSession);
private native ImageReader nativeSharedCameraGetImageReader(long j, CameraDevice cameraDevice);
private native ImageReader nativeSharedCameraGetImageReaderMotionTracking(long j, CameraDevice cameraDevice);
private native Surface nativeSharedCameraGetSurface(long j, CameraDevice cameraDevice);
private native SurfaceTexture nativeSharedCameraGetSurfaceTexture(long j, CameraDevice cameraDevice);
private native void nativeSharedCameraOnClosed(long j, CameraDevice cameraDevice);
private native void nativeSharedCameraOnDisconnected(long j, CameraDevice cameraDevice);
private native void nativeSharedCameraOnOpened(long j, CameraDevice cameraDevice);
private native void nativeSharedCameraSetAppSurfaces(long j, String str, List<Surface> list);
private native void nativeSharedCameraSetCaptureCallback(long j, CameraCaptureSession.CaptureCallback captureCallback, Handler handler);
/* JADX INFO: Access modifiers changed from: private */
public void onCaptureSessionActive(CameraCaptureSession cameraCaptureSession) {
nativeSharedCameraCaptureSessionActive(this.session.nativeWrapperHandle, cameraCaptureSession);
}
/* JADX INFO: Access modifiers changed from: private */
public void onCaptureSessionClosed(CameraCaptureSession cameraCaptureSession) {
nativeSharedCameraCaptureSessionClosed(this.session.nativeWrapperHandle, cameraCaptureSession);
}
/* JADX INFO: Access modifiers changed from: private */
public void onCaptureSessionConfigureFailed(CameraCaptureSession cameraCaptureSession) {
nativeSharedCameraCaptureSessionConfigureFailed(this.session.nativeWrapperHandle, cameraCaptureSession);
}
/* JADX INFO: Access modifiers changed from: private */
public void onCaptureSessionConfigured(CameraCaptureSession cameraCaptureSession) {
nativeSharedCameraCaptureSessionConfigured(this.session.nativeWrapperHandle, cameraCaptureSession);
}
/* JADX INFO: Access modifiers changed from: private */
public void onCaptureSessionReady(CameraCaptureSession cameraCaptureSession) {
nativeSharedCameraCaptureSessionReady(this.session.nativeWrapperHandle, cameraCaptureSession);
}
/* JADX INFO: Access modifiers changed from: private */
public void onDeviceClosed(CameraDevice cameraDevice) {
nativeSharedCameraOnClosed(this.session.nativeWrapperHandle, cameraDevice);
this.cameraSharedWithAr = false;
}
/* JADX INFO: Access modifiers changed from: private */
public void onDeviceDisconnected(CameraDevice cameraDevice) {
nativeSharedCameraOnDisconnected(this.session.nativeWrapperHandle, cameraDevice);
this.cameraSharedWithAr = false;
this.sharedCameraInfo.d(null);
}
/* JADX INFO: Access modifiers changed from: private */
public void onDeviceOpened(CameraDevice cameraDevice) {
this.sharedCameraInfo.d(cameraDevice);
this.cameraSharedWithAr = true;
nativeSharedCameraOnOpened(this.session.nativeWrapperHandle, cameraDevice);
}
/* JADX INFO: Access modifiers changed from: private */
public void setDummyListenerToAvoidImageBufferStarvation() {
setDummyOnImageAvailableListener(getCpuImageReader());
setDummyOnImageAvailableListener(getCpuImageReaderMotionTracking());
}
private void setDummyOnImageAvailableListener(ImageReader imageReader) {
if (imageReader != null) {
imageReader.setOnImageAvailableListener(new ImageReader.OnImageAvailableListener() { // from class: com.google.ar.core.SharedCamera$$ExternalSyntheticLambda0
@Override // android.media.ImageReader.OnImageAvailableListener
public final void onImageAvailable(ImageReader imageReader2) {
SharedCamera.lambda$setDummyOnImageAvailableListener$0(imageReader2);
}
}, this.sharedCameraHandler);
}
}
public CameraDevice.StateCallback createARDeviceStateCallback(CameraDevice.StateCallback stateCallback, Handler handler) {
return new ah(this, handler, stateCallback);
}
public CameraCaptureSession.StateCallback createARSessionStateCallback(CameraCaptureSession.StateCallback stateCallback, Handler handler) {
return new ai(this, handler, stateCallback);
}
public List<Surface> getArCoreSurfaces() {
ArrayList arrayList = new ArrayList();
arrayList.add(this.sharedCameraInfo.c());
ImageReader cpuImageReaderMotionTracking = getCpuImageReaderMotionTracking();
if (cpuImageReaderMotionTracking != null) {
arrayList.add(cpuImageReaderMotionTracking.getSurface());
}
arrayList.add(getCpuImageReader().getSurface());
return arrayList;
}
public SurfaceTexture getSurfaceTexture() {
return this.sharedCameraInfo.a();
}
public void pause() {
if (this.sharedCameraInfo.b() != null) {
setDummyListenerToAvoidImageBufferStarvation();
}
}
public void setAppSurfaces(String str, List<Surface> list) {
this.sharedCameraInfo.e(str, list);
nativeSharedCameraSetAppSurfaces(this.session.nativeWrapperHandle, str, list);
}
public void setCaptureCallback(CameraCaptureSession.CaptureCallback captureCallback, Handler handler) {
nativeSharedCameraSetCaptureCallback(this.session.nativeWrapperHandle, captureCallback, handler);
}
}

View File

@@ -0,0 +1,67 @@
package com.google.ar.core;
import androidx.annotation.NonNull;
import java.nio.ByteBuffer;
import java.util.UUID;
/* loaded from: classes3.dex */
public class Track {
long nativeHandle;
private final long nativeSymbolTableHandle;
private final Session session;
public Track() {
this.session = null;
this.nativeHandle = 0L;
this.nativeSymbolTableHandle = 0L;
}
public Track(Session session) {
this.session = session;
this.nativeHandle = nativeCreateTrack(session.nativeWrapperHandle);
this.nativeSymbolTableHandle = session.nativeSymbolTableHandle;
}
private static native long nativeCreateTrack(long j);
private static native void nativeDestroyTrack(long j, long j2);
private native void nativeSetId(long j, long j2, byte[] bArr);
private native void nativeSetMetadata(long j, long j2, byte[] bArr);
private native void nativeSetMimeType(long j, long j2, String str);
public void finalize() throws Throwable {
long j = this.nativeHandle;
if (j != 0) {
nativeDestroyTrack(this.nativeSymbolTableHandle, j);
this.nativeHandle = 0L;
}
super.finalize();
}
@NonNull
public Track setId(UUID uuid) {
ByteBuffer wrap = ByteBuffer.wrap(new byte[16]);
wrap.putLong(uuid.getMostSignificantBits());
wrap.putLong(uuid.getLeastSignificantBits());
nativeSetId(this.session.nativeWrapperHandle, this.nativeHandle, wrap.array());
return this;
}
@NonNull
public Track setMetadata(ByteBuffer byteBuffer) {
byteBuffer.position(0);
byte[] bArr = new byte[byteBuffer.remaining()];
byteBuffer.get(bArr);
nativeSetMetadata(this.session.nativeWrapperHandle, this.nativeHandle, bArr);
return this;
}
@NonNull
public Track setMimeType(String str) {
nativeSetMimeType(this.session.nativeWrapperHandle, this.nativeHandle, str);
return this;
}
}

View File

@@ -0,0 +1,47 @@
package com.google.ar.core;
import java.nio.ByteBuffer;
/* loaded from: classes3.dex */
public class TrackData {
long nativeHandle;
final long nativeSymbolTableHandle;
private final Session session;
public TrackData(long j, Session session) {
this.session = session;
this.nativeHandle = j;
this.nativeSymbolTableHandle = session.nativeSymbolTableHandle;
}
private native ByteBuffer nativeGetData(long j, long j2);
private native long nativeGetFrameTimestamp(long j, long j2);
private static native void nativeReleaseTrackData(long j, long j2);
private void release() {
long j = this.nativeHandle;
if (j != 0) {
nativeReleaseTrackData(this.nativeSymbolTableHandle, j);
this.nativeHandle = 0L;
}
}
public void close() {
release();
}
public void finalize() throws Throwable {
release();
super.finalize();
}
public ByteBuffer getData() {
return nativeGetData(this.session.nativeWrapperHandle, this.nativeHandle);
}
public long getFrameTimestamp() {
return nativeGetFrameTimestamp(this.session.nativeWrapperHandle, this.nativeHandle);
}
}

View File

@@ -0,0 +1,16 @@
package com.google.ar.core;
import androidx.annotation.NonNull;
import java.util.Collection;
/* loaded from: classes3.dex */
public interface Trackable {
@NonNull
Anchor createAnchor(Pose pose);
@NonNull
Collection<Anchor> getAnchors();
@NonNull
TrackingState getTrackingState();
}

View File

@@ -0,0 +1,69 @@
package com.google.ar.core;
import com.google.ar.core.annotations.UsedByNative;
import java.util.Collection;
@UsedByNative("trackable_base_jni.cc")
/* loaded from: classes3.dex */
class TrackableBase implements Trackable {
long nativeHandle;
protected final long nativeSymbolTableHandle;
protected final Session session;
public TrackableBase(long j, Session session) {
this.session = session;
this.nativeHandle = j;
this.nativeSymbolTableHandle = session == null ? 0L : session.nativeSymbolTableHandle;
}
public static int internalGetType(long j, long j2) {
return nativeGetType(j, j2);
}
public static void internalReleaseNativeHandle(long j, long j2) {
nativeReleaseTrackable(j, j2);
}
private native long nativeCreateAnchor(long j, long j2, Pose pose);
private native long[] nativeGetAnchors(long j, long j2);
private native int nativeGetTrackingState(long j, long j2);
private static native int nativeGetType(long j, long j2);
private static native void nativeReleaseTrackable(long j, long j2);
@Override // com.google.ar.core.Trackable
public Anchor createAnchor(Pose pose) {
return new Anchor(nativeCreateAnchor(this.session.nativeWrapperHandle, this.nativeHandle, pose), this.session);
}
public boolean equals(Object obj) {
return (obj instanceof TrackableBase) && ((TrackableBase) obj).nativeHandle == this.nativeHandle;
}
public void finalize() throws Throwable {
long j = this.nativeHandle;
if (j != 0) {
nativeReleaseTrackable(this.nativeSymbolTableHandle, j);
this.nativeHandle = 0L;
}
super.finalize();
}
@Override // com.google.ar.core.Trackable
public Collection getAnchors() {
Session session = this.session;
return session.convertNativeAnchorsToCollection(nativeGetAnchors(session.nativeWrapperHandle, this.nativeHandle));
}
@Override // com.google.ar.core.Trackable
public TrackingState getTrackingState() {
return TrackingState.forNumber(nativeGetTrackingState(this.session.nativeWrapperHandle, this.nativeHandle));
}
public int hashCode() {
return Long.valueOf(this.nativeHandle).hashCode();
}
}

View File

@@ -0,0 +1,30 @@
package com.google.ar.core;
import androidx.annotation.NonNull;
import com.google.ar.core.exceptions.FatalException;
/* loaded from: classes3.dex */
public enum TrackingFailureReason {
NONE(0),
BAD_STATE(1),
INSUFFICIENT_LIGHT(2),
EXCESSIVE_MOTION(3),
INSUFFICIENT_FEATURES(4),
CAMERA_UNAVAILABLE(5);
final int nativeCode;
TrackingFailureReason(int i) {
this.nativeCode = i;
}
@NonNull
public static TrackingFailureReason forNumber(int i) {
for (TrackingFailureReason trackingFailureReason : values()) {
if (trackingFailureReason.nativeCode == i) {
return trackingFailureReason;
}
}
throw new FatalException("Unexpected value for native TrackingFailureReason, value=" + i);
}
}

View File

@@ -0,0 +1,27 @@
package com.google.ar.core;
import androidx.annotation.NonNull;
import com.google.ar.core.exceptions.FatalException;
/* loaded from: classes3.dex */
public enum TrackingState {
TRACKING(0),
PAUSED(1),
STOPPED(2);
final int nativeCode;
TrackingState(int i) {
this.nativeCode = i;
}
@NonNull
public static TrackingState forNumber(int i) {
for (TrackingState trackingState : values()) {
if (trackingState.nativeCode == i) {
return trackingState;
}
}
throw new FatalException("Unexpected value for native TrackingState, value=" + i);
}
}

View File

@@ -0,0 +1,28 @@
package com.google.ar.core;
import com.google.ar.core.ArCoreApk;
/* loaded from: classes3.dex */
public enum a extends ArCoreApk.Availability {
/* JADX WARN: Illegal instructions before constructor call */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public /* synthetic */ a() {
/*
r3 = this;
r0 = 0
r1 = 0
java.lang.String r2 = "UNKNOWN_ERROR"
r3.<init>(r2, r0, r0)
return
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.ar.core.a.<init>():void");
}
@Override // com.google.ar.core.ArCoreApk.Availability
public final boolean isUnknown() {
return true;
}
}

View File

@@ -0,0 +1,69 @@
package com.google.ar.core;
import android.os.Bundle;
import android.util.Log;
import com.google.ar.core.exceptions.FatalException;
import java.util.concurrent.atomic.AtomicBoolean;
/* loaded from: classes3.dex */
public final class aa extends com.google.ar.core.dependencies.i {
public final /* synthetic */ AtomicBoolean a;
public final /* synthetic */ ac b;
public aa(ac acVar, AtomicBoolean atomicBoolean) {
this.b = acVar;
this.a = atomicBoolean;
}
@Override // com.google.ar.core.dependencies.j
public final void b(Bundle bundle) {
}
@Override // com.google.ar.core.dependencies.j
public final void c(Bundle bundle) {
if (this.a.getAndSet(true)) {
}
int i = bundle.getInt("error.code", -100);
int i2 = bundle.getInt("install.status", 0);
if (i2 == 4) {
this.b.b.a(t.COMPLETED);
return;
}
if (i != 0) {
Log.w("ARCore-InstallService", "requestInstall = " + i + ", launching fullscreen.");
ac acVar = this.b;
u uVar = acVar.c;
u.o(acVar.a, acVar.b);
return;
}
if (bundle.containsKey("resolution.intent")) {
ac acVar2 = this.b;
u uVar2 = acVar2.c;
u.p(acVar2.a, bundle, acVar2.b);
return;
}
if (i2 == 10) {
this.b.b.b(new FatalException("Unexpected REQUIRES_UI_INTENT install status without an intent."));
return;
}
switch (i2) {
case 1:
case 2:
case 3:
this.b.b.a(t.ACCEPTED);
break;
case 4:
this.b.b.a(t.COMPLETED);
break;
case 5:
this.b.b.b(new FatalException("Unexpected FAILED install status without error."));
break;
case 6:
this.b.b.a(t.CANCELLED);
break;
default:
this.b.b.b(new FatalException("Unexpected install status: " + i2));
break;
}
}
}

View File

@@ -0,0 +1,26 @@
package com.google.ar.core;
import android.util.Log;
import java.util.concurrent.atomic.AtomicBoolean;
/* loaded from: classes3.dex */
public final class ab implements Runnable {
public final /* synthetic */ AtomicBoolean a;
public final /* synthetic */ ac b;
public ab(ac acVar, AtomicBoolean atomicBoolean) {
this.b = acVar;
this.a = atomicBoolean;
}
@Override // java.lang.Runnable
public final void run() {
if (this.a.getAndSet(true)) {
return;
}
Log.w("ARCore-InstallService", "requestInstall timed out, launching fullscreen.");
ac acVar = this.b;
u uVar = acVar.c;
u.o(acVar.a, acVar.b);
}
}

View File

@@ -0,0 +1,37 @@
package com.google.ar.core;
import android.app.Activity;
import android.os.Bundle;
import android.os.Handler;
import android.os.RemoteException;
import android.util.Log;
import java.util.Collections;
import java.util.concurrent.atomic.AtomicBoolean;
/* loaded from: classes3.dex */
public final class ac implements Runnable {
public final /* synthetic */ Activity a;
public final /* synthetic */ s b;
public final /* synthetic */ u c;
public ac(u uVar, Activity activity, s sVar) {
this.c = uVar;
this.a = activity;
this.b = sVar;
}
@Override // java.lang.Runnable
public final void run() {
com.google.ar.core.dependencies.h hVar;
try {
AtomicBoolean atomicBoolean = new AtomicBoolean(false);
hVar = this.c.c;
hVar.e(this.a.getApplicationInfo().packageName, Collections.singletonList(u.k()), new Bundle(), new aa(this, atomicBoolean));
new Handler().postDelayed(new ab(this, atomicBoolean), 3000L);
} catch (RemoteException e) {
Log.w("ARCore-InstallService", "requestInstall threw, launching fullscreen.", e);
u uVar = this.c;
u.o(this.a, this.b);
}
}
}

View File

@@ -0,0 +1,8 @@
package com.google.ar.core;
/* loaded from: classes3.dex */
public final class ad extends Exception {
public ad() {
super("InstallService not bound");
}
}

View File

@@ -0,0 +1,79 @@
package com.google.ar.core;
import com.google.ar.core.exceptions.AnchorNotSupportedForHostingException;
import com.google.ar.core.exceptions.CameraNotAvailableException;
import com.google.ar.core.exceptions.CloudAnchorsNotConfiguredException;
import com.google.ar.core.exceptions.DataInvalidFormatException;
import com.google.ar.core.exceptions.DataUnsupportedVersionException;
import com.google.ar.core.exceptions.DeadlineExceededException;
import com.google.ar.core.exceptions.FatalException;
import com.google.ar.core.exceptions.FineLocationPermissionNotGrantedException;
import com.google.ar.core.exceptions.GooglePlayServicesLocationLibraryNotLinkedException;
import com.google.ar.core.exceptions.ImageInsufficientQualityException;
import com.google.ar.core.exceptions.MetadataNotFoundException;
import com.google.ar.core.exceptions.MissingGlContextException;
import com.google.ar.core.exceptions.NotTrackingException;
import com.google.ar.core.exceptions.NotYetAvailableException;
import com.google.ar.core.exceptions.PlaybackFailedException;
import com.google.ar.core.exceptions.RecordingFailedException;
import com.google.ar.core.exceptions.ResourceExhaustedException;
import com.google.ar.core.exceptions.SessionNotPausedException;
import com.google.ar.core.exceptions.SessionPausedException;
import com.google.ar.core.exceptions.SessionUnsupportedException;
import com.google.ar.core.exceptions.TextureNotSetException;
import com.google.ar.core.exceptions.UnavailableApkTooOldException;
import com.google.ar.core.exceptions.UnavailableArcoreNotInstalledException;
import com.google.ar.core.exceptions.UnavailableDeviceNotCompatibleException;
import com.google.ar.core.exceptions.UnavailableSdkTooOldException;
import com.google.ar.core.exceptions.UnavailableUserDeclinedInstallationException;
import com.google.ar.core.exceptions.UnsupportedConfigurationException;
/* loaded from: classes3.dex */
public enum ae {
SUCCESS(0, null),
ERROR_INVALID_ARGUMENT(-1, IllegalArgumentException.class),
ERROR_FATAL(-2, FatalException.class),
ERROR_SESSION_PAUSED(-3, SessionPausedException.class),
ERROR_SESSION_NOT_PAUSED(-4, SessionNotPausedException.class),
ERROR_NOT_TRACKING(-5, NotTrackingException.class),
ERROR_TEXTURE_NOT_SET(-6, TextureNotSetException.class),
ERROR_MISSING_GL_CONTEXT(-7, MissingGlContextException.class),
ERROR_UNSUPPORTED_CONFIGURATION(-8, UnsupportedConfigurationException.class),
ERROR_FINE_LOCATION_PERMISSION_NOT_GRANTED(-21, FineLocationPermissionNotGrantedException.class),
ERROR_GOOGLE_PLAY_SERVICES_LOCATION_LIBRARY_NOT_LINKED(-22, GooglePlayServicesLocationLibraryNotLinkedException.class),
ERROR_CAMERA_PERMISSION_NOT_GRANTED(-9, SecurityException.class, "Camera permission is not granted"),
ERROR_DEADLINE_EXCEEDED(-10, DeadlineExceededException.class),
ERROR_RESOURCE_EXHAUSTED(-11, ResourceExhaustedException.class),
ERROR_NOT_YET_AVAILABLE(-12, NotYetAvailableException.class),
ERROR_CAMERA_NOT_AVAILABLE(-13, CameraNotAvailableException.class),
ERROR_ANCHOR_NOT_SUPPORTED_FOR_HOSTING(-16, AnchorNotSupportedForHostingException.class),
ERROR_IMAGE_INSUFFICIENT_QUALITY(-17, ImageInsufficientQualityException.class),
ERROR_DATA_INVALID_FORMAT(-18, DataInvalidFormatException.class),
ERROR_DATA_UNSUPPORTED_VERSION(-19, DataUnsupportedVersionException.class),
ERROR_ILLEGAL_STATE(-20, IllegalStateException.class),
ERROR_RECORDING_FAILED(-23, RecordingFailedException.class),
ERROR_PLAYBACK_FAILED(-24, PlaybackFailedException.class),
ERROR_SESSION_UNSUPPORTED(-25, SessionUnsupportedException.class),
ERROR_METADATA_NOT_FOUND(-26, MetadataNotFoundException.class),
ERROR_CLOUD_ANCHORS_NOT_CONFIGURED(-14, CloudAnchorsNotConfiguredException.class),
ERROR_INTERNET_PERMISSION_NOT_GRANTED(-15, SecurityException.class, "Internet permission is not granted"),
UNAVAILABLE_ARCORE_NOT_INSTALLED(-100, UnavailableArcoreNotInstalledException.class),
UNAVAILABLE_DEVICE_NOT_COMPATIBLE(-101, UnavailableDeviceNotCompatibleException.class),
UNAVAILABLE_APK_TOO_OLD(-103, UnavailableApkTooOldException.class),
UNAVAILABLE_SDK_TOO_OLD(-104, UnavailableSdkTooOldException.class),
UNAVAILABLE_USER_DECLINED_INSTALLATION(-105, UnavailableUserDeclinedInstallationException.class);
final int G;
final Class H;
final String I;
ae(int i, Class cls) {
this(i, cls, null);
}
ae(int i, Class cls, String str) {
this.G = i;
this.H = cls;
this.I = str;
}
}

View File

@@ -0,0 +1,35 @@
package com.google.ar.core;
import androidx.annotation.NonNull;
/* loaded from: classes3.dex */
public enum af {
BASE_TRACKABLE(1095893248, Trackable.class),
UNKNOWN_TO_JAVA(-1, null),
PLANE(1095893249, Plane.class),
POINT(1095893250, Point.class),
AUGMENTED_IMAGE(1095893252, AugmentedImage.class),
FACE(1095893253, AugmentedFace.class),
EARTH(1095893257, Earth.class),
DEPTH_POINT(1095893265, DepthPoint.class),
INSTANT_PLACEMENT_POINT(1095893266, InstantPlacementPoint.class);
final int j;
private final Class l;
af(int i, Class cls) {
this.j = i;
this.l = cls;
}
@NonNull
public static af a(Class cls) {
for (af afVar : values()) {
Class cls2 = afVar.l;
if (cls2 != null && cls2.equals(cls)) {
return afVar;
}
}
return UNKNOWN_TO_JAVA;
}
}

View File

@@ -0,0 +1,43 @@
package com.google.ar.core;
import android.app.PendingIntent;
import android.content.Context;
import android.net.Uri;
import android.os.Bundle;
import com.facebook.gamingservices.cloudgaming.internal.SDKConstants;
import com.google.ar.core.exceptions.UnavailableDeviceNotCompatibleException;
import com.google.ar.core.exceptions.UnavailableUserDeclinedInstallationException;
/* loaded from: classes3.dex */
public abstract class ag {
public static PendingIntent a(Context context) {
try {
Bundle call = context.getContentResolver().call(new Uri.Builder().scheme("content").authority("com.google.ar.core.services.arcorecontentprovider").path("").build(), "getSetupIntent", context.getPackageName(), (Bundle) null);
if (call == null) {
return null;
}
PendingIntent pendingIntent = (PendingIntent) call.getParcelable(SDKConstants.PARAM_INTENT);
if (pendingIntent != null) {
return pendingIntent;
}
String string = call.getString("exceptionType", "");
if (string.isEmpty()) {
return null;
}
if (string.equals(UnavailableDeviceNotCompatibleException.class.getName())) {
throw new UnavailableDeviceNotCompatibleException();
}
if (string.equals(UnavailableUserDeclinedInstallationException.class.getName())) {
throw new UnavailableUserDeclinedInstallationException();
}
Class<? extends U> asSubclass = Class.forName(string).asSubclass(RuntimeException.class);
String string2 = call.getString("exceptionText", null);
if (string2 != null) {
throw ((RuntimeException) asSubclass.getConstructor(String.class).newInstance(string2));
}
throw ((RuntimeException) asSubclass.getConstructor(new Class[0]).newInstance(new Object[0]));
} catch (ReflectiveOperationException | RuntimeException unused) {
return null;
}
}
}

View File

@@ -0,0 +1,98 @@
package com.google.ar.core;
import android.graphics.SurfaceTexture;
import android.hardware.camera2.CameraDevice;
import android.os.Handler;
import android.view.Surface;
/* loaded from: classes3.dex */
public final class ah extends CameraDevice.StateCallback {
public static final /* synthetic */ int $r8$clinit = 0;
public final /* synthetic */ Handler a;
public final /* synthetic */ CameraDevice.StateCallback b;
public final /* synthetic */ SharedCamera c;
public ah(SharedCamera sharedCamera, Handler handler, CameraDevice.StateCallback stateCallback) {
this.c = sharedCamera;
this.a = handler;
this.b = stateCallback;
}
@Override // android.hardware.camera2.CameraDevice.StateCallback
public final void onClosed(final CameraDevice cameraDevice) {
Handler handler = this.a;
final CameraDevice.StateCallback stateCallback = this.b;
handler.post(new Runnable() { // from class: com.google.ar.core.SharedCamera$1$$ExternalSyntheticLambda2
@Override // java.lang.Runnable
public final void run() {
CameraDevice.StateCallback stateCallback2 = stateCallback;
CameraDevice cameraDevice2 = cameraDevice;
int i = ah.$r8$clinit;
stateCallback2.onClosed(cameraDevice2);
}
});
this.c.onDeviceClosed(cameraDevice);
}
@Override // android.hardware.camera2.CameraDevice.StateCallback
public final void onDisconnected(final CameraDevice cameraDevice) {
Handler handler = this.a;
final CameraDevice.StateCallback stateCallback = this.b;
handler.post(new Runnable() { // from class: com.google.ar.core.SharedCamera$1$$ExternalSyntheticLambda1
@Override // java.lang.Runnable
public final void run() {
CameraDevice.StateCallback stateCallback2 = stateCallback;
CameraDevice cameraDevice2 = cameraDevice;
int i = ah.$r8$clinit;
stateCallback2.onDisconnected(cameraDevice2);
}
});
this.c.onDeviceDisconnected(cameraDevice);
}
@Override // android.hardware.camera2.CameraDevice.StateCallback
public final void onError(final CameraDevice cameraDevice, final int i) {
Handler handler = this.a;
final CameraDevice.StateCallback stateCallback = this.b;
handler.post(new Runnable() { // from class: com.google.ar.core.SharedCamera$1$$ExternalSyntheticLambda0
@Override // java.lang.Runnable
public final void run() {
CameraDevice.StateCallback stateCallback2 = stateCallback;
CameraDevice cameraDevice2 = cameraDevice;
int i2 = i;
int i3 = ah.$r8$clinit;
stateCallback2.onError(cameraDevice2, i2);
}
});
this.c.close();
}
@Override // android.hardware.camera2.CameraDevice.StateCallback
public final void onOpened(final CameraDevice cameraDevice) {
aj ajVar;
aj ajVar2;
SurfaceTexture gpuSurfaceTexture;
aj ajVar3;
Surface gpuSurface;
ajVar = this.c.sharedCameraInfo;
ajVar.d(cameraDevice);
Handler handler = this.a;
final CameraDevice.StateCallback stateCallback = this.b;
handler.post(new Runnable() { // from class: com.google.ar.core.SharedCamera$1$$ExternalSyntheticLambda3
@Override // java.lang.Runnable
public final void run() {
CameraDevice.StateCallback stateCallback2 = stateCallback;
CameraDevice cameraDevice2 = cameraDevice;
int i = ah.$r8$clinit;
stateCallback2.onOpened(cameraDevice2);
}
});
this.c.onDeviceOpened(cameraDevice);
ajVar2 = this.c.sharedCameraInfo;
gpuSurfaceTexture = this.c.getGpuSurfaceTexture();
ajVar2.g(gpuSurfaceTexture);
ajVar3 = this.c.sharedCameraInfo;
gpuSurface = this.c.getGpuSurface();
ajVar3.f(gpuSurface);
}
}

View File

@@ -0,0 +1,105 @@
package com.google.ar.core;
import android.hardware.camera2.CameraCaptureSession;
import android.os.Handler;
/* loaded from: classes3.dex */
public final class ai extends CameraCaptureSession.StateCallback {
public static final /* synthetic */ int $r8$clinit = 0;
public final /* synthetic */ Handler a;
public final /* synthetic */ CameraCaptureSession.StateCallback b;
public final /* synthetic */ SharedCamera c;
public ai(SharedCamera sharedCamera, Handler handler, CameraCaptureSession.StateCallback stateCallback) {
this.c = sharedCamera;
this.a = handler;
this.b = stateCallback;
}
@Override // android.hardware.camera2.CameraCaptureSession.StateCallback
public final void onActive(final CameraCaptureSession cameraCaptureSession) {
Handler handler = this.a;
final CameraCaptureSession.StateCallback stateCallback = this.b;
handler.post(new Runnable() { // from class: com.google.ar.core.SharedCamera$2$$ExternalSyntheticLambda0
@Override // java.lang.Runnable
public final void run() {
CameraCaptureSession.StateCallback stateCallback2 = stateCallback;
CameraCaptureSession cameraCaptureSession2 = cameraCaptureSession;
int i = ai.$r8$clinit;
stateCallback2.onActive(cameraCaptureSession2);
}
});
this.c.onCaptureSessionActive(cameraCaptureSession);
}
@Override // android.hardware.camera2.CameraCaptureSession.StateCallback
public final void onClosed(final CameraCaptureSession cameraCaptureSession) {
Handler handler = this.a;
final CameraCaptureSession.StateCallback stateCallback = this.b;
handler.post(new Runnable() { // from class: com.google.ar.core.SharedCamera$2$$ExternalSyntheticLambda1
@Override // java.lang.Runnable
public final void run() {
CameraCaptureSession.StateCallback stateCallback2 = stateCallback;
CameraCaptureSession cameraCaptureSession2 = cameraCaptureSession;
int i = ai.$r8$clinit;
stateCallback2.onClosed(cameraCaptureSession2);
}
});
this.c.onCaptureSessionClosed(cameraCaptureSession);
}
@Override // android.hardware.camera2.CameraCaptureSession.StateCallback
public final void onConfigureFailed(final CameraCaptureSession cameraCaptureSession) {
Handler handler = this.a;
final CameraCaptureSession.StateCallback stateCallback = this.b;
handler.post(new Runnable() { // from class: com.google.ar.core.SharedCamera$2$$ExternalSyntheticLambda3
@Override // java.lang.Runnable
public final void run() {
CameraCaptureSession.StateCallback stateCallback2 = stateCallback;
CameraCaptureSession cameraCaptureSession2 = cameraCaptureSession;
int i = ai.$r8$clinit;
stateCallback2.onConfigureFailed(cameraCaptureSession2);
}
});
this.c.onCaptureSessionConfigureFailed(cameraCaptureSession);
}
@Override // android.hardware.camera2.CameraCaptureSession.StateCallback
public final void onConfigured(final CameraCaptureSession cameraCaptureSession) {
aj ajVar;
aj unused;
unused = this.c.sharedCameraInfo;
Handler handler = this.a;
final CameraCaptureSession.StateCallback stateCallback = this.b;
handler.post(new Runnable() { // from class: com.google.ar.core.SharedCamera$2$$ExternalSyntheticLambda4
@Override // java.lang.Runnable
public final void run() {
CameraCaptureSession.StateCallback stateCallback2 = stateCallback;
CameraCaptureSession cameraCaptureSession2 = cameraCaptureSession;
int i = ai.$r8$clinit;
stateCallback2.onConfigured(cameraCaptureSession2);
}
});
this.c.onCaptureSessionConfigured(cameraCaptureSession);
ajVar = this.c.sharedCameraInfo;
if (ajVar.b() != null) {
this.c.setDummyListenerToAvoidImageBufferStarvation();
}
}
@Override // android.hardware.camera2.CameraCaptureSession.StateCallback
public final void onReady(final CameraCaptureSession cameraCaptureSession) {
Handler handler = this.a;
final CameraCaptureSession.StateCallback stateCallback = this.b;
handler.post(new Runnable() { // from class: com.google.ar.core.SharedCamera$2$$ExternalSyntheticLambda2
@Override // java.lang.Runnable
public final void run() {
CameraCaptureSession.StateCallback stateCallback2 = stateCallback;
CameraCaptureSession cameraCaptureSession2 = cameraCaptureSession;
int i = ai.$r8$clinit;
stateCallback2.onReady(cameraCaptureSession2);
}
});
this.c.onCaptureSessionReady(cameraCaptureSession);
}
}

View File

@@ -0,0 +1,47 @@
package com.google.ar.core;
import android.graphics.SurfaceTexture;
import android.hardware.camera2.CameraDevice;
import android.view.Surface;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/* loaded from: classes3.dex */
public final class aj {
public CameraDevice a = null;
public final Map b = new HashMap();
public SurfaceTexture c = null;
public Surface d = null;
public final SurfaceTexture a() {
return this.c;
}
public final CameraDevice b() {
return this.a;
}
public final Surface c() {
return this.d;
}
public final void d(CameraDevice cameraDevice) {
this.a = cameraDevice;
}
public final void e(String str, List list) {
this.b.put(str, list);
}
public final void f(Surface surface) {
this.d = surface;
}
public final void g(SurfaceTexture surfaceTexture) {
this.c = surfaceTexture;
}
public /* synthetic */ aj(byte[] bArr) {
}
}

View File

@@ -0,0 +1,10 @@
package com.google.ar.core.annotations;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@Retention(RetentionPolicy.SOURCE)
/* loaded from: classes3.dex */
public @interface NativeEnum {
String value();
}

View File

@@ -0,0 +1,10 @@
package com.google.ar.core.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Target;
@Target({ElementType.METHOD, ElementType.FIELD, ElementType.TYPE, ElementType.CONSTRUCTOR})
/* loaded from: classes3.dex */
public @interface UsedByNative {
String value();
}

View File

@@ -0,0 +1,10 @@
package com.google.ar.core.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Target;
@Target({ElementType.METHOD, ElementType.FIELD, ElementType.TYPE, ElementType.CONSTRUCTOR})
/* loaded from: classes3.dex */
public @interface UsedByReflection {
String value();
}

View File

@@ -0,0 +1,33 @@
package com.google.ar.core;
import com.google.ar.core.ArCoreApk;
/* loaded from: classes3.dex */
public enum b extends ArCoreApk.Availability {
/* JADX WARN: Illegal instructions before constructor call */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public /* synthetic */ b() {
/*
r3 = this;
r0 = 1
r1 = 0
java.lang.String r2 = "UNKNOWN_CHECKING"
r3.<init>(r2, r0, r0)
return
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.ar.core.b.<init>():void");
}
@Override // com.google.ar.core.ArCoreApk.Availability
public final boolean isTransient() {
return true;
}
@Override // com.google.ar.core.ArCoreApk.Availability
public final boolean isUnknown() {
return true;
}
}

View File

@@ -0,0 +1,28 @@
package com.google.ar.core;
import com.google.ar.core.ArCoreApk;
/* loaded from: classes3.dex */
public enum c extends ArCoreApk.Availability {
/* JADX WARN: Illegal instructions before constructor call */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public /* synthetic */ c() {
/*
r3 = this;
r0 = 2
r1 = 0
java.lang.String r2 = "UNKNOWN_TIMED_OUT"
r3.<init>(r2, r0, r0)
return
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.ar.core.c.<init>():void");
}
@Override // com.google.ar.core.ArCoreApk.Availability
public final boolean isUnknown() {
return true;
}
}

View File

@@ -0,0 +1,15 @@
package com.google.ar.core;
import com.google.ar.core.ArCoreApk;
/* loaded from: classes3.dex */
public enum d extends ArCoreApk.Availability {
public /* synthetic */ d() {
super("UNSUPPORTED_DEVICE_NOT_CAPABLE", 3, 100);
}
@Override // com.google.ar.core.ArCoreApk.Availability
public final boolean isUnsupported() {
return true;
}
}

View File

@@ -0,0 +1,7 @@
package com.google.ar.core.dependencies;
import android.media.Image;
/* loaded from: classes3.dex */
public abstract class a extends Image.Plane {
}

View File

@@ -0,0 +1,7 @@
package com.google.ar.core.dependencies;
import android.media.Image;
/* loaded from: classes3.dex */
public abstract class b extends Image {
}

View File

@@ -0,0 +1,52 @@
package com.google.ar.core.dependencies;
import android.os.IBinder;
import android.os.IInterface;
import android.os.Parcel;
import android.os.RemoteException;
/* loaded from: classes3.dex */
public class c implements IInterface {
private final IBinder a;
private final String b;
public c(IBinder iBinder, String str) {
this.a = iBinder;
this.b = str;
}
public final Parcel a() {
Parcel obtain = Parcel.obtain();
obtain.writeInterfaceToken(this.b);
return obtain;
}
@Override // android.os.IInterface
public final IBinder asBinder() {
return this.a;
}
public final Parcel b(int i, Parcel parcel) throws RemoteException {
Parcel obtain = Parcel.obtain();
try {
try {
this.a.transact(i, parcel, obtain, 0);
obtain.readException();
return obtain;
} catch (RuntimeException e) {
obtain.recycle();
throw e;
}
} finally {
parcel.recycle();
}
}
public final void c(int i, Parcel parcel) throws RemoteException {
try {
this.a.transact(i, parcel, null, 1);
} finally {
parcel.recycle();
}
}
}

View File

@@ -0,0 +1,33 @@
package com.google.ar.core.dependencies;
import android.os.Binder;
import android.os.IBinder;
import android.os.IInterface;
import android.os.Parcel;
import android.os.RemoteException;
/* loaded from: classes3.dex */
public class d extends Binder implements IInterface {
public d(String str) {
attachInterface(this, str);
}
public boolean a(int i, Parcel parcel) throws RemoteException {
return false;
}
@Override // android.os.IInterface
public final IBinder asBinder() {
return this;
}
@Override // android.os.Binder
public final boolean onTransact(int i, Parcel parcel, Parcel parcel2, int i2) throws RemoteException {
if (i <= 16777215) {
parcel.enforceInterface(getInterfaceDescriptor());
} else if (super.onTransact(i, parcel, parcel2, i2)) {
return true;
}
return a(i, parcel);
}
}

View File

@@ -0,0 +1,47 @@
package com.google.ar.core.dependencies;
import android.os.BadParcelableException;
import android.os.IInterface;
import android.os.Parcel;
import android.os.Parcelable;
/* loaded from: classes3.dex */
public final class e {
static {
e.class.getClassLoader();
}
private e() {
}
public static Parcelable a(Parcel parcel, Parcelable.Creator creator) {
if (parcel.readInt() == 0) {
return null;
}
return (Parcelable) creator.createFromParcel(parcel);
}
public static void b(Parcel parcel) {
int dataAvail = parcel.dataAvail();
if (dataAvail <= 0) {
return;
}
StringBuilder sb = new StringBuilder(56);
sb.append("Parcel data not fully consumed, unread size: ");
sb.append(dataAvail);
throw new BadParcelableException(sb.toString());
}
public static void c(Parcel parcel, Parcelable parcelable) {
parcel.writeInt(1);
parcelable.writeToParcel(parcel, 0);
}
public static void d(Parcel parcel, IInterface iInterface) {
if (iInterface == null) {
parcel.writeStrongBinder(null);
} else {
parcel.writeStrongBinder(iInterface.asBinder());
}
}
}

View File

@@ -0,0 +1,33 @@
package com.google.ar.core.dependencies;
import android.os.Bundle;
import android.os.IBinder;
import android.os.Parcel;
import android.os.RemoteException;
import java.util.List;
/* loaded from: classes3.dex */
public final class f extends c implements h {
public f(IBinder iBinder) {
super(iBinder, "com.google.android.play.core.install.protocol.IInstallService");
}
@Override // com.google.ar.core.dependencies.h
public final void d(String str, Bundle bundle, j jVar) throws RemoteException {
Parcel a = a();
a.writeString(str);
e.c(a, bundle);
e.d(a, jVar);
c(2, a);
}
@Override // com.google.ar.core.dependencies.h
public final void e(String str, List list, Bundle bundle, j jVar) throws RemoteException {
Parcel a = a();
a.writeString(str);
a.writeTypedList(list);
e.c(a, bundle);
e.d(a, jVar);
c(1, a);
}
}

View File

@@ -0,0 +1,15 @@
package com.google.ar.core.dependencies;
import android.os.IBinder;
import android.os.IInterface;
/* loaded from: classes3.dex */
public abstract class g extends d implements h {
public static h b(IBinder iBinder) {
if (iBinder == null) {
return null;
}
IInterface queryLocalInterface = iBinder.queryLocalInterface("com.google.android.play.core.install.protocol.IInstallService");
return queryLocalInterface instanceof h ? (h) queryLocalInterface : new f(iBinder);
}
}

View File

@@ -0,0 +1,13 @@
package com.google.ar.core.dependencies;
import android.os.Bundle;
import android.os.IInterface;
import android.os.RemoteException;
import java.util.List;
/* loaded from: classes3.dex */
public interface h extends IInterface {
void d(String str, Bundle bundle, j jVar) throws RemoteException;
void e(String str, List list, Bundle bundle, j jVar) throws RemoteException;
}

View File

@@ -0,0 +1,31 @@
package com.google.ar.core.dependencies;
import android.os.Bundle;
import android.os.Parcel;
import android.os.RemoteException;
/* loaded from: classes3.dex */
public abstract class i extends d implements j {
public i() {
super("com.google.android.play.core.install.protocol.IInstallServiceCallback");
}
@Override // com.google.ar.core.dependencies.d
public final boolean a(int i, Parcel parcel) throws RemoteException {
if (i == 1) {
Bundle bundle = (Bundle) e.a(parcel, Bundle.CREATOR);
e.b(parcel);
c(bundle);
} else if (i == 2) {
Bundle bundle2 = (Bundle) e.a(parcel, Bundle.CREATOR);
e.b(parcel);
b(bundle2);
} else {
if (i != 3) {
return false;
}
e.b(parcel);
}
return true;
}
}

View File

@@ -0,0 +1,12 @@
package com.google.ar.core.dependencies;
import android.os.Bundle;
import android.os.IInterface;
import android.os.RemoteException;
/* loaded from: classes3.dex */
public interface j extends IInterface {
void b(Bundle bundle) throws RemoteException;
void c(Bundle bundle) throws RemoteException;
}

View File

@@ -0,0 +1,15 @@
package com.google.ar.core;
import com.google.ar.core.ArCoreApk;
/* loaded from: classes3.dex */
public enum e extends ArCoreApk.Availability {
public /* synthetic */ e() {
super("SUPPORTED_NOT_INSTALLED", 4, 201);
}
@Override // com.google.ar.core.ArCoreApk.Availability
public final boolean isSupported() {
return true;
}
}

View File

@@ -0,0 +1,11 @@
package com.google.ar.core.exceptions;
/* loaded from: classes3.dex */
public class AnchorNotSupportedForHostingException extends UnsupportedOperationException {
public AnchorNotSupportedForHostingException() {
}
public AnchorNotSupportedForHostingException(String str) {
super(str);
}
}

View File

@@ -0,0 +1,11 @@
package com.google.ar.core.exceptions;
/* loaded from: classes3.dex */
public class CameraNotAvailableException extends Exception {
public CameraNotAvailableException() {
}
public CameraNotAvailableException(String str) {
super(str);
}
}

View File

@@ -0,0 +1,11 @@
package com.google.ar.core.exceptions;
/* loaded from: classes3.dex */
public class CloudAnchorsNotConfiguredException extends IllegalStateException {
public CloudAnchorsNotConfiguredException() {
}
public CloudAnchorsNotConfiguredException(String str) {
super(str);
}
}

View File

@@ -0,0 +1,11 @@
package com.google.ar.core.exceptions;
/* loaded from: classes3.dex */
public class DataInvalidFormatException extends IllegalArgumentException {
public DataInvalidFormatException() {
}
public DataInvalidFormatException(String str) {
super(str);
}
}

View File

@@ -0,0 +1,11 @@
package com.google.ar.core.exceptions;
/* loaded from: classes3.dex */
public class DataUnsupportedVersionException extends IllegalArgumentException {
public DataUnsupportedVersionException() {
}
public DataUnsupportedVersionException(String str) {
super(str);
}
}

View File

@@ -0,0 +1,11 @@
package com.google.ar.core.exceptions;
/* loaded from: classes3.dex */
public class DeadlineExceededException extends IllegalStateException {
public DeadlineExceededException() {
}
public DeadlineExceededException(String str) {
super(str);
}
}

View File

@@ -0,0 +1,15 @@
package com.google.ar.core.exceptions;
/* loaded from: classes3.dex */
public class FatalException extends RuntimeException {
public FatalException() {
}
public FatalException(String str) {
super(str);
}
public FatalException(String str, Throwable th) {
super(str, th);
}
}

View File

@@ -0,0 +1,12 @@
package com.google.ar.core.exceptions;
/* loaded from: classes3.dex */
public class FineLocationPermissionNotGrantedException extends SecurityException {
public FineLocationPermissionNotGrantedException() {
this("");
}
public FineLocationPermissionNotGrantedException(String str) {
super("The Android permission ACCESS_FINE_LOCATION has not been granted prior to calling Session.configure() with Geospatial mode enabled (Config.GeospatialMode.ENABLED).".concat(String.valueOf(str)));
}
}

View File

@@ -0,0 +1,12 @@
package com.google.ar.core.exceptions;
/* loaded from: classes3.dex */
public class GooglePlayServicesLocationLibraryNotLinkedException extends UnsupportedConfigurationException {
public GooglePlayServicesLocationLibraryNotLinkedException() {
this("");
}
public GooglePlayServicesLocationLibraryNotLinkedException(String str) {
super("The Google Fused Location Provider for Android classes must be linked into the app's binary when calling Session.configure() with Geospatial mode enabled (Config.GeospatialMode.ENABLED). ".concat(String.valueOf(str)));
}
}

View File

@@ -0,0 +1,11 @@
package com.google.ar.core.exceptions;
/* loaded from: classes3.dex */
public class ImageInsufficientQualityException extends IllegalArgumentException {
public ImageInsufficientQualityException() {
}
public ImageInsufficientQualityException(String str) {
super(str);
}
}

View File

@@ -0,0 +1,11 @@
package com.google.ar.core.exceptions;
/* loaded from: classes3.dex */
public class MetadataNotFoundException extends Exception {
public MetadataNotFoundException() {
}
public MetadataNotFoundException(String str) {
super(str);
}
}

View File

@@ -0,0 +1,11 @@
package com.google.ar.core.exceptions;
/* loaded from: classes3.dex */
public class MissingGlContextException extends IllegalStateException {
public MissingGlContextException() {
}
public MissingGlContextException(String str) {
super(str);
}
}

View File

@@ -0,0 +1,11 @@
package com.google.ar.core.exceptions;
/* loaded from: classes3.dex */
public class NotTrackingException extends RuntimeException {
public NotTrackingException() {
}
public NotTrackingException(String str) {
super(str);
}
}

View File

@@ -0,0 +1,11 @@
package com.google.ar.core.exceptions;
/* loaded from: classes3.dex */
public class NotYetAvailableException extends Exception {
public NotYetAvailableException() {
}
public NotYetAvailableException(String str) {
super(str);
}
}

View File

@@ -0,0 +1,13 @@
package com.google.ar.core.exceptions;
import java.io.IOException;
/* loaded from: classes3.dex */
public class PlaybackFailedException extends IOException {
public PlaybackFailedException() {
}
public PlaybackFailedException(String str) {
super(str);
}
}

View File

@@ -0,0 +1,13 @@
package com.google.ar.core.exceptions;
import java.io.IOException;
/* loaded from: classes3.dex */
public class RecordingFailedException extends IOException {
public RecordingFailedException() {
}
public RecordingFailedException(String str) {
super(str);
}
}

View File

@@ -0,0 +1,11 @@
package com.google.ar.core.exceptions;
/* loaded from: classes3.dex */
public class ResourceExhaustedException extends RuntimeException {
public ResourceExhaustedException() {
}
public ResourceExhaustedException(String str) {
super(str);
}
}

View File

@@ -0,0 +1,11 @@
package com.google.ar.core.exceptions;
/* loaded from: classes3.dex */
public class SessionNotPausedException extends IllegalStateException {
public SessionNotPausedException() {
}
public SessionNotPausedException(String str) {
super(str);
}
}

View File

@@ -0,0 +1,11 @@
package com.google.ar.core.exceptions;
/* loaded from: classes3.dex */
public class SessionPausedException extends IllegalStateException {
public SessionPausedException() {
}
public SessionPausedException(String str) {
super(str);
}
}

View File

@@ -0,0 +1,11 @@
package com.google.ar.core.exceptions;
/* loaded from: classes3.dex */
public class SessionUnsupportedException extends IllegalStateException {
public SessionUnsupportedException() {
}
public SessionUnsupportedException(String str) {
super(str);
}
}

View File

@@ -0,0 +1,11 @@
package com.google.ar.core.exceptions;
/* loaded from: classes3.dex */
public class TextureNotSetException extends IllegalStateException {
public TextureNotSetException() {
}
public TextureNotSetException(String str) {
super(str);
}
}

View File

@@ -0,0 +1,11 @@
package com.google.ar.core.exceptions;
/* loaded from: classes3.dex */
public class UnavailableApkTooOldException extends UnavailableException {
public UnavailableApkTooOldException() {
}
public UnavailableApkTooOldException(String str) {
super(str);
}
}

View File

@@ -0,0 +1,11 @@
package com.google.ar.core.exceptions;
/* loaded from: classes3.dex */
public class UnavailableArcoreNotInstalledException extends UnavailableException {
public UnavailableArcoreNotInstalledException() {
}
public UnavailableArcoreNotInstalledException(String str) {
super(str);
}
}

View File

@@ -0,0 +1,11 @@
package com.google.ar.core.exceptions;
/* loaded from: classes3.dex */
public class UnavailableDeviceNotCompatibleException extends UnavailableException {
public UnavailableDeviceNotCompatibleException() {
}
public UnavailableDeviceNotCompatibleException(String str) {
super(str);
}
}

View File

@@ -0,0 +1,11 @@
package com.google.ar.core.exceptions;
/* loaded from: classes3.dex */
public class UnavailableException extends Exception {
public UnavailableException() {
}
public UnavailableException(String str) {
super(str);
}
}

View File

@@ -0,0 +1,11 @@
package com.google.ar.core.exceptions;
/* loaded from: classes3.dex */
public class UnavailableSdkTooOldException extends UnavailableException {
public UnavailableSdkTooOldException() {
}
public UnavailableSdkTooOldException(String str) {
super(str);
}
}

View File

@@ -0,0 +1,11 @@
package com.google.ar.core.exceptions;
/* loaded from: classes3.dex */
public class UnavailableUserDeclinedInstallationException extends UnavailableException {
public UnavailableUserDeclinedInstallationException() {
}
public UnavailableUserDeclinedInstallationException(String str) {
super(str);
}
}

View File

@@ -0,0 +1,11 @@
package com.google.ar.core.exceptions;
/* loaded from: classes3.dex */
public class UnsupportedConfigurationException extends RuntimeException {
public UnsupportedConfigurationException() {
}
public UnsupportedConfigurationException(String str) {
super(str);
}
}

View File

@@ -0,0 +1,15 @@
package com.google.ar.core;
import com.google.ar.core.ArCoreApk;
/* loaded from: classes3.dex */
public enum f extends ArCoreApk.Availability {
public /* synthetic */ f() {
super("SUPPORTED_APK_TOO_OLD", 5, 202);
}
@Override // com.google.ar.core.ArCoreApk.Availability
public final boolean isSupported() {
return true;
}
}

View File

@@ -0,0 +1,15 @@
package com.google.ar.core;
import com.google.ar.core.ArCoreApk;
/* loaded from: classes3.dex */
public enum g extends ArCoreApk.Availability {
public /* synthetic */ g() {
super("SUPPORTED_INSTALLED", 6, 203);
}
@Override // com.google.ar.core.ArCoreApk.Availability
public final boolean isSupported() {
return true;
}
}

Some files were not shown because too many files have changed in this diff Show More