drop unified uri in favor of generic /key_rings

this works well in the uri schema, and we get notifications back with no
effort.

....also remove a line I committed accidentally oO
This commit is contained in:
Vincent Breitmoser 2014-03-13 14:34:07 +01:00
parent 9a1ce093bf
commit be3828c89e
2 changed files with 10 additions and 15 deletions

View File

@ -78,7 +78,6 @@ public class KeychainContract {
public static final String PATH_PUBLIC = "public";
public static final String PATH_SECRET = "secret";
public static final String PATH_UNIFIED = "unified";
public static final String PATH_BY_MASTER_KEY_ID = "master_key_id";
public static final String PATH_BY_KEY_ID = "key_id";
@ -102,7 +101,7 @@ public class KeychainContract {
public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.thialfihar.apg.key_ring";
public static Uri buildUnifiedKeyRingsUri() {
return CONTENT_URI.buildUpon().appendPath(PATH_UNIFIED).build();
return CONTENT_URI;
}
public static Uri buildPublicKeyRingsUri() {

View File

@ -96,6 +96,15 @@ public class KeychainProvider extends ContentProvider {
String authority = KeychainContract.CONTENT_AUTHORITY;
/**
* unified key rings
*
* <pre>
* key_rings
* </pre>
*/
matcher.addURI(authority, KeychainContract.BASE_KEY_RINGS, UNIFIED_KEY_RING);
/**
* public key rings
*
@ -228,16 +237,6 @@ public class KeychainProvider extends ContentProvider {
matcher.addURI(authority, KeychainContract.BASE_API_APPS + "/"
+ KeychainContract.PATH_BY_PACKAGE_NAME + "/*", API_APPS_BY_PACKAGE_NAME);
/**
* unified key rings
* <pre>
*
* key_rings/unified
*
*/
matcher.addURI(authority, KeychainContract.BASE_KEY_RINGS + "/"
+ KeychainContract.PATH_UNIFIED, UNIFIED_KEY_RING);
/**
* data stream
*
@ -813,9 +812,6 @@ public class KeychainProvider extends ContentProvider {
// notify of changes in db
getContext().getContentResolver().notifyChange(uri, null);
getContext().getContentResolver().notifyChange(
KeyRings.buildUnifiedKeyRingsUri().buildUpon().appendPath("lulz").build(), null
);
return count;
}