Merge branch 'master' into s

This commit is contained in:
Mygod
2021-06-10 13:10:23 +08:00
4 changed files with 7 additions and 2 deletions

View File

@@ -9,7 +9,8 @@
Connecting things to your VPN made simple. Share your VPN connection over hotspot or repeater. (**root required**) Connecting things to your VPN made simple. Share your VPN connection over hotspot or repeater. (**root required**)
<a href="https://play.google.com/store/apps/details?id=be.mygod.vpnhotspot" target="_blank"><img src="https://play.google.com/intl/en_us/badges/images/generic/en-play-badge.png" height="60"></a>, <a href="https://play.google.com/store/apps/details?id=be.mygod.vpnhotspot" target="_blank"><img src="https://play.google.com/intl/en_us/badges/images/generic/en-play-badge.png" height="60"></a>,
<a href="https://appdistribution.firebase.dev/i/FUCPGdzm" target="_blank">sign up for beta</a> sign up for beta at <a href="https://play.google.com/apps/testing/be.mygod.vpnhotspot" target="_blank">Google Play</a>
or <a href="https://appdistribution.firebase.dev/i/FUCPGdzm" target="_blank">Firebase</a>
This app is useful for: This app is useful for:

View File

@@ -12,6 +12,7 @@ import android.util.*
import androidx.annotation.RequiresApi import androidx.annotation.RequiresApi
import kotlinx.parcelize.Parcelize import kotlinx.parcelize.Parcelize
import java.io.IOException import java.io.IOException
import java.util.*
class NoShellException(cause: Throwable) : Exception("Root missing", cause) class NoShellException(cause: Throwable) : Exception("Root missing", cause)
@@ -252,4 +253,5 @@ inline fun <reified T : Parcelable> ByteArray.toParcelable(classLoader: ClassLoa
} }
// Stream closed caused in NullOutputStream // Stream closed caused in NullOutputStream
val IOException.isEBADF get() = message == "Stream closed" || (cause as? ErrnoException)?.errno == OsConstants.EBADF val IOException.isEBADF get() = (cause as? ErrnoException)?.errno == OsConstants.EBADF ||
message?.lowercase(Locale.ENGLISH) == "stream closed"

View File

@@ -60,6 +60,7 @@ class UpstreamsPreference(context: Context, attrs: AttributeSet) : Preference(co
init { init {
(context as LifecycleOwner).lifecycle.addObserver(this) (context as LifecycleOwner).lifecycle.addObserver(this)
onUpdate()
} }
override fun onStart(owner: LifecycleOwner) { override fun onStart(owner: LifecycleOwner) {

View File

@@ -65,6 +65,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:minHeight="@dimen/touch_target_min"
android:text="@string/donations__google_android_market_donate_button" /> android:text="@string/donations__google_android_market_donate_button" />
</LinearLayout> </LinearLayout>