Initial commit
This commit is contained in:
33
sources/com/yanzhenjie/permission/checker/SmsReadTest.java
Normal file
33
sources/com/yanzhenjie/permission/checker/SmsReadTest.java
Normal file
@@ -0,0 +1,33 @@
|
||||
package com.yanzhenjie.permission.checker;
|
||||
|
||||
import android.content.ContentResolver;
|
||||
import android.content.Context;
|
||||
import android.database.Cursor;
|
||||
import android.provider.Telephony;
|
||||
import com.liulishuo.filedownloader.model.FileDownloadModel;
|
||||
import com.yanzhenjie.permission.checker.PermissionTest;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
class SmsReadTest implements PermissionTest {
|
||||
private ContentResolver a;
|
||||
|
||||
SmsReadTest(Context context) {
|
||||
this.a = context.getContentResolver();
|
||||
}
|
||||
|
||||
@Override // com.yanzhenjie.permission.checker.PermissionTest
|
||||
public boolean a() throws Throwable {
|
||||
Cursor query = this.a.query(Telephony.Sms.CONTENT_URI, new String[]{FileDownloadModel.ID, "address", "person", "body"}, null, null, null);
|
||||
if (query == null) {
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
PermissionTest.CursorTest.a(query);
|
||||
query.close();
|
||||
return true;
|
||||
} catch (Throwable th) {
|
||||
query.close();
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user