mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-03 17:36:49 +00:00
Moving Plugin and feature flags UI to androidX
> Combining both preference into a single screen > Adding plugin preference screen so quickstep build Change-Id: I3d2ff3ebdac3c774659e79ecb81be6f75f765eb0
This commit is contained in:
@@ -24,17 +24,16 @@ import static com.android.launcher3.util.SecureSettingsObserver.newNotificationS
|
||||
import android.app.Activity;
|
||||
import android.app.DialogFragment;
|
||||
import android.app.Fragment;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.provider.Settings;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import com.android.launcher3.LauncherFiles;
|
||||
import com.android.launcher3.R;
|
||||
import com.android.launcher3.Utilities;
|
||||
import com.android.launcher3.config.FeatureFlags;
|
||||
import com.android.launcher3.graphics.IconShapeOverride;
|
||||
import com.android.launcher3.uioverrides.plugins.PluginManagerWrapper;
|
||||
import com.android.launcher3.util.SecureSettingsObserver;
|
||||
|
||||
import androidx.preference.ListPreference;
|
||||
@@ -52,6 +51,7 @@ import androidx.recyclerview.widget.RecyclerView;
|
||||
public class SettingsActivity extends Activity
|
||||
implements OnPreferenceStartFragmentCallback, OnPreferenceStartScreenCallback {
|
||||
|
||||
private static final String DEVELOPER_OPTIONS_KEY = "pref_developer_options";
|
||||
private static final String FLAGS_PREFERENCE_KEY = "flag_toggler";
|
||||
|
||||
private static final String ICON_BADGING_PREFERENCE_KEY = "pref_icon_badging";
|
||||
@@ -204,6 +204,11 @@ public class SettingsActivity extends Activity
|
||||
case FLAGS_PREFERENCE_KEY:
|
||||
// Only show flag toggler UI if this build variant implements that.
|
||||
return FeatureFlags.showFlagTogglerUi(getContext());
|
||||
|
||||
case DEVELOPER_OPTIONS_KEY:
|
||||
// Show if plugins are enabled or flag UI is enabled.
|
||||
return FeatureFlags.showFlagTogglerUi(getContext()) ||
|
||||
PluginManagerWrapper.hasPlugins(getContext());
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user