Return account creation intent if account does not exists in db
This commit is contained in:
@@ -160,6 +160,7 @@ public class KeychainContract {
|
||||
}
|
||||
|
||||
public static Uri buildSecretKeyRingsByEmailsUri(String emails) {
|
||||
// TODO: encoded?
|
||||
return CONTENT_URI.buildUpon().appendPath(PATH_SECRET).appendPath(PATH_BY_EMAILS)
|
||||
.appendPath(emails).build();
|
||||
}
|
||||
@@ -263,16 +264,12 @@ public class KeychainContract {
|
||||
/**
|
||||
* Use if multiple items get returned
|
||||
*/
|
||||
public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.thialfihar.apg.api.app";
|
||||
public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.thialfihar.apg.api_apps";
|
||||
|
||||
/**
|
||||
* Use if a single item is returned
|
||||
*/
|
||||
public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.thialfihar.apg.api.apps";
|
||||
|
||||
// public static Uri buildIdUri(String rowId) {
|
||||
// return CONTENT_URI.buildUpon().appendPath(rowId).build();
|
||||
// }
|
||||
public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.thialfihar.apg.api_app";
|
||||
|
||||
public static Uri buildByPackageNameUri(String packageName) {
|
||||
return CONTENT_URI.buildUpon().appendEncodedPath(packageName).build();
|
||||
@@ -286,22 +283,12 @@ public class KeychainContract {
|
||||
/**
|
||||
* Use if multiple items get returned
|
||||
*/
|
||||
public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.thialfihar.apg.api.acoounts";
|
||||
public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.thialfihar.apg.api_app.accounts";
|
||||
|
||||
/**
|
||||
* Use if a single item is returned
|
||||
*/
|
||||
public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.thialfihar.apg.api.account";
|
||||
|
||||
// public static Uri buildUri(String rowIdApp) {
|
||||
// return CONTENT_URI.buildUpon().appendPath(rowIdApp).appendPath(PATH_ACCOUNTS)
|
||||
// .build();
|
||||
// }
|
||||
//
|
||||
// public static Uri buildIdUri(String rowIdApp, String rowId) {
|
||||
// return CONTENT_URI.buildUpon().appendPath(rowIdApp).appendPath(PATH_ACCOUNTS)
|
||||
// .appendPath(rowId).build();
|
||||
// }
|
||||
public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.thialfihar.apg.api_app.account";
|
||||
|
||||
public static Uri buildBaseUri(String packageName) {
|
||||
return CONTENT_URI.buildUpon().appendEncodedPath(packageName).appendPath(PATH_ACCOUNTS)
|
||||
|
||||
@@ -27,7 +27,6 @@ import android.database.sqlite.SQLiteDatabase;
|
||||
import android.database.sqlite.SQLiteQueryBuilder;
|
||||
import android.net.Uri;
|
||||
import android.provider.BaseColumns;
|
||||
import android.support.v4.database.DatabaseUtilsCompat;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
@@ -243,10 +242,10 @@ public class KeychainProvider extends ContentProvider {
|
||||
*
|
||||
* <pre>
|
||||
* api_apps
|
||||
* api_apps/_
|
||||
* api_apps/_ (package name)
|
||||
*
|
||||
* api_apps/_/accounts
|
||||
* api_apps/_/accounts/_
|
||||
* api_apps/_/accounts/_ (account name)
|
||||
* </pre>
|
||||
*/
|
||||
matcher.addURI(authority, KeychainContract.BASE_API_APPS, API_APPS);
|
||||
|
||||
Reference in New Issue
Block a user