Merge branch 'LittleTurtle2333:main' into main

This commit is contained in:
YuKongA
2022-02-18 16:05:07 +08:00
committed by GitHub
7 changed files with 11 additions and 46 deletions

2
app/.gitignore vendored
View File

@@ -1,3 +1,5 @@
/build /build
/release /release
/debug /debug
/src/androidTest
/src/test

View File

@@ -1,26 +0,0 @@
package com.lt2333.simplicitytools;
import android.content.Context;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("com.lt2333.myapplication", appContext.getPackageName());
}
}

View File

@@ -11,7 +11,8 @@
android:theme="@style/Theme.MyApplication"> android:theme="@style/Theme.MyApplication">
<activity <activity
android:name=".activity.SettingsActivity" android:name=".activity.SettingsActivity"
android:exported="true"> android:exported="true"
android:launchMode="singleTop">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER"/> <category android:name="android.intent.category.LAUNCHER"/>

View File

@@ -43,7 +43,12 @@ class SettingsActivity : AppCompatActivity() {
} catch (exception: SecurityException) { } catch (exception: SecurityException) {
AlertDialog.Builder(this) AlertDialog.Builder(this)
.setMessage("您似乎正在使用过时的 LSPosed 版本或 LSPosed 未激活,请更新 LSPosed 或者激活后再试。") .setMessage("您似乎正在使用过时的 LSPosed 版本或 LSPosed 未激活,请更新 LSPosed 或者激活后再试。")
.setCancelable(false)
.setPositiveButton("确定", DialogInterface.OnClickListener { dialogInterface, i ->
android.os.Process.killProcess(android.os.Process.myPid())
})
.show() .show()
} }
} }

View File

@@ -1,17 +0,0 @@
package com.lt2333.simplicitytools;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
}

View File

@@ -5,7 +5,7 @@ buildscript {
mavenCentral() mavenCentral()
} }
dependencies { dependencies {
classpath "com.android.tools.build:gradle:7.0.4" classpath 'com.android.tools.build:gradle:7.1.1'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10' classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10'
// NOTE: Do not place your application dependencies here; they belong // NOTE: Do not place your application dependencies here; they belong

View File

@@ -1,6 +1,6 @@
#Sun Feb 13 16:53:34 CST 2022 #Sun Feb 13 16:53:34 CST 2022
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME