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

Commit c89ecd7d authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fixing gradle build for SystemUI"

parents 1ef3f98d f709bd25
Loading
Loading
Loading
Loading
+26 −25
Original line number Diff line number Diff line
@@ -194,9 +194,7 @@ public class OneHandedController implements OneHanded {
            mGestureHandler = null;
            mTimeoutHandler = null;
            mOverlayManager = null;
            return;
        }

        } else {
            mContext = context;
            mDisplayAreaOrganizer = displayAreaOrganizer;
            mDisplayController = displayController;
@@ -206,10 +204,12 @@ public class OneHandedController implements OneHanded {

            mOverlayManager = IOverlayManager.Stub.asInterface(
                    ServiceManager.getService(Context.OVERLAY_SERVICE));
        mOffSetFraction = SystemProperties.getInt(ONE_HANDED_MODE_OFFSET_PERCENTAGE, 50) / 100.0f;
            mOffSetFraction = SystemProperties.getInt(ONE_HANDED_MODE_OFFSET_PERCENTAGE, 50)
                    / 100.0f;
            mIsOneHandedEnabled = OneHandedSettingsUtil.getSettingsOneHandedModeEnabled(
                    context.getContentResolver());
        mIsSwipeToNotificationEnabled = OneHandedSettingsUtil.getSettingsSwipeToNotificationEnabled(
            mIsSwipeToNotificationEnabled =
                    OneHandedSettingsUtil.getSettingsSwipeToNotificationEnabled(
                            context.getContentResolver());
            mTimeoutHandler = OneHandedTimeoutHandler.get();

@@ -221,6 +221,7 @@ public class OneHandedController implements OneHanded {
            setupGesturalOverlay();
            updateSettings();
        }
    }

    /**
     * Set one handed enabled or disabled when user update settings
+1 −1
Original line number Diff line number Diff line
@@ -43,7 +43,7 @@ import androidx.core.graphics.drawable.IconCompat;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.android.settingslib.R;
import com.android.systemui.R;
import com.android.systemui.statusbar.phone.SystemUIDialog;

/**
+17 −2
Original line number Diff line number Diff line
@@ -280,10 +280,25 @@ public class PipController implements Pip, PipTaskOrganizer.PipTransitionCallbac

        PackageManager pm = context.getPackageManager();
        boolean supportsPip = pm.hasSystemFeature(FEATURE_PICTURE_IN_PICTURE);
        if (!supportsPip) {
        if (supportsPip) {
            initController(context, broadcastDispatcher, configController, deviceConfig,
                    displayController, floatingContentCoordinator, sysUiState, pipBoundsHandler,
                    pipSurfaceTransactionHelper, pipTaskOrganizer, pipUiEventLogger);
        } else {
            Log.w(TAG, "Device not support PIP feature");
            return;
        }
    }

    private void initController(Context context, BroadcastDispatcher broadcastDispatcher,
            ConfigurationController configController,
            DeviceConfigProxy deviceConfig,
            DisplayController displayController,
            FloatingContentCoordinator floatingContentCoordinator,
            SysUiState sysUiState,
            PipBoundsHandler pipBoundsHandler,
            PipSurfaceTransactionHelper pipSurfaceTransactionHelper,
            PipTaskOrganizer pipTaskOrganizer,
            PipUiEventLogger pipUiEventLogger) {

        // Ensure that we are the primary user's SystemUI.
        final int processUser = UserManager.get(context).getUserHandle();