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

Commit eff2fc7a authored by android-build-team Robot's avatar android-build-team Robot
Browse files

release-request-336ddfb0-c762-4bda-8684-20198669642d-for-git_oc-mr1-release-43...

release-request-336ddfb0-c762-4bda-8684-20198669642d-for-git_oc-mr1-release-4346879 snap-temp-L51800000104038734

Change-Id: Icc0c11736f93db001153af435cc049be737eaabf
parents 6eb39f98 745388d5
Loading
Loading
Loading
Loading
+16 −4
Original line number Diff line number Diff line
@@ -62,7 +62,10 @@ public class VrManager {
     * @param callback The callback to register.
     * @hide
     */
    @RequiresPermission(android.Manifest.permission.RESTRICTED_VR_ACCESS)
    @RequiresPermission(anyOf = {
            android.Manifest.permission.RESTRICTED_VR_ACCESS,
            android.Manifest.permission.ACCESS_VR_STATE
    })
    public void registerVrStateCallback(VrStateCallback callback, @NonNull Handler handler) {
        if (callback == null || mCallbackMap.containsKey(callback)) {
            return;
@@ -88,7 +91,10 @@ public class VrManager {
     * @param callback The callback to deregister.
     * @hide
     */
    @RequiresPermission(android.Manifest.permission.RESTRICTED_VR_ACCESS)
    @RequiresPermission(anyOf = {
            android.Manifest.permission.RESTRICTED_VR_ACCESS,
            android.Manifest.permission.ACCESS_VR_STATE
    })
    public void unregisterVrStateCallback(VrStateCallback callback) {
        CallbackEntry entry = mCallbackMap.remove(callback);
        if (entry != null) {
@@ -110,7 +116,10 @@ public class VrManager {
     * Returns the current VrMode state.
     * @hide
     */
    @RequiresPermission(android.Manifest.permission.ACCESS_VR_STATE)
    @RequiresPermission(anyOf = {
            android.Manifest.permission.RESTRICTED_VR_ACCESS,
            android.Manifest.permission.ACCESS_VR_STATE
    })
    public boolean getVrModeEnabled() {
        try {
            return mService.getVrModeState();
@@ -124,7 +133,10 @@ public class VrManager {
     * Returns the current VrMode state.
     * @hide
     */
    @RequiresPermission(android.Manifest.permission.ACCESS_VR_STATE)
    @RequiresPermission(anyOf = {
            android.Manifest.permission.RESTRICTED_VR_ACCESS,
            android.Manifest.permission.ACCESS_VR_STATE
    })
    public boolean getPersistentVrModeEnabled() {
        try {
            return mService.getPersistentVrModeEnabled();
+4 −3
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@ package android.hardware.camera2;

import android.annotation.IntRange;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.graphics.Bitmap;
import android.graphics.Color;
import android.graphics.ImageFormat;
@@ -37,6 +36,7 @@ import java.nio.ByteBuffer;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Locale;
import java.util.TimeZone;

/**
@@ -122,7 +122,7 @@ public final class DngCreator implements AutoCloseable {
        // Create this fresh each time since the time zone may change while a long-running application
        // is active.
        final DateFormat dateTimeStampFormat =
            new SimpleDateFormat(TIFF_DATETIME_FORMAT);
                new SimpleDateFormat(TIFF_DATETIME_FORMAT, Locale.US);
        dateTimeStampFormat.setTimeZone(TimeZone.getDefault());

        // Format for metadata
@@ -472,7 +472,8 @@ public final class DngCreator implements AutoCloseable {

    private static final String GPS_DATE_FORMAT_STR = "yyyy:MM:dd";
    private static final String TIFF_DATETIME_FORMAT = "yyyy:MM:dd HH:mm:ss";
    private static final DateFormat sExifGPSDateStamp = new SimpleDateFormat(GPS_DATE_FORMAT_STR);
    private static final DateFormat sExifGPSDateStamp =
            new SimpleDateFormat(GPS_DATE_FORMAT_STR, Locale.US);
    private final Calendar mGPSTimeStampCalendar = Calendar
            .getInstance(TimeZone.getTimeZone("UTC"));

+40 −0
Original line number Diff line number Diff line
@@ -127,6 +127,7 @@ import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
@@ -1078,6 +1079,29 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
     * <a href="#attr_android:autofillHint"> {@code android:autofillHint}</a> (in which case the
     * value should be <code>{@value #AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DATE}</code>).
     *
     * <p>When annotating a view with this hint, it's recommended to use a date autofill value to
     * avoid ambiguity when the autofill service provides a value for it. To understand why a
     * value can be ambiguous, consider "April of 2020", which could be represented as either of
     * the following options:
     *
     * <ul>
     *   <li>{@code "04/2020"}
     *   <li>{@code "4/2020"}
     *   <li>{@code "2020/04"}
     *   <li>{@code "2020/4"}
     *   <li>{@code "April/2020"}
     *   <li>{@code "Apr/2020"}
     * </ul>
     *
     * <p>You define a date autofill value for the view by overriding the following methods:
     *
     * <ol>
     *   <li>{@link #getAutofillType()} to return {@link #AUTOFILL_TYPE_DATE}.
     *   <li>{@link #getAutofillValue()} to return a
     *       {@link AutofillValue#forDate(long) date autofillvalue}.
     *   <li>{@link #autofill(AutofillValue)} to expect a data autofillvalue.
     * </ol>
     *
     * <p>See {@link #setAutofillHints(String...)} for more info about autofill hints.
     */
    public static final String AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DATE =
@@ -1090,6 +1114,22 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
     * <a href="#attr_android:autofillHint"> {@code android:autofillHint}</a> (in which case the
     * value should be <code>{@value #AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_MONTH}</code>).
     *
     * <p>When annotating a view with this hint, it's recommended to use a text autofill value
     * whose value is the numerical representation of the month, starting on {@code 1} to avoid
     * ambiguity when the autofill service provides a value for it. To understand why a
     * value can be ambiguous, consider "January", which could be represented as either of
     *
     * <ul>
     *   <li>{@code "1"}: recommended way.
     *   <li>{@code "0"}: if following the {@link Calendar#MONTH} convention.
     *   <li>{@code "January"}: full name, in English.
     *   <li>{@code "jan"}: abbreviated name, in English.
     *   <li>{@code "Janeiro"}: full name, in another language.
     * </ul>
     *
     * <p>Another recommended approach is to use a date autofill value - see
     * {@link #AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DATE} for more details.
     *
     * <p>See {@link #setAutofillHints(String...)} for more info about autofill hints.
     */
    public static final String AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_MONTH =
+5 −5
Original line number Diff line number Diff line
@@ -44,7 +44,7 @@ import android.view.View;

import com.android.internal.annotations.GuardedBy;
import com.android.internal.logging.MetricsLogger;
import com.android.internal.logging.nano.MetricsProto;
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;

import java.io.PrintWriter;
import java.lang.annotation.Retention;
@@ -1245,10 +1245,10 @@ public final class AutofillManager {
                }
            }

            final LogMaker log = new LogMaker(MetricsProto.MetricsEvent.AUTOFILL_DATASET_APPLIED);
            log.addTaggedData(MetricsProto.MetricsEvent.FIELD_AUTOFILL_NUM_VALUES, itemCount);
            log.addTaggedData(MetricsProto.MetricsEvent.FIELD_AUTOFILL_NUM_VIEWS_FILLED,
                    numApplied);
            final LogMaker log = new LogMaker(MetricsEvent.AUTOFILL_DATASET_APPLIED)
                    .setPackageName(mContext.getPackageName())
                    .addTaggedData(MetricsEvent.FIELD_AUTOFILL_NUM_VALUES, itemCount)
                    .addTaggedData(MetricsEvent.FIELD_AUTOFILL_NUM_VIEWS_FILLED, numApplied);
            mMetricsLogger.write(log);
        }
    }
+7 −36
Original line number Diff line number Diff line
@@ -2723,25 +2723,20 @@ public class WebView extends AbsoluteLayout
     *   {@code IFRAME}, in which case it would be treated the same way as multiple forms described
     *   above, except that the {@link ViewStructure#setWebDomain(String) web domain} of the
     *   {@code FORM} contains the {@code src} attribute from the {@code IFRAME} node.
     *   <li>If the Android SDK provides a similar View, then should be set with the
     *   fully-qualified class name of such view.
     *   <li>The W3C autofill field ({@code autocomplete} tag attribute) maps to
     *   {@link ViewStructure#setAutofillHints(String[])}.
     *   <li>The {@code type} attribute of {@code INPUT} tags maps to
     *       {@link ViewStructure#setInputType(int)}.
     *   <li>The {@code value} attribute of {@code INPUT} tags maps to
     *       {@link ViewStructure#setText(CharSequence)}.
     *   <li>If the view is editalbe, the {@link ViewStructure#setAutofillType(int)} and
     *   <li>If the view is editable, the {@link ViewStructure#setAutofillType(int)} and
     *   {@link ViewStructure#setAutofillValue(AutofillValue)} must be set.
     *   <li>The {@code placeholder} attribute maps to {@link ViewStructure#setHint(CharSequence)}.
     *   <li>Other HTML attributes can be represented through
     *   {@link ViewStructure#setHtmlInfo(android.view.ViewStructure.HtmlInfo)}.
     * </ol>
     *
     * <p>It should also call {@code structure.setDataIsSensitive(false)} for fields whose value
     * were not dynamically changed (for example, through Javascript).
     * <p>If the WebView implementation can determine that the value of a field was set statically
     * (for example, not through Javascript), it should also call
     * {@code structure.setDataIsSensitive(false)}.
     *
     * <p>Example1: an HTML form with 2 fields for username and password.
     * <p>For example, an HTML form with 2 fields for username and password:
     *
     * <pre class="prettyprint">
     *    &lt;input type="text" name="username" id="user" value="Type your username" autocomplete="username" placeholder="Email or username"&gt;
@@ -2754,51 +2749,27 @@ public class WebView extends AbsoluteLayout
     *     int index = structure.addChildCount(2);
     *     ViewStructure username = structure.newChild(index);
     *     username.setAutofillId(structure.getAutofillId(), 1); // id 1 - first child
     *     username.setClassName("input");
     *     username.setInputType("android.widget.EditText");
     *     username.setAutofillHints("username");
     *     username.setHtmlInfo(username.newHtmlInfoBuilder("input")
     *         .addAttribute("type", "text")
     *         .addAttribute("name", "username")
     *         .addAttribute("id", "user")
     *         .build());
     *     username.setHint("Email or username");
     *     username.setAutofillType(View.AUTOFILL_TYPE_TEXT);
     *     username.setAutofillValue(AutofillValue.forText("Type your username"));
     *     username.setText("Type your username");
     *     // Value of the field is not sensitive because it was not dynamically changed:
     *     // Value of the field is not sensitive because it was created statically and not changed.
     *     username.setDataIsSensitive(false);
     *
     *     ViewStructure password = structure.newChild(index + 1);
     *     username.setAutofillId(structure, 2); // id 2 - second child
     *     password.setInputType("android.widget.EditText");
     *     password.setInputType(InputType.TYPE_TEXT_VARIATION_PASSWORD);
     *     password.setAutofillHints("current-password");
     *     password.setHtmlInfo(password.newHtmlInfoBuilder("input")
     *         .addAttribute("type", "password")
     *         .addAttribute("name", "password")
     *         .addAttribute("id", "pass")
     *         .build());
     *     password.setHint("Password");
     *     password.setAutofillType(View.AUTOFILL_TYPE_TEXT);
     * </pre>
     *
     * <p>Example2: an IFRAME tag.
     *
     * <pre class="prettyprint">
     *    &lt;iframe src="https://example.com/login"/&gt;
     * </pre>
     *
     * <p>Would map to:
     *
     * <pre class="prettyprint">
     *     int index = structure.addChildCount(1);
     *     ViewStructure iframe = structure.newChildFor(index);
     *     iframe.setAutofillId(structure.getAutofillId(), 1);
     *     iframe.setHtmlInfo(iframe.newHtmlInfoBuilder("iframe")
     *         .addAttribute("src", "https://example.com/login")
     *         .build());
     * </pre>
     */
    @Override
    public void onProvideAutofillVirtualStructure(ViewStructure structure, int flags) {
Loading