Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Launcher3: Swith to our OmniSettings provider #4

Open
wants to merge 1 commit into
base: android-14.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
import android.net.Uri;
import android.os.Handler;
import android.os.SystemProperties;
import android.provider.OmniSettings;
import android.provider.Settings;
import android.util.Log;
import android.view.Display;
Expand Down Expand Up @@ -87,7 +88,7 @@ public class TaskbarManager {
Settings.Secure.NAV_BAR_KIDS_MODE);

private static final Uri ENABLE_TASKBAR_URI = Settings.System.getUriFor(
Settings.System.OMNI_ENABLE_TASKBAR);
OmniSettings.OMNI_ENABLE_TASKBAR);

private final Context mContext;
private final DisplayController mDisplayController;
Expand Down Expand Up @@ -162,7 +163,7 @@ public TaskbarManager(TouchInteractionService service) {
// Create the illusion of this taking effect immediately
// Also needed because TaskbarManager inits before SystemUiProxy on start
boolean enabled = Settings.System.getInt(mContext.getContentResolver(),
Settings.System.OMNI_ENABLE_TASKBAR, 0) == 1;
OmniSettings.OMNI_ENABLE_TASKBAR, 0) == 1;
SystemUiProxy.INSTANCE.get(mContext).setTaskbarEnabled(enabled);

// Restart launcher
Expand Down
3 changes: 2 additions & 1 deletion src/com/android/launcher3/DeviceProfile.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import android.graphics.Point;
import android.graphics.PointF;
import android.graphics.Rect;
import android.provider.OmniSettings;
import android.provider.Settings;
import android.util.DisplayMetrics;
import android.util.SparseArray;
Expand Down Expand Up @@ -314,7 +315,7 @@ public class DeviceProfile {
isPhone = !isTablet;
isTwoPanels = isTablet && isMultiDisplay;
boolean isTaskBarEnabled = Settings.System.getInt(context.getContentResolver(),
Settings.System.OMNI_ENABLE_TASKBAR, isTablet ? 1 : 0) == 1;
OmniSettings.OMNI_ENABLE_TASKBAR, isTablet ? 1 : 0) == 1;
isTaskbarPresent = isTaskBarEnabled && ApiWrapper.TASKBAR_DRAWN_IN_PROCESS;

// Some more constants.
Expand Down