mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-03 23:15:31 +00:00
[fenix] Close https://github.com/mozilla-mobile/fenix/issues/26495: Move Huawei checks to ManufacturerCodes
This commit is contained in:
parent
9a86122ddb
commit
c1700709e3
@ -127,6 +127,7 @@ import org.mozilla.fenix.theme.DefaultThemeManager
|
|||||||
import org.mozilla.fenix.theme.ThemeManager
|
import org.mozilla.fenix.theme.ThemeManager
|
||||||
import org.mozilla.fenix.trackingprotection.TrackingProtectionPanelDialogFragmentDirections
|
import org.mozilla.fenix.trackingprotection.TrackingProtectionPanelDialogFragmentDirections
|
||||||
import org.mozilla.fenix.utils.BrowsersCache
|
import org.mozilla.fenix.utils.BrowsersCache
|
||||||
|
import org.mozilla.fenix.utils.ManufacturerCodes
|
||||||
import org.mozilla.fenix.utils.Settings
|
import org.mozilla.fenix.utils.Settings
|
||||||
import java.lang.ref.WeakReference
|
import java.lang.ref.WeakReference
|
||||||
|
|
||||||
@ -617,8 +618,7 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity {
|
|||||||
Build.VERSION.SDK_INT == Build.VERSION_CODES.N || Build.VERSION.SDK_INT == Build.VERSION_CODES.N_MR1
|
Build.VERSION.SDK_INT == Build.VERSION_CODES.N || Build.VERSION.SDK_INT == Build.VERSION_CODES.N_MR1
|
||||||
// Huawei devices seem to have problems with onKeyLongPress
|
// Huawei devices seem to have problems with onKeyLongPress
|
||||||
// See https://github.com/mozilla-mobile/fenix/issues/13498
|
// See https://github.com/mozilla-mobile/fenix/issues/13498
|
||||||
val isHuawei = Build.MANUFACTURER.equals("huawei", ignoreCase = true)
|
return isAndroidN || ManufacturerCodes.isHuawei
|
||||||
return isAndroidN || isHuawei
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun handleBackLongPress(): Boolean {
|
private fun handleBackLongPress(): Boolean {
|
||||||
|
@ -19,4 +19,5 @@ object ManufacturerCodes {
|
|||||||
|
|
||||||
val isLG get() = Build.MANUFACTURER.equals(LG, ignoreCase = true)
|
val isLG get() = Build.MANUFACTURER.equals(LG, ignoreCase = true)
|
||||||
val isSamsung get() = Build.MANUFACTURER.equals(SAMSUNG, ignoreCase = true)
|
val isSamsung get() = Build.MANUFACTURER.equals(SAMSUNG, ignoreCase = true)
|
||||||
|
val isHuawei get() = Build.MANUFACTURER.equals(HUAWEI, ignoreCase = true)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user