29 lines
876 B
Java
29 lines
876 B
Java
package com.yanzhenjie.permission.checker;
|
|
|
|
import android.content.Context;
|
|
import android.net.sip.SipManager;
|
|
import android.net.sip.SipProfile;
|
|
|
|
/* loaded from: classes2.dex */
|
|
class SipTest implements PermissionTest {
|
|
private Context a;
|
|
|
|
SipTest(Context context) {
|
|
this.a = context;
|
|
}
|
|
|
|
@Override // com.yanzhenjie.permission.checker.PermissionTest
|
|
public boolean a() throws Throwable {
|
|
SipManager newInstance;
|
|
if (!SipManager.isApiSupported(this.a) || (newInstance = SipManager.newInstance(this.a)) == null) {
|
|
return true;
|
|
}
|
|
SipProfile.Builder builder = new SipProfile.Builder("Permission", "127.0.0.1");
|
|
builder.setPassword("password");
|
|
SipProfile build = builder.build();
|
|
newInstance.open(build);
|
|
newInstance.close(build.getUriString());
|
|
return true;
|
|
}
|
|
}
|