mirror of
https://github.com/moparisthebest/open-keychain
synced 2025-01-11 21:48:17 -05:00
parent
71d8bcc8f4
commit
7ee4a44afa
@ -281,10 +281,6 @@ public class KeychainDatabase extends SQLiteOpenHelper {
|
|||||||
Log.e(Constants.TAG, "Unknown blob data type!");
|
Log.e(Constants.TAG, "Unknown blob data type!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Move to a different file (but don't delete, just to be safe)
|
|
||||||
Log.d(Constants.TAG, "All done - moving apg.db to apg_old.db");
|
|
||||||
context.getDatabasePath("apg.db").renameTo(context.getDatabasePath("apg_old.db"));
|
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
Log.e(Constants.TAG, "Error importing apg.db!", e);
|
Log.e(Constants.TAG, "Error importing apg.db!", e);
|
||||||
} finally {
|
} finally {
|
||||||
@ -296,6 +292,9 @@ public class KeychainDatabase extends SQLiteOpenHelper {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Move to a different file (but don't delete, just to be safe)
|
||||||
|
Log.d(Constants.TAG, "All done - moving apg.db to apg_old.db");
|
||||||
|
context.getDatabasePath("apg.db").renameTo(context.getDatabasePath("apg_old.db"));
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void copy(File in, File out) throws IOException {
|
private static void copy(File in, File out) throws IOException {
|
||||||
|
@ -609,12 +609,7 @@ public class KeychainProvider extends ContentProvider {
|
|||||||
String packageName = uri.getPathSegments().get(1);
|
String packageName = uri.getPathSegments().get(1);
|
||||||
values.put(ApiAccounts.PACKAGE_NAME, packageName);
|
values.put(ApiAccounts.PACKAGE_NAME, packageName);
|
||||||
|
|
||||||
Log.d(Constants.TAG, "provider packageName: " + packageName);
|
|
||||||
|
|
||||||
db.insertOrThrow(Tables.API_ACCOUNTS, null, values);
|
db.insertOrThrow(Tables.API_ACCOUNTS, null, values);
|
||||||
// TODO: this is wrong:
|
|
||||||
// rowUri = ApiAccounts.buildIdUri(Long.toString(rowId));
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -630,7 +625,7 @@ public class KeychainProvider extends ContentProvider {
|
|||||||
getContext().getContentResolver().notifyChange(uri, null);
|
getContext().getContentResolver().notifyChange(uri, null);
|
||||||
|
|
||||||
} catch (SQLiteConstraintException e) {
|
} catch (SQLiteConstraintException e) {
|
||||||
Log.e(Constants.TAG, "Constraint exception on insert! Entry already existing?", e);
|
Log.d(Constants.TAG, "Constraint exception on insert! Entry already existing?", e);
|
||||||
}
|
}
|
||||||
|
|
||||||
return rowUri;
|
return rowUri;
|
||||||
@ -732,7 +727,7 @@ public class KeychainProvider extends ContentProvider {
|
|||||||
getContext().getContentResolver().notifyChange(uri, null);
|
getContext().getContentResolver().notifyChange(uri, null);
|
||||||
|
|
||||||
} catch (SQLiteConstraintException e) {
|
} catch (SQLiteConstraintException e) {
|
||||||
Log.e(Constants.TAG, "Constraint exception on update! Entry already existing?", e);
|
Log.d(Constants.TAG, "Constraint exception on update! Entry already existing?", e);
|
||||||
}
|
}
|
||||||
|
|
||||||
return count;
|
return count;
|
||||||
|
Loading…
Reference in New Issue
Block a user