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

Commit 52643e0c authored by Ben Murdoch's avatar Ben Murdoch
Browse files

Update WebView#PictureListener for JBMR2.

Now JBMR2 constant is defined, update code and docs to use it.

Bug: 8241082
Change-Id: If221c6524b79cc259ffc71fc218b141ffe6ed790
parent 60e37947
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -334,8 +334,9 @@ public class WebView extends AbsoluteLayout
         * See {@link WebView#capturePicture} for details of the picture.
         *
         * @param view the WebView that owns the picture
         * @param picture the new picture. Applications targetting Jelly
         *         Bean MR2 or above will always receive a null Picture.
         * @param picture the new picture. Applications targeting
         *     {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR2} or above
         *     will always receive a null Picture.
         * @deprecated Deprecated due to internal changes.
         */
        @Deprecated
+2 −6
Original line number Diff line number Diff line
@@ -7909,10 +7909,8 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc
        if (mPictureListener != null) {
            // trigger picture listener for hardware layers. Software layers are
            // triggered in setNewPicture
            // TODO: Update CUR_DEVELOPMENT when appropriate JBMR2 constant is
            // available.
            Picture picture = mContext.getApplicationInfo().targetSdkVersion <
                    Build.VERSION_CODES.CUR_DEVELOPMENT ? capturePicture() : null;
                    Build.VERSION_CODES.JELLY_BEAN_MR2 ? capturePicture() : null;
            mPictureListener.onNewPicture(getWebView(), picture);
        }
    }
@@ -7998,10 +7996,8 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc
                    || mWebView.getLayerType() == View.LAYER_TYPE_SOFTWARE) {
                // trigger picture listener for software layers. Hardware layers are
                // triggered in pageSwapCallback
                // TODO: Update CUR_DEVELOPMENT when appropriate JBMR2 constant is
                // available.
                Picture picture = mContext.getApplicationInfo().targetSdkVersion <
                        Build.VERSION_CODES.CUR_DEVELOPMENT ? capturePicture() : null;
                        Build.VERSION_CODES.JELLY_BEAN_MR2 ? capturePicture() : null;
                mPictureListener.onNewPicture(getWebView(), picture);
            }
        }