Skip to content

Commit eaada10

Browse files
committed
Cleanup
1 parent 8d4ff1f commit eaada10

23 files changed

+33
-2323
lines changed

app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<uses-permission android:name="com.android.vending.BILLING" />
88

99
<application
10-
android:name="com.jecelyin.editor.v2.TextEditorApplication"
10+
android:name="com.duy.editor.TextEditorApplication"
1111
android:allowBackup="true"
1212
android:fullBackupContent="true"
1313
android:icon="@mipmap/ic_launcher"
@@ -94,9 +94,6 @@
9494
android:name="com.pdaxrom.utils.FileDialog"
9595
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
9696
android:label="@string/filebrowser_name" />
97-
<activity
98-
android:name="com.pdaxrom.cctools.CCtoolsPreferences"
99-
android:label="@string/preferences" />
10097
<activity android:name="com.pdaxrom.cctools.LauncherNativeActivity">
10198
<intent-filter>
10299
<action android:name="com.pdaXrom.cctools.action.RUN" />

app/src/main/java/com/duy/ccppcompiler/packagemanager/Environment.java

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import android.content.Context;
2020
import android.content.SharedPreferences;
2121
import android.preference.PreferenceManager;
22+
import android.support.annotation.Nullable;
2223

2324
import com.pdaxrom.utils.Utils;
2425

@@ -27,6 +28,7 @@
2728
import java.io.File;
2829
import java.io.FileDescriptor;
2930
import java.io.FileInputStream;
31+
import java.io.FilenameFilter;
3032
import java.io.InputStreamReader;
3133

3234
import jackpal.androidterm.TermSettings;
@@ -180,9 +182,9 @@ private static String getShareDir(Context context) {
180182
private static String getBootClassPath() {
181183
String bootClassPath = getEnv("BOOTCLASSPATH", null);
182184
if (bootClassPath == null) {
183-
bootClassPath = Utils.getBootClassPath();
185+
bootClassPath = findBootClassPath();
184186
}
185-
if (bootClassPath == null) {
187+
if (bootClassPath == null || bootClassPath.isEmpty()) {
186188
bootClassPath = "/system/framework/core.jar:" +
187189
"/system/framework/ext.jar:" +
188190
"/system/framework/framework.jar:" +
@@ -192,6 +194,29 @@ private static String getBootClassPath() {
192194
return bootClassPath;
193195
}
194196

197+
@Nullable
198+
private static String findBootClassPath() {
199+
String classPath = null;
200+
File dir = new File("/system/framework");
201+
if (dir.exists() && dir.isDirectory()) {
202+
FilenameFilter filter = new FilenameFilter() {
203+
public boolean accept(File dir, String name) {
204+
String lowercaseName = name.toLowerCase();
205+
return lowercaseName.endsWith(".jar");
206+
}
207+
};
208+
209+
String[] list = dir.list(filter);
210+
for (int i = 0; i < list.length; i++) {
211+
String file = list[i];
212+
if (i != 0) {
213+
classPath += ":";
214+
}
215+
classPath += "/system/framework/" + file;
216+
}
217+
}
218+
return classPath;
219+
}
195220

196221
private static String getEnv(String name, String defValue) {
197222
String value = System.getenv(name);

app/src/main/java/com/jecelyin/editor/v2/TextEditorApplication.java renamed to app/src/main/java/com/duy/editor/TextEditorApplication.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* limitations under the License.
1717
*/
1818

19-
package com.jecelyin.editor.v2;
19+
package com.duy.editor;
2020

2121
import android.content.Context;
2222
import android.support.multidex.MultiDexApplication;

app/src/main/java/com/pdaxrom/cctools/BuildActivity.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ public void onCreate(Bundle savedInstanceState) {
8383
String fileName = new File(mFilePath).getName();
8484
if (fileName.contentEquals("Makefile") || fileName.contentEquals("makefile")) {
8585
mCommand = "make " + systemShell;
86-
mCommand += " " + CompilerSetting.getMakeFlags();
8786

8887
} else {
8988
int dotPos = fileName.lastIndexOf(".");

0 commit comments

Comments
 (0)