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

Commit cc865a5d authored by Satakshi Rana's avatar Satakshi Rana Committed by android-build-merger
Browse files

Merge "Assert only one bitmap is provided to ContentSuggestionsService." into...

Merge "Assert only one bitmap is provided to ContentSuggestionsService." into qt-qpr1-dev am: ecc65c6e
am: bcf751a4

Change-Id: Ic96bdaeb9b3e77ade24a40b00f56b508629f1a9c
parents 0d9dd2b0 bcf751a4
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -64,6 +64,10 @@ public abstract class ContentSuggestionsService extends Service {
        @Override
        public void provideContextImage(int taskId, GraphicBuffer contextImage,
                int colorSpaceId, Bundle imageContextRequestExtras) {
            if (imageContextRequestExtras.containsKey(ContentSuggestionsManager.EXTRA_BITMAP)
                    && contextImage != null) {
                throw new IllegalArgumentException("Two bitmaps provided; expected one.");
            }

            Bitmap wrappedBuffer = null;
            if (imageContextRequestExtras.containsKey(ContentSuggestionsManager.EXTRA_BITMAP)) {