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

Commit c0dd2f7a authored by Xin Li's avatar Xin Li Committed by Automerger Merge Worker
Browse files

Merge "Merge TP1A.221005.003" am: 534ff49f

parents 0d05cf92 534ff49f
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -112,6 +112,7 @@ import android.text.TextUtils;
import android.text.format.DateFormat;
import android.util.ArrayMap;
import android.util.ArraySet;
import android.util.EventLog;
import android.util.IndentingPrintWriter;
import android.util.Log;
import android.util.LongArrayQueue;
@@ -2299,7 +2300,11 @@ public class AlarmManagerService extends SystemService {
                                + " reached for uid: " + UserHandle.formatUid(callingUid)
                                + ", callingPackage: " + callingPackage;
                Slog.w(TAG, errorMsg);
                if (callingUid != Process.SYSTEM_UID) {
                    throw new IllegalStateException(errorMsg);
                } else {
                    EventLog.writeEvent(0x534e4554, "234441463", -1, errorMsg);
                }
            }
            setImplLocked(type, triggerAtTime, triggerElapsed, windowLength, interval, operation,
                    directReceiver, listenerTag, flags, workSource, alarmClock, callingUid,
+0 −7
Original line number Diff line number Diff line
@@ -31,7 +31,6 @@ import android.util.Log;

import com.android.internal.annotations.GuardedBy;

import java.util.Objects;
import java.util.Set;

/**
@@ -87,12 +86,6 @@ public class Account implements Parcelable {
        if (TextUtils.isEmpty(type)) {
            throw new IllegalArgumentException("the type must not be empty: " + type);
        }
        if (name.length() > 200) {
            throw new IllegalArgumentException("account name is longer than 200 characters");
        }
        if (type.length() > 200) {
            throw new IllegalArgumentException("account type is longer than 200 characters");
        }
        this.name = name;
        this.type = type;
        this.accessId = accessId;
+5 −0
Original line number Diff line number Diff line
@@ -1453,6 +1453,11 @@ public class ActivityOptions extends ComponentOptions {
        return mRemoteTransition;
    }

    /** @hide */
    public void setRemoteTransition(@Nullable RemoteTransition remoteTransition) {
        mRemoteTransition = remoteTransition;
    }

    /** @hide */
    public static ActivityOptions fromBundle(Bundle bOptions) {
        return bOptions != null ? new ActivityOptions(bOptions) : null;
+8 −3
Original line number Diff line number Diff line
@@ -1598,7 +1598,13 @@ public class RemoteViews implements Parcelable, Filter {

        public BitmapCache(Parcel source) {
            mBitmaps = source.createTypedArrayList(Bitmap.CREATOR);
            mBitmapHashes = source.readSparseIntArray();
            mBitmapHashes = new SparseIntArray();
            for (int i = 0; i < mBitmaps.size(); i++) {
                Bitmap b = mBitmaps.get(i);
                if (b != null) {
                    mBitmapHashes.put(b.hashCode(), i);
                }
            }
        }

        public int getBitmapId(Bitmap b) {
@@ -1614,7 +1620,7 @@ public class RemoteViews implements Parcelable, Filter {
                        b = b.asShared();
                    }
                    mBitmaps.add(b);
                    mBitmapHashes.put(mBitmaps.size() - 1, hash);
                    mBitmapHashes.put(hash, mBitmaps.size() - 1);
                    mBitmapMemory = -1;
                    return (mBitmaps.size() - 1);
                }
@@ -1631,7 +1637,6 @@ public class RemoteViews implements Parcelable, Filter {

        public void writeBitmapsToParcel(Parcel dest, int flags) {
            dest.writeTypedList(mBitmaps, flags);
            dest.writeSparseIntArray(mBitmapHashes);
        }

        public int getBitmapMemory() {
+7 −0
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ import android.graphics.ImageDecoder;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.Icon;
import android.net.Uri;
import android.text.TextUtils;
import android.util.Log;
import android.util.Size;

@@ -108,6 +109,12 @@ public class LocalImageResolver {
                }
                break;
            case Icon.TYPE_RESOURCE:
                if (!(TextUtils.isEmpty(icon.getResPackage())
                        || context.getPackageName().equals(icon.getResPackage()))) {
                    // We can't properly resolve icons from other packages here, so fall back.
                    return icon.loadDrawable(context);
                }

                Drawable result = resolveImage(icon.getResId(), context, maxWidth, maxHeight);
                if (result != null) {
                    return tintDrawable(icon, result);
Loading