diff options
author | 2023-09-22 00:03:44 +0000 | |
---|---|---|
committer | 2023-09-22 00:03:44 +0000 | |
commit | 351061a8db863d84b5b999663ed7bfdd07b51262 (patch) | |
tree | 8b59442956ee5085b8e95cddbb4aa4360d2ab1ef /java/src | |
parent | aa9ebffe912cb870a193d673740c0d55e55b8944 (diff) | |
parent | a509ca0b4f1f4621394f7c951842f11bdfc7e3bf (diff) |
Make chooser full-width in phone-portrait orientation am: a509ca0b4f
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/IntentResolver/+/24783423
Change-Id: I30e0a4a4c2b9fc3ca1bbb7dc9378d163a9bec560
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/com/android/intentresolver/grid/ChooserGridAdapter.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/java/src/com/android/intentresolver/grid/ChooserGridAdapter.java b/java/src/com/android/intentresolver/grid/ChooserGridAdapter.java index 77ae20f5..fadea934 100644 --- a/java/src/com/android/intentresolver/grid/ChooserGridAdapter.java +++ b/java/src/com/android/intentresolver/grid/ChooserGridAdapter.java @@ -164,8 +164,10 @@ public final class ChooserGridAdapter extends RecyclerView.Adapter<RecyclerView. return false; } - // Limit width to the maximum width of the chooser activity - width = Math.min(mChooserWidthPixels, width); + // Limit width to the maximum width of the chooser activity, if the maximum width is set + if (mChooserWidthPixels >= 0) { + width = Math.min(mChooserWidthPixels, width); + } int newWidth = width / mMaxTargetsPerRow; if (newWidth != mChooserTargetWidth) { |