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

Commit 04d7cddf authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 8650774 from b15458e4 to tm-qpr1-release

Change-Id: Ib0c2452de42601985dbe9b592a036c48bd2a06a9
parents 55a5cf38 b15458e4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -733,7 +733,7 @@ status_t TombstoneSection::BlockingCall(unique_fd& pipeWriteFd) const {
        return -errno;
    }

    const std::set<int> hal_pids = get_interesting_hal_pids();
    const std::set<int> hal_pids = get_interesting_pids();

    auto pooledBuffer = get_buffer_from_pool();
    ProtoOutputStream proto(pooledBuffer);
+30 −0
Original line number Diff line number Diff line
@@ -38,7 +38,15 @@ public class ComponentOptions {
    public static final String KEY_PENDING_INTENT_BACKGROUND_ACTIVITY_ALLOWED =
            "android.pendingIntent.backgroundActivityAllowed";

    /**
     * PendingIntent caller allows activity to be started if caller has BAL permission.
     * @hide
     */
    public static final String KEY_PENDING_INTENT_BACKGROUND_ACTIVITY_ALLOWED_BY_PERMISSION =
            "android.pendingIntent.backgroundActivityAllowedByPermission";

    private boolean mPendingIntentBalAllowed = PENDING_INTENT_BAL_ALLOWED_DEFAULT;
    private boolean mPendingIntentBalAllowedByPermission = false;

    ComponentOptions() {
    }
@@ -50,6 +58,9 @@ public class ComponentOptions {
        setPendingIntentBackgroundActivityLaunchAllowed(
                opts.getBoolean(KEY_PENDING_INTENT_BACKGROUND_ACTIVITY_ALLOWED,
                        PENDING_INTENT_BAL_ALLOWED_DEFAULT));
        setPendingIntentBackgroundActivityLaunchAllowedByPermission(
                opts.getBoolean(KEY_PENDING_INTENT_BACKGROUND_ACTIVITY_ALLOWED_BY_PERMISSION,
                        false));
    }

    /**
@@ -68,9 +79,28 @@ public class ComponentOptions {
        return mPendingIntentBalAllowed;
    }

    /**
     * Set PendingIntent activity can be launched from background if caller has BAL permission.
     * @hide
     */
    public void setPendingIntentBackgroundActivityLaunchAllowedByPermission(boolean allowed) {
        mPendingIntentBalAllowedByPermission = allowed;
    }

    /**
     * Get PendingIntent activity is allowed to be started in the background if the caller
     * has BAL permission.
     * @hide
     */
    public boolean isPendingIntentBackgroundActivityLaunchAllowedByPermission() {
        return mPendingIntentBalAllowedByPermission;
    }

    public Bundle toBundle() {
        Bundle b = new Bundle();
        b.putBoolean(KEY_PENDING_INTENT_BACKGROUND_ACTIVITY_ALLOWED, mPendingIntentBalAllowed);
        b.putBoolean(KEY_PENDING_INTENT_BACKGROUND_ACTIVITY_ALLOWED_BY_PERMISSION,
                mPendingIntentBalAllowedByPermission);
        return b;
    }
}
+0 −17
Original line number Diff line number Diff line
@@ -34,10 +34,7 @@ import android.graphics.Rect;
import android.os.Build;
import android.os.IBinder;
import android.os.Parcel;
import android.os.RemoteException;
import android.util.Log;
import android.view.DisplayCutout;
import android.window.TaskSnapshot;
import android.window.WindowContainerToken;

import java.lang.annotation.Retention;
@@ -348,20 +345,6 @@ public class TaskInfo {
        return isVisible;
    }

    /**
     * @param isLowResolution
     * @return
     * @hide
     */
    public TaskSnapshot getTaskSnapshot(boolean isLowResolution) {
        try {
            return ActivityTaskManager.getService().getTaskSnapshot(taskId, isLowResolution);
        } catch (RemoteException e) {
            Log.e(TAG, "Failed to get task snapshot, taskId=" + taskId, e);
            return null;
        }
    }

    /** @hide */
    @NonNull
    @TestApi
+0 −1
Original line number Diff line number Diff line
@@ -46,6 +46,5 @@ interface INfcTag
    int getMaxTransceiveLength(int technology);
    boolean getExtendedLengthApdusSupported();

    void setTagUpToDate(long cookie);
    boolean isTagUpToDate(long cookie);
}
+9 −14
Original line number Diff line number Diff line
@@ -34,7 +34,6 @@ import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.RemoteException;
import android.os.SystemClock;

import java.io.IOException;
import java.util.Arrays;
@@ -119,17 +118,17 @@ public final class Tag implements Parcelable {
    final String[] mTechStringList;
    final Bundle[] mTechExtras;
    final int mServiceHandle;  // for use by NFC service, 0 indicates a mock
    final long mCookie;        // for accessibility checking
    final INfcTag mTagService; // interface to NFC service, will be null if mock tag

    int mConnectedTechnology;
    long mCookie;

    /**
     * Hidden constructor to be used by NFC service and internal classes.
     * @hide
     */
    public Tag(byte[] id, int[] techList, Bundle[] techListExtras, int serviceHandle,
            INfcTag tagService) {
            long cookie, INfcTag tagService) {
        if (techList == null) {
            throw new IllegalArgumentException("rawTargets cannot be null");
        }
@@ -139,20 +138,13 @@ public final class Tag implements Parcelable {
        // Ensure mTechExtras is as long as mTechList
        mTechExtras = Arrays.copyOf(techListExtras, techList.length);
        mServiceHandle = serviceHandle;
        mCookie = cookie;
        mTagService = tagService;

        mConnectedTechnology = -1;
        mCookie = SystemClock.elapsedRealtime();

        if (tagService == null) {
            return;
        }

        try {
            tagService.setTagUpToDate(mCookie);
        } catch (RemoteException e) {
            throw e.rethrowAsRuntimeException();
        }
    }

    /**
@@ -165,9 +157,10 @@ public final class Tag implements Parcelable {
     * @return freshly constructed tag
     * @hide
     */
    public static Tag createMockTag(byte[] id, int[] techList, Bundle[] techListExtras) {
    public static Tag createMockTag(byte[] id, int[] techList, Bundle[] techListExtras,
            long cookie) {
        // set serviceHandle to 0 and tagService to null to indicate mock tag
        return new Tag(id, techList, techListExtras, 0, null);
        return new Tag(id, techList, techListExtras, 0, cookie, null);
    }

    private String[] generateTechStringList(int[] techList) {
@@ -445,6 +438,7 @@ public final class Tag implements Parcelable {
        dest.writeIntArray(mTechList);
        dest.writeTypedArray(mTechExtras, 0);
        dest.writeInt(mServiceHandle);
        dest.writeLong(mCookie);
        dest.writeInt(isMock);
        if (isMock == 0) {
            dest.writeStrongBinder(mTagService.asBinder());
@@ -463,6 +457,7 @@ public final class Tag implements Parcelable {
            in.readIntArray(techList);
            Bundle[] techExtras = in.createTypedArray(Bundle.CREATOR);
            int serviceHandle = in.readInt();
            long cookie = in.readLong();
            int isMock = in.readInt();
            if (isMock == 0) {
                tagService = INfcTag.Stub.asInterface(in.readStrongBinder());
@@ -471,7 +466,7 @@ public final class Tag implements Parcelable {
                tagService = null;
            }

            return new Tag(id, techList, techExtras, serviceHandle, tagService);
            return new Tag(id, techList, techExtras, serviceHandle, cookie, tagService);
        }

        @Override
Loading