Initial commit
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
package com.yanzhenjie.permission.checker;
|
||||
|
||||
import android.content.ContentResolver;
|
||||
import android.content.ContentUris;
|
||||
import android.content.ContentValues;
|
||||
import android.content.Context;
|
||||
import android.provider.CallLog;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
class CallLogWriteTest implements PermissionTest {
|
||||
private ContentResolver a;
|
||||
|
||||
CallLogWriteTest(Context context) {
|
||||
this.a = context.getContentResolver();
|
||||
}
|
||||
|
||||
@Override // com.yanzhenjie.permission.checker.PermissionTest
|
||||
public boolean a() throws Throwable {
|
||||
try {
|
||||
ContentValues contentValues = new ContentValues();
|
||||
contentValues.put("type", (Integer) 1);
|
||||
contentValues.put("number", "1");
|
||||
contentValues.put("date", (Integer) 20080808);
|
||||
contentValues.put("new", "0");
|
||||
return ContentUris.parseId(this.a.insert(CallLog.Calls.CONTENT_URI, contentValues)) > 0;
|
||||
} finally {
|
||||
this.a.delete(CallLog.Calls.CONTENT_URI, "number=?", new String[]{"1"});
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user