mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-07 20:46:17 +01:00
ask for SMS_RECEIVE on startup if have SMS_SEND
It's free (same group) but required on SDK_26 for invitations to work.
This commit is contained in:
parent
f7ef1adcb5
commit
e15fb84005
2 changed files with 12 additions and 1 deletions
|
@ -987,6 +987,16 @@ public class GamesListDelegate extends ListDelegateBase
|
|||
} );
|
||||
|
||||
updateField();
|
||||
|
||||
// RECEIVE_SMS is required now (Oreo/SDK_26) but wasn't
|
||||
// before. There's logic elsewhere to ask for it AND SEND_SMS, but if
|
||||
// the user's already granted SEND_SMS we can get RECEIVE_SMS just by
|
||||
// asking (OS will grant without user interaction) since they're in
|
||||
// the same group. So just do it now. This code can be removed
|
||||
// later...
|
||||
if ( Perms23.havePermission( Perm.SEND_SMS ) ) {
|
||||
Perms23.tryGetPerms( this, Perm.RECEIVE_SMS, 0, Action.SKIP_CALLBACK );
|
||||
}
|
||||
} // init
|
||||
|
||||
@Override
|
||||
|
|
|
@ -237,7 +237,8 @@ public class Perms23 {
|
|||
{
|
||||
// Log.d( TAG, "tryGetPerms(%s)", perm.toString() );
|
||||
Context context = XWApp.getContext();
|
||||
String msg = LocUtils.getString( context, rationaleId );
|
||||
String msg = rationaleId == 0
|
||||
? null : LocUtils.getString( context, rationaleId );
|
||||
tryGetPerms( delegate, perm, msg, action, params );
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue