正在查看: OVO v3.139.0 应用的 jfh.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: OVO v3.139.0 应用的 jfh.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package o.i;
import android.content.Context;
import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import android.hardware.SensorManager;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
import okhttp3.MediaType;
import okhttp3.MultipartBody;
import okhttp3.RequestBody;
public final class jfh {
public final Context a;
public final zeh f3359b;
public final String c;
public String d;
public ez7 e;
public ez7 f;
public ez7 g;
public ez7 h;
public ez7 i;
public ez7 j;
public File k;
public File l;
public File m;
public File n;
public File f3360o;
public File p;
public File q;
public final SensorManager r;
public Sensor s;
public Sensor t;
public Sensor u;
public Sensor v;
public Sensor w;
public boolean x;
public boolean y;
public final a z;
public class a implements SensorEventListener {
public a() {
}
@Override
public final void onAccuracyChanged(Sensor sensor, int i) {
}
@Override
public final void onSensorChanged(SensorEvent sensorEvent) {
jfh jfhVar = jfh.this;
if (jfhVar.y) {
return;
}
int type = sensorEvent.sensor.getType();
float[] fArr = sensorEvent.values;
wx7 wx7Var = new wx7(fArr.length);
for (float f : fArr) {
Float valueOf = Float.valueOf(f);
wx7Var.a.add(valueOf == null ? cz7.a : new jz7(valueOf));
}
long currentTimeMillis = System.currentTimeMillis();
if (type == 1) {
jfhVar.f.r(String.valueOf(currentTimeMillis), wx7Var);
return;
}
if (type == 2) {
jfhVar.g.r(String.valueOf(currentTimeMillis), wx7Var);
return;
}
if (type == 3) {
jfhVar.j.r(String.valueOf(currentTimeMillis), wx7Var);
} else if (type == 4) {
jfhVar.h.r(String.valueOf(currentTimeMillis), wx7Var);
} else {
if (type != 6) {
return;
}
jfhVar.i.r(String.valueOf(currentTimeMillis), wx7Var);
}
}
}
public jfh(Context context) {
StringBuilder sb = new StringBuilder("https://armxjib6ub.execute-api.ap-southeast-1.amazonaws.com/prod/");
xu6.c().getClass();
sb.append(xu6.f6575b.getAppId());
sb.append("/sensorData/");
this.c = sb.toString();
this.d = "";
this.e = new ez7();
this.f = new ez7();
this.g = new ez7();
this.h = new ez7();
this.i = new ez7();
this.j = new ez7();
this.x = false;
this.y = false;
this.z = new a();
this.a = context;
this.f3359b = zeh.a();
SensorManager sensorManager = (SensorManager) context.getSystemService("sensor");
this.r = sensorManager;
this.s = sensorManager.getDefaultSensor(1);
this.t = sensorManager.getDefaultSensor(2);
this.u = sensorManager.getDefaultSensor(4);
this.v = sensorManager.getDefaultSensor(6);
this.w = sensorManager.getDefaultSensor(3);
File file = new File(context.getFilesDir(), "hv/sensorData");
if (!file.exists()) {
file.mkdirs();
}
this.k = d(file, "sensor_data_events.json");
this.l = d(file, "accelerometerSensorData.json");
this.m = d(file, "geomagneticSensorData.json");
this.n = d(file, "gyroscopeSensorData.json");
this.f3360o = d(file, "pressureSensorData.json");
this.p = d(file, "orientationSensorData.json");
}
public static File d(File file, String str) {
File file2 = new File(file, str);
if (!str.contains("zip")) {
try {
PrintWriter printWriter = new PrintWriter(file2);
try {
printWriter.print("");
printWriter.close();
} finally {
}
} catch (Exception e) {
fvi.d(e);
}
}
return file2;
}
public static void f(ez7 ez7Var, File file) {
try {
FileWriter fileWriter = new FileWriter(file, true);
try {
BufferedWriter bufferedWriter = new BufferedWriter(fileWriter);
try {
bufferedWriter.append((CharSequence) ez7Var.toString());
bufferedWriter.newLine();
bufferedWriter.flush();
bufferedWriter.close();
fileWriter.close();
} finally {
}
} finally {
}
} catch (Exception e) {
fvi.d(e);
}
}
public final void a() {
this.e = new ez7();
this.f = new ez7();
this.g = new ez7();
this.h = new ez7();
this.i = new ez7();
this.j = new ez7();
File file = new File(this.a.getFilesDir(), "hv/sensorData");
d(file, this.k.getName());
d(file, this.l.getName());
d(file, this.m.getName());
d(file, this.n.getName());
d(file, this.f3360o.getName());
d(file, this.p.getName());
this.d = "";
}
public final void b() {
Sensor sensor = this.s;
a aVar = this.z;
SensorManager sensorManager = this.r;
if (sensor != null) {
sensorManager.registerListener(aVar, sensor, 10000);
}
Sensor sensor2 = this.t;
if (sensor2 != null) {
sensorManager.registerListener(aVar, sensor2, 10000);
}
Sensor sensor3 = this.u;
if (sensor3 != null) {
sensorManager.registerListener(aVar, sensor3, 10000);
}
Sensor sensor4 = this.v;
if (sensor4 != null) {
sensorManager.registerListener(aVar, sensor4, 10000);
}
Sensor sensor5 = this.w;
if (sensor5 != null) {
sensorManager.registerListener(aVar, sensor5, 10000);
}
this.x = true;
}
public final void c() {
FileInputStream fileInputStream;
if (this.x) {
if ((this.k == null || this.l == null || this.m == null || this.n == null || this.f3360o == null || this.p == null) ? false : true) {
SensorManager sensorManager = this.r;
if (sensorManager != null) {
sensorManager.unregisterListener(this.z);
this.x = false;
}
f(this.e, this.k);
f(this.f, this.l);
f(this.g, this.m);
f(this.h, this.n);
f(this.i, this.f3360o);
f(this.j, this.p);
}
if (this.q != null) {
Context context = this.a;
List asList = Arrays.asList(this.k.getAbsolutePath(), this.l.getAbsolutePath(), this.m.getAbsolutePath(), this.n.getAbsolutePath(), this.f3360o.getAbsolutePath(), this.p.getAbsolutePath());
File file = this.q;
int i = fvi.a;
try {
FileOutputStream fileOutputStream = new FileOutputStream(file);
try {
ZipOutputStream zipOutputStream = new ZipOutputStream(fileOutputStream);
try {
Iterator it = asList.iterator();
while (it.hasNext()) {
File file2 = new File((String) it.next());
try {
fileInputStream = new FileInputStream(file2);
} catch (Exception e) {
fvi.d(e);
djj.e().c(context).a();
}
try {
zipOutputStream.putNextEntry(new ZipEntry(file2.getName()));
byte[] bArr = new byte[1024];
while (true) {
int read = fileInputStream.read(bArr);
if (read < 0) {
break;
} else {
zipOutputStream.write(bArr, 0, read);
}
}
fileInputStream.close();
} catch (Throwable th) {
try {
fileInputStream.close();
} catch (Throwable th2) {
th.addSuppressed(th2);
}
throw th;
}
}
zipOutputStream.close();
fileOutputStream.close();
} finally {
}
} finally {
}
} catch (Exception unused) {
djj.e().c(context).a();
}
String str = this.d;
File file3 = this.q;
this.f3359b.a.getClass();
MultipartBody.Part createFormData = MultipartBody.Part.createFormData("sensorDataZipFile", file3.getName(), RequestBody.create(MediaType.parse("application/zip"), file3));
HashMap hashMap = new HashMap();
xu6.c().getClass();
if (xu6.f6575b.getAccessToken() != null) {
xu6.c().getClass();
if (!xu6.f6575b.getAccessToken().isEmpty()) {
xu6.c().getClass();
hashMap.put("Authorization", xu6.f6575b.getAccessToken());
afh.b().a(str, hashMap, createFormData).enqueue(new xfb());
}
}
xu6.c().getClass();
hashMap.put("appId", xu6.f6575b.getAppId());
xu6.c().getClass();
hashMap.put("appKey", xu6.f6575b.getAppKey());
afh.b().a(str, hashMap, createFormData).enqueue(new xfb());
}
a();
}
}
public final void e(long j, String str) {
wx7 wx7Var = new wx7();
wx7Var.r(str);
this.e.r(String.valueOf(j), wx7Var);
}
public final boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof jfh)) {
return false;
}
jfh jfhVar = (jfh) obj;
jfhVar.getClass();
if (this.x != jfhVar.x || this.y != jfhVar.y) {
return false;
}
Context context = this.a;
Context context2 = jfhVar.a;
if (context != null ? !context.equals(context2) : context2 != null) {
return false;
}
zeh zehVar = this.f3359b;
zeh zehVar2 = jfhVar.f3359b;
if (zehVar != null ? !zehVar.equals(zehVar2) : zehVar2 != null) {
return false;
}
String str = this.c;
String str2 = jfhVar.c;
if (str != null ? !str.equals(str2) : str2 != null) {
return false;
}
String str3 = this.d;
String str4 = jfhVar.d;
if (str3 != null ? !str3.equals(str4) : str4 != null) {
return false;
}
ez7 ez7Var = this.e;
ez7 ez7Var2 = jfhVar.e;
if (ez7Var != null ? !ez7Var.equals(ez7Var2) : ez7Var2 != null) {
return false;
}
ez7 ez7Var3 = this.f;
ez7 ez7Var4 = jfhVar.f;
if (ez7Var3 != null ? !ez7Var3.equals(ez7Var4) : ez7Var4 != null) {
return false;
}
ez7 ez7Var5 = this.g;
ez7 ez7Var6 = jfhVar.g;
if (ez7Var5 != null ? !ez7Var5.equals(ez7Var6) : ez7Var6 != null) {
return false;
}
ez7 ez7Var7 = this.h;
ez7 ez7Var8 = jfhVar.h;
if (ez7Var7 != null ? !ez7Var7.equals(ez7Var8) : ez7Var8 != null) {
return false;
}
ez7 ez7Var9 = this.i;
ez7 ez7Var10 = jfhVar.i;
if (ez7Var9 != null ? !ez7Var9.equals(ez7Var10) : ez7Var10 != null) {
return false;
}
ez7 ez7Var11 = this.j;
ez7 ez7Var12 = jfhVar.j;
if (ez7Var11 != null ? !ez7Var11.equals(ez7Var12) : ez7Var12 != null) {
return false;
}
File file = this.k;
File file2 = jfhVar.k;
if (file != null ? !file.equals(file2) : file2 != null) {
return false;
}
File file3 = this.l;
File file4 = jfhVar.l;
if (file3 != null ? !file3.equals(file4) : file4 != null) {
return false;
}
File file5 = this.m;
File file6 = jfhVar.m;
if (file5 != null ? !file5.equals(file6) : file6 != null) {
return false;
}
File file7 = this.n;
File file8 = jfhVar.n;
if (file7 != null ? !file7.equals(file8) : file8 != null) {
return false;
}
File file9 = this.f3360o;
File file10 = jfhVar.f3360o;
if (file9 != null ? !file9.equals(file10) : file10 != null) {
return false;
}
File file11 = this.p;
File file12 = jfhVar.p;
if (file11 != null ? !file11.equals(file12) : file12 != null) {
return false;
}
File file13 = this.q;
File file14 = jfhVar.q;
if (file13 != null ? !file13.equals(file14) : file14 != null) {
return false;
}
SensorManager sensorManager = this.r;
SensorManager sensorManager2 = jfhVar.r;
if (sensorManager != null ? !sensorManager.equals(sensorManager2) : sensorManager2 != null) {
return false;
}
Sensor sensor = this.s;
Sensor sensor2 = jfhVar.s;
if (sensor != null ? !sensor.equals(sensor2) : sensor2 != null) {
return false;
}
Sensor sensor3 = this.t;
Sensor sensor4 = jfhVar.t;
if (sensor3 != null ? !sensor3.equals(sensor4) : sensor4 != null) {
return false;
}
Sensor sensor5 = this.u;
Sensor sensor6 = jfhVar.u;
if (sensor5 != null ? !sensor5.equals(sensor6) : sensor6 != null) {
return false;
}
Sensor sensor7 = this.v;
Sensor sensor8 = jfhVar.v;
if (sensor7 != null ? !sensor7.equals(sensor8) : sensor8 != null) {
return false;
}
Sensor sensor9 = this.w;
Sensor sensor10 = jfhVar.w;
if (sensor9 != null ? !sensor9.equals(sensor10) : sensor10 != null) {
return false;
}
a aVar = this.z;
a aVar2 = jfhVar.z;
return aVar != null ? aVar.equals(aVar2) : aVar2 == null;
}
public final void g(String str) {
a();
File file = new File(this.a.getFilesDir(), "hv/sensorData");
if (!file.exists()) {
file.mkdirs();
}
this.q = d(file, str);
this.d = this.c.concat(str);
b();
}
public final int hashCode() {
int i = ((((this.x ? 79 : 97) + 593481) * 59) + (this.y ? 79 : 97)) * 59;
Context context = this.a;
int hashCode = (i + (context == null ? 43 : context.hashCode())) * 59;
zeh zehVar = this.f3359b;
int hashCode2 = (hashCode + (zehVar == null ? 43 : zehVar.hashCode())) * 59;
String str = this.c;
int hashCode3 = hashCode2 + (str == null ? 43 : str.hashCode());
String str2 = this.d;
int hashCode4 = (hashCode3 * 59) + (str2 == null ? 43 : str2.hashCode());
ez7 ez7Var = this.e;
int hashCode5 = (hashCode4 * 59) + (ez7Var == null ? 43 : ez7Var.hashCode());
ez7 ez7Var2 = this.f;
int hashCode6 = (hashCode5 * 59) + (ez7Var2 == null ? 43 : ez7Var2.hashCode());
ez7 ez7Var3 = this.g;
int hashCode7 = (hashCode6 * 59) + (ez7Var3 == null ? 43 : ez7Var3.hashCode());
ez7 ez7Var4 = this.h;
int hashCode8 = (hashCode7 * 59) + (ez7Var4 == null ? 43 : ez7Var4.hashCode());
ez7 ez7Var5 = this.i;
int hashCode9 = (hashCode8 * 59) + (ez7Var5 == null ? 43 : ez7Var5.hashCode());
ez7 ez7Var6 = this.j;
int hashCode10 = (hashCode9 * 59) + (ez7Var6 == null ? 43 : ez7Var6.hashCode());
File file = this.k;
int hashCode11 = (hashCode10 * 59) + (file == null ? 43 : file.hashCode());
File file2 = this.l;
int hashCode12 = (hashCode11 * 59) + (file2 == null ? 43 : file2.hashCode());
File file3 = this.m;
int hashCode13 = (hashCode12 * 59) + (file3 == null ? 43 : file3.hashCode());
File file4 = this.n;
int hashCode14 = (hashCode13 * 59) + (file4 == null ? 43 : file4.hashCode());
File file5 = this.f3360o;
int hashCode15 = (hashCode14 * 59) + (file5 == null ? 43 : file5.hashCode());
File file6 = this.p;
int hashCode16 = (hashCode15 * 59) + (file6 == null ? 43 : file6.hashCode());
File file7 = this.q;
int hashCode17 = ((hashCode16 * 59) + (file7 == null ? 43 : file7.hashCode())) * 59;
SensorManager sensorManager = this.r;
int hashCode18 = hashCode17 + (sensorManager == null ? 43 : sensorManager.hashCode());
Sensor sensor = this.s;
int hashCode19 = (hashCode18 * 59) + (sensor == null ? 43 : sensor.hashCode());
Sensor sensor2 = this.t;
int hashCode20 = (hashCode19 * 59) + (sensor2 == null ? 43 : sensor2.hashCode());
Sensor sensor3 = this.u;
int hashCode21 = (hashCode20 * 59) + (sensor3 == null ? 43 : sensor3.hashCode());
Sensor sensor4 = this.v;
int hashCode22 = (hashCode21 * 59) + (sensor4 == null ? 43 : sensor4.hashCode());
Sensor sensor5 = this.w;
int hashCode23 = ((hashCode22 * 59) + (sensor5 == null ? 43 : sensor5.hashCode())) * 59;
a aVar = this.z;
return hashCode23 + (aVar != null ? aVar.hashCode() : 43);
}
public final String toString() {
return "HVSensorBiometrics(mContext=" + this.a + ", dataRepository=" + this.f3359b + ", postSensorDataEndpointBluePrint=" + this.c + ", postSensorDataEndpoint=" + this.d + ", sensorDataEventsJsonObject=" + this.e + ", accelerometerSensorDataJsonObject=" + this.f + ", geomagneticSensorDataJsonObject=" + this.g + ", gyroscopeSensorDataJsonObject=" + this.h + ", pressureSensorDataJsonObject=" + this.i + ", orientationSensorDataJsonObject=" + this.j + ", sensorDataEventsFile=" + this.k + ", accelerometerSensorDataFile=" + this.l + ", geomagneticSensorDataFile=" + this.m + ", gyroscopeSensorDataFile=" + this.n + ", pressureSensorDataFile=" + this.f3360o + ", orientationSensorDataFile=" + this.p + ", sensorDataZipFile=" + this.q + ", mSensorManager=" + this.r + ", mSensorAccelerometer=" + this.s + ", mSensorGeoMagnetic=" + this.t + ", mSensorGyroscope=" + this.u + ", mSensorPressure=" + this.v + ", mSensorOrientation=" + this.w + ", samplingPeriodMicroseconds=10000, isHvSensorBiometricsRunning=" + this.x + ", isSendingToServer=" + this.y + ", mSensorEventListener=" + this.z + ")";
}
}