From 7c033ccdf1e0d1e674983b1db613982cc1869314 Mon Sep 17 00:00:00 2001 From: Eric House Date: Wed, 4 Jan 2017 06:46:44 -0800 Subject: [PATCH] warn when unpermitted choice made Let OS ask for STORAGE when user chooses Downloads dict storage option, but do nothing if it's not granted. Existing code asks again when the actual move is to done. --- .../XWords4/src/org/eehouse/android/xw4/DictsDelegate.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/DictsDelegate.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/DictsDelegate.java index 4b37a0c58..7729ba06f 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/DictsDelegate.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/DictsDelegate.java @@ -375,6 +375,12 @@ public class DictsDelegate extends ListDelegateBase Button btn = dlg.getButton( AlertDialog.BUTTON_POSITIVE ); btn.setEnabled( true ); + + // Ask for STORAGE (but do nothing if not granted) + if ( DictLoc.DOWNLOAD == itemToRealLoc( item ) ) { + new Perms23.Builder( Perm.STORAGE ) + .asyncQuery( m_activity ); + } } };