aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/cyanogenmod/filemanager/util/ExceptionUtil.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/cyanogenmod/filemanager/util/ExceptionUtil.java')
-rw-r--r--src/com/cyanogenmod/filemanager/util/ExceptionUtil.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/com/cyanogenmod/filemanager/util/ExceptionUtil.java b/src/com/cyanogenmod/filemanager/util/ExceptionUtil.java
index 7b7ce745..edd876ae 100644
--- a/src/com/cyanogenmod/filemanager/util/ExceptionUtil.java
+++ b/src/com/cyanogenmod/filemanager/util/ExceptionUtil.java
@@ -285,6 +285,17 @@ public final class ExceptionUtil {
}
return;
}
+ if (relaunchable instanceof InsufficientPermissionsException &&
+ !FileManagerApplication.isDeviceRooted()) {
+ DialogHelper.showToast(context, R.string.root_not_available_msg,
+ Toast.LENGTH_SHORT);
+
+ // Operation failed. Root is not available
+ if (listener != null) {
+ listener.onFailed(relaunchable);
+ }
+ return;
+ }
//Create a yes/no dialog and ask the user
final DialogInterface.OnClickListener clickListener =