Commit 4cd39185 authored by Nastuzzi Samy's avatar Nastuzzi Samy
Browse files

Bug fix

Check update bug fixed
Add abstract arg to InternetActivity
parent 3c9df5ca
......@@ -4,7 +4,7 @@ android {
compileSdkVersion 26
buildToolsVersion '26.0.2'
defaultConfig {
applicationId "fr.utc.simde.payutc"
applicationId "fr.utc.simde.jessy"
minSdkVersion 21
targetSdkVersion 26
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
......
......@@ -593,6 +593,8 @@ public abstract class BaseActivity extends InternetActivity {
runOnUiThread(new Runnable() {
@Override
public void run() {
dialog.stopLoading();
final AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(BaseActivity.this);
alertDialogBuilder
.setTitle(R.string.update)
......@@ -614,6 +616,13 @@ public abstract class BaseActivity extends InternetActivity {
}
else if (popupIfNot)
throw new Exception(getString(R.string.no_update));
else
runOnUiThread(new Runnable() {
@Override
public void run() {
dialog.stopLoading();
}
});
}
else
throw new Exception(getString(R.string.can_not_detect_update));
......
......@@ -14,7 +14,7 @@ import android.widget.Toast;
* Created by Samy on 16/11/2017.
*/
public class InternetActivity extends NFCActivity {
public abstract class InternetActivity extends NFCActivity {
private AlertDialog.Builder internetAlertDialog;
BroadcastReceiver broadcastReceiver = new BroadcastReceiver() {
......
......@@ -53,13 +53,7 @@ public class MainActivity extends BaseActivity {
ginger = new Ginger(MainActivity.this);
casConnexion = new CASConnexion(nemopaySession);
config = new Config(sharedPreferences);
/*
if (this.internetBroadcast != null)
unregisterReceiver(this.internetBroadcast);
this.internetBroadcast = new InternetBroadcast();
registerReceiver(this.internetBroadcast, new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION));
*/
String key = sharedPreferences.getString("key", "");
if (!key.equals(""))
setNemopayKey(key);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment