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

Commit 5409ef1a authored by Xin Li's avatar Xin Li Committed by Android (Google) Code Review
Browse files

Merge "Merge SP2A.220305.012" into stage-aosp-master

parents 5dbc71e1 2b87be68
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -40,4 +40,11 @@ public abstract class ServiceStartNotAllowedException extends IllegalStateExcept
            return new BackgroundServiceStartNotAllowedException(message);
        }
    }

    @Override
    public synchronized Throwable getCause() {
        // "Cause" is often used for clustering exceptions, and developers don't want to have it
        // for this exception. b/210890426
        return null;
    }
}
+11 −29
Original line number Diff line number Diff line
@@ -1488,27 +1488,18 @@ public class WallpaperManager {
                    mContext.getUserId());
            if (fd != null) {
                FileOutputStream fos = null;
                final Bitmap tmp = BitmapFactory.decodeStream(resources.openRawResource(resid));
                boolean ok = false;
                try {
                    // If the stream can't be decoded, treat it as an invalid input.
                    if (tmp != null) {
                    fos = new ParcelFileDescriptor.AutoCloseOutputStream(fd);
                        tmp.compress(Bitmap.CompressFormat.PNG, 100, fos);
                    copyStreamToWallpaperFile(resources.openRawResource(resid), fos);
                    // The 'close()' is the trigger for any server-side image manipulation,
                    // so we must do that before waiting for completion.
                    fos.close();
                    completion.waitForCompletion();
                    } else {
                        throw new IllegalArgumentException(
                                "Resource 0x" + Integer.toHexString(resid) + " is invalid");
                    }
                } finally {
                    // Might be redundant but completion shouldn't wait unless the write
                    // succeeded; this is a fallback if it threw past the close+wait.
                    IoUtils.closeQuietly(fos);
                    if (tmp != null) {
                        tmp.recycle();
                    }
                }
            }
        } catch (RemoteException e) {
@@ -1750,22 +1741,13 @@ public class WallpaperManager {
                    result, which, completion, mContext.getUserId());
            if (fd != null) {
                FileOutputStream fos = null;
                final Bitmap tmp = BitmapFactory.decodeStream(bitmapData);
                try {
                    // If the stream can't be decoded, treat it as an invalid input.
                    if (tmp != null) {
                    fos = new ParcelFileDescriptor.AutoCloseOutputStream(fd);
                        tmp.compress(Bitmap.CompressFormat.PNG, 100, fos);
                    copyStreamToWallpaperFile(bitmapData, fos);
                    fos.close();
                    completion.waitForCompletion();
                    } else {
                        throw new IllegalArgumentException("InputStream is invalid");
                    }
                } finally {
                    IoUtils.closeQuietly(fos);
                    if (tmp != null) {
                        tmp.recycle();
                    }
                }
            }
        } catch (RemoteException e) {
+8 −0
Original line number Diff line number Diff line
@@ -158,6 +158,14 @@ public class LocalePickerWithRegion extends ListFragment implements SearchView.O
        setListAdapter(mAdapter);
    }

    @Override
    public void onViewCreated(View view, Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
        // In order to make the list view work with CollapsingToolbarLayout,
        // we have to enable the nested scrolling feature of the list view.
        getListView().setNestedScrollingEnabled(true);
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem menuItem) {
        int id = menuItem.getItemId();
+3 −0
Original line number Diff line number Diff line
@@ -43,6 +43,9 @@
    <!-- PiP minimum size, which is a % based off the shorter side of display width and height -->
    <fraction name="config_pipShortestEdgePercent">40%</fraction>

    <!-- Show PiP enter split icon, which allows apps to directly enter splitscreen from PiP. -->
    <bool name="config_pipEnableEnterSplitButton">false</bool>

    <!-- Animation duration when using long press on recents to dock -->
    <integer name="long_press_dock_anim_duration">250</integer>

+2 −1
Original line number Diff line number Diff line
@@ -1724,6 +1724,7 @@ public class BubbleStackView extends FrameLayout

    /**
     * Changes the expanded state of the stack.
     * Don't call this directly, call mBubbleData#setExpanded.
     *
     * @param shouldExpand whether the bubble stack should appear expanded
     */
@@ -1770,7 +1771,7 @@ public class BubbleStackView extends FrameLayout
            } else if (mManageEduView != null && mManageEduView.getVisibility() == VISIBLE) {
                mManageEduView.hide();
            } else {
                setExpanded(false);
                mBubbleData.setExpanded(false);
            }
        }
    }
Loading