mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-24 01:32:16 -05:00
renaming permissions and uris
This commit is contained in:
parent
630780cae4
commit
328da74eb2
@ -11,24 +11,21 @@
|
|||||||
android:minSdkVersion="4"
|
android:minSdkVersion="4"
|
||||||
android:targetSdkVersion="14" />
|
android:targetSdkVersion="14" />
|
||||||
|
|
||||||
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
|
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||||
|
<uses-permission android:name="com.fsck.k9.permission.READ_ATTACHMENT" />
|
||||||
|
|
||||||
<permission
|
<permission
|
||||||
android:name="org.thialfihar.android.apg.permission.READ_KEY_DETAILS"
|
android:name="org.apg.permission.READ_KEY_DETAILS"
|
||||||
android:description="@string/permission_read_key_details_description"
|
android:description="@string/permission_read_key_details_description"
|
||||||
android:label="@string/permission_read_key_details_label"
|
android:label="@string/permission_read_key_details_label"
|
||||||
android:protectionLevel="dangerous" />
|
android:protectionLevel="dangerous" />
|
||||||
<permission
|
<permission
|
||||||
android:name="org.thialfihar.android.apg.permission.STORE_BLOBS"
|
android:name="org.apg.permission.STORE_BLOBS"
|
||||||
android:description="@string/permission_store_blobs_description"
|
android:description="@string/permission_store_blobs_description"
|
||||||
android:label="@string/permission_store_blobs_label"
|
android:label="@string/permission_store_blobs_label"
|
||||||
android:protectionLevel="dangerous" />
|
android:protectionLevel="dangerous" />
|
||||||
|
|
||||||
<uses-permission android:name="com.google.android.providers.gmail.permission.READ_GMAIL" />
|
|
||||||
<uses-permission android:name="com.google.android.gm.permission.READ_GMAIL" />
|
|
||||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
|
||||||
<uses-permission android:name="com.fsck.k9.permission.READ_ATTACHMENT" />
|
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
|
||||||
<uses-permission android:name="org.thialfihar.android.apg.permission.STORE_BLOBS" />
|
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:icon="@drawable/icon"
|
android:icon="@drawable/icon"
|
||||||
android:label="@string/app_name" >
|
android:label="@string/app_name" >
|
||||||
@ -78,7 +75,7 @@
|
|||||||
android:label="@string/title_selectRecipients"
|
android:label="@string/title_selectRecipients"
|
||||||
android:launchMode="singleTop" >
|
android:launchMode="singleTop" >
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="org.thialfihar.android.apg.intent.SELECT_PUBLIC_KEYS" />
|
<action android:name="org.apg.intent.SELECT_PUBLIC_KEYS" />
|
||||||
|
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
@ -96,7 +93,7 @@
|
|||||||
android:label="@string/title_selectSignature"
|
android:label="@string/title_selectSignature"
|
||||||
android:launchMode="singleTop" >
|
android:launchMode="singleTop" >
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="org.thialfihar.android.apg.intent.SELECT_SECRET_KEY" />
|
<action android:name="org.apg.intent.SELECT_SECRET_KEY" />
|
||||||
|
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
@ -113,10 +110,10 @@
|
|||||||
android:configChanges="keyboardHidden|orientation|keyboard"
|
android:configChanges="keyboardHidden|orientation|keyboard"
|
||||||
android:label="@string/title_encrypt" >
|
android:label="@string/title_encrypt" >
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="org.thialfihar.android.apg.intent.ENCRYPT" />
|
<action android:name="org.apg.intent.ENCRYPT" />
|
||||||
<action android:name="org.thialfihar.android.apg.intent.ENCRYPT_FILE" />
|
<action android:name="org.apg.intent.ENCRYPT_FILE" />
|
||||||
<action android:name="org.thialfihar.android.apg.intent.ENCRYPT_AND_RETURN" />
|
<action android:name="org.apg.intent.ENCRYPT_AND_RETURN" />
|
||||||
<action android:name="org.thialfihar.android.apg.intent.GENERATE_SIGNATURE" />
|
<action android:name="org.apg.intent.GENERATE_SIGNATURE" />
|
||||||
|
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
|
||||||
@ -128,9 +125,9 @@
|
|||||||
android:configChanges="keyboardHidden|orientation|keyboard"
|
android:configChanges="keyboardHidden|orientation|keyboard"
|
||||||
android:label="@string/title_decrypt" >
|
android:label="@string/title_decrypt" >
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="org.thialfihar.android.apg.intent.DECRYPT" />
|
<action android:name="org.apg.intent.DECRYPT" />
|
||||||
<action android:name="org.thialfihar.android.apg.intent.DECRYPT_FILE" />
|
<action android:name="org.apg.intent.DECRYPT_FILE" />
|
||||||
<action android:name="org.thialfihar.android.apg.intent.DECRYPT_AND_RETURN" />
|
<action android:name="org.apg.intent.DECRYPT_AND_RETURN" />
|
||||||
|
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
|
||||||
@ -208,10 +205,10 @@
|
|||||||
android:name=".ApgService"
|
android:name=".ApgService"
|
||||||
android:enabled="true"
|
android:enabled="true"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
android:permission="org.thialfihar.android.apg.permission.READ_KEY_DETAILS"
|
android:permission="org.apg.permission.READ_KEY_DETAILS"
|
||||||
android:process=":remote" >
|
android:process=":remote" >
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="org.thialfihar.android.apg.IApgService" />
|
<action android:name="org.apg.IApgService" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
|
||||||
<meta-data
|
<meta-data
|
||||||
@ -221,12 +218,12 @@
|
|||||||
|
|
||||||
<provider
|
<provider
|
||||||
android:name=".provider.DataProvider"
|
android:name=".provider.DataProvider"
|
||||||
android:authorities="org.thialfihar.android.apg.provider"
|
android:authorities="org.apg.provider"
|
||||||
android:readPermission="org.thialfihar.android.apg.permission.READ_KEY_DETAILS" />
|
android:readPermission="org.apg.permission.READ_KEY_DETAILS" />
|
||||||
<provider
|
<provider
|
||||||
android:name=".provider.ApgServiceBlobProvider"
|
android:name=".provider.ApgServiceBlobProvider"
|
||||||
android:authorities="org.thialfihar.android.apg.provider.apgserviceblobprovider"
|
android:authorities="org.apg.provider.apgserviceblobprovider"
|
||||||
android:permission="org.thialfihar.android.apg.permission.STORE_BLOBS" />
|
android:permission="org.apg.permission.STORE_BLOBS" />
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
</manifest>
|
</manifest>
|
@ -108,23 +108,23 @@ import java.util.Vector;
|
|||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
public class Apg {
|
public class Apg {
|
||||||
private static final String mApgPackageName = "org.thialfihar.android.apg";
|
private static final String mApgPackageName = "org.apg";
|
||||||
|
|
||||||
public static class Intent {
|
public static class Intent {
|
||||||
public static final String DECRYPT = "org.thialfihar.android.apg.intent.DECRYPT";
|
public static final String DECRYPT = "org.apg.intent.DECRYPT";
|
||||||
public static final String ENCRYPT = "org.thialfihar.android.apg.intent.ENCRYPT";
|
public static final String ENCRYPT = "org.apg.intent.ENCRYPT";
|
||||||
public static final String DECRYPT_FILE = "org.thialfihar.android.apg.intent.DECRYPT_FILE";
|
public static final String DECRYPT_FILE = "org.apg.intent.DECRYPT_FILE";
|
||||||
public static final String ENCRYPT_FILE = "org.thialfihar.android.apg.intent.ENCRYPT_FILE";
|
public static final String ENCRYPT_FILE = "org.apg.intent.ENCRYPT_FILE";
|
||||||
public static final String DECRYPT_AND_RETURN = "org.thialfihar.android.apg.intent.DECRYPT_AND_RETURN";
|
public static final String DECRYPT_AND_RETURN = "org.apg.intent.DECRYPT_AND_RETURN";
|
||||||
public static final String ENCRYPT_AND_RETURN = "org.thialfihar.android.apg.intent.ENCRYPT_AND_RETURN";
|
public static final String ENCRYPT_AND_RETURN = "org.apg.intent.ENCRYPT_AND_RETURN";
|
||||||
public static final String SELECT_PUBLIC_KEYS = "org.thialfihar.android.apg.intent.SELECT_PUBLIC_KEYS";
|
public static final String SELECT_PUBLIC_KEYS = "org.apg.intent.SELECT_PUBLIC_KEYS";
|
||||||
public static final String SELECT_SECRET_KEY = "org.thialfihar.android.apg.intent.SELECT_SECRET_KEY";
|
public static final String SELECT_SECRET_KEY = "org.apg.intent.SELECT_SECRET_KEY";
|
||||||
public static final String IMPORT = "org.thialfihar.android.apg.intent.IMPORT";
|
public static final String IMPORT = "org.apg.intent.IMPORT";
|
||||||
public static final String LOOK_UP_KEY_ID = "org.thialfihar.android.apg.intent.LOOK_UP_KEY_ID";
|
public static final String LOOK_UP_KEY_ID = "org.apg.intent.LOOK_UP_KEY_ID";
|
||||||
public static final String LOOK_UP_KEY_ID_AND_RETURN = "org.thialfihar.android.apg.intent.LOOK_UP_KEY_ID_AND_RETURN";
|
public static final String LOOK_UP_KEY_ID_AND_RETURN = "org.apg.intent.LOOK_UP_KEY_ID_AND_RETURN";
|
||||||
public static final String GENERATE_SIGNATURE = "org.thialfihar.android.apg.intent.GENERATE_SIGNATURE";
|
public static final String GENERATE_SIGNATURE = "org.apg.intent.GENERATE_SIGNATURE";
|
||||||
public static final String EXPORT_KEY_TO_SERVER = "org.thialfihar.android.apg.intent.EXPORT_KEY_TO_SERVER";
|
public static final String EXPORT_KEY_TO_SERVER = "org.apg.intent.EXPORT_KEY_TO_SERVER";
|
||||||
public static final String IMPORT_FROM_QR_CODE = "org.thialfihar.android.apg.intent.IMPORT_FROM_QR_CODE";
|
public static final String IMPORT_FROM_QR_CODE = "org.apg.intent.IMPORT_FROM_QR_CODE";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final String EXTRA_TEXT = "text";
|
public static final String EXTRA_TEXT = "text";
|
||||||
@ -153,7 +153,7 @@ public class Apg {
|
|||||||
public static final String EXTRA_ASCII_ARMOUR = "asciiArmour";
|
public static final String EXTRA_ASCII_ARMOUR = "asciiArmour";
|
||||||
public static final String EXTRA_BINARY = "binary";
|
public static final String EXTRA_BINARY = "binary";
|
||||||
public static final String EXTRA_KEY_SERVERS = "keyServers";
|
public static final String EXTRA_KEY_SERVERS = "keyServers";
|
||||||
public static final String EXTRA_EXPECTED_FINGERPRINT = "org.thialfihar.android.apg.EXPECTED_FINGERPRINT";
|
public static final String EXTRA_EXPECTED_FINGERPRINT = "org.apg.EXPECTED_FINGERPRINT";
|
||||||
|
|
||||||
public static final String AUTHORITY = DataProvider.AUTHORITY;
|
public static final String AUTHORITY = DataProvider.AUTHORITY;
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ public class ApgServiceBlobProvider extends ContentProvider {
|
|||||||
|
|
||||||
private static final String TAG = "ApgServiceBlobProvider";
|
private static final String TAG = "ApgServiceBlobProvider";
|
||||||
|
|
||||||
public static final Uri CONTENT_URI = Uri.parse("content://org.thialfihar.android.apg.provider.apgserviceblobprovider");
|
public static final Uri CONTENT_URI = Uri.parse("content://org.apg.provider.apgserviceblobprovider");
|
||||||
|
|
||||||
private static final String COLUMN_KEY = "key";
|
private static final String COLUMN_KEY = "key";
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ import android.os.ParcelFileDescriptor;
|
|||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
|
|
||||||
public class DataProvider extends ContentProvider {
|
public class DataProvider extends ContentProvider {
|
||||||
public static final String AUTHORITY = "org.thialfihar.android.apg.provider";
|
public static final String AUTHORITY = "org.apg.provider";
|
||||||
|
|
||||||
private static final int PUBLIC_KEY_RING = 101;
|
private static final int PUBLIC_KEY_RING = 101;
|
||||||
private static final int PUBLIC_KEY_RING_ID = 102;
|
private static final int PUBLIC_KEY_RING_ID = 102;
|
||||||
|
@ -33,7 +33,7 @@ public class Database extends SQLiteOpenHelper {
|
|||||||
private static final String DATABASE_NAME = "apg";
|
private static final String DATABASE_NAME = "apg";
|
||||||
private static final int DATABASE_VERSION = 2;
|
private static final int DATABASE_VERSION = 2;
|
||||||
|
|
||||||
public static final String AUTHORITY = "org.thialfihar.android.apg.database";
|
public static final String AUTHORITY = "org.apg.database";
|
||||||
|
|
||||||
public static HashMap<String, String> sKeyRingsProjection;
|
public static HashMap<String, String> sKeyRingsProjection;
|
||||||
public static HashMap<String, String> sKeysProjection;
|
public static HashMap<String, String> sKeysProjection;
|
||||||
|
@ -60,7 +60,7 @@ public class ApgCon {
|
|||||||
|
|
||||||
private final static String TAG = "ApgCon";
|
private final static String TAG = "ApgCon";
|
||||||
private final static int API_VERSION = 2; // aidl api-version it expects
|
private final static int API_VERSION = 2; // aidl api-version it expects
|
||||||
private final static String BLOB_URI = "content://org.thialfihar.android.apg.provider.apgserviceblobprovider";
|
private final static String BLOB_URI = "content://org.apg.provider.apgserviceblobprovider";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* How many seconds to wait for a connection to AGP when connecting.
|
* How many seconds to wait for a connection to AGP when connecting.
|
||||||
@ -175,7 +175,7 @@ public class ApgCon {
|
|||||||
error tmpError = null;
|
error tmpError = null;
|
||||||
try {
|
try {
|
||||||
if( LOCAL_LOGV ) Log.v(TAG, "Searching for the right APG version");
|
if( LOCAL_LOGV ) Log.v(TAG, "Searching for the right APG version");
|
||||||
ServiceInfo apgServices[] = ctx.getPackageManager().getPackageInfo("org.thialfihar.android.apg",
|
ServiceInfo apgServices[] = ctx.getPackageManager().getPackageInfo("org.apg",
|
||||||
PackageManager.GET_SERVICES | PackageManager.GET_META_DATA).services;
|
PackageManager.GET_SERVICES | PackageManager.GET_META_DATA).services;
|
||||||
if (apgServices == null) {
|
if (apgServices == null) {
|
||||||
Log.e(TAG, "Could not fetch services");
|
Log.e(TAG, "Could not fetch services");
|
||||||
@ -184,7 +184,7 @@ public class ApgCon {
|
|||||||
boolean apgServiceFound = false;
|
boolean apgServiceFound = false;
|
||||||
for (ServiceInfo inf : apgServices) {
|
for (ServiceInfo inf : apgServices) {
|
||||||
if( LOCAL_LOGV ) Log.v(TAG, "Found service of APG: " + inf.name);
|
if( LOCAL_LOGV ) Log.v(TAG, "Found service of APG: " + inf.name);
|
||||||
if (inf.name.equals("org.thialfihar.android.apg.ApgService")) {
|
if (inf.name.equals("org.apg.ApgService")) {
|
||||||
apgServiceFound = true;
|
apgServiceFound = true;
|
||||||
if (inf.metaData == null) {
|
if (inf.metaData == null) {
|
||||||
Log.w(TAG, "Could not determine ApgService API");
|
Log.w(TAG, "Could not determine ApgService API");
|
||||||
|
Loading…
Reference in New Issue
Block a user