mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-29 10:26:36 +01:00
get rid of stuff trying to support two sdk versions
This commit is contained in:
parent
2d30854949
commit
43a96fb6fc
7 changed files with 12 additions and 22 deletions
|
@ -112,9 +112,10 @@ android {
|
|||
flavorDimensions "variant"//, "abi"
|
||||
productFlavors {
|
||||
all {
|
||||
buildConfigField "int", "FLAG_IMMUTABLE", "0"
|
||||
buildConfigField "boolean", "BLUETOOTH_CONNECT", "true"
|
||||
buildConfigField "boolean", "BLUETOOTH_SCAN", "true"
|
||||
android {
|
||||
targetSdkVersion 31
|
||||
compileSdkVersion 31
|
||||
}
|
||||
buildConfigField "String", "JNI_LIB_NAME", "\"xwjni\""
|
||||
buildConfigField "String", "DB_NAME", "\"xwdb\""
|
||||
buildConfigField "String", "BUILD_INFO_NAME", "\"${BUILD_INFO_NAME}\""
|
||||
|
@ -170,14 +171,6 @@ android {
|
|||
xw4d {
|
||||
dimension "variant"
|
||||
|
||||
android {
|
||||
targetSdkVersion 31
|
||||
compileSdkVersion 31
|
||||
}
|
||||
buildConfigField "String", "BLUETOOTH_CONNECT", "android.Manifest.permission.BLUETOOTH_CONNECT"
|
||||
buildConfigField "String", "BLUETOOTH_SCAN", "android.Manifest.permission.BLUETOOTH_SCAN"
|
||||
buildConfigField "int", "FLAG_IMMUTABLE", "android.app.PendingIntent.FLAG_IMMUTABLE"
|
||||
|
||||
buildConfigField "String", "DB_NAME", "\"xwddb\""
|
||||
applicationId "org.eehouse.android.xw4dbg"
|
||||
resValue "string", "app_name", "CrossDbg"
|
||||
|
|
|
@ -173,7 +173,7 @@ public class DupeModeTimer extends BroadcastReceiver {
|
|||
sCurTimer = whenSeconds;
|
||||
Intent intent = new Intent( context, DupeModeTimer.class );
|
||||
PendingIntent pi = PendingIntent.getBroadcast( context, 0, intent,
|
||||
BuildConfig.FLAG_IMMUTABLE );
|
||||
PendingIntent.FLAG_IMMUTABLE );
|
||||
|
||||
long now = Utils.getCurSeconds();
|
||||
long fire_millis = SystemClock.elapsedRealtime()
|
||||
|
|
|
@ -380,7 +380,7 @@ public class NBSProto {
|
|||
{
|
||||
Intent intent = new Intent( msg );
|
||||
return PendingIntent.getBroadcast( context, 0, intent,
|
||||
BuildConfig.FLAG_IMMUTABLE );
|
||||
PendingIntent.FLAG_IMMUTABLE );
|
||||
}
|
||||
|
||||
private void cacheForRetry( QueueElem elem )
|
||||
|
|
|
@ -48,8 +48,8 @@ public class Perms23 {
|
|||
SEND_SMS(Manifest.permission.SEND_SMS),
|
||||
RECEIVE_SMS(Manifest.permission.RECEIVE_SMS),
|
||||
READ_CONTACTS(Manifest.permission.READ_CONTACTS),
|
||||
BLUETOOTH_CONNECT(BuildConfig.BLUETOOTH_CONNECT),
|
||||
BLUETOOTH_SCAN(BuildConfig.BLUETOOTH_SCAN);
|
||||
BLUETOOTH_CONNECT(Manifest.permission.BLUETOOTH_CONNECT),
|
||||
BLUETOOTH_SCAN(Manifest.permission.BLUETOOTH_SCAN);
|
||||
|
||||
private String m_str = null;
|
||||
private Perm(String str) { m_str = str; }
|
||||
|
@ -59,7 +59,6 @@ public class Perms23 {
|
|||
{
|
||||
return !permInManifest( context, this );
|
||||
}
|
||||
public boolean notNeeded() { return null == m_str; }
|
||||
public static Perm getFor( String str ) {
|
||||
Perm result = null;
|
||||
for ( Perm one : Perm.values() ) {
|
||||
|
@ -422,9 +421,7 @@ public class Perms23 {
|
|||
for ( int ii = 0; result && ii < perms.length; ++ii ) {
|
||||
Perm perm = perms[ii];
|
||||
boolean thisResult;
|
||||
if ( perm.notNeeded() ) {
|
||||
thisResult = true;
|
||||
} else if ( perm.isBanned(context) ) {
|
||||
if ( perm.isBanned(context) ) {
|
||||
thisResult = bannedWithWorkaround( context, perm );
|
||||
} else {
|
||||
thisResult = PackageManager.PERMISSION_GRANTED
|
||||
|
|
|
@ -391,7 +391,7 @@ public class TimerReceiver extends BroadcastReceiver {
|
|||
intent.putExtra( KEY_TIMER_ID, timerID );
|
||||
PendingIntent pi = PendingIntent
|
||||
.getBroadcast( context, 0, intent, PendingIntent.FLAG_CANCEL_CURRENT
|
||||
| BuildConfig.FLAG_IMMUTABLE );
|
||||
| PendingIntent.FLAG_IMMUTABLE );
|
||||
am.set( AlarmManager.RTC_WAKEUP, firstFireTime, pi );
|
||||
|
||||
setJobTimerIf( context, delayMS, timerID );
|
||||
|
|
|
@ -98,7 +98,7 @@ public class UpdateCheckReceiver extends BroadcastReceiver {
|
|||
|
||||
Intent intent = new Intent( context, UpdateCheckReceiver.class );
|
||||
PendingIntent pi = PendingIntent.getBroadcast( context, 0, intent,
|
||||
BuildConfig.FLAG_IMMUTABLE );
|
||||
PendingIntent.FLAG_IMMUTABLE );
|
||||
am.cancel( pi );
|
||||
|
||||
long interval_millis;
|
||||
|
|
|
@ -379,7 +379,7 @@ public class Utils {
|
|||
{
|
||||
PendingIntent pi = PendingIntent
|
||||
.getActivity( context, Utils.nextRandomInt(), intent,
|
||||
PendingIntent.FLAG_ONE_SHOT | BuildConfig.FLAG_IMMUTABLE );
|
||||
PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_IMMUTABLE );
|
||||
return pi;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue