mirror of
https://github.com/TimeCrafters/TimeCraftersConfigurationTool.git
synced 2025-12-13 04:02:34 +00:00
Process is no longer bad
This commit is contained in:
2
.idea/compiler.xml
generated
2
.idea/compiler.xml
generated
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<bytecodeTargetLevel target="1.8" />
|
||||
<bytecodeTargetLevel target="11" />
|
||||
</component>
|
||||
</project>
|
||||
3
.idea/gradle.xml
generated
3
.idea/gradle.xml
generated
@@ -4,7 +4,7 @@
|
||||
<component name="GradleSettings">
|
||||
<option name="linkedExternalProjectsSettings">
|
||||
<GradleProjectSettings>
|
||||
<option name="testRunner" value="PLATFORM" />
|
||||
<option name="testRunner" value="GRADLE" />
|
||||
<option name="distributionType" value="DEFAULT_WRAPPED" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="gradleJvm" value="1.8" />
|
||||
@@ -15,7 +15,6 @@
|
||||
</set>
|
||||
</option>
|
||||
<option name="resolveModulePerSourceSet" value="false" />
|
||||
<option name="useQualifiedModuleNames" value="true" />
|
||||
</GradleProjectSettings>
|
||||
</option>
|
||||
</component>
|
||||
|
||||
2
.idea/misc.xml
generated
2
.idea/misc.xml
generated
@@ -39,7 +39,7 @@
|
||||
</value>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
<component name="ProjectType">
|
||||
|
||||
12
.idea/runConfigurations.xml
generated
12
.idea/runConfigurations.xml
generated
@@ -1,12 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="RunConfigurationProducerService">
|
||||
<option name="ignoredProducers">
|
||||
<set>
|
||||
<option value="org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer" />
|
||||
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer" />
|
||||
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer" />
|
||||
</set>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
||||
@@ -26,6 +26,7 @@ android {
|
||||
dependencies {
|
||||
implementation fileTree(dir: "libs", include: ["*.jar"])
|
||||
implementation 'com.google.code.gson:gson:2.8.6'
|
||||
implementation 'net.sourceforge.streamsupport:streamsupport:1.7.4'
|
||||
implementation 'androidx.appcompat:appcompat:1.1.0'
|
||||
implementation 'com.google.android.material:material:1.0.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
package="org.timecrafters.TimeCraftersConfigurationTool">
|
||||
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
||||
@@ -22,11 +21,13 @@
|
||||
<service
|
||||
android:name=".tacnet.TACNETServerService"
|
||||
android:enabled="true"
|
||||
android:exported="false"/>
|
||||
android:exported="false"
|
||||
android:permission="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<service
|
||||
android:name=".tacnet.TACNETConnectionService"
|
||||
android:enabled="true"
|
||||
android:exported="false"/>
|
||||
android:exported="false"
|
||||
android:permission="android.permission.WRITE_EXTERNAL_STORAGE"/>
|
||||
|
||||
<activity
|
||||
android:name=".LauncherActivity"
|
||||
@@ -40,9 +41,15 @@
|
||||
|
||||
<activity android:name=".MainActivity" />
|
||||
|
||||
<receiver android:name=".tacnet.TACNETOnBootReceiver">
|
||||
<receiver
|
||||
android:enabled="true"
|
||||
android:exported="true"
|
||||
android:name=".tacnet.TACNETOnBootReceiver"
|
||||
android:permission="android.permission.BOOT_COMPLETED">
|
||||
<intent-filter>
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<action android:name="android.intent.action.BOOT_COMPLETED" />
|
||||
<action android:name="android.intent.action.QUICKBOOT_POWERON" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
</application>
|
||||
|
||||
@@ -2,19 +2,14 @@ package org.timecrafters.TimeCraftersConfigurationTool;
|
||||
|
||||
import android.Manifest;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.core.app.ActivityCompat;
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
import com.google.android.material.bottomnavigation.BottomNavigationView;
|
||||
|
||||
import org.timecrafters.TimeCraftersConfigurationTool.backend.Backend;
|
||||
import org.timecrafters.TimeCraftersConfigurationTool.dialogs.PermissionsRequestDialog;
|
||||
|
||||
|
||||
@@ -15,13 +15,11 @@ public class TAC {
|
||||
|
||||
// Set COMPETITION_MODE to true to disable automatic TACNET server start
|
||||
public static final boolean BUILD_COMPETITION_MODE = false;
|
||||
public static final boolean BUILD_AUTO_START = false;
|
||||
public static final String BUILD_AUTO_START_MODEL = "rev hub"; /* LOWERCASE */
|
||||
public static final boolean BUILD_AUTO_START = true;
|
||||
|
||||
static public boolean allowAutoServerStart() {
|
||||
return !TAC.BUILD_COMPETITION_MODE &&
|
||||
((TAC.BUILD_AUTO_START &&
|
||||
Build.MODEL.toLowerCase().contains(TAC.BUILD_AUTO_START_MODEL)) ||
|
||||
(Backend.instance() != null && Backend.instance().getSettings().mobileStartServerAtBoot));
|
||||
TAC.BUILD_AUTO_START ||
|
||||
Backend.instance() != null && Backend.instance().getSettings().mobileStartServerAtBoot;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ public class PermissionsRequestDialog extends TimeCraftersDialog {
|
||||
((TextView)root.findViewById(R.id.dialog_title)).setText("Storage Permission Required");
|
||||
LinearLayout view = root.findViewById(R.id.dialog_content);
|
||||
view.addView(getLayoutInflater().inflate(R.layout.dialog_permission_request, null));
|
||||
((TextView)view.findViewById(R.id.message)).setText("Permission is required to write to external storage:\n\n" + TAC.ROOT_PATH);
|
||||
((TextView)view.findViewById(R.id.message)).setText("Permission is required to access external storage:\n\n" + TAC.ROOT_PATH);
|
||||
|
||||
Button quitButton = view.findViewById(R.id.quit_button);
|
||||
Button continueButton = view.findViewById(R.id.continue_button);
|
||||
|
||||
Reference in New Issue
Block a user