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

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

Snap for 7960322 from 12aff064 to sc-v2-release

Change-Id: I2739c2a6cdb9ea878012a581628ddd34fa199f41
parents 1962a561 12aff064
Loading
Loading
Loading
Loading
+23 −0
Original line number Diff line number Diff line
@@ -151,6 +151,9 @@ public class Dialog implements DialogInterface, Window.Callback,

    private final Runnable mDismissAction = this::dismissDialog;

    /** A {@link Runnable} to run instead of dismissing when {@link #dismiss()} is called. */
    private Runnable mDismissOverride;

    /**
     * Creates a dialog window that uses the default dialog theme.
     * <p>
@@ -370,6 +373,11 @@ public class Dialog implements DialogInterface, Window.Callback,
     */
    @Override
    public void dismiss() {
        if (mDismissOverride != null) {
            mDismissOverride.run();
            return;
        }

        if (Looper.myLooper() == mHandler.getLooper()) {
            dismissDialog();
        } else {
@@ -1354,6 +1362,21 @@ public class Dialog implements DialogInterface, Window.Callback,
        mDismissMessage = msg;
    }

    /**
     * Set a {@link Runnable} to run when this dialog is dismissed instead of directly dismissing
     * it. This allows to animate the dialog in its window before dismissing it.
     *
     * Note that {@code override} should always end up calling this method with {@code null}
     * followed by a call to {@link #dismiss() dismiss} to actually dismiss the dialog.
     *
     * @see #dismiss()
     *
     * @hide
     */
    public void setDismissOverride(@Nullable Runnable override) {
        mDismissOverride = override;
    }

    /** @hide */
    public boolean takeCancelAndDismissListeners(@Nullable String msg,
            @Nullable OnCancelListener cancel, @Nullable OnDismissListener dismiss) {
+10 −1
Original line number Diff line number Diff line
@@ -395,7 +395,7 @@ public class InputMethodService extends AbstractInputMethodService {

    /**
     * @hide
     * The IME is visible.
     * The IME is perceptibly visible to the user.
     */
    public static final int IME_VISIBLE = 0x2;

@@ -406,6 +406,15 @@ public class InputMethodService extends AbstractInputMethodService {
     */
    public static final int IME_INVISIBLE = 0x4;

    /**
     * @hide
     * The IME is visible, but not yet perceptible to the user (e.g. fading in)
     * by {@link android.view.WindowInsetsController}.
     *
     * @see InputMethodManager#reportPerceptible
     */
    public static final int IME_VISIBLE_IMPERCEPTIBLE = 0x8;

    // Min and max values for back disposition.
    private static final int BACK_DISPOSITION_MIN = BACK_DISPOSITION_DEFAULT;
    private static final int BACK_DISPOSITION_MAX = BACK_DISPOSITION_ADJUST_NOTHING;
+7 −4
Original line number Diff line number Diff line
@@ -63,7 +63,7 @@ public final class SharedMemory implements Parcelable, Closeable {

        mMemoryRegistration = new MemoryRegistration(mSize);
        mCleaner = Cleaner.create(mFileDescriptor,
                new Closer(mFileDescriptor, mMemoryRegistration));
                new Closer(mFileDescriptor.getInt$(), mMemoryRegistration));
    }

    /**
@@ -256,6 +256,7 @@ public final class SharedMemory implements Parcelable, Closeable {
     */
    @Override
    public void close() {
        mFileDescriptor.setInt$(-1);
        if (mCleaner != null) {
            mCleaner.clean();
            mCleaner = null;
@@ -305,10 +306,10 @@ public final class SharedMemory implements Parcelable, Closeable {
     * Cleaner that closes the FD
     */
    private static final class Closer implements Runnable {
        private FileDescriptor mFd;
        private int mFd;
        private MemoryRegistration mMemoryReference;

        private Closer(FileDescriptor fd, MemoryRegistration memoryReference) {
        private Closer(int fd, MemoryRegistration memoryReference) {
            mFd = fd;
            mMemoryReference = memoryReference;
        }
@@ -316,7 +317,9 @@ public final class SharedMemory implements Parcelable, Closeable {
        @Override
        public void run() {
            try {
                Os.close(mFd);
                FileDescriptor fd = new FileDescriptor();
                fd.setInt$(mFd);
                Os.close(fd);
            } catch (ErrnoException e) { /* swallow error */ }
            mMemoryReference.release();
            mMemoryReference = null;
+9 −0
Original line number Diff line number Diff line
@@ -73,6 +73,15 @@
        "[^/]*BatteryConsumer[^/]*\\.java"
      ],
      "name": "BatteryUsageStatsProtoTests"
    },
    {
      "file_patterns": ["SharedMemory[^/]*\\.java"],
      "name": "CtsOsTestCases",
      "options": [
        {
          "include-filter": "android.os.cts.SharedMemoryTest"
        }
      ]
    }
  ],
  "postsubmit": [
+3 −3
Original line number Diff line number Diff line
@@ -1463,10 +1463,10 @@ public final class Display {
            return false;
        }
        final Configuration config = mResources.getConfiguration();
        // TODO(b/179308296) Temporarily - never report max bounds to only Launcher if the feature
        // is disabled.
        // TODO(b/179308296) Temporarily exclude Launcher from being given max bounds, by checking
        // if the caller is the recents component.
        return config != null && !config.windowConfiguration.getMaxBounds().isEmpty()
                && (mDisplayInfo.shouldConstrainMetricsForLauncher || !isRecentsComponent());
                && !isRecentsComponent();
    }

    /**
Loading