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

Commit ecaa6ec5 authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge "Making time-zone an API constant" into rvc-dev am: 59218138 am: dab8e16e am: 4d28f3a0

Change-Id: Ie578e442ca3b10d9081cc81d7f09be7b782332eb
parents 8dd36aea 4d28f3a0
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -10806,6 +10806,7 @@ package android.content {
    field public static final String EXTRA_TEMPLATE = "android.intent.extra.TEMPLATE";
    field public static final String EXTRA_TEXT = "android.intent.extra.TEXT";
    field public static final String EXTRA_TIME = "android.intent.extra.TIME";
    field public static final String EXTRA_TIMEZONE = "time-zone";
    field public static final String EXTRA_TITLE = "android.intent.extra.TITLE";
    field public static final String EXTRA_UID = "android.intent.extra.UID";
    field public static final String EXTRA_USER = "android.intent.extra.USER";
@@ -82233,3 +82234,4 @@ package org.xmlpull.v1.sax2 {
  }
}
+12 −1
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ import android.annotation.Nullable;
import android.annotation.RequiresPermission;
import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
import android.annotation.SuppressLint;
import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.app.AppGlobals;
@@ -86,6 +87,7 @@ import java.util.List;
import java.util.Locale;
import java.util.Objects;
import java.util.Set;
import java.util.TimeZone;

/**
 * An intent is an abstract description of an operation to be performed.  It
@@ -2312,7 +2314,8 @@ public class Intent implements Parcelable, Cloneable {
    /**
     * Broadcast Action: The timezone has changed. The intent will have the following extra values:</p>
     * <ul>
     *   <li><em>time-zone</em> - The java.util.TimeZone.getID() value identifying the new time zone.</li>
     *   <li>{@link #EXTRA_TIMEZONE} - The java.util.TimeZone.getID() value identifying the new
     *   time zone.</li>
     * </ul>
     *
     * <p class="note">This is a protected intent that can only be sent
@@ -5784,6 +5787,14 @@ public class Intent implements Parcelable, Cloneable {
     */
    public static final String EXTRA_TIME = "android.intent.extra.TIME";

    /**
     * Extra sent with {@link #ACTION_TIMEZONE_CHANGED} specifying the new time zone of the device.
     *
     * <p>Type: String, the same as returned by {@link TimeZone#getID()} to identify time zones.
     */
    @SuppressLint("ActionValue")
    public static final String EXTRA_TIMEZONE = "time-zone";

    /**
     * Optional int extra for {@link #ACTION_TIME_CHANGED} that indicates the
     * user has set their time format preference. See {@link #EXTRA_TIME_PREF_VALUE_USE_12_HOUR},
+1 −1
Original line number Diff line number Diff line
@@ -261,7 +261,7 @@ public class AnalogClock extends View {
        @Override
        public void onReceive(Context context, Intent intent) {
            if (intent.getAction().equals(Intent.ACTION_TIMEZONE_CHANGED)) {
                String tz = intent.getStringExtra("time-zone");
                String tz = intent.getStringExtra(Intent.EXTRA_TIMEZONE);
                mClock = Clock.system(ZoneId.of(tz));
            }

+1 −1
Original line number Diff line number Diff line
@@ -173,7 +173,7 @@ public class TextClock extends TextView {
                return; // Test disabled the clock ticks
            }
            if (mTimeZone == null && Intent.ACTION_TIMEZONE_CHANGED.equals(intent.getAction())) {
                final String timeZone = intent.getStringExtra("time-zone");
                final String timeZone = intent.getStringExtra(Intent.EXTRA_TIMEZONE);
                createTime(timeZone);
            } else if (!mShouldRunTicker && (Intent.ACTION_TIME_TICK.equals(intent.getAction())
                    || Intent.ACTION_TIME_CHANGED.equals(intent.getAction()))) {
+1 −1
Original line number Diff line number Diff line
@@ -1086,7 +1086,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
                mHandler.sendEmptyMessage(MSG_TIME_UPDATE);
            } else if (Intent.ACTION_TIMEZONE_CHANGED.equals(action)) {
                final Message msg = mHandler.obtainMessage(
                        MSG_TIMEZONE_UPDATE, intent.getStringExtra("time-zone"));
                        MSG_TIMEZONE_UPDATE, intent.getStringExtra(Intent.EXTRA_TIMEZONE));
                mHandler.sendMessage(msg);
            } else if (Intent.ACTION_BATTERY_CHANGED.equals(action)) {

Loading