mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-30 08:34:16 +01:00
remove REQUEST_INSTALL_PACKAGES from all variants
And start adding it to those not on the Play Store
This commit is contained in:
parent
c5e24d1294
commit
93db9f5add
4 changed files with 68 additions and 65 deletions
|
@ -141,8 +141,7 @@ android {
|
||||||
dimension "variant"
|
dimension "variant"
|
||||||
applicationId "org.eehouse.android.xw4"
|
applicationId "org.eehouse.android.xw4"
|
||||||
manifestPlaceholders = [ APP_ID: applicationId ]
|
manifestPlaceholders = [ APP_ID: applicationId ]
|
||||||
resValue "string", "app_name", "CrossWords"
|
resValue "string", "app_name", "DoNotRelease"
|
||||||
resValue "string", "nbs_port", "3344"
|
|
||||||
buildConfigField "boolean", "WIDIR_ENABLED", "false"
|
buildConfigField "boolean", "WIDIR_ENABLED", "false"
|
||||||
buildConfigField "String", "VARIANT_NAME", "\"Google Play Store\""
|
buildConfigField "String", "VARIANT_NAME", "\"Google Play Store\""
|
||||||
buildConfigField "int", "VARIANT_CODE", "1"
|
buildConfigField "int", "VARIANT_CODE", "1"
|
||||||
|
|
|
@ -49,7 +49,8 @@ public class Perms23 {
|
||||||
RECEIVE_SMS(Manifest.permission.RECEIVE_SMS),
|
RECEIVE_SMS(Manifest.permission.RECEIVE_SMS),
|
||||||
READ_CONTACTS(Manifest.permission.READ_CONTACTS),
|
READ_CONTACTS(Manifest.permission.READ_CONTACTS),
|
||||||
BLUETOOTH_CONNECT(Manifest.permission.BLUETOOTH_CONNECT),
|
BLUETOOTH_CONNECT(Manifest.permission.BLUETOOTH_CONNECT),
|
||||||
BLUETOOTH_SCAN(Manifest.permission.BLUETOOTH_SCAN);
|
BLUETOOTH_SCAN(Manifest.permission.BLUETOOTH_SCAN),
|
||||||
|
REQUEST_INSTALL_PACKAGES(Manifest.permission.REQUEST_INSTALL_PACKAGES);
|
||||||
|
|
||||||
private String m_str = null;
|
private String m_str = null;
|
||||||
private Perm(String str) { m_str = str; }
|
private Perm(String str) { m_str = str; }
|
||||||
|
@ -72,7 +73,7 @@ public class Perms23 {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Map<Perm, Boolean> sManifestMap = new HashMap<>();
|
private static Map<Perm, Boolean> sManifestMap = new HashMap<>();
|
||||||
private static boolean permInManifest( Context context, Perm perm )
|
static boolean permInManifest( Context context, Perm perm )
|
||||||
{
|
{
|
||||||
boolean result = false;
|
boolean result = false;
|
||||||
if ( sManifestMap.containsKey( perm ) ) {
|
if ( sManifestMap.containsKey( perm ) ) {
|
||||||
|
|
|
@ -297,6 +297,9 @@ public class UpdateCheckReceiver extends BroadcastReceiver {
|
||||||
|
|
||||||
// Add upgrade
|
// Add upgrade
|
||||||
if ( jobj.has( k_APP ) ) {
|
if ( jobj.has( k_APP ) ) {
|
||||||
|
if ( Perms23.permInManifest( m_context,
|
||||||
|
Perms23.Perm
|
||||||
|
.REQUEST_INSTALL_PACKAGES ) ) {
|
||||||
JSONObject app = jobj.getJSONObject( k_APP );
|
JSONObject app = jobj.getJSONObject( k_APP );
|
||||||
if ( app.has( k_URL ) ) {
|
if ( app.has( k_URL ) ) {
|
||||||
ApplicationInfo ai =
|
ApplicationInfo ai =
|
||||||
|
@ -364,6 +367,9 @@ public class UpdateCheckReceiver extends BroadcastReceiver {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
Log.d( TAG, "need to notify upgrade available" );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// dictionaries upgrade
|
// dictionaries upgrade
|
||||||
|
|
|
@ -8,9 +8,6 @@
|
||||||
<uses-permission android:name="android.permission.SEND_SMS" />
|
<uses-permission android:name="android.permission.SEND_SMS" />
|
||||||
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
|
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
|
||||||
|
|
||||||
<!-- for crittercism -->
|
|
||||||
<uses-permission android:name="android.permission.GET_TASKS"/>
|
|
||||||
|
|
||||||
<application android:icon="@drawable/icon48x48"
|
<application android:icon="@drawable/icon48x48"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:name=".XWApp"
|
android:name=".XWApp"
|
||||||
|
|
Loading…
Add table
Reference in a new issue