Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8c1e15f3 authored by Hyunyoung Song's avatar Hyunyoung Song
Browse files

[automerger] WallpaperManagerCompat should target correct platform Also...

[automerger] WallpaperManagerCompat should target correct platform Also replace Utilities.isAtLeastO() to static final constant. Bug: 65544683 am: e24cb63b

Change-Id: I85935372c20d6b473b692119730212811e01657d
parents 2f8d53d2 e24cb63b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -123,7 +123,7 @@ public class IconCache {
    }

    private Drawable getFullResDefaultActivityIcon() {
        return getFullResIcon(Resources.getSystem(), Utilities.isAtLeastO() ?
        return getFullResIcon(Resources.getSystem(), Utilities.ATLEAST_OREO ?
                android.R.drawable.sym_def_app_icon : android.R.mipmap.sym_def_app_icon);
    }

+2 −2
Original line number Diff line number Diff line
@@ -1050,7 +1050,7 @@ public class Launcher extends BaseActivity
            // On O and above we there is always some setting present settings (add icon to
            // home screen or icon badging). On earlier APIs we will have the allow rotation
            // setting, on devices with a locked orientation,
            return Utilities.isAtLeastO() || !getResources().getBoolean(R.bool.allow_rotation);
            return Utilities.ATLEAST_OREO || !getResources().getBoolean(R.bool.allow_rotation);
        }
    }

@@ -1322,7 +1322,7 @@ public class Launcher extends BaseActivity
        CellLayout layout = getCellLayout(container, screenId);

        ShortcutInfo info = null;
        if (Utilities.isAtLeastO()) {
        if (Utilities.ATLEAST_OREO) {
            info = LauncherAppsCompatVO.createShortcutInfoFromPinItemRequest(
                    this, LauncherAppsCompatVO.getPinItemRequest(data), 0);
        }
+1 −1
Original line number Diff line number Diff line
@@ -92,7 +92,7 @@ public class LauncherAppWidgetHostView extends AppWidgetHostView
        setAccessibilityDelegate(Launcher.getLauncher(context).getAccessibilityDelegate());
        setBackgroundResource(R.drawable.widget_internal_focus_bg);

        if (Utilities.isAtLeastO()) {
        if (Utilities.ATLEAST_OREO) {
            setExecutor(Utilities.THREAD_POOL_EXECUTOR);
        }
    }
+2 −2
Original line number Diff line number Diff line
@@ -59,7 +59,7 @@ public class SessionCommitReceiver extends BroadcastReceiver {

    @Override
    public void onReceive(Context context, Intent intent) {
        if (!isEnabled(context) || !Utilities.isAtLeastO()) {
        if (!isEnabled(context) || !Utilities.ATLEAST_OREO) {
            // User has decided to not add icons on homescreen.
            return;
        }
@@ -92,7 +92,7 @@ public class SessionCommitReceiver extends BroadcastReceiver {
    }

    public static void applyDefaultUserPrefs(final Context context) {
        if (!Utilities.isAtLeastO()) {
        if (!Utilities.ATLEAST_OREO) {
            return;
        }
        SharedPreferences prefs = Utilities.getPrefs(context);
+1 −1
Original line number Diff line number Diff line
@@ -94,7 +94,7 @@ public class SettingsActivity extends Activity {

            ButtonPreference iconBadgingPref =
                    (ButtonPreference) findPreference(ICON_BADGING_PREFERENCE_KEY);
            if (!Utilities.isAtLeastO()) {
            if (!Utilities.ATLEAST_OREO) {
                getPreferenceScreen().removePreference(
                        findPreference(SessionCommitReceiver.ADD_ICON_PREFERENCE_KEY));
                getPreferenceScreen().removePreference(iconBadgingPref);
Loading