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

Commit ddd96f38 authored by Joy Babafemi's avatar Joy Babafemi
Browse files

Increase credman max visible dropdown credentials to 4

Bug: 322887813
Change-Id: Icf4cf9cefaa4a15e35531d60da1f592e97f9a7e5
parent 91eeab07
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -17,7 +17,7 @@
                android:id="@android:id/content"
                android:id="@android:id/content"
                android:layout_width="wrap_content"
                android:layout_width="wrap_content"
                android:layout_height="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:orientation="horizontal"
                android:layout_marginEnd="@dimen/dropdown_layout_horizontal_margin"
                android:layout_marginEnd="@dimen/dropdown_layout_horizontal_margin"
                android:elevation="3dp">
                android:elevation="3dp">
+1 −1
Original line number Original line Diff line number Diff line
@@ -17,7 +17,7 @@
                android:id="@android:id/content"
                android:id="@android:id/content"
                android:layout_width="wrap_content"
                android:layout_width="wrap_content"
                android:layout_height="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:layout_marginEnd="@dimen/dropdown_layout_horizontal_margin"
                android:elevation="3dp">
                android:elevation="3dp">


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


        var i = 0
        var i = 0
        var datasetAdded = false
        var datasetAdded = false
+8 −1
Original line number Original line Diff line number Diff line
@@ -15,6 +15,7 @@
 */
 */
package com.android.server.autofill.ui;
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.paramsToString;
import static com.android.server.autofill.Helper.sDebug;
import static com.android.server.autofill.Helper.sDebug;
import static com.android.server.autofill.Helper.sFullScreenMode;
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;
import android.service.autofill.Dataset.DatasetFieldFilter;
import android.service.autofill.Dataset.DatasetFieldFilter;
import android.service.autofill.FillResponse;
import android.service.autofill.FillResponse;
import android.service.autofill.Flags;
import android.text.TextUtils;
import android.text.TextUtils;
import android.util.PluralsMessageFormatter;
import android.util.PluralsMessageFormatter;
import android.util.Slog;
import android.util.Slog;
@@ -79,6 +81,7 @@ final class FillUi {
            com.android.internal.R.style.Theme_DeviceDefault_Light_Autofill;
            com.android.internal.R.style.Theme_DeviceDefault_Light_Autofill;
    private static final int THEME_ID_DARK =
    private static final int THEME_ID_DARK =
            com.android.internal.R.style.Theme_DeviceDefault_Autofill;
            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();
    private static final TypedValue sTempTypedValue = new TypedValue();


@@ -211,7 +214,11 @@ final class FillUi {
            if (sVerbose) {
            if (sVerbose) {
                Slog.v(TAG, "overriding maximum visible datasets to " + mVisibleDatasetsMaxCount);
                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()
            mVisibleDatasetsMaxCount = mContext.getResources()
                    .getInteger(com.android.internal.R.integer.autofill_max_visible_datasets);
                    .getInteger(com.android.internal.R.integer.autofill_max_visible_datasets);
        }
        }