mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-29 08:34:37 +01:00
more fixes for Android 31
FLAG_IMMUTABLE and android:exported="true"
This commit is contained in:
parent
5654602662
commit
9429fd34e6
8 changed files with 19 additions and 9 deletions
|
@ -172,7 +172,8 @@ public class DupeModeTimer extends BroadcastReceiver {
|
|||
if ( whenSeconds < sCurTimer ) {
|
||||
sCurTimer = whenSeconds;
|
||||
Intent intent = new Intent( context, DupeModeTimer.class );
|
||||
PendingIntent pi = PendingIntent.getBroadcast( context, 0, intent, 0 );
|
||||
PendingIntent pi = PendingIntent.getBroadcast( context, 0, intent,
|
||||
PendingIntent.FLAG_IMMUTABLE );
|
||||
|
||||
long now = Utils.getCurSeconds();
|
||||
long fire_millis = SystemClock.elapsedRealtime()
|
||||
|
|
|
@ -379,7 +379,8 @@ public class NBSProto {
|
|||
private PendingIntent makeStatusIntent( Context context, String msg )
|
||||
{
|
||||
Intent intent = new Intent( msg );
|
||||
return PendingIntent.getBroadcast( context, 0, intent, 0 );
|
||||
return PendingIntent.getBroadcast( context, 0, intent,
|
||||
PendingIntent.FLAG_IMMUTABLE );
|
||||
}
|
||||
|
||||
private void cacheForRetry( QueueElem elem )
|
||||
|
|
|
@ -389,8 +389,9 @@ public class TimerReceiver extends BroadcastReceiver {
|
|||
(AlarmManager)context.getSystemService( Context.ALARM_SERVICE );
|
||||
Intent intent = new Intent( context, TimerReceiver.class );
|
||||
intent.putExtra( KEY_TIMER_ID, timerID );
|
||||
PendingIntent pi = PendingIntent.getBroadcast( context, 0, intent,
|
||||
PendingIntent.FLAG_CANCEL_CURRENT );
|
||||
PendingIntent pi = PendingIntent
|
||||
.getBroadcast( context, 0, intent, PendingIntent.FLAG_CANCEL_CURRENT
|
||||
| PendingIntent.FLAG_IMMUTABLE );
|
||||
am.set( AlarmManager.RTC_WAKEUP, firstFireTime, pi );
|
||||
|
||||
setJobTimerIf( context, delayMS, timerID );
|
||||
|
|
|
@ -96,7 +96,8 @@ public class UpdateCheckReceiver extends BroadcastReceiver {
|
|||
(AlarmManager)context.getSystemService( Context.ALARM_SERVICE );
|
||||
|
||||
Intent intent = new Intent( context, UpdateCheckReceiver.class );
|
||||
PendingIntent pi = PendingIntent.getBroadcast( context, 0, intent, 0 );
|
||||
PendingIntent pi = PendingIntent.getBroadcast( context, 0, intent,
|
||||
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 );
|
||||
PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_IMMUTABLE );
|
||||
return pi;
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,9 @@
|
|||
|
||||
<service android:name="WiDirService"/>
|
||||
|
||||
<receiver android:name="SMSReceiver" >
|
||||
<receiver android:name="SMSReceiver"
|
||||
android:exported="true"
|
||||
>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.DATA_SMS_RECEIVED" />
|
||||
<data android:scheme="sms" />
|
||||
|
|
|
@ -25,7 +25,9 @@
|
|||
|
||||
<service android:name="WiDirService"/>
|
||||
|
||||
<receiver android:name="SMSReceiver" >
|
||||
<receiver android:name="SMSReceiver"
|
||||
android:exported="true"
|
||||
>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.DATA_SMS_RECEIVED" />
|
||||
<data android:scheme="sms" />
|
||||
|
|
|
@ -9,7 +9,9 @@
|
|||
<uses-permission android:name="android.permission.SEND_SMS" />
|
||||
|
||||
<application>
|
||||
<receiver android:name="SMSReceiver" >
|
||||
<receiver android:name="SMSReceiver"
|
||||
android:exported="true"
|
||||
>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.DATA_SMS_RECEIVED" />
|
||||
<data android:scheme="sms" />
|
||||
|
|
Loading…
Add table
Reference in a new issue