|
@@ -2,6 +2,7 @@ package com.hzliuzhi.applet.device.pulse.util
|
|
|
|
|
|
|
|
import android.app.Activity
|
|
import android.app.Activity
|
|
|
import android.app.Application
|
|
import android.app.Application
|
|
|
|
|
+import android.content.res.Resources
|
|
|
import com.hzliuzhi.applet.core.shared.Payload
|
|
import com.hzliuzhi.applet.core.shared.Payload
|
|
|
import com.hzliuzhi.applet.core.util.proxy
|
|
import com.hzliuzhi.applet.core.util.proxy
|
|
|
import com.hzliuzhi.applet.device.pulse.PulseResult
|
|
import com.hzliuzhi.applet.device.pulse.PulseResult
|
|
@@ -24,6 +25,7 @@ object TaiYiUtil {
|
|
|
skipReport = resources.getBoolean(R.bool.taiyi_skip_report)
|
|
skipReport = resources.getBoolean(R.bool.taiyi_skip_report)
|
|
|
delayDisconnect = resources.getInteger(R.integer.taiyi_delay_disconnect)
|
|
delayDisconnect = resources.getInteger(R.integer.taiyi_delay_disconnect)
|
|
|
this.proxy = resources.proxy(R.array.browser_proxy_pool)
|
|
this.proxy = resources.proxy(R.array.browser_proxy_pool)
|
|
|
|
|
+ this.agencyOfOSS = resources.OSSAgency()
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
)
|
|
)
|
|
@@ -52,4 +54,12 @@ object TaiYiUtil {
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+private fun Resources.OSSAgency(): TaiyiConfig.OSSAgency {
|
|
|
|
|
+ return TaiyiConfig.OSSAgency(
|
|
|
|
|
+ runCatching { getString(R.string.taiyi_oss_agency_url) }.getOrNull()?.trim(),
|
|
|
|
|
+ runCatching { getString(R.string.taiyi_oss_agency_method) }.getOrNull()?.trim(),
|
|
|
|
|
+ runCatching { getBoolean(R.bool.taiyi_oss_agency_header2query) }.getOrNull() ?: false
|
|
|
|
|
+ )
|
|
|
}
|
|
}
|