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

Commit bfd652d0 authored by Candice Lo's avatar Candice Lo Committed by Android (Google) Code Review
Browse files

Merge "Change the flag of magnification settings to TYPE_NAVIGATION_BAR_PANE" into udc-dev

parents 0bb91e1d 6ad8fdff
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ import android.content.ComponentCallbacks;
import android.content.Context;
import android.content.res.Configuration;
import android.util.Range;
import android.view.WindowManager;

import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.graphics.SfVsyncFrameCallbackProvider;
@@ -68,14 +69,18 @@ public class MagnificationSettingsController implements ComponentCallbacks {
            @NonNull Callback settingsControllerCallback,
            SecureSettings secureSettings,
            WindowMagnificationSettings windowMagnificationSettings) {
        mContext = context;
        mContext = context.createWindowContext(
                context.getDisplay(),
                WindowManager.LayoutParams.TYPE_NAVIGATION_BAR_PANEL,
                null);
        mContext.setTheme(com.android.systemui.R.style.Theme_SystemUI);
        mDisplayId = mContext.getDisplayId();
        mConfiguration = new Configuration(context.getResources().getConfiguration());
        mConfiguration = new Configuration(mContext.getResources().getConfiguration());
        mSettingsControllerCallback = settingsControllerCallback;
        if (windowMagnificationSettings != null) {
            mWindowMagnificationSettings = windowMagnificationSettings;
        } else {
            mWindowMagnificationSettings = new WindowMagnificationSettings(context,
            mWindowMagnificationSettings = new WindowMagnificationSettings(mContext,
                    mWindowMagnificationSettingsCallback,
                    sfVsyncFrameProvider, secureSettings);
        }
+1 −1
Original line number Diff line number Diff line
@@ -559,7 +559,7 @@ class WindowMagnificationSettings implements MagnificationGestureDetector.OnGest
        final LayoutParams params = new LayoutParams(
                LayoutParams.WRAP_CONTENT,
                LayoutParams.WRAP_CONTENT,
                LayoutParams.TYPE_ACCESSIBILITY_MAGNIFICATION_OVERLAY,
                LayoutParams.TYPE_NAVIGATION_BAR_PANEL,
                LayoutParams.FLAG_NOT_FOCUSABLE,
                PixelFormat.TRANSPARENT);
        params.gravity = Gravity.TOP | Gravity.START;