Skip to content

Commit 0351661

Browse files
author
rjmatthews62
committed
Fix to issue 616 (editor npe in autoclose on unsupported scripts)
This time for sure...
1 parent 19e63f9 commit 0351661

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

android/Common/src/com/googlecode/android_scripting/language/Language.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@
2727
*
2828
* @author igor.v.karp@gmail.com (Igor Karp)
2929
*/
30-
public abstract class Language {
30+
public class Language {
3131

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

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

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

7474
/** Returns the RPC receiver found in the given script. */

android/ScriptingLayerForAndroid/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<manifest
33
xmlns:android="http://schemas.android.com/apk/res/android"
44
package="com.googlecode.android_scripting"
5-
android:installLocation="auto" android:versionCode="406" android:versionName="5x06">
5+
android:installLocation="auto" android:versionCode="407" android:versionName="5x07">
66
<uses-permission android:name="android.permission.RECEIVE_SMS"></uses-permission>
77
<uses-permission android:name="net.dinglisch.android.tasker.PERMISSION_RUN_TASKS"></uses-permission>
88
<application

android/ScriptingLayerForAndroid/src/com/googlecode/android_scripting/activity/ScriptManager.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,8 @@ public void onCreate(Bundle savedInstanceState) {
117117
new AlertDialog.Builder(this)
118118
.setTitle("Error")
119119
.setMessage(
120-
"Failed to create scripts directory. Please check the permissions of your external storage media.")
120+
"Failed to create scripts directory.\n" + mBaseDir + "\n"
121+
+ "Please check the permissions of your external storage media.")
121122
.setIcon(android.R.drawable.ic_dialog_alert).setPositiveButton("Ok", null).show();
122123
}
123124
} else {

0 commit comments

Comments
 (0)