Merge pull request #2241 from dv1/comboctl-dev
combov2: Fix pairing activity in pumpcontrol application
This commit is contained in:
commit
17368c92f6
4 changed files with 6 additions and 7 deletions
|
@ -1,13 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="info.nightscout.androidaps.plugins.pump.combov2">
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<uses-permission android:name="android.permission.BLUETOOTH" />
|
||||
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
|
||||
|
||||
<application>
|
||||
<activity
|
||||
android:name="info.nightscout.pump.combov2.activities.ComboV2PairingActivity"
|
||||
android:name=".activities.ComboV2PairingActivity"
|
||||
android:exported="false"
|
||||
android:theme="@style/AppTheme.NoActionBar" />
|
||||
</application>
|
||||
|
|
|
@ -44,6 +44,7 @@ import info.nightscout.interfaces.queue.CommandQueue
|
|||
import info.nightscout.interfaces.ui.UiInteraction
|
||||
import info.nightscout.interfaces.utils.DecimalFormatter
|
||||
import info.nightscout.interfaces.utils.TimeChangeType
|
||||
import info.nightscout.pump.combov2.activities.ComboV2PairingActivity
|
||||
import info.nightscout.rx.bus.RxBus
|
||||
import info.nightscout.rx.events.EventDismissNotification
|
||||
import info.nightscout.rx.events.EventInitializationChanged
|
||||
|
@ -326,6 +327,8 @@ class ComboV2Plugin @Inject constructor (
|
|||
val pairPref: Preference? = findPreference(rh.gs(R.string.key_combov2_pair_with_pump))
|
||||
val unpairPref: Preference? = findPreference(rh.gs(R.string.key_combov2_unpair_pump))
|
||||
|
||||
pairPref?.intent = Intent(activity, ComboV2PairingActivity::class.java)
|
||||
|
||||
val isInitiallyPaired = pairedStateUIFlow.value
|
||||
pairPref?.isEnabled = !isInitiallyPaired
|
||||
unpairPref?.isEnabled = isInitiallyPaired
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
tools:context=".plugins.pump.combov2.activities.ComboV2PairingActivity">
|
||||
tools:context=".activities.ComboV2PairingActivity">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/header"
|
||||
|
|
|
@ -12,9 +12,6 @@
|
|||
android:title="@string/combov2_pair_with_pump_title"
|
||||
android:summary="@string/combov2_pair_with_pump_summary"
|
||||
android:shouldDisableView="true">
|
||||
<intent
|
||||
android:targetClass="info.nightscout.pump.combov2.activities.ComboV2PairingActivity"
|
||||
android:targetPackage="info.nightscout.androidaps" />
|
||||
</Preference>
|
||||
|
||||
<Preference
|
||||
|
|
Loading…
Reference in a new issue