mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-09 05:24:44 +01:00
Fix problems inviting SMS on emulator
Likely no-ops on real devices
This commit is contained in:
parent
105e8e2623
commit
5a64b3b92f
1 changed files with 5 additions and 4 deletions
|
@ -192,9 +192,11 @@ public class Perms23 {
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
builder.asyncQuery( m_delegate.getActivity(), new PermCbck() {
|
builder.asyncQuery( m_delegate.getActivity(), new PermCbck() {
|
||||||
|
@Override
|
||||||
public void onPermissionResult( Map<Perm, Boolean> perms ) {
|
public void onPermissionResult( Map<Perm, Boolean> perms ) {
|
||||||
if ( Action.SKIP_CALLBACK != m_action ) {
|
if ( Action.SKIP_CALLBACK != m_action ) {
|
||||||
if ( perms.get( m_perm ) ) {
|
Boolean got = perms.get( m_perm );
|
||||||
|
if ( null != got && got ) {
|
||||||
m_delegate.onPosButton( m_action, m_params );
|
m_delegate.onPosButton( m_action, m_params );
|
||||||
} else {
|
} else {
|
||||||
m_delegate.onNegButton( m_action, m_params );
|
m_delegate.onNegButton( m_action, m_params );
|
||||||
|
@ -302,12 +304,11 @@ public class Perms23 {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
// This is probably overkill as the OS only allows one permission request
|
// If two permission requests are made in a row the map may contain more
|
||||||
// at a time
|
// than one entry.
|
||||||
private static int s_nextRecord = 0;
|
private static int s_nextRecord = 0;
|
||||||
private static int register( PermCbck cbck )
|
private static int register( PermCbck cbck )
|
||||||
{
|
{
|
||||||
Assert.assertTrue( !BuildConfig.DEBUG || 0 == s_map.size() );
|
|
||||||
DbgUtils.assertOnUIThread();
|
DbgUtils.assertOnUIThread();
|
||||||
int code = ++s_nextRecord;
|
int code = ++s_nextRecord;
|
||||||
s_map.put( code, cbck );
|
s_map.put( code, cbck );
|
||||||
|
|
Loading…
Reference in a new issue