show warnings for backup/restore on Android 9

Restore doesn't work there, so warn appropriately
This commit is contained in:
Eric House 2023-05-04 13:31:35 -07:00
parent 869967d1ec
commit 93477ae744
3 changed files with 27 additions and 4 deletions

View file

@ -57,6 +57,7 @@ public class DlgDelegate {
LAUNCH_THEME_CONFIG,
SEND_LOGS,
OPEN_BYOD_DICT,
BACKUP_DO,
BACKUP_LOADDB,
BACKUP_OVERWRITE,
BACKUP_RETRY,

View file

@ -1455,6 +1455,10 @@ public class GamesListDelegate extends ListDelegateBase
openWithChecks( rowid, summary );
break;
case BACKUP_DO:
showDialogFragment( DlgID.BACKUP_LOADSTORE );
break;
case BACKUP_LOADDB:
startFileChooser( null );
break;
@ -1923,12 +1927,23 @@ public class GamesListDelegate extends ListDelegateBase
// with the choose-what alert in the store case, and with the
// choose-where (OS) grossness in the load case
case R.id.games_menu_storedb:
showDialogFragment( DlgID.BACKUP_LOADSTORE );
if ( Build.VERSION.SDK_INT == Build.VERSION_CODES.P ) {
makeConfirmThenBuilder( Action.BACKUP_DO,
R.string.backup_only_on_9 )
.show();
} else {
onPosButton( Action.BACKUP_DO );
}
break;
case R.id.games_menu_loaddb:
makeNotAgainBuilder( R.string.key_notagain_loaddb,
Action.BACKUP_LOADDB, R.string.not_again_loaddb )
.show();
if ( Build.VERSION.SDK_INT == Build.VERSION_CODES.P ) {
makeOkOnlyBuilder( R.string.no_restore_on_9 )
.show();
} else {
makeNotAgainBuilder( R.string.key_notagain_loaddb,
Action.BACKUP_LOADDB, R.string.not_again_loaddb )
.show();
}
break;
case R.id.games_menu_writegit:

View file

@ -5,4 +5,11 @@
<string name="dup_allscores_fmt">All scores: %1$s</string>
<string name="backup_only_on_9">Export works on Android 9 (and all
other versions), but Import does not. So you can do an export on
this device in order to migrate to a newer phone, but you will not
be able to import the resulting file on this device.</string>
<string name="no_restore_on_9">Import does not work on Android 9.</string>
</resources>