mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-15 15:48:26 -04:00
The notch option is now gone for users with no notch.
This commit is contained in:
parent
9593adba31
commit
f666e190be
@ -311,8 +311,8 @@ public class PojavLauncherActivity extends BaseLauncherActivity
|
||||
@Override
|
||||
public void onAttachedToWindow() {
|
||||
super.onAttachedToWindow();
|
||||
//Try to get the notch so it can be taken into account in settings
|
||||
if (Build.VERSION.SDK_INT >= P){
|
||||
//Get the fucking notch height:
|
||||
try {
|
||||
PREF_NOTCH_SIZE = getWindow().getDecorView().getRootWindowInsets().getDisplayCutout().getBoundingRects().get(0).width();
|
||||
}catch (Exception e){
|
||||
|
@ -9,6 +9,8 @@ import net.kdt.pojavlaunch.Tools;
|
||||
|
||||
import android.content.*;
|
||||
|
||||
import static net.kdt.pojavlaunch.prefs.LauncherPreferences.PREF_NOTCH_SIZE;
|
||||
|
||||
public class LauncherPreferenceFragment extends PreferenceFragmentCompat implements SharedPreferences.OnSharedPreferenceChangeListener
|
||||
{
|
||||
@Override
|
||||
@ -16,9 +18,9 @@ public class LauncherPreferenceFragment extends PreferenceFragmentCompat impleme
|
||||
addPreferencesFromResource(R.xml.pref_main);
|
||||
|
||||
// Disable freeform mode in Android 6.0 and below.
|
||||
findPreference("freeform").setVisible(Build.VERSION.SDK_INT >= 24);
|
||||
findPreference("freeform").setVisible(Build.VERSION.SDK_INT >= Build.VERSION_CODES.N);
|
||||
//Disable notch checking behavior on android 8.1 and below.
|
||||
findPreference("ignoreNotch").setVisible(Build.VERSION.SDK_INT >= 28);
|
||||
findPreference("ignoreNotch").setVisible(Build.VERSION.SDK_INT >= Build.VERSION_CODES.P && PREF_NOTCH_SIZE != 0);
|
||||
|
||||
CustomSeekBarPreference seek2 = (CustomSeekBarPreference) findPreference("timeLongPressTrigger");
|
||||
seek2.setMin(100);
|
||||
|
Loading…
x
Reference in New Issue
Block a user