Cherish:Hide FOD if non-devices

Signed-off-by: Hưng Phan <phandinhhungvp2001@gmail.com>
This commit is contained in:
Hưng Phan
2021-06-26 22:06:15 +07:00
parent ed97aea10a
commit 73c62e21a5

View File

@@ -38,7 +38,7 @@ import android.os.SystemProperties;
import android.provider.Settings;
import com.android.settings.R;
import com.android.settings.SettingsPreferenceFragment;
import com.android.internal.util.cherish.FodUtils;
import com.cherish.settings.preferences.SystemSettingListPreference;
import com.cherish.settings.preferences.CustomSeekBarPreference;
import com.cherish.settings.preferences.SecureSettingListPreference;
@@ -80,7 +80,8 @@ public class LockScreenSettings extends SettingsPreferenceFragment implements
Resources resources = getResources();
FODSettings = (Preference) findPreference(LOCKSCREEN_FOD_CATEGORY);
if (!getResources().getBoolean(com.android.internal.R.bool.config_needCustomFODView)) {
if (FODSettings != null
&& !getResources().getBoolean(com.android.internal.R.bool.config_needCustomFODView)) {
prefScreen.removePreference(FODSettings);
}