Fix password reset feature
This commit is contained in:
parent
9edb83f656
commit
cd7832a6e1
|
@ -151,10 +151,6 @@ class MainActivity : DaggerAppCompatActivityWithResult() {
|
||||||
.toObservable(EventPreferenceChange::class.java)
|
.toObservable(EventPreferenceChange::class.java)
|
||||||
.observeOn(aapsSchedulers.main)
|
.observeOn(aapsSchedulers.main)
|
||||||
.subscribe({ processPreferenceChange(it) }, fabricPrivacy::logException)
|
.subscribe({ processPreferenceChange(it) }, fabricPrivacy::logException)
|
||||||
disposable += rxBus
|
|
||||||
.toObservable(EventInitializationChanged::class.java)
|
|
||||||
.observeOn(aapsSchedulers.main)
|
|
||||||
.subscribe({ passwordResetCheck(this) }, fabricPrivacy::logException)
|
|
||||||
if (startWizard() && !isRunningRealPumpTest()) {
|
if (startWizard() && !isRunningRealPumpTest()) {
|
||||||
protectionCheck.queryProtection(this, ProtectionCheck.Protection.PREFERENCES, {
|
protectionCheck.queryProtection(this, ProtectionCheck.Protection.PREFERENCES, {
|
||||||
startActivity(Intent(this, SetupWizardActivity::class.java))
|
startActivity(Intent(this, SetupWizardActivity::class.java))
|
||||||
|
@ -168,6 +164,7 @@ class MainActivity : DaggerAppCompatActivityWithResult() {
|
||||||
androidPermission.notifyForSystemWindowPermissions(this)
|
androidPermission.notifyForSystemWindowPermissions(this)
|
||||||
androidPermission.notifyForBtConnectPermission(this)
|
androidPermission.notifyForBtConnectPermission(this)
|
||||||
}
|
}
|
||||||
|
passwordResetCheck(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun checkPluginPreferences(viewPager: ViewPager2) {
|
private fun checkPluginPreferences(viewPager: ViewPager2) {
|
||||||
|
|
|
@ -120,6 +120,7 @@ public abstract class AbstractDanaRPlugin extends PumpPluginBase implements Pump
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
danaPump.setSerialNumber(sp.getString(info.nightscout.pump.dana.R.string.key_danar_bt_name, "")); // fill at start to allow password reset
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override protected void onStop() {
|
@Override protected void onStop() {
|
||||||
|
|
|
@ -154,6 +154,7 @@ class DanaRSPlugin @Inject constructor(
|
||||||
fun changePump() {
|
fun changePump() {
|
||||||
mDeviceAddress = sp.getString(info.nightscout.pump.dana.R.string.key_danars_address, "")
|
mDeviceAddress = sp.getString(info.nightscout.pump.dana.R.string.key_danars_address, "")
|
||||||
mDeviceName = sp.getString(info.nightscout.pump.dana.R.string.key_danars_name, "")
|
mDeviceName = sp.getString(info.nightscout.pump.dana.R.string.key_danars_name, "")
|
||||||
|
danaPump.serialNumber = sp.getString(info.nightscout.pump.dana.R.string.key_danars_name, "")
|
||||||
danaPump.reset()
|
danaPump.reset()
|
||||||
commandQueue.readStatus(rh.gs(info.nightscout.core.ui.R.string.device_changed), null)
|
commandQueue.readStatus(rh.gs(info.nightscout.core.ui.R.string.device_changed), null)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue