You've already forked Magisk
mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-09-06 06:36:58 +00:00
Set minSdkVersion to 21
This commit is contained in:
@@ -2,7 +2,6 @@ package com.topjohnwu.magisk.ui
|
||||
|
||||
import android.content.Intent
|
||||
import android.content.pm.ApplicationInfo
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.view.MenuItem
|
||||
import android.view.View
|
||||
@@ -123,10 +122,7 @@ open class MainActivity : BaseUIActivity<MainViewModel, ActivityMainMd2Binding>(
|
||||
val topView = binding.mainToolbarWrapper
|
||||
val bottomView = binding.mainBottomBar
|
||||
|
||||
if (
|
||||
Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT &&
|
||||
!binding.mainBottomBar.isAttachedToWindow
|
||||
) {
|
||||
if (!binding.mainBottomBar.isAttachedToWindow) {
|
||||
binding.mainBottomBar.viewTreeObserver.addOnWindowAttachListener(object :
|
||||
ViewTreeObserver.OnWindowAttachListener {
|
||||
|
||||
|
||||
@@ -74,10 +74,6 @@ class SettingsViewModel(
|
||||
Magisk,
|
||||
MagiskHide, SystemlessHosts
|
||||
))
|
||||
if (Build.VERSION.SDK_INT < 19) {
|
||||
// MagiskHide is only available on 4.4+
|
||||
list.remove(MagiskHide)
|
||||
}
|
||||
}
|
||||
|
||||
// Superuser
|
||||
|
||||
@@ -3,7 +3,6 @@ package com.topjohnwu.magisk.ui.surequest
|
||||
import android.content.Intent
|
||||
import android.content.pm.ActivityInfo
|
||||
import android.content.res.Resources
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.view.Window
|
||||
import android.view.WindowManager
|
||||
@@ -62,9 +61,6 @@ open class SuRequestActivity : BaseUIActivity<SuRequestViewModel, ActivityReques
|
||||
}
|
||||
|
||||
private fun lockOrientation() {
|
||||
requestedOrientation = if (Build.VERSION.SDK_INT < 18)
|
||||
resources.configuration.orientation
|
||||
else
|
||||
ActivityInfo.SCREEN_ORIENTATION_LOCKED
|
||||
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_LOCKED
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user