mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-30 10:26:58 +01:00
add another perms request/rationale
This commit is contained in:
parent
7c033ccdf1
commit
d661f1d050
6 changed files with 51 additions and 13 deletions
|
@ -1988,8 +1988,8 @@ XLATE-ME
|
||||||
|
|
||||||
*/
|
*/
|
||||||
public static final int connstat_unsucc=0x7f050237;
|
public static final int connstat_unsucc=0x7f050237;
|
||||||
public static final int contact_not_found=0x7f050361;
|
public static final int contact_not_found=0x7f050362;
|
||||||
public static final int contacts_rationale=0x7f05035e;
|
public static final int contacts_rationale=0x7f05035f;
|
||||||
/** title of dialog brought up in response to the
|
/** title of dialog brought up in response to the
|
||||||
board_menu_game_counts menu. The dialog lists all tiles in
|
board_menu_game_counts menu. The dialog lists all tiles in
|
||||||
the language being used for the game together with how many
|
the language being used for the game together with how many
|
||||||
|
@ -2288,6 +2288,7 @@ XLATE-ME
|
||||||
will use is substituted in for "%s".
|
will use is substituted in for "%s".
|
||||||
*/
|
*/
|
||||||
public static final int dicts_list_prompt_fmt=0x7f0500df;
|
public static final int dicts_list_prompt_fmt=0x7f0500df;
|
||||||
|
public static final int dicts_storage_rationale=0x7f05035a;
|
||||||
public static final int disable_dualpane=0x7f050355;
|
public static final int disable_dualpane=0x7f050355;
|
||||||
public static final int disable_nag_solo_title=0x7f0502fe;
|
public static final int disable_nag_solo_title=0x7f0502fe;
|
||||||
/** <string name="disable_nag_summary">Do not notify me no matter
|
/** <string name="disable_nag_summary">Do not notify me no matter
|
||||||
|
@ -3831,7 +3832,7 @@ XLATE-ME
|
||||||
depending on the current location of the wordlist.)
|
depending on the current location of the wordlist.)
|
||||||
*/
|
*/
|
||||||
public static final int move_dict_fmt=0x7f0500b2;
|
public static final int move_dict_fmt=0x7f0500b2;
|
||||||
public static final int move_dict_rationale=0x7f05035f;
|
public static final int move_dict_rationale=0x7f050360;
|
||||||
/**
|
/**
|
||||||
############################################################
|
############################################################
|
||||||
# :Dialogs:
|
# :Dialogs:
|
||||||
|
@ -5042,21 +5043,21 @@ XLATE-ME
|
||||||
explanation of the above
|
explanation of the above
|
||||||
*/
|
*/
|
||||||
public static final int peek_other_summary=0x7f05015d;
|
public static final int peek_other_summary=0x7f05015d;
|
||||||
public static final int perms_rationale_title=0x7f050363;
|
public static final int perms_rationale_title=0x7f050364;
|
||||||
/**
|
/**
|
||||||
|
|
||||||
<string name="phone_label">Connected number[s]:</string>
|
<string name="phone_label">Connected number[s]:</string>
|
||||||
|
|
||||||
*/
|
*/
|
||||||
public static final int phone_label=0x7f050223;
|
public static final int phone_label=0x7f050223;
|
||||||
public static final int phone_lookup_rationale=0x7f05035b;
|
public static final int phone_lookup_rationale=0x7f05035c;
|
||||||
/** Case where SMS is the only way the game can communicate
|
/** Case where SMS is the only way the game can communicate
|
||||||
*/
|
*/
|
||||||
public static final int phone_lookup_rationale_drop=0x7f05035c;
|
public static final int phone_lookup_rationale_drop=0x7f05035d;
|
||||||
/** Case where SMS is NOT the only way the game can communicate
|
/** Case where SMS is NOT the only way the game can communicate
|
||||||
*/
|
*/
|
||||||
public static final int phone_lookup_rationale_others=0x7f05035d;
|
public static final int phone_lookup_rationale_others=0x7f05035e;
|
||||||
public static final int phone_state_rationale=0x7f05035a;
|
public static final int phone_state_rationale=0x7f05035b;
|
||||||
/** Don't warn, but simply force to skip turn (give 0 points)
|
/** Don't warn, but simply force to skip turn (give 0 points)
|
||||||
when user attempts to play word not in the wordlist.
|
when user attempts to play word not in the wordlist.
|
||||||
Don't warn, but simply force to skip turn (give 0 points)
|
Don't warn, but simply force to skip turn (give 0 points)
|
||||||
|
@ -5813,7 +5814,7 @@ XLATE-ME
|
||||||
|
|
||||||
*/
|
*/
|
||||||
public static final int remote_undone=0x7f050226;
|
public static final int remote_undone=0x7f050226;
|
||||||
public static final int remove_sms=0x7f050360;
|
public static final int remove_sms=0x7f050361;
|
||||||
/** <string name="rename_group_label">Change the name of this group to:</string>
|
/** <string name="rename_group_label">Change the name of this group to:</string>
|
||||||
*/
|
*/
|
||||||
public static final int rename_group_label=0x7f050273;
|
public static final int rename_group_label=0x7f050273;
|
||||||
|
@ -6021,7 +6022,7 @@ XLATE-ME
|
||||||
/** <string name="sms_ready_text">Tap the receiving device now</string>
|
/** <string name="sms_ready_text">Tap the receiving device now</string>
|
||||||
*/
|
*/
|
||||||
public static final int sms_ready_text=0x7f050288;
|
public static final int sms_ready_text=0x7f050288;
|
||||||
public static final int sms_send_failed=0x7f050362;
|
public static final int sms_send_failed=0x7f050363;
|
||||||
/** <string name="square_tiles">Square rack tiles</string>
|
/** <string name="square_tiles">Square rack tiles</string>
|
||||||
*/
|
*/
|
||||||
public static final int square_tiles=0x7f050278;
|
public static final int square_tiles=0x7f050278;
|
||||||
|
@ -6890,7 +6891,7 @@ string name="str_robot_moved">O robô fez esta jogada:\u0020</string
|
||||||
feature is not yet supported on Android.)
|
feature is not yet supported on Android.)
|
||||||
*/
|
*/
|
||||||
public static final int title_tile_picker=0x7f0501b4;
|
public static final int title_tile_picker=0x7f0501b4;
|
||||||
public static final int toast_no_permission=0x7f050364;
|
public static final int toast_no_permission=0x7f050365;
|
||||||
/** <string name="update_dicts_fmt">Updates are available for one or more
|
/** <string name="update_dicts_fmt">Updates are available for one or more
|
||||||
installed wordlists. Would you like to download the new
|
installed wordlists. Would you like to download the new
|
||||||
version[s] of %1$s now?</string>
|
version[s] of %1$s now?</string>
|
||||||
|
|
|
@ -2729,6 +2729,14 @@
|
||||||
temporary storage to keep what you\'re about to download.
|
temporary storage to keep what you\'re about to download.
|
||||||
</string>
|
</string>
|
||||||
|
|
||||||
|
<string name="dicts_storage_rationale">
|
||||||
|
Crosswords can store and read wordlists in your device\'s
|
||||||
|
Downloads area but it needs permission to access them
|
||||||
|
there.\n\nYou can safely deny this permission if you will never
|
||||||
|
download wordlists except from inside Crosswords and have not
|
||||||
|
previously stored any there.
|
||||||
|
</string>
|
||||||
|
|
||||||
<string name="phone_state_rationale">Crosswords wants to offer you
|
<string name="phone_state_rationale">Crosswords wants to offer you
|
||||||
the option of exchanging moves via SMS \"data\" messages. In order
|
the option of exchanging moves via SMS \"data\" messages. In order
|
||||||
to determine if your device can send SMS Crosswords needs permission
|
to determine if your device can send SMS Crosswords needs permission
|
||||||
|
|
|
@ -2329,6 +2329,13 @@
|
||||||
<string name="download_rationale">Sdrowssorc sdeen ssecca ot
|
<string name="download_rationale">Sdrowssorc sdeen ssecca ot
|
||||||
yraropmet egarots ot peek tahw uoy\'er tuoba ot daolnwod.
|
yraropmet egarots ot peek tahw uoy\'er tuoba ot daolnwod.
|
||||||
</string>
|
</string>
|
||||||
|
<string name="dicts_storage_rationale">
|
||||||
|
Sdrowssorc nac erots dna daer stsildrow ni ruoy ecived\'s
|
||||||
|
Sdaolnwod aera tub ti sdeen noissimrep ot ssecca meht
|
||||||
|
ereht.\n\nUoy nac ylefas yned siht noissimrep fi uoy lliw reven
|
||||||
|
daolnwod stsildrow tpecxe morf edisni Sdrowssorc dna evah ton
|
||||||
|
ylsuoiverp derots yna ereht.
|
||||||
|
</string>
|
||||||
<string name="phone_state_rationale">Sdrowssorc stnaw ot reffo uoy
|
<string name="phone_state_rationale">Sdrowssorc stnaw ot reffo uoy
|
||||||
eht noitpo fo gnignahcxe sevom aiv SMS \"atad\" segassem. Ni redro
|
eht noitpo fo gnignahcxe sevom aiv SMS \"atad\" segassem. Ni redro
|
||||||
ot enimreted fi ruoy ecived nac dnes SMS Sdrowssorc sdeen noissimrep
|
ot enimreted fi ruoy ecived nac dnes SMS Sdrowssorc sdeen noissimrep
|
||||||
|
|
|
@ -2329,6 +2329,13 @@
|
||||||
<string name="download_rationale">CROSSWORDS NEEDS ACCESS TO
|
<string name="download_rationale">CROSSWORDS NEEDS ACCESS TO
|
||||||
TEMPORARY STORAGE TO KEEP WHAT YOU\'RE ABOUT TO DOWNLOAD.
|
TEMPORARY STORAGE TO KEEP WHAT YOU\'RE ABOUT TO DOWNLOAD.
|
||||||
</string>
|
</string>
|
||||||
|
<string name="dicts_storage_rationale">
|
||||||
|
CROSSWORDS CAN STORE AND READ WORDLISTS IN YOUR DEVICE\'S
|
||||||
|
DOWNLOADS AREA BUT IT NEEDS PERMISSION TO ACCESS THEM
|
||||||
|
THERE.\n\nYOU CAN SAFELY DENY THIS PERMISSION IF YOU WILL NEVER
|
||||||
|
DOWNLOAD WORDLISTS EXCEPT FROM INSIDE CROSSWORDS AND HAVE NOT
|
||||||
|
PREVIOUSLY STORED ANY THERE.
|
||||||
|
</string>
|
||||||
<string name="phone_state_rationale">CROSSWORDS WANTS TO OFFER YOU
|
<string name="phone_state_rationale">CROSSWORDS WANTS TO OFFER YOU
|
||||||
THE OPTION OF EXCHANGING MOVES VIA SMS \"DATA\" MESSAGES. IN ORDER
|
THE OPTION OF EXCHANGING MOVES VIA SMS \"DATA\" MESSAGES. IN ORDER
|
||||||
TO DETERMINE IF YOUR DEVICE CAN SEND SMS CROSSWORDS NEEDS PERMISSION
|
TO DETERMINE IF YOUR DEVICE CAN SEND SMS CROSSWORDS NEEDS PERMISSION
|
||||||
|
|
|
@ -105,6 +105,12 @@ public class DelegateBase implements DlgClickNotify,
|
||||||
|
|
||||||
protected void requestWindowFeature( int feature ) {}
|
protected void requestWindowFeature( int feature ) {}
|
||||||
|
|
||||||
|
protected void tryGetPerms( Perms23.Perm perm, int rationale,
|
||||||
|
Action action, Object... params )
|
||||||
|
{
|
||||||
|
Perms23.tryGetPerms( this, perm, rationale, action, this, params );
|
||||||
|
}
|
||||||
|
|
||||||
// Fragments only
|
// Fragments only
|
||||||
protected View inflateView( LayoutInflater inflater, ViewGroup container )
|
protected View inflateView( LayoutInflater inflater, ViewGroup container )
|
||||||
{
|
{
|
||||||
|
@ -653,6 +659,7 @@ public class DelegateBase implements DlgClickNotify,
|
||||||
handled = true;
|
handled = true;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
DbgUtils.logd( TAG, "unhandled action %s", action.toString() );
|
||||||
Assert.fail();
|
Assert.fail();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -534,6 +534,9 @@ public class DictsDelegate extends ListDelegateBase
|
||||||
|
|
||||||
makeNotAgainBuilder( R.string.not_again_dicts, R.string.key_na_dicts )
|
makeNotAgainBuilder( R.string.not_again_dicts, R.string.key_na_dicts )
|
||||||
.show();
|
.show();
|
||||||
|
|
||||||
|
tryGetPerms( Perm.STORAGE, R.string.dicts_storage_rationale,
|
||||||
|
Action.STORAGE_CONFIRMED );
|
||||||
} // init
|
} // init
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -654,8 +657,8 @@ public class DictsDelegate extends ListDelegateBase
|
||||||
private void moveDicts( XWListItem[] selItems, DictLoc toLoc )
|
private void moveDicts( XWListItem[] selItems, DictLoc toLoc )
|
||||||
{
|
{
|
||||||
if ( DictUtils.needsStoragePermission( toLoc ) ) {
|
if ( DictUtils.needsStoragePermission( toLoc ) ) {
|
||||||
Perms23.tryGetPerms( this, Perm.STORAGE, R.string.move_dict_rationale,
|
tryGetPerms( Perm.STORAGE, R.string.move_dict_rationale,
|
||||||
Action.MOVE_CONFIRMED, this, selItems, toLoc );
|
Action.MOVE_CONFIRMED, selItems, toLoc );
|
||||||
} else {
|
} else {
|
||||||
moveDictsWithPermission( selItems, toLoc );
|
moveDictsWithPermission( selItems, toLoc );
|
||||||
}
|
}
|
||||||
|
@ -935,6 +938,11 @@ public class DictsDelegate extends ListDelegateBase
|
||||||
moveDictsWithPermission( params );
|
moveDictsWithPermission( params );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case STORAGE_CONFIRMED:
|
||||||
|
if ( positive ) {
|
||||||
|
mkListAdapter();
|
||||||
|
}
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
super.dlgButtonClicked( action, which, params );
|
super.dlgButtonClicked( action, which, params );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue