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

Commit f196bf89 authored by Joy Babafemi's avatar Joy Babafemi Committed by Android (Google) Code Review
Browse files

Merge "Increase credman max visible dropdown credentials to 4" into main

parents 8d557a6f ddd96f38
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@
                android:id="@android:id/content"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:minWidth="@dimen/dropdown_touch_target_min_width"
                android:minHeight="@dimen/dropdown_touch_target_min_height"
                android:orientation="horizontal"
                android:layout_marginEnd="@dimen/dropdown_layout_horizontal_margin"
                android:elevation="3dp">
+1 −1
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@
                android:id="@android:id/content"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:minWidth="@dimen/dropdown_touch_target_min_width"
                android:minHeight="@dimen/dropdown_touch_target_min_height"
                android:layout_marginEnd="@dimen/dropdown_layout_horizontal_margin"
                android:elevation="3dp">

+2 −2
Original line number Diff line number Diff line
@@ -26,6 +26,6 @@
    <dimen name="autofill_dropdown_textview_min_width">112dp</dimen>
    <dimen name="autofill_dropdown_textview_max_width">230dp</dimen>
    <dimen name="dropdown_layout_horizontal_margin">24dp</dimen>
    <integer name="autofill_max_visible_datasets">3</integer>
    <dimen name="dropdown_touch_target_min_width">48dp</dimen>
    <integer name="autofill_max_visible_datasets">5</integer>
    <dimen name="dropdown_touch_target_min_height">48dp</dimen>
</resources>
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
@@ -318,7 +318,7 @@ class CredentialAutofillService : AutofillService() {
        maxInlineItemCount = maxInlineItemCount.coerceAtMost(inlineMaxSuggestedCount)
        val lastDropdownDatasetIndex = Settings.Global.getInt(this.contentResolver,
                Settings.Global.AUTOFILL_MAX_VISIBLE_DATASETS,
                (maxDropdownDisplayLimit - 1).coerceAtMost(totalEntryCount - 1))
                (maxDropdownDisplayLimit - 1)).coerceAtMost(totalEntryCount - 1)

        var i = 0
        var datasetAdded = false
+8 −1
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@
 */
package com.android.server.autofill.ui;

import static android.service.autofill.FillRequest.FLAG_VIEW_REQUESTS_CREDMAN_SERVICE;
import static com.android.server.autofill.Helper.paramsToString;
import static com.android.server.autofill.Helper.sDebug;
import static com.android.server.autofill.Helper.sFullScreenMode;
@@ -31,6 +32,7 @@ import android.graphics.drawable.Drawable;
import android.service.autofill.Dataset;
import android.service.autofill.Dataset.DatasetFieldFilter;
import android.service.autofill.FillResponse;
import android.service.autofill.Flags;
import android.text.TextUtils;
import android.util.PluralsMessageFormatter;
import android.util.Slog;
@@ -79,6 +81,7 @@ final class FillUi {
            com.android.internal.R.style.Theme_DeviceDefault_Light_Autofill;
    private static final int THEME_ID_DARK =
            com.android.internal.R.style.Theme_DeviceDefault_Autofill;
    private static final int AUTOFILL_CREDMAN_MAX_VISIBLE_DATASETS = 5;

    private static final TypedValue sTempTypedValue = new TypedValue();

@@ -211,7 +214,11 @@ final class FillUi {
            if (sVerbose) {
                Slog.v(TAG, "overriding maximum visible datasets to " + mVisibleDatasetsMaxCount);
            }
        } else {
        } else if (Flags.autofillCredmanIntegration() && (
                (response.getFlags() & FLAG_VIEW_REQUESTS_CREDMAN_SERVICE) != 0)) {
            mVisibleDatasetsMaxCount = AUTOFILL_CREDMAN_MAX_VISIBLE_DATASETS;
        }
        else {
            mVisibleDatasetsMaxCount = mContext.getResources()
                    .getInteger(com.android.internal.R.integer.autofill_max_visible_datasets);
        }