close the app when no permission to storage is given

This commit is contained in:
tibbi 2016-06-13 17:32:38 +02:00
parent 11e692af35
commit 51981e4f06
2 changed files with 2 additions and 1 deletions

View file

@ -117,6 +117,7 @@ public class MainActivity extends AppCompatActivity
initializeGallery(); initializeGallery();
} else { } else {
Toast.makeText(this, getResources().getString(R.string.no_permissions), Toast.LENGTH_SHORT).show(); Toast.makeText(this, getResources().getString(R.string.no_permissions), Toast.LENGTH_SHORT).show();
finish();
} }
} }
} }

View file

@ -1,7 +1,7 @@
<resources> <resources>
<string name="app_name">Simple Gallery</string> <string name="app_name">Simple Gallery</string>
<string name="share_via">Share via</string> <string name="share_via">Share via</string>
<string name="no_permissions">Not much to do in a gallery without accessing your photos and videos</string> <string name="no_permissions">Not much to do in a gallery without accessing your storage</string>
<string name="delete">Delete</string> <string name="delete">Delete</string>
<string name="deleting">Deleting</string> <string name="deleting">Deleting</string>
<string name="edit">Edit</string> <string name="edit">Edit</string>