jimu-decompiled/sources/com/yanzhenjie/permission/checker/PhoneStateReadTest.java
2025-05-13 19:24:51 +02:00

24 lines
853 B
Java

package com.yanzhenjie.permission.checker;
import android.content.Context;
import android.telephony.TelephonyManager;
import android.text.TextUtils;
/* loaded from: classes2.dex */
class PhoneStateReadTest implements PermissionTest {
private Context a;
PhoneStateReadTest(Context context) {
this.a = context;
}
@Override // com.yanzhenjie.permission.checker.PermissionTest
public boolean a() throws Throwable {
if (!this.a.getPackageManager().hasSystemFeature("android.hardware.telephony")) {
return true;
}
TelephonyManager telephonyManager = (TelephonyManager) this.a.getSystemService("phone");
return (telephonyManager.getPhoneType() != 0 && TextUtils.isEmpty(telephonyManager.getDeviceId()) && TextUtils.isEmpty(telephonyManager.getSubscriberId())) ? false : true;
}
}