This repository has been archived by the owner on Jun 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
44 changed files
with
373 additions
and
1,046 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ | |
*.apk binary | ||
*.jar binary | ||
*.png binary | ||
*.jks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
plugins { | ||
id 'com.android.application' | ||
} | ||
|
||
android { | ||
namespace 'me.s1204.benesse.touch.support' | ||
compileSdk 34 | ||
|
||
defaultConfig { | ||
minSdk 24 | ||
//noinspection ExpiredTargetSdkVersion | ||
targetSdk 22 | ||
versionCode 1 | ||
versionName "1.0.0" | ||
proguardFiles += '../app/proguard-rules.pro' | ||
} | ||
|
||
signingConfigs { | ||
android { | ||
storeFile file('../app/android.jks') | ||
storePassword 'android' | ||
keyAlias 'android' | ||
keyPassword 'android' | ||
} | ||
} | ||
|
||
buildTypes { | ||
debug { | ||
signingConfig signingConfigs.android | ||
minifyEnabled false | ||
} | ||
release { | ||
minifyEnabled true | ||
shrinkResources true | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
compileOnly files('../app/libs/BenesseExtension.jar') | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:tools="http://schemas.android.com/tools"> | ||
|
||
<uses-permission | ||
android:name="android.permission.WRITE_SETTINGS" | ||
tools:ignore="ProtectedPermissions" /> | ||
|
||
<application | ||
android:icon="@drawable/ic_settings_development_alpha" | ||
android:label="開発者向けオプション" | ||
android:theme="@android:style/Theme.NoDisplay"> | ||
|
||
<activity | ||
android:name=".DevelopmentOptions" | ||
android:clearTaskOnLaunch="true" | ||
android:excludeFromRecents="true" | ||
android:exported="true" | ||
android:launchMode="singleInstance"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
|
||
<activity | ||
android:name=".DchaStateChanger" | ||
android:exported="true" | ||
android:launchMode="singleInstance" | ||
android:noHistory="true"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.VIEW" /> | ||
<action android:name="android.intent.action.APPLICATION_PREFERENCES" /> | ||
</intent-filter> | ||
</activity> | ||
|
||
</application> | ||
|
||
</manifest> |
28 changes: 28 additions & 0 deletions
28
CT3/src/main/java/me/s1204/benesse/touch/support/DchaStateChanger.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package me.s1204.benesse.touch.support; | ||
|
||
import android.app.Activity; | ||
import android.content.Intent; | ||
import android.net.Uri; | ||
import android.os.BenesseExtension; | ||
import android.os.Bundle; | ||
import android.provider.Settings; | ||
|
||
public class DchaStateChanger extends Activity { | ||
private void setDchaState(int value) { | ||
Settings.System.putInt(getContentResolver(), "dcha_state", value); | ||
} | ||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
finishAndRemoveTask(); | ||
if (Settings.System.canWrite(this)) { | ||
if (BenesseExtension.getDchaState() == 3) { | ||
setDchaState(0); | ||
} else { | ||
setDchaState(3); | ||
} | ||
} else { | ||
startActivity(new Intent(Settings.ACTION_MANAGE_WRITE_SETTINGS, Uri.parse("package:" + getPackageName())).setFlags(Intent.FLAG_ACTIVITY_NEW_TASK)); | ||
} | ||
} | ||
} |
38 changes: 38 additions & 0 deletions
38
CT3/src/main/java/me/s1204/benesse/touch/support/DevelopmentOptions.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package me.s1204.benesse.touch.support; | ||
|
||
import android.app.Activity; | ||
import android.content.Intent; | ||
import android.net.Uri; | ||
import android.os.Build; | ||
import android.os.Bundle; | ||
import android.os.Handler; | ||
import android.os.Looper; | ||
import android.provider.Settings; | ||
|
||
public class DevelopmentOptions extends Activity { | ||
private boolean getEnabled(String variable) throws Settings.SettingNotFoundException { | ||
return Settings.Global.getInt(getContentResolver(), variable) == 1; | ||
} | ||
private void setDchaState(int value) { | ||
Settings.System.putInt(getContentResolver(), "dcha_state", value); | ||
} | ||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
Intent intent; | ||
finishAndRemoveTask(); | ||
if (Settings.System.canWrite(this)) { | ||
setDchaState(3); | ||
intent = new Intent(Settings.ACTION_APPLICATION_DEVELOPMENT_SETTINGS); | ||
try { | ||
if (getEnabled(Settings.Global.ADB_ENABLED) && getEnabled(Settings.Global.DEVELOPMENT_SETTINGS_ENABLED)) { | ||
new Handler(Looper.getMainLooper()).postDelayed(() -> setDchaState(0), 1000); | ||
} | ||
} catch (Settings.SettingNotFoundException ignored) { | ||
} | ||
} else { | ||
intent = new Intent(Settings.ACTION_MANAGE_WRITE_SETTINGS, Uri.parse("package:" + getPackageName())).setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); | ||
} | ||
startActivity(intent); | ||
} | ||
} |
Binary file added
BIN
+425 Bytes
CT3/src/main/res/drawable-mdpi-v4/ic_settings_development_alpha.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
plugins { | ||
id 'com.android.application' | ||
} | ||
|
||
android { | ||
namespace 'me.s1204.benesse.touch.support' | ||
compileSdk 34 | ||
|
||
defaultConfig { | ||
minSdk 28 | ||
//noinspection ExpiredTargetSdkVersion | ||
targetSdk 28 | ||
versionCode 1 | ||
versionName "1.0.0" | ||
proguardFiles += '../app/proguard-rules.pro' | ||
} | ||
|
||
signingConfigs { | ||
android { | ||
storeFile file('../app/android.jks') | ||
storePassword 'android' | ||
keyAlias 'android' | ||
keyPassword 'android' | ||
} | ||
} | ||
|
||
buildTypes { | ||
debug { | ||
signingConfig signingConfigs.android | ||
minifyEnabled false | ||
} | ||
release { | ||
minifyEnabled true | ||
shrinkResources true | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
compileOnly files('../app/libs/BenesseExtension.jar') | ||
implementation files('../app/libs/DchaService.jar') | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:tools="http://schemas.android.com/tools"> | ||
|
||
<application | ||
android:icon="@drawable/ic_settings_development_alpha" | ||
android:label="開発者向けオプション" | ||
android:theme="@android:style/Theme.NoDisplay"> | ||
|
||
<activity | ||
android:name=".DevelopmentOptions" | ||
android:clearTaskOnLaunch="true" | ||
android:excludeFromRecents="true" | ||
android:exported="true" | ||
android:launchMode="singleInstance"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
|
||
<activity | ||
android:name=".DchaStateChanger" | ||
android:exported="true" | ||
android:launchMode="singleInstance" | ||
android:noHistory="true"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.VIEW" /> | ||
<action android:name="android.intent.action.APPLICATION_PREFERENCES" /> | ||
</intent-filter> | ||
</activity> | ||
|
||
</application> | ||
|
||
</manifest> |
18 changes: 18 additions & 0 deletions
18
CTX/src/main/java/me/s1204/benesse/touch/support/DchaStateChanger.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package me.s1204.benesse.touch.support; | ||
|
||
import android.app.Activity; | ||
import android.os.BenesseExtension; | ||
import android.os.Bundle; | ||
|
||
public class DchaStateChanger extends Activity { | ||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
finishAndRemoveTask(); | ||
if (BenesseExtension.getDchaState() == 3) { | ||
BenesseExtension.setDchaState(0); | ||
} else { | ||
BenesseExtension.setDchaState(3); | ||
} | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
CTX/src/main/java/me/s1204/benesse/touch/support/DevelopmentOptions.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package me.s1204.benesse.touch.support; | ||
|
||
import android.app.Activity; | ||
import android.content.Intent; | ||
import android.os.BenesseExtension; | ||
import android.os.Bundle; | ||
import android.os.Handler; | ||
import android.os.Looper; | ||
import android.provider.Settings; | ||
|
||
public class DevelopmentOptions extends Activity { | ||
private boolean getEnabled(String variable) throws Settings.SettingNotFoundException { | ||
return Settings.Global.getInt(getContentResolver(), variable) == 1; | ||
} | ||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
BenesseExtension.setDchaState(3); | ||
finishAndRemoveTask(); | ||
startActivity(new Intent(Settings.ACTION_APPLICATION_DEVELOPMENT_SETTINGS)); | ||
try { | ||
if (getEnabled(Settings.Global.ADB_ENABLED) && getEnabled(Settings.Global.DEVELOPMENT_SETTINGS_ENABLED)) { | ||
new Handler(Looper.getMainLooper()).postDelayed(() -> BenesseExtension.setDchaState(0), 1000); | ||
} | ||
} catch (Settings.SettingNotFoundException ignored) { | ||
} | ||
} | ||
} |
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
-keep class jp.co.benesse.dcha.dchaservice.IDchaService | ||
-keep class jp.co.benesse.touch.setuplogin.** | ||
-keep class jp.co.benesse.dcha.dchaservice.IDchaService |
Oops, something went wrong.