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

Commit 718ba309 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Adjust Notification APIs per API council" into nyc-dev

parents 0fda52b9 96b7e20b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -4925,7 +4925,7 @@ package android.app {
    field public static final int DEFAULT_VIBRATE = 2; // 0x2
    field public static final java.lang.String EXTRA_BACKGROUND_IMAGE_URI = "android.backgroundImageUri";
    field public static final java.lang.String EXTRA_BIG_TEXT = "android.bigText";
    field public static final java.lang.String EXTRA_CHRONOMETER_COUNTS_DOWN = "android.chronometerCountsDown";
    field public static final java.lang.String EXTRA_CHRONOMETER_COUNT_DOWN = "android.chronometerCountDown";
    field public static final java.lang.String EXTRA_COMPACT_ACTIONS = "android.compactActions";
    field public static final java.lang.String EXTRA_CONVERSATION_TITLE = "android.conversationTitle";
    field public static final java.lang.String EXTRA_INFO_TEXT = "android.infoText";
@@ -5084,7 +5084,7 @@ package android.app {
    method public android.app.Notification.Builder setActions(android.app.Notification.Action...);
    method public android.app.Notification.Builder setAutoCancel(boolean);
    method public android.app.Notification.Builder setCategory(java.lang.String);
    method public android.app.Notification.Builder setChronometerCountsDown(boolean);
    method public android.app.Notification.Builder setChronometerCountDown(boolean);
    method public android.app.Notification.Builder setColor(int);
    method public deprecated android.app.Notification.Builder setContent(android.widget.RemoteViews);
    method public deprecated android.app.Notification.Builder setContentInfo(java.lang.CharSequence);
+6 −6
Original line number Diff line number Diff line
@@ -5070,7 +5070,7 @@ package android.app {
    field public static final int DEFAULT_VIBRATE = 2; // 0x2
    field public static final java.lang.String EXTRA_BACKGROUND_IMAGE_URI = "android.backgroundImageUri";
    field public static final java.lang.String EXTRA_BIG_TEXT = "android.bigText";
    field public static final java.lang.String EXTRA_CHRONOMETER_COUNTS_DOWN = "android.chronometerCountsDown";
    field public static final java.lang.String EXTRA_CHRONOMETER_COUNT_DOWN = "android.chronometerCountDown";
    field public static final java.lang.String EXTRA_COMPACT_ACTIONS = "android.compactActions";
    field public static final java.lang.String EXTRA_CONVERSATION_TITLE = "android.conversationTitle";
    field public static final java.lang.String EXTRA_INFO_TEXT = "android.infoText";
@@ -5231,7 +5231,7 @@ package android.app {
    method public android.app.Notification.Builder setActions(android.app.Notification.Action...);
    method public android.app.Notification.Builder setAutoCancel(boolean);
    method public android.app.Notification.Builder setCategory(java.lang.String);
    method public android.app.Notification.Builder setChronometerCountsDown(boolean);
    method public android.app.Notification.Builder setChronometerCountDown(boolean);
    method public android.app.Notification.Builder setColor(int);
    method public deprecated android.app.Notification.Builder setContent(android.widget.RemoteViews);
    method public deprecated android.app.Notification.Builder setContentInfo(java.lang.CharSequence);
@@ -31762,6 +31762,7 @@ package android.os {
    method public android.os.UserHandle getUserForSerialNumber(long);
    method public java.lang.String getUserName();
    method public java.util.List<android.os.UserHandle> getUserProfiles();
    method public int getUserRestrictionSource(java.lang.String, android.os.UserHandle);
    method public android.os.Bundle getUserRestrictions();
    method public android.os.Bundle getUserRestrictions(android.os.UserHandle);
    method public boolean hasUserRestriction(java.lang.String);
@@ -31779,7 +31780,6 @@ package android.os {
    method public deprecated void setUserRestrictions(android.os.Bundle);
    method public deprecated void setUserRestrictions(android.os.Bundle, android.os.UserHandle);
    method public static boolean supportsMultipleUsers();
    method public int getUserRestrictionSource(java.lang.String, android.os.UserHandle);
    field public static final java.lang.String ALLOW_PARENT_PROFILE_APP_LINKING = "allow_parent_profile_app_linking";
    field public static final java.lang.String DISALLOW_ADD_USER = "no_add_user";
    field public static final java.lang.String DISALLOW_ADJUST_VOLUME = "no_adjust_volume";
@@ -31815,12 +31815,12 @@ package android.os {
    field public static final java.lang.String DISALLOW_USB_FILE_TRANSFER = "no_usb_file_transfer";
    field public static final java.lang.String ENSURE_VERIFY_APPS = "ensure_verify_apps";
    field public static final java.lang.String KEY_RESTRICTIONS_PENDING = "restrictions_pending";
    field public static final int USER_CREATION_FAILED_NOT_PERMITTED = 1; // 0x1
    field public static final int USER_CREATION_FAILED_NO_MORE_USERS = 2; // 0x2
    field public static final int RESTRICTION_NOT_SET = 0; // 0x0
    field public static final int RESTRICTION_SOURCE_SYSTEM = 1; // 0x1
    field public static final int RESTRICTION_SOURCE_DEVICE_OWNER = 2; // 0x2
    field public static final int RESTRICTION_SOURCE_PROFILE_OWNER = 4; // 0x4
    field public static final int RESTRICTION_SOURCE_SYSTEM = 1; // 0x1
    field public static final int USER_CREATION_FAILED_NOT_PERMITTED = 1; // 0x1
    field public static final int USER_CREATION_FAILED_NO_MORE_USERS = 2; // 0x2
  }
  public static abstract class UserManager.UserRestrictionSource implements java.lang.annotation.Annotation {
+2 −2
Original line number Diff line number Diff line
@@ -4926,7 +4926,7 @@ package android.app {
    field public static final int DEFAULT_VIBRATE = 2; // 0x2
    field public static final java.lang.String EXTRA_BACKGROUND_IMAGE_URI = "android.backgroundImageUri";
    field public static final java.lang.String EXTRA_BIG_TEXT = "android.bigText";
    field public static final java.lang.String EXTRA_CHRONOMETER_COUNTS_DOWN = "android.chronometerCountsDown";
    field public static final java.lang.String EXTRA_CHRONOMETER_COUNT_DOWN = "android.chronometerCountDown";
    field public static final java.lang.String EXTRA_COMPACT_ACTIONS = "android.compactActions";
    field public static final java.lang.String EXTRA_CONVERSATION_TITLE = "android.conversationTitle";
    field public static final java.lang.String EXTRA_INFO_TEXT = "android.infoText";
@@ -5085,7 +5085,7 @@ package android.app {
    method public android.app.Notification.Builder setActions(android.app.Notification.Action...);
    method public android.app.Notification.Builder setAutoCancel(boolean);
    method public android.app.Notification.Builder setCategory(java.lang.String);
    method public android.app.Notification.Builder setChronometerCountsDown(boolean);
    method public android.app.Notification.Builder setChronometerCountDown(boolean);
    method public android.app.Notification.Builder setColor(int);
    method public deprecated android.app.Notification.Builder setContent(android.widget.RemoteViews);
    method public deprecated android.app.Notification.Builder setContentInfo(java.lang.CharSequence);
+16 −15
Original line number Diff line number Diff line
@@ -55,11 +55,9 @@ import android.text.style.RelativeSizeSpan;
import android.text.style.TextAppearanceSpan;
import android.util.Log;
import android.util.SparseArray;
import android.util.TypedValue;
import android.view.Gravity;
import android.view.NotificationHeaderView;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ProgressBar;
import android.widget.RemoteViews;

@@ -867,8 +865,9 @@ public class Notification implements Parcelable
    /**
     * {@link #extras} key: whether the chronometer set on the notification should count down
     * instead of counting up. Is only relevant if key {@link #EXTRA_SHOW_CHRONOMETER} is present.
     * This extra is a boolean. The default is false.
     */
    public static final String EXTRA_CHRONOMETER_COUNTS_DOWN = "android.chronometerCountsDown";
    public static final String EXTRA_CHRONOMETER_COUNT_DOWN = "android.chronometerCountDown";

    /**
     * {@link #extras} key: whether {@link #when} should be shown,
@@ -934,12 +933,13 @@ public class Notification implements Parcelable
    /**
     * {@link #extras} key: the username to be displayed for all messages sent by the user including
     * direct replies
     * {@link android.app.Notification.MessagingStyle} notification.
     * {@link android.app.Notification.MessagingStyle} notification. This extra is a
     * {@link CharSequence}
     */
    public static final String EXTRA_SELF_DISPLAY_NAME = "android.selfDisplayName";

    /**
     * {@link #extras} key: a {@link String} to be displayed as the title to a conversation
     * {@link #extras} key: a {@link CharSequence} to be displayed as the title to a conversation
     * represented by a {@link android.app.Notification.MessagingStyle}
     */
    public static final String EXTRA_CONVERSATION_TITLE = "android.conversationTitle";
@@ -947,7 +947,8 @@ public class Notification implements Parcelable
    /**
     * {@link #extras} key: an array of {@link android.app.Notification.MessagingStyle.Message}
     * bundles provided by a
     * {@link android.app.Notification.MessagingStyle} notification.
     * {@link android.app.Notification.MessagingStyle} notification. This extra is a parcelable
     * array of bundles.
     */
    public static final String EXTRA_MESSAGES = "android.messages";

@@ -2337,11 +2338,11 @@ public class Notification implements Parcelable
         * Useful when showing an elapsed time (like an ongoing phone call).
         *
         * The counter can also be set to count down to <code>when</code> when using
         * {@link #setChronometerCountsDown(boolean)}.
         * {@link #setChronometerCountDown(boolean)}.
         *
         * @see android.widget.Chronometer
         * @see Notification#when
         * @see #setChronometerCountsDown(boolean)
         * @see #setChronometerCountDown(boolean)
         */
        public Builder setUsesChronometer(boolean b) {
            mN.extras.putBoolean(EXTRA_SHOW_CHRONOMETER, b);
@@ -2356,8 +2357,8 @@ public class Notification implements Parcelable
         *
         * @see #setUsesChronometer(boolean)
         */
        public Builder setChronometerCountsDown(boolean countsDown) {
            mN.extras.putBoolean(EXTRA_CHRONOMETER_COUNTS_DOWN, countsDown);
        public Builder setChronometerCountDown(boolean countDown) {
            mN.extras.putBoolean(EXTRA_CHRONOMETER_COUNT_DOWN, countDown);
            return this;
        }

@@ -3288,7 +3289,7 @@ public class Notification implements Parcelable
                    contentView.setLong(R.id.chronometer, "setBase",
                            mN.when + (SystemClock.elapsedRealtime() - System.currentTimeMillis()));
                    contentView.setBoolean(R.id.chronometer, "setStarted", true);
                    boolean countsDown = mN.extras.getBoolean(EXTRA_CHRONOMETER_COUNTS_DOWN);
                    boolean countsDown = mN.extras.getBoolean(EXTRA_CHRONOMETER_COUNT_DOWN);
                    contentView.setChronometerCountDown(R.id.chronometer, countsDown);
                } else {
                    contentView.setViewVisibility(R.id.time, View.VISIBLE);
@@ -3559,8 +3560,8 @@ public class Notification implements Parcelable
                    savedBundle.getBoolean(EXTRA_SHOW_WHEN));
            publicExtras.putBoolean(EXTRA_SHOW_CHRONOMETER,
                    savedBundle.getBoolean(EXTRA_SHOW_CHRONOMETER));
            publicExtras.putBoolean(EXTRA_CHRONOMETER_COUNTS_DOWN,
                    savedBundle.getBoolean(EXTRA_CHRONOMETER_COUNTS_DOWN));
            publicExtras.putBoolean(EXTRA_CHRONOMETER_COUNT_DOWN,
                    savedBundle.getBoolean(EXTRA_CHRONOMETER_COUNT_DOWN));
            publicExtras.putCharSequence(EXTRA_TITLE,
                    mContext.getString(R.string.notification_hidden_text));
            mN.extras = publicExtras;
@@ -4459,8 +4460,8 @@ public class Notification implements Parcelable
            super.restoreFromExtras(extras);

            mMessages.clear();
            mUserDisplayName = extras.getString(EXTRA_SELF_DISPLAY_NAME);
            mConversationTitle = extras.getString(EXTRA_CONVERSATION_TITLE);
            mUserDisplayName = extras.getCharSequence(EXTRA_SELF_DISPLAY_NAME);
            mConversationTitle = extras.getCharSequence(EXTRA_CONVERSATION_TITLE);
            Parcelable[] parcelables = extras.getParcelableArray(EXTRA_MESSAGES);
            if (parcelables != null && parcelables instanceof Parcelable[]) {
                mMessages = Message.getMessagesFromBundleArray(parcelables);