Skip to content

Commit

Permalink
Fix to issue 616 (editor npe in autoclose on unsupported scripts)
Browse files Browse the repository at this point in the history
This time for sure...
  • Loading branch information
rjmatthews62 committed Mar 26, 2012
1 parent 19e63f9 commit 0351661
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
*
* @author [email protected] (Igor Karp)
*/
public abstract class Language {
public class Language {

private final static Map<Character, String> AUTO_CLOSE_MAP =
buildAutoCloseMap('[', "[]", '{', "{}", '(', "()", '\'', "''", '"', "\"\"");
private final static Map<Character, String> AUTO_CLOSE_MAP = buildAutoCloseMap('[', "[]", '{',
"{}", '(', "()", '\'', "''", '"', "\"\"");

/** Returns the initial template for newly created script. */
public String getContentTemplate() {
Expand Down Expand Up @@ -67,8 +67,8 @@ public String autoClose(char token) {

/** Returns the RPC call text with given parameter values. */
public final String getRpcText(String content, MethodDescriptor rpc, String[] values) {
return getMethodCallText(getRpcReceiverName(content), rpc.getName(), rpc
.getParameterValues(values));
return getMethodCallText(getRpcReceiverName(content), rpc.getName(),
rpc.getParameterValues(values));
}

/** Returns the RPC receiver found in the given script. */
Expand Down
2 changes: 1 addition & 1 deletion android/ScriptingLayerForAndroid/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.googlecode.android_scripting"
android:installLocation="auto" android:versionCode="406" android:versionName="5x06">
android:installLocation="auto" android:versionCode="407" android:versionName="5x07">
<uses-permission android:name="android.permission.RECEIVE_SMS"></uses-permission>
<uses-permission android:name="net.dinglisch.android.tasker.PERMISSION_RUN_TASKS"></uses-permission>
<application
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ public void onCreate(Bundle savedInstanceState) {
new AlertDialog.Builder(this)
.setTitle("Error")
.setMessage(
"Failed to create scripts directory. Please check the permissions of your external storage media.")
"Failed to create scripts directory.\n" + mBaseDir + "\n"
+ "Please check the permissions of your external storage media.")
.setIcon(android.R.drawable.ic_dialog_alert).setPositiveButton("Ok", null).show();
}
} else {
Expand Down

0 comments on commit 0351661

Please sign in to comment.