[android-scripting] push by rjmatthews62 - Fix to 'file not found' on first install. on 2013-06-28 06:34 GMT

3 views
Skip to first unread message

android-...@googlecode.com

unread,
Jun 28, 2013, 2:34:41 AM6/28/13
to android-scri...@googlegroups.com
Revision: 6438d9b0cbfd
Branch: default
Author: rjmatthews62
Date: Thu Jun 27 23:33:42 2013
Log: Fix to 'file not found' on first install.
http://code.google.com/p/android-scripting/source/detail?r=6438d9b0cbfd

Modified:
/android/ScriptingLayerForAndroid/AndroidManifest.xml

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

=======================================
--- /android/ScriptingLayerForAndroid/AndroidManifest.xml Thu Jun 27
19:15:45 2013
+++ /android/ScriptingLayerForAndroid/AndroidManifest.xml Thu Jun 27
23:33:42 2013
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.googlecode.android_scripting" android:installLocation="auto"
- android:versionCode="602" android:versionName="6x02">
+ android:versionCode="603" android:versionName="6x03">
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission
android:name="net.dinglisch.android.tasker.PERMISSION_RUN_TASKS" />
<uses-permission
android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
=======================================
---
/android/ScriptingLayerForAndroid/src/com/googlecode/android_scripting/activity/ScriptManager.java
Sun Mar 25 21:55:14 2012
+++
/android/ScriptingLayerForAndroid/src/com/googlecode/android_scripting/activity/ScriptManager.java
Thu Jun 27 23:33:42 2013
@@ -113,6 +113,15 @@
super.onCreate(savedInstanceState);
CustomizeWindow.requestCustomTitle(this, "Scripts",
R.layout.script_manager);
if (FileUtils.externalStorageMounted()) {
+ File sl4a = mBaseDir.getParentFile();
+ if (!sl4a.exists()) {
+ sl4a.mkdir();
+ try {
+ FileUtils.chmod(sl4a, 0755); // Handle the sl4a parent folder
first.
+ } catch (Exception e) {
+ // Not much we can do here if it doesn't work.
+ }
+ }
if (!FileUtils.makeDirectories(mBaseDir, 0755)) {
new AlertDialog.Builder(this)
.setTitle("Error")
Reply all
Reply to author
Forward
0 new messages