From 6802c0ea8530d7bfc129fa47a0b104aa6700ff28 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Thu, 8 Aug 2019 18:39:56 +0200 Subject: [PATCH] fix activities --- .../nightscout/androidaps/MainActivity.java | 26 +++++++++---------- .../activities/NoSplashAppCompatActivity.kt | 12 +++++++++ .../RequestDexcomPermissionActivity.kt | 4 +-- .../activities/SingleFragmentActivity.java | 4 +-- .../activities/QuickWizardListActivity.java | 17 ++++++------ .../dialogs/BolusProgressHelperActivity.java | 17 +++++------- .../overview/dialogs/ErrorHelperActivity.kt | 8 +++--- .../dialog/RileyLinkBLEScanActivity.java | 5 ++-- .../dialog/RileyLinkStatusActivity.java | 6 ++--- .../danaRS/activities/BLEScanActivity.java | 6 ++--- .../activities/PairingHelperActivity.java | 7 ++--- .../activities/InsightAlertActivity.java | 9 ++++--- .../activities/InsightPairingActivity.java | 15 ++++++----- .../InsightPairingInformationActivity.java | 9 ++++--- .../EventMedtronicDeviceStatusChange.kt | 10 +------ .../androidaps/setupwizard/SWDefinition.java | 1 - .../setupwizard/SetupWizardActivity.java | 16 ++++++------ app/src/main/res/values/styles.xml | 2 +- 18 files changed, 89 insertions(+), 85 deletions(-) create mode 100644 app/src/main/java/info/nightscout/androidaps/activities/NoSplashAppCompatActivity.kt diff --git a/app/src/main/java/info/nightscout/androidaps/MainActivity.java b/app/src/main/java/info/nightscout/androidaps/MainActivity.java index 2c8a56bdd7..47cf8ba1ae 100644 --- a/app/src/main/java/info/nightscout/androidaps/MainActivity.java +++ b/app/src/main/java/info/nightscout/androidaps/MainActivity.java @@ -7,16 +7,6 @@ import android.graphics.Rect; import android.os.Bundle; import android.os.PersistableBundle; import android.os.PowerManager; -import androidx.annotation.Nullable; -import com.google.android.material.navigation.NavigationView; -import com.google.android.material.tabs.TabLayout; -import androidx.core.app.ActivityCompat; -import androidx.viewpager.widget.ViewPager; -import androidx.drawerlayout.widget.DrawerLayout; -import androidx.appcompat.app.ActionBarDrawerToggle; -import androidx.appcompat.app.AlertDialog; -import androidx.appcompat.app.AppCompatActivity; -import androidx.appcompat.widget.Toolbar; import android.text.SpannableString; import android.text.method.LinkMovementMethod; import android.text.util.Linkify; @@ -31,6 +21,16 @@ import android.widget.EditText; import android.widget.LinearLayout; import android.widget.TextView; +import androidx.annotation.Nullable; +import androidx.appcompat.app.ActionBarDrawerToggle; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.widget.Toolbar; +import androidx.core.app.ActivityCompat; +import androidx.drawerlayout.widget.DrawerLayout; +import androidx.viewpager.widget.ViewPager; + +import com.google.android.material.navigation.NavigationView; +import com.google.android.material.tabs.TabLayout; import com.joanzapata.iconify.Iconify; import com.joanzapata.iconify.fonts.FontAwesomeModule; import com.squareup.otto.Subscribe; @@ -40,6 +40,7 @@ import org.slf4j.LoggerFactory; import info.nightscout.androidaps.activities.AgreementActivity; import info.nightscout.androidaps.activities.HistoryBrowseActivity; +import info.nightscout.androidaps.activities.NoSplashAppCompatActivity; import info.nightscout.androidaps.activities.PreferencesActivity; import info.nightscout.androidaps.activities.SingleFragmentActivity; import info.nightscout.androidaps.data.Profile; @@ -63,7 +64,7 @@ import info.nightscout.androidaps.utils.OKDialog; import info.nightscout.androidaps.utils.PasswordProtection; import info.nightscout.androidaps.utils.SP; -public class MainActivity extends AppCompatActivity { +public class MainActivity extends NoSplashAppCompatActivity { private static Logger log = LoggerFactory.getLogger(L.CORE); protected PowerManager.WakeLock mWakeLock; @@ -73,8 +74,7 @@ public class MainActivity extends AppCompatActivity { private MenuItem pluginPreferencesMenuItem; @Override - protected void onCreate(Bundle savedInstanceState) { - setTheme(R.style.AppTheme_NoActionBar); + public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (L.isEnabled(L.CORE)) diff --git a/app/src/main/java/info/nightscout/androidaps/activities/NoSplashAppCompatActivity.kt b/app/src/main/java/info/nightscout/androidaps/activities/NoSplashAppCompatActivity.kt new file mode 100644 index 0000000000..e4c8027cd5 --- /dev/null +++ b/app/src/main/java/info/nightscout/androidaps/activities/NoSplashAppCompatActivity.kt @@ -0,0 +1,12 @@ +package info.nightscout.androidaps.activities + +import android.os.Bundle +import androidx.appcompat.app.AppCompatActivity +import info.nightscout.androidaps.R + +open class NoSplashAppCompatActivity : AppCompatActivity() { + public override fun onCreate(savedInstanceState: Bundle?) { + setTheme(R.style.AppTheme_NoActionBar) + super.onCreate(savedInstanceState) + } +} diff --git a/app/src/main/java/info/nightscout/androidaps/activities/RequestDexcomPermissionActivity.kt b/app/src/main/java/info/nightscout/androidaps/activities/RequestDexcomPermissionActivity.kt index af370ff021..96a399a299 100644 --- a/app/src/main/java/info/nightscout/androidaps/activities/RequestDexcomPermissionActivity.kt +++ b/app/src/main/java/info/nightscout/androidaps/activities/RequestDexcomPermissionActivity.kt @@ -1,11 +1,9 @@ package info.nightscout.androidaps.activities -import android.os.Build import android.os.Bundle -import androidx.appcompat.app.AppCompatActivity import info.nightscout.androidaps.plugins.source.SourceDexcomPlugin -class RequestDexcomPermissionActivity : AppCompatActivity() { +class RequestDexcomPermissionActivity : NoSplashAppCompatActivity() { private val requestCode = "AndroidAPS <3".map { it.toInt() }.sum() diff --git a/app/src/main/java/info/nightscout/androidaps/activities/SingleFragmentActivity.java b/app/src/main/java/info/nightscout/androidaps/activities/SingleFragmentActivity.java index 2c899784bd..b0fe66e0a2 100644 --- a/app/src/main/java/info/nightscout/androidaps/activities/SingleFragmentActivity.java +++ b/app/src/main/java/info/nightscout/androidaps/activities/SingleFragmentActivity.java @@ -13,12 +13,12 @@ import info.nightscout.androidaps.R; import info.nightscout.androidaps.interfaces.PluginBase; import info.nightscout.androidaps.utils.PasswordProtection; -public class SingleFragmentActivity extends AppCompatActivity { +public class SingleFragmentActivity extends NoSplashAppCompatActivity { private PluginBase plugin; @Override - protected void onCreate(@Nullable Bundle savedInstanceState) { + public void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_single_fragment); diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/activities/QuickWizardListActivity.java b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/activities/QuickWizardListActivity.java index 85adbf7e80..bbcda2c083 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/activities/QuickWizardListActivity.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/activities/QuickWizardListActivity.java @@ -2,29 +2,30 @@ package info.nightscout.androidaps.plugins.general.overview.activities; import android.app.Activity; import android.os.Bundle; -import androidx.fragment.app.FragmentManager; -import androidx.appcompat.app.AppCompatActivity; -import androidx.cardview.widget.CardView; -import androidx.recyclerview.widget.LinearLayoutManager; -import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button; import android.widget.TextView; +import androidx.cardview.widget.CardView; +import androidx.fragment.app.FragmentManager; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; + import com.squareup.otto.Subscribe; import info.nightscout.androidaps.MainApp; import info.nightscout.androidaps.R; +import info.nightscout.androidaps.activities.NoSplashAppCompatActivity; import info.nightscout.androidaps.data.QuickWizard; -import info.nightscout.androidaps.plugins.general.overview.dialogs.EditQuickWizardDialog; import info.nightscout.androidaps.plugins.general.overview.OverviewPlugin; +import info.nightscout.androidaps.plugins.general.overview.dialogs.EditQuickWizardDialog; import info.nightscout.androidaps.plugins.general.overview.events.EventQuickWizardChange; import info.nightscout.androidaps.utils.DateUtil; import info.nightscout.androidaps.utils.DecimalFormatter; -public class QuickWizardListActivity extends AppCompatActivity implements View.OnClickListener { +public class QuickWizardListActivity extends NoSplashAppCompatActivity implements View.OnClickListener { RecyclerView recyclerView; LinearLayoutManager llm; @@ -113,7 +114,7 @@ public class QuickWizardListActivity extends AppCompatActivity implements View.O @Override - protected void onCreate(Bundle savedInstanceState) { + public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.overview_quickwizardlist_activity); diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/dialogs/BolusProgressHelperActivity.java b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/dialogs/BolusProgressHelperActivity.java index a18f9bbb18..54f6aa7688 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/dialogs/BolusProgressHelperActivity.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/dialogs/BolusProgressHelperActivity.java @@ -1,23 +1,20 @@ package info.nightscout.androidaps.plugins.general.overview.dialogs; import android.os.Bundle; -import androidx.appcompat.app.AppCompatActivity; -/** - * Created by adrian on 09/02/17. - */ +import info.nightscout.androidaps.activities.NoSplashAppCompatActivity; -public class BolusProgressHelperActivity extends AppCompatActivity { +public class BolusProgressHelperActivity extends NoSplashAppCompatActivity { public BolusProgressHelperActivity() { super(); } @Override public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - BolusProgressDialog bolusProgressDialog = new BolusProgressDialog(); - bolusProgressDialog.setHelperActivity(this); - bolusProgressDialog.setInsulin(getIntent().getDoubleExtra("insulin", 0d)); - bolusProgressDialog.show(getSupportFragmentManager(), "BolusProgress"); + super.onCreate(savedInstanceState); + BolusProgressDialog bolusProgressDialog = new BolusProgressDialog(); + bolusProgressDialog.setHelperActivity(this); + bolusProgressDialog.setInsulin(getIntent().getDoubleExtra("insulin", 0d)); + bolusProgressDialog.show(getSupportFragmentManager(), "BolusProgress"); } } diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/dialogs/ErrorHelperActivity.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/dialogs/ErrorHelperActivity.kt index 8e4c7f1b57..15840d3499 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/dialogs/ErrorHelperActivity.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/dialogs/ErrorHelperActivity.kt @@ -1,15 +1,15 @@ package info.nightscout.androidaps.plugins.general.overview.dialogs import android.os.Bundle -import androidx.appcompat.app.AppCompatActivity - import info.nightscout.androidaps.R +import info.nightscout.androidaps.activities.NoSplashAppCompatActivity import info.nightscout.androidaps.plugins.general.nsclient.NSUpload import info.nightscout.androidaps.utils.SP -class ErrorHelperActivity : AppCompatActivity() { +class ErrorHelperActivity : NoSplashAppCompatActivity() { - public override fun onCreate(savedInstanceState: Bundle?) { + @Override + override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) val errorDialog = ErrorDialog() errorDialog.helperActivity = this diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/common/dialog/RileyLinkBLEScanActivity.java b/app/src/main/java/info/nightscout/androidaps/plugins/pump/common/dialog/RileyLinkBLEScanActivity.java index dbe401601c..ae0a0d34f7 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/common/dialog/RileyLinkBLEScanActivity.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/common/dialog/RileyLinkBLEScanActivity.java @@ -42,6 +42,7 @@ import java.util.Map; import info.nightscout.androidaps.MainApp; import info.nightscout.androidaps.R; +import info.nightscout.androidaps.activities.NoSplashAppCompatActivity; import info.nightscout.androidaps.plugins.bus.RxBus; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkConst; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkUtil; @@ -53,7 +54,7 @@ import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil; import info.nightscout.androidaps.utils.SP; // IMPORTANT: This activity needs to be called from RileyLinkSelectPreference (see pref_medtronic.xml as example) -public class RileyLinkBLEScanActivity extends AppCompatActivity { +public class RileyLinkBLEScanActivity extends NoSplashAppCompatActivity { private static final Logger LOG = LoggerFactory.getLogger(RileyLinkBLEScanActivity.class); @@ -80,7 +81,7 @@ public class RileyLinkBLEScanActivity extends AppCompatActivity { @Override - protected void onCreate(Bundle savedInstanceState) { + public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.rileylink_scan_activity); diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/dialog/RileyLinkStatusActivity.java b/app/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/dialog/RileyLinkStatusActivity.java index a1c4832617..37a6656a6e 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/dialog/RileyLinkStatusActivity.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/common/hw/rileylink/dialog/RileyLinkStatusActivity.java @@ -3,7 +3,6 @@ package info.nightscout.androidaps.plugins.pump.common.hw.rileylink.dialog; import android.os.Bundle; import android.widget.TextView; -import androidx.appcompat.app.AppCompatActivity; import androidx.fragment.app.Fragment; import androidx.fragment.app.FragmentManager; import androidx.fragment.app.FragmentPagerAdapter; @@ -17,11 +16,12 @@ import java.util.List; import info.nightscout.androidaps.MainApp; import info.nightscout.androidaps.R; +import info.nightscout.androidaps.activities.NoSplashAppCompatActivity; import info.nightscout.androidaps.plugins.pump.common.dialog.RefreshableInterface; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkUtil; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.RileyLinkServiceData; -public class RileyLinkStatusActivity extends AppCompatActivity { +public class RileyLinkStatusActivity extends NoSplashAppCompatActivity { TextView connectionStatus; TextView configuredAddress; @@ -39,7 +39,7 @@ public class RileyLinkStatusActivity extends AppCompatActivity { @Override - protected void onCreate(Bundle savedInstanceState) { + public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.rileylink_status); diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/activities/BLEScanActivity.java b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/activities/BLEScanActivity.java index d26fb3a917..7262153d5c 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/activities/BLEScanActivity.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/activities/BLEScanActivity.java @@ -7,7 +7,6 @@ import android.bluetooth.le.ScanCallback; import android.bluetooth.le.ScanResult; import android.os.Bundle; import android.os.Handler; -import androidx.appcompat.app.AppCompatActivity; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; @@ -20,10 +19,11 @@ import java.util.regex.Pattern; import info.nightscout.androidaps.MainApp; import info.nightscout.androidaps.R; +import info.nightscout.androidaps.activities.NoSplashAppCompatActivity; import info.nightscout.androidaps.plugins.pump.danaRS.events.EventDanaRSDeviceChange; import info.nightscout.androidaps.utils.SP; -public class BLEScanActivity extends AppCompatActivity { +public class BLEScanActivity extends NoSplashAppCompatActivity { private ListView listView = null; private ListAdapter mListAdapter = null; private ArrayList mDevices = new ArrayList<>(); @@ -33,7 +33,7 @@ public class BLEScanActivity extends AppCompatActivity { @Override - protected void onCreate(Bundle savedInstanceState) { + public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.danars_blescanner_activity); diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/activities/PairingHelperActivity.java b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/activities/PairingHelperActivity.java index 6282ff8d0f..5be6d7fbd1 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/activities/PairingHelperActivity.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/activities/PairingHelperActivity.java @@ -1,12 +1,13 @@ package info.nightscout.androidaps.plugins.pump.danaRS.activities; -import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; -public class PairingHelperActivity extends AppCompatActivity { +import info.nightscout.androidaps.activities.NoSplashAppCompatActivity; + +public class PairingHelperActivity extends NoSplashAppCompatActivity { @Override - protected void onCreate(Bundle savedInstanceState) { + public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); PairingProgressDialog bolusProgressDialog = new PairingProgressDialog(); bolusProgressDialog.setHelperActivity(this); diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/insight/activities/InsightAlertActivity.java b/app/src/main/java/info/nightscout/androidaps/plugins/pump/insight/activities/InsightAlertActivity.java index b255be2dd6..77be3ab03a 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/insight/activities/InsightAlertActivity.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/insight/activities/InsightAlertActivity.java @@ -5,8 +5,6 @@ import android.content.Intent; import android.content.ServiceConnection; import android.os.Bundle; import android.os.IBinder; -import androidx.core.content.ContextCompat; -import androidx.appcompat.app.AppCompatActivity; import android.text.Html; import android.view.View; import android.view.WindowManager; @@ -14,14 +12,17 @@ import android.widget.Button; import android.widget.ImageView; import android.widget.TextView; +import androidx.core.content.ContextCompat; + import java.text.DecimalFormat; import info.nightscout.androidaps.R; +import info.nightscout.androidaps.activities.NoSplashAppCompatActivity; import info.nightscout.androidaps.plugins.pump.insight.InsightAlertService; import info.nightscout.androidaps.plugins.pump.insight.descriptors.Alert; import info.nightscout.androidaps.plugins.pump.insight.descriptors.AlertStatus; -public class InsightAlertActivity extends AppCompatActivity { +public class InsightAlertActivity extends NoSplashAppCompatActivity { private Alert alert; private InsightAlertService alertService; @@ -50,7 +51,7 @@ public class InsightAlertActivity extends AppCompatActivity { }; @Override - protected void onCreate(Bundle savedInstanceState) { + public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_insight_alert); diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/insight/activities/InsightPairingActivity.java b/app/src/main/java/info/nightscout/androidaps/plugins/pump/insight/activities/InsightPairingActivity.java index 535d3d8bdb..71450aaa0c 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/insight/activities/InsightPairingActivity.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/insight/activities/InsightPairingActivity.java @@ -10,11 +10,6 @@ import android.content.IntentFilter; import android.content.ServiceConnection; import android.os.Bundle; import android.os.IBinder; -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; -import androidx.appcompat.app.AppCompatActivity; -import androidx.recyclerview.widget.LinearLayoutManager; -import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -22,15 +17,21 @@ import android.widget.Button; import android.widget.LinearLayout; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; + import java.util.ArrayList; import java.util.List; import info.nightscout.androidaps.R; +import info.nightscout.androidaps.activities.NoSplashAppCompatActivity; import info.nightscout.androidaps.plugins.pump.insight.connection_service.InsightConnectionService; import info.nightscout.androidaps.plugins.pump.insight.descriptors.InsightState; import info.nightscout.androidaps.plugins.pump.insight.utils.ExceptionTranslator; -public class InsightPairingActivity extends AppCompatActivity implements InsightConnectionService.StateCallback, View.OnClickListener, InsightConnectionService.ExceptionCallback { +public class InsightPairingActivity extends NoSplashAppCompatActivity implements InsightConnectionService.StateCallback, View.OnClickListener, InsightConnectionService.ExceptionCallback { private boolean scanning; private LinearLayout deviceSearchSection; @@ -66,7 +67,7 @@ public class InsightPairingActivity extends AppCompatActivity implements Insight }; @Override - protected void onCreate(@Nullable Bundle savedInstanceState) { + public void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_insight_pairing); diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/insight/activities/InsightPairingInformationActivity.java b/app/src/main/java/info/nightscout/androidaps/plugins/pump/insight/activities/InsightPairingInformationActivity.java index 9e6ee03d77..e20fb2c94f 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/insight/activities/InsightPairingInformationActivity.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/insight/activities/InsightPairingInformationActivity.java @@ -5,15 +5,16 @@ import android.content.Intent; import android.content.ServiceConnection; import android.os.Bundle; import android.os.IBinder; -import androidx.annotation.Nullable; -import androidx.appcompat.app.AppCompatActivity; import android.view.View; import android.widget.TextView; +import androidx.annotation.Nullable; + import info.nightscout.androidaps.R; +import info.nightscout.androidaps.activities.NoSplashAppCompatActivity; import info.nightscout.androidaps.plugins.pump.insight.connection_service.InsightConnectionService; -public class InsightPairingInformationActivity extends AppCompatActivity { +public class InsightPairingInformationActivity extends NoSplashAppCompatActivity { private InsightConnectionService connectionService; @@ -57,7 +58,7 @@ public class InsightPairingInformationActivity extends AppCompatActivity { }; @Override - protected void onCreate(@Nullable Bundle savedInstanceState) { + public void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_insight_pairing_information); serialNumber = findViewById(R.id.serial_number); diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/events/EventMedtronicDeviceStatusChange.kt b/app/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/events/EventMedtronicDeviceStatusChange.kt index 79c69f86c0..2e4eedfa14 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/events/EventMedtronicDeviceStatusChange.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/medtronic/events/EventMedtronicDeviceStatusChange.kt @@ -14,25 +14,17 @@ class EventMedtronicDeviceStatusChange : Event { private var errorDescription: String? = null - constructor(rileyLinkServiceState: RileyLinkServiceState, rileyLinkError: RileyLinkError) { + constructor(rileyLinkServiceState: RileyLinkServiceState, rileyLinkError: RileyLinkError?) { this.rileyLinkServiceState = rileyLinkServiceState this.rileyLinkError = rileyLinkError } - constructor(pumpDeviceState: PumpDeviceState) { this.pumpDeviceState = pumpDeviceState } - constructor(pumpDeviceState: PumpDeviceState, errorDescription: String) { this.pumpDeviceState = pumpDeviceState this.errorDescription = errorDescription } - - - override fun toString(): String { - return ("EventMedtronicDeviceStatusChange [" + "rileyLinkServiceState=" + rileyLinkServiceState - + ", rileyLinkError=" + rileyLinkError + ", pumpDeviceState=" + pumpDeviceState + ']'.toString()) - } } diff --git a/app/src/main/java/info/nightscout/androidaps/setupwizard/SWDefinition.java b/app/src/main/java/info/nightscout/androidaps/setupwizard/SWDefinition.java index a66a2dc11c..46f7fcf185 100644 --- a/app/src/main/java/info/nightscout/androidaps/setupwizard/SWDefinition.java +++ b/app/src/main/java/info/nightscout/androidaps/setupwizard/SWDefinition.java @@ -19,7 +19,6 @@ import info.nightscout.androidaps.events.EventPumpStatusChanged; import info.nightscout.androidaps.interfaces.PluginBase; import info.nightscout.androidaps.interfaces.PluginType; import info.nightscout.androidaps.plugins.aps.loop.LoopPlugin; -import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderFragment; import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin; import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions; import info.nightscout.androidaps.plugins.constraints.objectives.ObjectivesFragment; diff --git a/app/src/main/java/info/nightscout/androidaps/setupwizard/SetupWizardActivity.java b/app/src/main/java/info/nightscout/androidaps/setupwizard/SetupWizardActivity.java index 3e2c638363..3064228fd3 100644 --- a/app/src/main/java/info/nightscout/androidaps/setupwizard/SetupWizardActivity.java +++ b/app/src/main/java/info/nightscout/androidaps/setupwizard/SetupWizardActivity.java @@ -3,16 +3,15 @@ package info.nightscout.androidaps.setupwizard; import android.content.Intent; import android.content.pm.PackageManager; import android.os.Bundle; - -import androidx.annotation.Nullable; -import androidx.core.app.ActivityCompat; -import androidx.appcompat.app.AlertDialog; -import androidx.appcompat.app.AppCompatActivity; import android.view.View; import android.widget.LinearLayout; import android.widget.ScrollView; import android.widget.TextView; +import androidx.annotation.Nullable; +import androidx.appcompat.app.AlertDialog; +import androidx.core.app.ActivityCompat; + import com.squareup.otto.Subscribe; import org.slf4j.Logger; @@ -23,8 +22,9 @@ import java.util.List; import info.nightscout.androidaps.MainActivity; import info.nightscout.androidaps.MainApp; import info.nightscout.androidaps.R; -import info.nightscout.androidaps.events.EventProfileStoreChanged; +import info.nightscout.androidaps.activities.NoSplashAppCompatActivity; import info.nightscout.androidaps.events.EventProfileNeedsUpdate; +import info.nightscout.androidaps.events.EventProfileStoreChanged; import info.nightscout.androidaps.events.EventPumpStatusChanged; import info.nightscout.androidaps.plugins.constraints.objectives.events.EventObjectivesSaved; import info.nightscout.androidaps.plugins.general.nsclient.events.EventNSClientStatus; @@ -35,7 +35,7 @@ import info.nightscout.androidaps.utils.LocaleHelper; import info.nightscout.androidaps.utils.OKDialog; import info.nightscout.androidaps.utils.SP; -public class SetupWizardActivity extends AppCompatActivity { +public class SetupWizardActivity extends NoSplashAppCompatActivity { //logging private static Logger log = LoggerFactory.getLogger(SetupWizardActivity.class); @@ -47,7 +47,7 @@ public class SetupWizardActivity extends AppCompatActivity { public static final String INTENT_MESSAGE = "WIZZARDPAGE"; @Override - protected void onCreate(Bundle savedInstanceState) { + public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); LocaleHelper.onCreate(this, "en"); setContentView(R.layout.activity_setupwizard); diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index a103f54149..f55937faab 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -1,7 +1,7 @@ -