这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 2 additions & 42 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,45 +1,5 @@
# From https://gist.github.com/iainconnor/8605514
# with the addition of the /captures below.
/captures

# Built application files
build/
*.apk
*.so
.externalNativeBuild

# Crashlytics configuations
com_crashlytics_export_strings.xml

# Local configuration file (sdk path, etc)
local.properties

# Gradle generated files
.gradle/

# Signing files
.signing/

# User-specific configurations
.idea/libraries/
.idea/workspace.xml
.idea/tasks.xml
.idea/.name
.idea/compiler.xml
.idea/copyright/profiles_settings.xml
.idea/encodings.xml
.idea/misc.xml
.idea/modules.xml
.idea/scopes/scope_settings.xml
.idea/vcs.xml
.idea/dictionaries/
*.iml

# OS-specific files
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
.idea/
*.iml
19 changes: 0 additions & 19 deletions .idea/gradle.xml

This file was deleted.

14 changes: 0 additions & 14 deletions .idea/inspectionProfiles/Project_Default.xml

This file was deleted.

7 changes: 0 additions & 7 deletions .idea/inspectionProfiles/profiles_settings.xml

This file was deleted.

12 changes: 0 additions & 12 deletions .idea/runConfigurations.xml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Termux:Boot
A [Termux](https://termux.com) add-on app to run programs at boot.

- [Termux:Boot on Google Play](https://play.google.com/store/apps/details?id=com.termux.boot)
- [Termux:Boot on F-Droid](https://f-droid.org/en/packages/com.termux.boot/)
- [Termux:Boot on F-Droid](https://f-droid.org/packages/com.termux.boot)

When developing (or packaging), note that this app needs to be signed with the same key as the main Termux app in order to have the permission to execute scripts.

Expand Down
1 change: 0 additions & 1 deletion app/.gitignore

This file was deleted.

27 changes: 17 additions & 10 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 27
buildToolsVersion "27.0.1"

dependencies {
compile 'com.android.support:support-annotations:27.0.0'
}

compileSdkVersion 28
buildToolsVersion '28.0.2'
defaultConfig {
applicationId "com.termux.boot"
minSdkVersion 21
targetSdkVersion 27
versionCode 5
versionName "0.5"
targetSdkVersion 28
versionCode 6
versionName "0.6"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}

Expand All @@ -23,5 +18,17 @@ android {
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
zipAlignEnabled true
}
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}

dependencies {
implementation 'com.android.support:support-annotations:28.0.0-rc02'
}
10 changes: 6 additions & 4 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.termux.boot"
android:sharedUserId="com.termux">
xmlns:tools="http://schemas.android.com/tools"
package="com.termux.boot"
android:sharedUserId="com.termux">

<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
Expand All @@ -20,7 +20,9 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<receiver android:name=".BootReceiver" android:exported="false">
<receiver
android:name=".BootReceiver"
android:exported="false">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/java/com/termux/boot/BootActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,4 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
webView.loadUrl("file:///android_asset/overview.html");
setContentView(webView);
}

}
1 change: 0 additions & 1 deletion app/src/main/java/com/termux/boot/BootJobService.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,4 @@ public boolean onStartJob(JobParameters params) {
public boolean onStopJob(JobParameters params) {
return true;
}

}
9 changes: 1 addition & 8 deletions app/src/main/java/com/termux/boot/BootReceiver.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

import java.io.File;
import java.util.Arrays;
import java.util.Comparator;

public class BootReceiver extends BroadcastReceiver {

Expand All @@ -26,12 +25,7 @@ public void onReceive(Context context, Intent intent) {
if (files == null) files = new File[0];

// Sort files so that they get executed in a repeatable and logical order.
Arrays.sort(files, new Comparator<File>() {
@Override
public int compare(File f1, File f2) {
return f1.getName().compareTo(f2.getName());
}
});
Arrays.sort(files, (f1, f2) -> f1.getName().compareTo(f2.getName()));

StringBuilder logMessage = new StringBuilder();
for (File file : files) {
Expand Down Expand Up @@ -68,5 +62,4 @@ private static void ensureFileReadableAndExecutable(File file) {
if (!file.canRead()) file.setReadable(true);
if (!file.canExecute()) file.setExecutable(true);
}

}
9 changes: 4 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
buildscript {
repositories {
google()
jcenter()
google()
}

dependencies {
classpath 'com.android.tools.build:gradle:3.0.0'
classpath 'com.android.tools.build:gradle:3.1.4'
}
}

allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
google()
}
}

Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionUrl=https\://services.gradle.org/distributions/gradle-4.3-bin.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists