Skip to content

Commit

Permalink
v3.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
s1204IT committed Nov 11, 2024
1 parent 6a7e98b commit 1aa618f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ android {
minSdk 24
//noinspection ExpiredTargetSdkVersion,EditedTargetSdkVersion
targetSdk 24
versionCode 5
versionName "3.0"
versionCode 6
versionName "3.0.1"
proguardFiles += 'proguard-rules.pro'
multiDexEnabled false
}
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/java/me/s1204/benesse/dcha/e/BackNova.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public void onServiceDisconnected(ComponentName componentName) {
}
}, Context.BIND_AUTO_CREATE)) {
makeText(this, R.string.fail_util_connect);
finish();
return;
}

Expand All @@ -61,6 +62,7 @@ public void onServiceDisconnected(ComponentName componentName) {
}
}, Context.BIND_AUTO_CREATE)) {
makeText(this, R.string.fail_dcha_connect);
finish();
return;
}

Expand All @@ -73,6 +75,7 @@ public void onServiceDisconnected(ComponentName componentName) {
e.printStackTrace();
makeText(this, R.string.fail_nova);
}
finish();
}

}
5 changes: 4 additions & 1 deletion app/src/main/java/me/s1204/benesse/dcha/e/InitDcha.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

public class InitDcha extends Activity {
protected static final String ACCESS_SYSTEM = "jp.co.benesse.dcha.permission.ACCESS_SYSTEM";
protected static final String DCHA_PFX = "jp.co.benesse.dcha.";
protected static final String DCHA_PFX = "jp.co.benesse.dcha";
protected static final String DCHA_PKG = DCHA_PFX + ".dchaservice";
protected static final String DCHA_SRV = DCHA_PKG + ".DchaService";
protected static final String UTIL_PKG = DCHA_PFX + ".dchautilservice";
Expand Down Expand Up @@ -56,6 +56,7 @@ public void onServiceDisconnected(ComponentName componentName) {
}
}, Context.BIND_AUTO_CREATE)) {
makeText(this, R.string.fail_util_connect);
finish();
return;
}

Expand All @@ -79,6 +80,7 @@ public void onServiceDisconnected(ComponentName componentName) {
}
}, Context.BIND_AUTO_CREATE)) {
makeText(this, R.string.fail_dcha_connect);
finish();
return;
}

Expand All @@ -91,6 +93,7 @@ public void onServiceDisconnected(ComponentName componentName) {
e.printStackTrace();
makeText(this, R.string.fail_dcha);
}
finish();
}

protected static boolean checkPermission(Context context) {
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/java/me/s1204/benesse/dcha/e/Reboot.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import static me.s1204.benesse.dcha.e.InitDcha.*;

public class Reboot extends Activity {
IDchaService mDchaService;

@Override
public void onCreate(Bundle savedInstanceState) {
Expand All @@ -26,12 +25,12 @@ public void onCreate(Bundle savedInstanceState) {
public void onServiceConnected(ComponentName componentName, IBinder iBinder) {
mDchaService = IDchaService.Stub.asInterface(iBinder);
makeText(getApplicationContext(), R.string.reboot_message);
startActivity(new Intent(Intent.ACTION_MAIN).setClassName(getPackageName(), getPackageName() + BACK_NOVA));
try {
mDchaService.rebootPad(0, null);
} catch (RemoteException ignored) {
}
unbindService(this);
startActivity(new Intent(Intent.ACTION_MAIN).setClassName(getPackageName(), getPackageName() + BACK_NOVA));
}
@Override
public void onServiceDisconnected(ComponentName componentName) {
Expand Down

0 comments on commit 1aa618f

Please sign in to comment.