use temporary db for external content provider queries
This commit is contained in:
@@ -32,7 +32,6 @@ import android.content.Context;
|
||||
import android.database.Cursor;
|
||||
import android.database.SQLException;
|
||||
import android.database.sqlite.SQLiteException;
|
||||
import android.support.annotation.VisibleForTesting;
|
||||
|
||||
import org.sufficientlysecure.keychain.daos.LocalSecretKeyStorage;
|
||||
import org.sufficientlysecure.keychain.provider.KeychainContract.CertsColumns;
|
||||
@@ -64,6 +63,10 @@ public class KeychainDatabase {
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
public static KeychainDatabase getTemporaryInstance(Context context) {
|
||||
return new KeychainDatabase(context.getApplicationContext());
|
||||
}
|
||||
|
||||
public interface Tables {
|
||||
String KEY_RINGS_PUBLIC = "keyrings_public";
|
||||
String KEYS = "keys";
|
||||
|
||||
@@ -134,7 +134,7 @@ public class KeychainExternalProvider extends ContentProvider {
|
||||
|
||||
String groupBy = null;
|
||||
|
||||
SupportSQLiteDatabase db = KeychainDatabase.getInstance(getContext()).getReadableDatabase();
|
||||
SupportSQLiteDatabase db = KeychainDatabase.getTemporaryInstance(getContext()).getReadableDatabase();
|
||||
|
||||
String callingPackageName = apiPermissionHelper.getCurrentCallingPackage();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user