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

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

Snap for 4662252 from c5d0ed9f to pi-release

Change-Id: Idceaaf72503dfebc1c23739907977c2846c6b734
parents 0608b837 c5d0ed9f
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -868,8 +868,12 @@ include $(BUILD_STATIC_JAVA_LIBRARY)

$(eval $(call copy-one-file,frameworks/base/config/hiddenapi-blacklist.txt,\
                            $(INTERNAL_PLATFORM_HIDDENAPI_BLACKLIST)))
$(eval $(call copy-one-file,frameworks/base/config/hiddenapi-light-greylist.txt,\
                            $(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST)))

# Temporarily merge light greylist from two files. Vendor list will become dark
# grey once we remove the UI toast.
$(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST): frameworks/base/config/hiddenapi-light-greylist.txt \
                                               frameworks/base/config/hiddenapi-vendor-list.txt
	sort $^ > $@

# Generate dark greylist as private API minus (blacklist plus light greylist).

+13 −6
Original line number Diff line number Diff line
@@ -5554,7 +5554,11 @@ package android.app {
    method public java.lang.String getKey();
    method public java.lang.CharSequence getName();
    method public java.lang.String getUri();
    method public boolean isBot();
    method public boolean isImportant();
    method public android.app.Notification.Person setBot(boolean);
    method public android.app.Notification.Person setIcon(android.graphics.drawable.Icon);
    method public android.app.Notification.Person setImportant(boolean);
    method public android.app.Notification.Person setKey(java.lang.String);
    method public android.app.Notification.Person setName(java.lang.CharSequence);
    method public android.app.Notification.Person setUri(java.lang.String);
@@ -6331,6 +6335,7 @@ package android.app.admin {
    method public java.lang.CharSequence loadDescription(android.content.pm.PackageManager) throws android.content.res.Resources.NotFoundException;
    method public android.graphics.drawable.Drawable loadIcon(android.content.pm.PackageManager);
    method public java.lang.CharSequence loadLabel(android.content.pm.PackageManager);
    method public boolean supportsTransferOwnership();
    method public boolean usesPolicy(int);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.app.admin.DeviceAdminInfo> CREATOR;
@@ -6395,7 +6400,6 @@ package android.app.admin {
    field public static final java.lang.String EXTRA_DISABLE_WARNING = "android.app.extra.DISABLE_WARNING";
    field public static final java.lang.String EXTRA_LOCK_TASK_PACKAGE = "android.app.extra.LOCK_TASK_PACKAGE";
    field public static final java.lang.String EXTRA_TRANSFER_OWNERSHIP_ADMIN_EXTRAS_BUNDLE = "android.app.extra.TRANSFER_OWNERSHIP_ADMIN_EXTRAS_BUNDLE";
    field public static final java.lang.String SUPPORT_TRANSFER_OWNERSHIP_META_DATA = "android.app.support_transfer_ownership";
  }
  public class DeviceAdminService extends android.app.Service {
@@ -21249,9 +21253,10 @@ package android.inputmethodservice {
    method public final boolean switchToPreviousInputMethod();
    method public void updateFullscreenMode();
    method public void updateInputViewShown();
    field public static final int BACK_DISPOSITION_ADJUST_NOTHING = 3; // 0x3
    field public static final int BACK_DISPOSITION_DEFAULT = 0; // 0x0
    field public static final int BACK_DISPOSITION_WILL_DISMISS = 2; // 0x2
    field public static final int BACK_DISPOSITION_WILL_NOT_DISMISS = 1; // 0x1
    field public static final deprecated int BACK_DISPOSITION_WILL_DISMISS = 2; // 0x2
    field public static final deprecated int BACK_DISPOSITION_WILL_NOT_DISMISS = 1; // 0x1
  }
  public class InputMethodService.InputMethodImpl extends android.inputmethodservice.AbstractInputMethodService.AbstractInputMethodImpl {
@@ -42820,17 +42825,17 @@ package android.telephony {
    ctor public ServiceState(android.os.Parcel);
    method protected void copyFrom(android.telephony.ServiceState);
    method public int describeContents();
    method public int getCdmaNetworkId();
    method public int getCdmaSystemId();
    method public int[] getCellBandwidths();
    method public int getChannelNumber();
    method public int getDuplexMode();
    method public boolean getIsManualSelection();
    method public int getNetworkId();
    method public java.lang.String getOperatorAlphaLong();
    method public java.lang.String getOperatorAlphaShort();
    method public java.lang.String getOperatorNumeric();
    method public boolean getRoaming();
    method public int getState();
    method public int getSystemId();
    method public void setIsManualSelection(boolean);
    method public void setOperatorName(java.lang.String, java.lang.String, java.lang.String);
    method public void setRoaming(boolean);
@@ -44040,7 +44045,7 @@ package android.text {
    method public abstract int getSpanTypeId();
  }
  public class PrecomputedText implements android.text.Spanned {
  public class PrecomputedText implements android.text.Spannable {
    method public char charAt(int);
    method public static android.text.PrecomputedText create(java.lang.CharSequence, android.text.PrecomputedText.Params);
    method public int getParagraphCount();
@@ -44054,6 +44059,8 @@ package android.text {
    method public java.lang.CharSequence getText();
    method public int length();
    method public int nextSpanTransition(int, int, java.lang.Class);
    method public void removeSpan(java.lang.Object);
    method public void setSpan(java.lang.Object, int, int, int);
    method public java.lang.CharSequence subSequence(int, int);
  }
+8 −0
Original line number Diff line number Diff line
@@ -729,9 +729,14 @@ package android.app.usage {
  public final class UsageStatsManager {
    method public int getAppStandbyBucket(java.lang.String);
    method public java.util.Map<java.lang.String, java.lang.Integer> getAppStandbyBuckets();
    method public void registerAppUsageObserver(int, java.lang.String[], long, java.util.concurrent.TimeUnit, android.app.PendingIntent);
    method public void setAppStandbyBucket(java.lang.String, int);
    method public void setAppStandbyBuckets(java.util.Map<java.lang.String, java.lang.Integer>);
    method public void unregisterAppUsageObserver(int);
    method public void whitelistAppTemporarily(java.lang.String, long, android.os.UserHandle);
    field public static final java.lang.String EXTRA_OBSERVER_ID = "android.app.usage.extra.OBSERVER_ID";
    field public static final java.lang.String EXTRA_TIME_LIMIT = "android.app.usage.extra.TIME_LIMIT";
    field public static final java.lang.String EXTRA_TIME_USED = "android.app.usage.extra.TIME_USED";
    field public static final int STANDBY_BUCKET_EXEMPTED = 5; // 0x5
    field public static final int STANDBY_BUCKET_NEVER = 50; // 0x32
  }
@@ -4327,11 +4332,14 @@ package android.security.keystore.recovery {
    method public deprecated java.util.List<java.lang.String> getAliases(java.lang.String) throws android.security.keystore.recovery.InternalRecoveryServiceException;
    method public java.util.List<java.lang.String> getAliases() throws android.security.keystore.recovery.InternalRecoveryServiceException;
    method public static android.security.keystore.recovery.RecoveryController getInstance(android.content.Context);
    method public java.security.Key getKey(java.lang.String) throws android.security.keystore.recovery.InternalRecoveryServiceException, java.security.UnrecoverableKeyException;
    method public android.security.keystore.recovery.KeyChainSnapshot getKeyChainSnapshot() throws android.security.keystore.recovery.InternalRecoveryServiceException;
    method public int[] getPendingRecoverySecretTypes() throws android.security.keystore.recovery.InternalRecoveryServiceException;
    method public deprecated android.security.keystore.recovery.KeyChainSnapshot getRecoveryData() throws android.security.keystore.recovery.InternalRecoveryServiceException;
    method public int[] getRecoverySecretTypes() throws android.security.keystore.recovery.InternalRecoveryServiceException;
    method public deprecated int getRecoveryStatus(java.lang.String, java.lang.String) throws android.security.keystore.recovery.InternalRecoveryServiceException;
    method public int getRecoveryStatus(java.lang.String) throws android.security.keystore.recovery.InternalRecoveryServiceException;
    method public java.security.Key importKey(java.lang.String, byte[]) throws android.security.keystore.recovery.InternalRecoveryServiceException, android.security.keystore.recovery.LockScreenRequiredException;
    method public deprecated void initRecoveryService(java.lang.String, byte[]) throws java.security.cert.CertificateException, android.security.keystore.recovery.InternalRecoveryServiceException;
    method public void initRecoveryService(java.lang.String, byte[], byte[]) throws java.security.cert.CertificateException, android.security.keystore.recovery.InternalRecoveryServiceException;
    method public void recoverySecretAvailable(android.security.keystore.recovery.KeyChainProtectionParams) throws android.security.keystore.recovery.InternalRecoveryServiceException;
+1 −1
Original line number Diff line number Diff line
@@ -759,7 +759,7 @@ package android.telephony {
  }

  public class ServiceState implements android.os.Parcelable {
    method public void setSystemAndNetworkId(int, int);
    method public void setCdmaSystemAndNetworkId(int, int);
  }

}
+32 −32
Original line number Diff line number Diff line
@@ -34,11 +34,11 @@ FdBuffer::FdBuffer()

FdBuffer::~FdBuffer() {}

status_t FdBuffer::read(int fd, int64_t timeout) {
    struct pollfd pfds = {.fd = fd, .events = POLLIN};
status_t FdBuffer::read(unique_fd* fd, int64_t timeout) {
    struct pollfd pfds = {.fd = fd->get(), .events = POLLIN};
    mStartTime = uptimeMillis();

    fcntl(fd, F_SETFL, fcntl(fd, F_GETFL, 0) | O_NONBLOCK);
    fcntl(fd->get(), F_SETFL, fcntl(fd->get(), F_GETFL, 0) | O_NONBLOCK);

    while (true) {
        if (mBuffer.size() >= MAX_BUFFER_COUNT * BUFFER_SIZE) {
@@ -67,16 +67,16 @@ status_t FdBuffer::read(int fd, int64_t timeout) {
                VLOG("return event has error %s", strerror(errno));
                return errno != 0 ? -errno : UNKNOWN_ERROR;
            } else {
                ssize_t amt = ::read(fd, mBuffer.writeBuffer(), mBuffer.currentToWrite());
                ssize_t amt = ::read(fd->get(), mBuffer.writeBuffer(), mBuffer.currentToWrite());
                if (amt < 0) {
                    if (errno == EAGAIN || errno == EWOULDBLOCK) {
                        continue;
                    } else {
                        VLOG("Fail to read %d: %s", fd, strerror(errno));
                        VLOG("Fail to read %d: %s", fd->get(), strerror(errno));
                        return -errno;
                    }
                } else if (amt == 0) {
                    VLOG("Reached EOF of fd=%d", fd);
                    VLOG("Reached EOF of fd=%d", fd->get());
                    break;
                }
                mBuffer.wp()->move(amt);
@@ -87,7 +87,7 @@ status_t FdBuffer::read(int fd, int64_t timeout) {
    return NO_ERROR;
}

status_t FdBuffer::readFully(int fd) {
status_t FdBuffer::readFully(unique_fd* fd) {
    mStartTime = uptimeMillis();

    while (true) {
@@ -99,10 +99,10 @@ status_t FdBuffer::readFully(int fd) {
        }
        if (mBuffer.writeBuffer() == NULL) return NO_MEMORY;

        ssize_t amt =
                TEMP_FAILURE_RETRY(::read(fd, mBuffer.writeBuffer(), mBuffer.currentToWrite()));
        ssize_t amt = TEMP_FAILURE_RETRY(
                ::read(fd->get(), mBuffer.writeBuffer(), mBuffer.currentToWrite()));
        if (amt < 0) {
            VLOG("Fail to read %d: %s", fd, strerror(errno));
            VLOG("Fail to read %d: %s", fd->get(), strerror(errno));
            return -errno;
        } else if (amt == 0) {
            VLOG("Done reading %zu bytes", mBuffer.size());
@@ -116,20 +116,20 @@ status_t FdBuffer::readFully(int fd) {
    return NO_ERROR;
}

status_t FdBuffer::readProcessedDataInStream(int fd, int toFd, int fromFd, int64_t timeoutMs,
                                             const bool isSysfs) {
status_t FdBuffer::readProcessedDataInStream(unique_fd* fd, unique_fd* toFd, unique_fd* fromFd,
                                             int64_t timeoutMs, const bool isSysfs) {
    struct pollfd pfds[] = {
            {.fd = fd, .events = POLLIN},
            {.fd = toFd, .events = POLLOUT},
            {.fd = fromFd, .events = POLLIN},
            {.fd = fd->get(), .events = POLLIN},
            {.fd = toFd->get(), .events = POLLOUT},
            {.fd = fromFd->get(), .events = POLLIN},
    };

    mStartTime = uptimeMillis();

    // mark all fds non blocking
    fcntl(fd, F_SETFL, fcntl(fd, F_GETFL, 0) | O_NONBLOCK);
    fcntl(toFd, F_SETFL, fcntl(toFd, F_GETFL, 0) | O_NONBLOCK);
    fcntl(fromFd, F_SETFL, fcntl(fromFd, F_GETFL, 0) | O_NONBLOCK);
    fcntl(fd->get(), F_SETFL, fcntl(fd->get(), F_GETFL, 0) | O_NONBLOCK);
    fcntl(toFd->get(), F_SETFL, fcntl(toFd->get(), F_GETFL, 0) | O_NONBLOCK);
    fcntl(fromFd->get(), F_SETFL, fcntl(fromFd->get(), F_GETFL, 0) | O_NONBLOCK);

    // A circular buffer holds data read from fd and writes to parsing process
    uint8_t cirBuf[BUFFER_SIZE];
@@ -166,10 +166,10 @@ status_t FdBuffer::readProcessedDataInStream(int fd, int toFd, int fromFd, int64
        for (int i = 0; i < 3; ++i) {
            if ((pfds[i].revents & POLLERR) != 0) {
                if (i == 0 && isSysfs) {
                    VLOG("fd %d is sysfs, ignore its POLLERR return value", fd);
                    VLOG("fd %d is sysfs, ignore its POLLERR return value", fd->get());
                    continue;
                }
                VLOG("fd[%d]=%d returns error events: %s", i, fd, strerror(errno));
                VLOG("fd[%d]=%d returns error events: %s", i, fd->get(), strerror(errno));
                return errno != 0 ? -errno : UNKNOWN_ERROR;
            }
        }
@@ -178,17 +178,17 @@ status_t FdBuffer::readProcessedDataInStream(int fd, int toFd, int fromFd, int64
        if (cirSize != BUFFER_SIZE && pfds[0].fd != -1) {
            ssize_t amt;
            if (rpos >= wpos) {
                amt = ::read(fd, cirBuf + rpos, BUFFER_SIZE - rpos);
                amt = ::read(fd->get(), cirBuf + rpos, BUFFER_SIZE - rpos);
            } else {
                amt = ::read(fd, cirBuf + rpos, wpos - rpos);
                amt = ::read(fd->get(), cirBuf + rpos, wpos - rpos);
            }
            if (amt < 0) {
                if (!(errno == EAGAIN || errno == EWOULDBLOCK)) {
                    VLOG("Fail to read fd %d: %s", fd, strerror(errno));
                    VLOG("Fail to read fd %d: %s", fd->get(), strerror(errno));
                    return -errno;
                }  // otherwise just continue
            } else if (amt == 0) {
                VLOG("Reached EOF of input file %d", fd);
                VLOG("Reached EOF of input file %d", fd->get());
                pfds[0].fd = -1;  // reach EOF so don't have to poll pfds[0].
            } else {
                rpos += amt;
@@ -200,13 +200,13 @@ status_t FdBuffer::readProcessedDataInStream(int fd, int toFd, int fromFd, int64
        if (cirSize > 0 && pfds[1].fd != -1) {
            ssize_t amt;
            if (rpos > wpos) {
                amt = ::write(toFd, cirBuf + wpos, rpos - wpos);
                amt = ::write(toFd->get(), cirBuf + wpos, rpos - wpos);
            } else {
                amt = ::write(toFd, cirBuf + wpos, BUFFER_SIZE - wpos);
                amt = ::write(toFd->get(), cirBuf + wpos, BUFFER_SIZE - wpos);
            }
            if (amt < 0) {
                if (!(errno == EAGAIN || errno == EWOULDBLOCK)) {
                    VLOG("Fail to write toFd %d: %s", toFd, strerror(errno));
                    VLOG("Fail to write toFd %d: %s", toFd->get(), strerror(errno));
                    return -errno;
                }  // otherwise just continue
            } else {
@@ -217,8 +217,8 @@ status_t FdBuffer::readProcessedDataInStream(int fd, int toFd, int fromFd, int64

        // if buffer is empty and fd is closed, close write fd.
        if (cirSize == 0 && pfds[0].fd == -1 && pfds[1].fd != -1) {
            VLOG("Close write pipe %d", toFd);
            ::close(pfds[1].fd);
            VLOG("Close write pipe %d", toFd->get());
            toFd->reset();
            pfds[1].fd = -1;
        }

@@ -231,14 +231,14 @@ status_t FdBuffer::readProcessedDataInStream(int fd, int toFd, int fromFd, int64
        }

        // read from parsing process
        ssize_t amt = ::read(fromFd, mBuffer.writeBuffer(), mBuffer.currentToWrite());
        ssize_t amt = ::read(fromFd->get(), mBuffer.writeBuffer(), mBuffer.currentToWrite());
        if (amt < 0) {
            if (!(errno == EAGAIN || errno == EWOULDBLOCK)) {
                VLOG("Fail to read fromFd %d: %s", fromFd, strerror(errno));
                VLOG("Fail to read fromFd %d: %s", fromFd->get(), strerror(errno));
                return -errno;
            }  // otherwise just continue
        } else if (amt == 0) {
            VLOG("Reached EOF of fromFd %d", fromFd);
            VLOG("Reached EOF of fromFd %d", fromFd->get());
            break;
        } else {
            mBuffer.wp()->move(amt);
Loading