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

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

Snap for 5591509 from 4786a567 to qt-release

Change-Id: Ie3683477d0be85b332babbda05181df805345030
parents 1ba81ce6 4786a567
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -3554,11 +3554,13 @@ public final class ActivityThread extends ClientTransactionHandler {
            @NonNull RemoteCallback callback) {
            @NonNull RemoteCallback callback) {
        final ActivityClientRecord r = mActivities.get(activityToken);
        final ActivityClientRecord r = mActivities.get(activityToken);
        if (r == null) {
        if (r == null) {
            Log.w(TAG, "requestDirectActions(): no activity for " + activityToken);
            callback.sendResult(null);
            callback.sendResult(null);
            return;
            return;
        }
        }
        final int lifecycleState = r.getLifecycleState();
        final int lifecycleState = r.getLifecycleState();
        if (lifecycleState < ON_START || lifecycleState >= ON_STOP) {
        if (lifecycleState < ON_START || lifecycleState >= ON_STOP) {
            Log.w(TAG, "requestDirectActions(" + r + "): wrong lifecycle: " + lifecycleState);
            callback.sendResult(null);
            callback.sendResult(null);
            return;
            return;
        }
        }
+11 −8
Original line number Original line Diff line number Diff line
@@ -103,7 +103,7 @@ public class ClipboardManager extends android.text.ClipboardManager {
        try {
        try {
            Preconditions.checkNotNull(clip);
            Preconditions.checkNotNull(clip);
            clip.prepareToLeaveProcess(true);
            clip.prepareToLeaveProcess(true);
            mService.setPrimaryClip(clip, mContext.getOpPackageName());
            mService.setPrimaryClip(clip, mContext.getOpPackageName(), mContext.getUserId());
        } catch (RemoteException e) {
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
            throw e.rethrowFromSystemServer();
        }
        }
@@ -116,7 +116,7 @@ public class ClipboardManager extends android.text.ClipboardManager {
     */
     */
    public void clearPrimaryClip() {
    public void clearPrimaryClip() {
        try {
        try {
            mService.clearPrimaryClip(mContext.getOpPackageName());
            mService.clearPrimaryClip(mContext.getOpPackageName(), mContext.getUserId());
        } catch (RemoteException e) {
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
            throw e.rethrowFromSystemServer();
        }
        }
@@ -132,7 +132,7 @@ public class ClipboardManager extends android.text.ClipboardManager {
     */
     */
    public @Nullable ClipData getPrimaryClip() {
    public @Nullable ClipData getPrimaryClip() {
        try {
        try {
            return mService.getPrimaryClip(mContext.getOpPackageName());
            return mService.getPrimaryClip(mContext.getOpPackageName(), mContext.getUserId());
        } catch (RemoteException e) {
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
            throw e.rethrowFromSystemServer();
        }
        }
@@ -149,7 +149,8 @@ public class ClipboardManager extends android.text.ClipboardManager {
     */
     */
    public @Nullable ClipDescription getPrimaryClipDescription() {
    public @Nullable ClipDescription getPrimaryClipDescription() {
        try {
        try {
            return mService.getPrimaryClipDescription(mContext.getOpPackageName());
            return mService.getPrimaryClipDescription(mContext.getOpPackageName(),
                    mContext.getUserId());
        } catch (RemoteException e) {
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
            throw e.rethrowFromSystemServer();
        }
        }
@@ -163,7 +164,7 @@ public class ClipboardManager extends android.text.ClipboardManager {
     */
     */
    public boolean hasPrimaryClip() {
    public boolean hasPrimaryClip() {
        try {
        try {
            return mService.hasPrimaryClip(mContext.getOpPackageName());
            return mService.hasPrimaryClip(mContext.getOpPackageName(), mContext.getUserId());
        } catch (RemoteException e) {
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
            throw e.rethrowFromSystemServer();
        }
        }
@@ -174,7 +175,8 @@ public class ClipboardManager extends android.text.ClipboardManager {
            if (mPrimaryClipChangedListeners.isEmpty()) {
            if (mPrimaryClipChangedListeners.isEmpty()) {
                try {
                try {
                    mService.addPrimaryClipChangedListener(
                    mService.addPrimaryClipChangedListener(
                            mPrimaryClipChangedServiceListener, mContext.getOpPackageName());
                            mPrimaryClipChangedServiceListener, mContext.getOpPackageName(),
                            mContext.getUserId());
                } catch (RemoteException e) {
                } catch (RemoteException e) {
                    throw e.rethrowFromSystemServer();
                    throw e.rethrowFromSystemServer();
                }
                }
@@ -189,7 +191,8 @@ public class ClipboardManager extends android.text.ClipboardManager {
            if (mPrimaryClipChangedListeners.isEmpty()) {
            if (mPrimaryClipChangedListeners.isEmpty()) {
                try {
                try {
                    mService.removePrimaryClipChangedListener(
                    mService.removePrimaryClipChangedListener(
                            mPrimaryClipChangedServiceListener);
                            mPrimaryClipChangedServiceListener, mContext.getOpPackageName(),
                            mContext.getUserId());
                } catch (RemoteException e) {
                } catch (RemoteException e) {
                    throw e.rethrowFromSystemServer();
                    throw e.rethrowFromSystemServer();
                }
                }
@@ -226,7 +229,7 @@ public class ClipboardManager extends android.text.ClipboardManager {
    @Deprecated
    @Deprecated
    public boolean hasText() {
    public boolean hasText() {
        try {
        try {
            return mService.hasClipboardText(mContext.getOpPackageName());
            return mService.hasClipboardText(mContext.getOpPackageName(), mContext.getUserId());
        } catch (RemoteException e) {
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
            throw e.rethrowFromSystemServer();
        }
        }
+9 −8
Original line number Original line Diff line number Diff line
@@ -26,17 +26,18 @@ import android.content.IOnPrimaryClipChangedListener;
 * {@hide}
 * {@hide}
 */
 */
interface IClipboard {
interface IClipboard {
    void setPrimaryClip(in ClipData clip, String callingPackage);
    void setPrimaryClip(in ClipData clip, String callingPackage, int userId);
    void clearPrimaryClip(String callingPackage);
    void clearPrimaryClip(String callingPackage, int userId);
    ClipData getPrimaryClip(String pkg);
    ClipData getPrimaryClip(String pkg, int userId);
    ClipDescription getPrimaryClipDescription(String callingPackage);
    ClipDescription getPrimaryClipDescription(String callingPackage, int userId);
    boolean hasPrimaryClip(String callingPackage);
    boolean hasPrimaryClip(String callingPackage, int userId);
    void addPrimaryClipChangedListener(in IOnPrimaryClipChangedListener listener,
    void addPrimaryClipChangedListener(in IOnPrimaryClipChangedListener listener,
            String callingPackage);
            String callingPackage, int userId);
    void removePrimaryClipChangedListener(in IOnPrimaryClipChangedListener listener);
    void removePrimaryClipChangedListener(in IOnPrimaryClipChangedListener listener,
            String callingPackage, int userId);


    /**
    /**
     * Returns true if the clipboard contains text; false otherwise.
     * Returns true if the clipboard contains text; false otherwise.
     */
     */
    boolean hasClipboardText(String callingPackage);
    boolean hasClipboardText(String callingPackage, int userId);
}
}
+2 −5
Original line number Original line Diff line number Diff line
@@ -1390,11 +1390,9 @@ public class ResourcesImpl {
                @StyleableRes int[] attrs,
                @StyleableRes int[] attrs,
                @AttrRes int defStyleAttr,
                @AttrRes int defStyleAttr,
                @StyleRes int defStyleRes) {
                @StyleRes int defStyleRes) {
            Trace.traceBegin(Trace.TRACE_TAG_RESOURCES, "obtainStyledAttributes");
            TypedArray array;
            synchronized (mKey) {
            synchronized (mKey) {
                final int len = attrs.length;
                final int len = attrs.length;
                array = TypedArray.obtain(wrapper.getResources(), len);
                final TypedArray array = TypedArray.obtain(wrapper.getResources(), len);


                // XXX note that for now we only work with compiled XML files.
                // XXX note that for now we only work with compiled XML files.
                // To support generic XML files we will need to manually parse
                // To support generic XML files we will need to manually parse
@@ -1405,10 +1403,9 @@ public class ResourcesImpl {
                        array.mDataAddress, array.mIndicesAddress);
                        array.mDataAddress, array.mIndicesAddress);
                array.mTheme = wrapper;
                array.mTheme = wrapper;
                array.mXml = parser;
                array.mXml = parser;
            }
            Trace.traceEnd(Trace.TRACE_TAG_RESOURCES);
                return array;
                return array;
            }
            }
        }


        @NonNull
        @NonNull
        TypedArray resolveAttributes(@NonNull Resources.Theme wrapper,
        TypedArray resolveAttributes(@NonNull Resources.Theme wrapper,
+8 −0
Original line number Original line Diff line number Diff line
@@ -16,6 +16,7 @@


package android.os.storage;
package android.os.storage;


import android.annotation.Nullable;
import android.os.IVold;
import android.os.IVold;


/**
/**
@@ -101,4 +102,11 @@ public abstract class StorageManagerInternal {
     * @param listener The listener that will be notified on reset events.
     * @param listener The listener that will be notified on reset events.
     */
     */
    public abstract void addResetListener(ResetListener listener);
    public abstract void addResetListener(ResetListener listener);

    /**
     * Notified when any app op changes so that storage mount points can be updated if the app op
     * affects them.
     */
    public abstract void onAppOpsChanged(int code, int uid,
            @Nullable String packageName, int mode);
}
}
Loading