Loading core/java/android/view/autofill/AutoFillManager.java +7 −5 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import android.content.Intent; import android.content.IntentSender; import android.graphics.Rect; import android.os.Bundle; import android.os.IBinder; import android.os.Parcelable; import android.os.RemoteException; import android.util.Log; Loading Loading @@ -131,7 +132,7 @@ public final class AutoFillManager { if (!mHasSession) { if (gainFocus) { // Starts new session. startSession(id, bounds, value); startSession(id, view.getWindowToken(), bounds, value); } } else { // Update focus on existing session. Loading Loading @@ -159,7 +160,7 @@ public final class AutoFillManager { if (!mHasSession) { if (gainFocus) { // Starts new session. startSession(id, bounds, null); startSession(id, parent.getWindowToken(), bounds, null); } } else { // Update focus on existing session. Loading Loading @@ -251,13 +252,14 @@ public final class AutoFillManager { return new AutoFillId(parent.getAccessibilityViewId(), childId); } private void startSession(AutoFillId id, Rect bounds, AutoFillValue value) { private void startSession(AutoFillId id, IBinder windowToken, Rect bounds, AutoFillValue value) { if (DEBUG) { Log.v(TAG, "startSession(): id=" + id + ", bounds=" + bounds + ", value=" + value); } try { mService.startSession(mContext.getActivityToken(), mServiceClient.asBinder(), id, bounds, value, mContext.getUserId()); mService.startSession(mContext.getActivityToken(), windowToken, mServiceClient.asBinder(), id, bounds, value, mContext.getUserId()); AutoFillClient client = getClient(); if (client != null) { client.resetableStateAvailable(); Loading core/java/android/view/autofill/IAutoFillManager.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -30,7 +30,7 @@ import android.view.autofill.IAutoFillManagerClient; */ interface IAutoFillManager { boolean addClient(in IAutoFillManagerClient client, int userId); oneway void startSession(in IBinder activityToken, in IBinder appCallback, oneway void startSession(in IBinder activityToken, IBinder windowToken, in IBinder appCallback, in AutoFillId autoFillId, in Rect bounds, in AutoFillValue value, int userId); oneway void updateSession(in IBinder activityToken, in AutoFillId id, in Rect bounds, in AutoFillValue value, int flags, int userId); Loading core/res/res/layout/autofill_save.xml +70 −35 Original line number Diff line number Diff line Loading @@ -14,44 +14,79 @@ limitations under the License. --> <!-- TODO(b/33197203) remove hardcoded color once color is final --> <RelativeLayout <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_width="fill_parent" android:layout_height="wrap_content" android:paddingStart="16dip" android:paddingEnd="16dip" android:paddingTop="16dip" android:paddingBottom="16dip" android:background="#FDF8C8"> android:elevation="16dp" android:background="?android:attr/colorBackground" android:orientation="vertical"> <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <!-- TODO(b/33197203) use.R.string once final wording is done --> <TextView android:id="@+id/autofill_save_title" android:layout_width="match_parent" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Save for autofill?" android:singleLine="true"/> android:text="@string/autofill_save_title" android:singleLine="true"> </TextView> <TextView <Space android:layout_width="0dp" android:layout_height="0dp" android:layout_weight="1" android:visibility="invisible" > </Space> <ImageView android:id="@+id/autofill_save_close" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@android:drawable/ic_close" android:background="?android:attr/selectableItemBackgroundBorderless"> </ImageView> </LinearLayout> <com.android.internal.widget.ButtonBarLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="end" android:layout_marginTop="16dp" android:layout_weight="1" android:orientation="horizontal"> <Space android:layout_width="0dp" android:layout_height="0dp" android:layout_weight="1" android:visibility="invisible" > </Space> <Button android:id="@+id/autofill_save_no" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@+id/autofill_save_title" android:layout_toLeftOf="@+id/autofill_save_yes" android:layout_marginRight="16dip" android:text="No thanks" android:textAllCaps="true" android:singleLine="true"/> style="?android:attr/buttonBarButtonStyle" android:text="@string/autofill_save_no" > </Button> <TextView <Button android:id="@+id/autofill_save_yes" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@+id/autofill_save_title" android:layout_alignParentRight="true" android:text="Save" android:textAllCaps="true" android:singleLine="true"/> style="?android:attr/buttonBarButtonStyle" android:text="@string/autofill_save_yes" > </Button> </com.android.internal.widget.ButtonBarLayout> </RelativeLayout> </LinearLayout> core/res/res/values/strings.xml +7 −0 Original line number Diff line number Diff line Loading @@ -4510,4 +4510,11 @@ <!-- Accessibility string used for describing the button in time picker that changes the dialog to circular clock mode. [CHAR LIMIT=NONE] --> <string name="time_picker_radial_mode_description">Switch to clock mode for the time input.</string> <!-- Title for the auto-fill save dialog shown when the user entered savable text [CHAR LIMIT=NONE] --> <string name="autofill_save_title">Save to <xliff:g id="label" example="MyPass">%1$s</xliff:g>?</string> <!-- Label for the auto-fill save button [CHAR LIMIT=NONE] --> <string name="autofill_save_yes">Save</string> <!-- Label for the auto-fill cancel button [CHAR LIMIT=NONE] --> <string name="autofill_save_no">No thanks</string> </resources> core/res/res/values/symbols.xml +4 −0 Original line number Diff line number Diff line Loading @@ -2842,6 +2842,10 @@ <java-symbol type="id" name="autofill_save_title" /> <java-symbol type="id" name="autofill_save_no" /> <java-symbol type="id" name="autofill_save_yes" /> <java-symbol type="id" name="autofill_save_close" /> <java-symbol type="string" name="autofill_save_title" /> <java-symbol type="string" name="autofill_save_yes" /> <java-symbol type="string" name="autofill_save_no" /> <!-- Accessibility fingerprint gestures --> <java-symbol type="string" name="capability_title_canCaptureFingerprintGestures" /> Loading Loading
core/java/android/view/autofill/AutoFillManager.java +7 −5 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import android.content.Intent; import android.content.IntentSender; import android.graphics.Rect; import android.os.Bundle; import android.os.IBinder; import android.os.Parcelable; import android.os.RemoteException; import android.util.Log; Loading Loading @@ -131,7 +132,7 @@ public final class AutoFillManager { if (!mHasSession) { if (gainFocus) { // Starts new session. startSession(id, bounds, value); startSession(id, view.getWindowToken(), bounds, value); } } else { // Update focus on existing session. Loading Loading @@ -159,7 +160,7 @@ public final class AutoFillManager { if (!mHasSession) { if (gainFocus) { // Starts new session. startSession(id, bounds, null); startSession(id, parent.getWindowToken(), bounds, null); } } else { // Update focus on existing session. Loading Loading @@ -251,13 +252,14 @@ public final class AutoFillManager { return new AutoFillId(parent.getAccessibilityViewId(), childId); } private void startSession(AutoFillId id, Rect bounds, AutoFillValue value) { private void startSession(AutoFillId id, IBinder windowToken, Rect bounds, AutoFillValue value) { if (DEBUG) { Log.v(TAG, "startSession(): id=" + id + ", bounds=" + bounds + ", value=" + value); } try { mService.startSession(mContext.getActivityToken(), mServiceClient.asBinder(), id, bounds, value, mContext.getUserId()); mService.startSession(mContext.getActivityToken(), windowToken, mServiceClient.asBinder(), id, bounds, value, mContext.getUserId()); AutoFillClient client = getClient(); if (client != null) { client.resetableStateAvailable(); Loading
core/java/android/view/autofill/IAutoFillManager.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -30,7 +30,7 @@ import android.view.autofill.IAutoFillManagerClient; */ interface IAutoFillManager { boolean addClient(in IAutoFillManagerClient client, int userId); oneway void startSession(in IBinder activityToken, in IBinder appCallback, oneway void startSession(in IBinder activityToken, IBinder windowToken, in IBinder appCallback, in AutoFillId autoFillId, in Rect bounds, in AutoFillValue value, int userId); oneway void updateSession(in IBinder activityToken, in AutoFillId id, in Rect bounds, in AutoFillValue value, int flags, int userId); Loading
core/res/res/layout/autofill_save.xml +70 −35 Original line number Diff line number Diff line Loading @@ -14,44 +14,79 @@ limitations under the License. --> <!-- TODO(b/33197203) remove hardcoded color once color is final --> <RelativeLayout <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_width="fill_parent" android:layout_height="wrap_content" android:paddingStart="16dip" android:paddingEnd="16dip" android:paddingTop="16dip" android:paddingBottom="16dip" android:background="#FDF8C8"> android:elevation="16dp" android:background="?android:attr/colorBackground" android:orientation="vertical"> <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <!-- TODO(b/33197203) use.R.string once final wording is done --> <TextView android:id="@+id/autofill_save_title" android:layout_width="match_parent" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Save for autofill?" android:singleLine="true"/> android:text="@string/autofill_save_title" android:singleLine="true"> </TextView> <TextView <Space android:layout_width="0dp" android:layout_height="0dp" android:layout_weight="1" android:visibility="invisible" > </Space> <ImageView android:id="@+id/autofill_save_close" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@android:drawable/ic_close" android:background="?android:attr/selectableItemBackgroundBorderless"> </ImageView> </LinearLayout> <com.android.internal.widget.ButtonBarLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="end" android:layout_marginTop="16dp" android:layout_weight="1" android:orientation="horizontal"> <Space android:layout_width="0dp" android:layout_height="0dp" android:layout_weight="1" android:visibility="invisible" > </Space> <Button android:id="@+id/autofill_save_no" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@+id/autofill_save_title" android:layout_toLeftOf="@+id/autofill_save_yes" android:layout_marginRight="16dip" android:text="No thanks" android:textAllCaps="true" android:singleLine="true"/> style="?android:attr/buttonBarButtonStyle" android:text="@string/autofill_save_no" > </Button> <TextView <Button android:id="@+id/autofill_save_yes" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@+id/autofill_save_title" android:layout_alignParentRight="true" android:text="Save" android:textAllCaps="true" android:singleLine="true"/> style="?android:attr/buttonBarButtonStyle" android:text="@string/autofill_save_yes" > </Button> </com.android.internal.widget.ButtonBarLayout> </RelativeLayout> </LinearLayout>
core/res/res/values/strings.xml +7 −0 Original line number Diff line number Diff line Loading @@ -4510,4 +4510,11 @@ <!-- Accessibility string used for describing the button in time picker that changes the dialog to circular clock mode. [CHAR LIMIT=NONE] --> <string name="time_picker_radial_mode_description">Switch to clock mode for the time input.</string> <!-- Title for the auto-fill save dialog shown when the user entered savable text [CHAR LIMIT=NONE] --> <string name="autofill_save_title">Save to <xliff:g id="label" example="MyPass">%1$s</xliff:g>?</string> <!-- Label for the auto-fill save button [CHAR LIMIT=NONE] --> <string name="autofill_save_yes">Save</string> <!-- Label for the auto-fill cancel button [CHAR LIMIT=NONE] --> <string name="autofill_save_no">No thanks</string> </resources>
core/res/res/values/symbols.xml +4 −0 Original line number Diff line number Diff line Loading @@ -2842,6 +2842,10 @@ <java-symbol type="id" name="autofill_save_title" /> <java-symbol type="id" name="autofill_save_no" /> <java-symbol type="id" name="autofill_save_yes" /> <java-symbol type="id" name="autofill_save_close" /> <java-symbol type="string" name="autofill_save_title" /> <java-symbol type="string" name="autofill_save_yes" /> <java-symbol type="string" name="autofill_save_no" /> <!-- Accessibility fingerprint gestures --> <java-symbol type="string" name="capability_title_canCaptureFingerprintGestures" /> Loading