fix flash when launch a shortcut
This commit is contained in:
@@ -33,7 +33,6 @@ public class CommonUtils {
|
||||
String directoryPath = null;
|
||||
String script = intent.getStringExtra(CommonUtils.EXTRA_KEY_PRE_EXECUTE_SCRIPT);
|
||||
ScriptSource source = null;
|
||||
Toast.makeText(context, path, Toast.LENGTH_SHORT).show();
|
||||
if (path == null && script != null) {
|
||||
source = new StringScriptSource(script);
|
||||
} else if (path != null && new PathChecker(context).checkAndToastError(path)) {
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.stardust.scriptdroid.external.shortcut;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.os.Bundle;
|
||||
|
||||
/**
|
||||
|
||||
@@ -23,10 +23,6 @@ public class ShortcutActivity extends Activity {
|
||||
if (new PathChecker(this).checkAndToastError(path)) {
|
||||
runScriptFile(path);
|
||||
}
|
||||
}
|
||||
|
||||
public void onStart() {
|
||||
super.onStart();
|
||||
finish();
|
||||
}
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ public class ScriptFile extends File {
|
||||
if (isDirectory())
|
||||
return renameTo(new File(getParent(), newName));
|
||||
else
|
||||
return renameTo(new File(getParent(), newName + getExtension()));
|
||||
return renameTo(new File(getParent(), newName + "." + getExtension()));
|
||||
}
|
||||
|
||||
private String getExtension() {
|
||||
|
||||
Reference in New Issue
Block a user