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

Commit ebc56625 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 9654967 from 49f323d9 to tm-qpr3-release

Change-Id: Ia8a771c5ba72c8870fd396948dc503de4aa0cd67
parents be6bcba3 49f323d9
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -3517,7 +3517,7 @@ public final class CameraCharacteristics extends CameraMetadata<CameraCharacteri
     * <p>An array of mandatory stream combinations which are applicable when device support the
     * 10-bit output capability
     * {@link android.hardware.camera2.CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES_DYNAMIC_RANGE_TEN_BIT }
     * This is an app-readable conversion of the maximum resolution mandatory stream combination
     * This is an app-readable conversion of the 10 bit output mandatory stream combination
     * {@link android.hardware.camera2.CameraDevice#createCaptureSession tables}.</p>
     * <p>The array of
     * {@link android.hardware.camera2.params.MandatoryStreamCombination combinations} is
@@ -3542,8 +3542,8 @@ public final class CameraCharacteristics extends CameraMetadata<CameraCharacteri
    /**
     * <p>An array of mandatory stream combinations which are applicable when device lists
     * {@code PREVIEW_STABILIZATION} in {@link CameraCharacteristics#CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES android.control.availableVideoStabilizationModes}.
     * This is an app-readable conversion of the maximum resolution mandatory stream combination
     * {@link android.hardware.camera2.CameraDevice#createCaptureSession tables}.</p>
     * This is an app-readable conversion of the preview stabilization mandatory stream
     * combination {@link android.hardware.camera2.CameraDevice#createCaptureSession tables}.</p>
     * <p>The array of
     * {@link android.hardware.camera2.params.MandatoryStreamCombination combinations} is
     * generated according to the documented
+18 −17
Original line number Diff line number Diff line
@@ -1000,24 +1000,25 @@ public abstract class CameraMetadata<TKey> {
     * camera's crop region is set to maximum size, the FOV of the physical streams for the
     * ultrawide lens will be the same as the logical stream, by making the crop region
     * smaller than its active array size to compensate for the smaller focal length.</p>
     * <p>There are two ways for the application to capture RAW images from a logical camera
     * with RAW capability:</p>
     * <p>For a logical camera, typically the underlying physical cameras have different RAW
     * capabilities (such as resolution or CFA pattern). There are two ways for the
     * application to capture RAW images from the logical camera:</p>
     * <ul>
     * <li>Because the underlying physical cameras may have different RAW capabilities (such
     * as resolution or CFA pattern), to maintain backward compatibility, when a RAW stream
     * is configured, the camera device makes sure the default active physical camera remains
     * active and does not switch to other physical cameras. (One exception is that, if the
     * logical camera consists of identical image sensors and advertises multiple focalLength
     * due to different lenses, the camera device may generate RAW images from different
     * physical cameras based on the focalLength being set by the application.) This
     * backward-compatible approach usually results in loss of optical zoom, to telephoto
     * lens or to ultrawide lens.</li>
     * <li>Alternatively, to take advantage of the full zoomRatio range of the logical camera,
     * the application should use {@link android.hardware.camera2.MultiResolutionImageReader }
     * to capture RAW images from the currently active physical camera. Because different
     * physical camera may have different RAW characteristics, the application needs to use
     * the characteristics and result metadata of the active physical camera for the
     * relevant RAW metadata.</li>
     * <li>If the logical camera has RAW capability, the application can create and use RAW
     * streams in the same way as before. In case a RAW stream is configured, to maintain
     * backward compatibility, the camera device makes sure the default active physical
     * camera remains active and does not switch to other physical cameras. (One exception
     * is that, if the logical camera consists of identical image sensors and advertises
     * multiple focalLength due to different lenses, the camera device may generate RAW
     * images from different physical cameras based on the focalLength being set by the
     * application.) This backward-compatible approach usually results in loss of optical
     * zoom, to telephoto lens or to ultrawide lens.</li>
     * <li>Alternatively, if supported by the device,
     * {@link android.hardware.camera2.MultiResolutionImageReader }
     * can be used to capture RAW images from one of the underlying physical cameras (
     * depending on current zoom level). Because different physical cameras may have
     * different RAW characteristics, the application needs to use the characteristics
     * and result metadata of the active physical camera for the relevant RAW metadata.</li>
     * </ul>
     * <p>The capture request and result metadata tags required for backward compatible camera
     * functionalities will be solely based on the logical camera capability. On the other
+1 −1
Original line number Diff line number Diff line
@@ -953,7 +953,7 @@ public class ZenModeConfig implements Parcelable {

    private static Uri safeUri(TypedXmlPullParser parser, String att) {
        final String val = parser.getAttributeValue(null, att);
        if (TextUtils.isEmpty(val)) return null;
        if (val == null) return null;
        return Uri.parse(val);
    }

+24 −11
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ import static android.view.WindowManager.LayoutParams.SYSTEM_FLAG_SHOW_FOR_ALL_U
import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY;

import android.content.ClipDescription;
import android.content.ComponentCallbacks2;
import android.content.Context;
import android.content.res.Configuration;
import android.graphics.PixelFormat;
@@ -58,9 +59,9 @@ import com.android.launcher3.icons.IconProvider;
import com.android.wm.shell.R;
import com.android.wm.shell.common.DisplayController;
import com.android.wm.shell.common.ShellExecutor;
import com.android.wm.shell.common.annotations.ExternalMainThread;
import com.android.wm.shell.protolog.ShellProtoLogGroup;
import com.android.wm.shell.splitscreen.SplitScreenController;
import com.android.wm.shell.sysui.ConfigurationChangeListener;
import com.android.wm.shell.sysui.ShellController;
import com.android.wm.shell.sysui.ShellInit;

@@ -70,7 +71,7 @@ import java.util.ArrayList;
 * Handles the global drag and drop handling for the Shell.
 */
public class DragAndDropController implements DisplayController.OnDisplaysChangedListener,
        View.OnDragListener, ConfigurationChangeListener {
        View.OnDragListener, ComponentCallbacks2 {

    private static final String TAG = DragAndDropController.class.getSimpleName();

@@ -119,7 +120,6 @@ public class DragAndDropController implements DisplayController.OnDisplaysChange
        mMainExecutor.executeDelayed(() -> {
            mDisplayController.addDisplayWindowListener(this);
        }, 0);
        mShellController.addConfigurationChangeListener(this);
    }

    /**
@@ -180,6 +180,7 @@ public class DragAndDropController implements DisplayController.OnDisplaysChange
        try {
            wm.addView(rootView, layoutParams);
            addDisplayDropTarget(displayId, context, wm, rootView, dragLayout);
            context.registerComponentCallbacks(this);
        } catch (WindowManager.InvalidDisplayException e) {
            Slog.w(TAG, "Unable to add view for display id: " + displayId);
        }
@@ -209,6 +210,7 @@ public class DragAndDropController implements DisplayController.OnDisplaysChange
        if (pd == null) {
            return;
        }
        pd.context.unregisterComponentCallbacks(this);
        pd.wm.removeViewImmediate(pd.rootView);
        mDisplayDropTargets.remove(displayId);
    }
@@ -328,18 +330,29 @@ public class DragAndDropController implements DisplayController.OnDisplaysChange
        return mimeTypes;
    }

    // Note: Component callbacks are always called on the main thread of the process
    @ExternalMainThread
    @Override
    public void onThemeChanged() {
    public void onConfigurationChanged(Configuration newConfig) {
        mMainExecutor.execute(() -> {
            for (int i = 0; i < mDisplayDropTargets.size(); i++) {
            mDisplayDropTargets.get(i).dragLayout.onThemeChange();
                mDisplayDropTargets.get(i).dragLayout.onConfigChanged(newConfig);
            }
        });
    }

    // Note: Component callbacks are always called on the main thread of the process
    @ExternalMainThread
    @Override
    public void onConfigurationChanged(Configuration newConfig) {
        for (int i = 0; i < mDisplayDropTargets.size(); i++) {
            mDisplayDropTargets.get(i).dragLayout.onConfigChanged(newConfig);
    public void onTrimMemory(int level) {
        // Do nothing
    }

    // Note: Component callbacks are always called on the main thread of the process
    @ExternalMainThread
    @Override
    public void onLowMemory() {
        // Do nothing
    }

    private static class PerDisplay {
+13 −5
Original line number Diff line number Diff line
@@ -18,6 +18,8 @@ package com.android.wm.shell.draganddrop;

import static android.app.StatusBarManager.DISABLE_NONE;
import static android.app.WindowConfiguration.ACTIVITY_TYPE_STANDARD;
import static android.content.pm.ActivityInfo.CONFIG_ASSETS_PATHS;
import static android.content.pm.ActivityInfo.CONFIG_UI_MODE;
import static android.view.ViewGroup.LayoutParams.MATCH_PARENT;

import static com.android.wm.shell.common.split.SplitScreenConstants.SPLIT_POSITION_BOTTOM_OR_RIGHT;
@@ -72,6 +74,7 @@ public class DragLayout extends LinearLayout {
    private final SplitScreenController mSplitScreenController;
    private final IconProvider mIconProvider;
    private final StatusBarManager mStatusBarManager;
    private final Configuration mLastConfiguration = new Configuration();

    private DragAndDropPolicy.Target mCurrentTarget = null;
    private DropZoneView mDropZoneView1;
@@ -92,6 +95,7 @@ public class DragLayout extends LinearLayout {
        mIconProvider = iconProvider;
        mPolicy = new DragAndDropPolicy(context, splitScreenController);
        mStatusBarManager = context.getSystemService(StatusBarManager.class);
        mLastConfiguration.setTo(context.getResources().getConfiguration());

        mDisplayMargin = context.getResources().getDimensionPixelSize(
                R.dimen.drop_layout_display_margin);
@@ -132,11 +136,6 @@ public class DragLayout extends LinearLayout {
        return super.onApplyWindowInsets(insets);
    }

    public void onThemeChange() {
        mDropZoneView1.onThemeChange();
        mDropZoneView2.onThemeChange();
    }

    public void onConfigChanged(Configuration newConfig) {
        if (newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE
                && getOrientation() != HORIZONTAL) {
@@ -147,6 +146,15 @@ public class DragLayout extends LinearLayout {
            setOrientation(LinearLayout.VERTICAL);
            updateContainerMargins(newConfig.orientation);
        }

        final int diff = newConfig.diff(mLastConfiguration);
        final boolean themeChanged = (diff & CONFIG_ASSETS_PATHS) != 0
                || (diff & CONFIG_UI_MODE) != 0;
        if (themeChanged) {
            mDropZoneView1.onThemeChange();
            mDropZoneView2.onThemeChange();
        }
        mLastConfiguration.setTo(newConfig);
    }

    private void updateContainerMarginsForSingleTask() {
Loading