From 9aace4340ef930436f566aca0052faaaf93d549b Mon Sep 17 00:00:00 2001 From: jruesga Date: Sat, 27 Oct 2012 00:51:28 +0200 Subject: [PATCH] Remove console selection (Issue #17) - Part III (string messages) --- res/values/strings.xml | 25 ++++++++++------------ .../filemanager/activities/NavigationActivity.java | 8 +++---- .../filemanager/console/ConsoleBuilder.java | 4 ++-- 3 files changed, 17 insertions(+), 20 deletions(-) diff --git a/res/values/strings.xml b/res/values/strings.xml index 86d19c7..c757135 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -66,20 +66,20 @@ Error. - - - The application is unable to create a console. The only way to run the app + + + The application is unable to gain privileges. The only way to run the app is to switch to non-privileged mode.\n\nApply this change? - - The application is unable to create a console and - will not work without a console. - + The application is unable to gain privileges and + will not work without under this conditions. + - A privileged console could not be allocated. + The application is unable to gain privileges. \nChanging to non-privileged mode. - Changing to the new type of console failed. + Changing to the new type of access mode failed. The setting could not be applied or stored. @@ -106,8 +106,8 @@ The operation timed out. The operation failed. - - A console could not be allocated. + + An internal error occurred. The operation cannot be cancelled. @@ -301,9 +301,6 @@ %1$d files - - Choose console - History diff --git a/src/com/cyanogenmod/filemanager/activities/NavigationActivity.java b/src/com/cyanogenmod/filemanager/activities/NavigationActivity.java index b275152..20947f6 100644 --- a/src/com/cyanogenmod/filemanager/activities/NavigationActivity.java +++ b/src/com/cyanogenmod/filemanager/activities/NavigationActivity.java @@ -195,7 +195,7 @@ public class NavigationActivity extends Activity return; } - // Advanced mode + // Access mode if (key.compareTo(FileManagerSettings. SETTINGS_ACCESS_MODE.getId()) == 0) { // Is it necessary to create or exit of the ChRooted? @@ -515,7 +515,7 @@ public class NavigationActivity extends Activity } // We are in a trouble (something is not allowing creating the console) - // Ask the user to return to advanced console mode with a + // Ask the user to return to prompt or root access mode mode with a // non-privileged console, prior to make crash the application askOrExit(); return; @@ -1315,14 +1315,14 @@ public class NavigationActivity extends Activity } /** - * Method that ask the user to change to to advanced console + * Method that ask the user to change the access mode prior to crash. * @hide */ void askOrExit() { //Show a dialog asking the user AlertDialog dialog = DialogHelper.createYesNoDialog( - this, R.string.msgs_change_to_advanced_console_mode, + this, R.string.msgs_change_to_prompt_access_mode, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface alertDialog, int which) { diff --git a/src/com/cyanogenmod/filemanager/console/ConsoleBuilder.java b/src/com/cyanogenmod/filemanager/console/ConsoleBuilder.java index 7ebbd82..34ff8c4 100644 --- a/src/com/cyanogenmod/filemanager/console/ConsoleBuilder.java +++ b/src/com/cyanogenmod/filemanager/console/ConsoleBuilder.java @@ -213,8 +213,8 @@ public final class ConsoleBuilder { * console is allocated or if the settings preferences has changed. * * @param context The current context - * @param superuserMode If create with a superuser mode console - * @param advancedMode If create with a advanced mode console + * @param superuserMode If create with a superuser mode console (root access mode) + * @param advancedMode If create with a advanced mode console (prompt or root access mode) * @return Console An allocated console * @throws FileNotFoundException If the initial directory not exists * @throws IOException If initial directory couldn't be checked -- 2.11.0