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

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

Snap for 5590748 from a8e40d37 to qt-c2f2-release

Change-Id: I8a708e79aa17c215e2d8d06ae60781003c7c5e6d
parents 5c138bb3 a8e40d37
Loading
Loading
Loading
Loading
+11 −0
Original line number Original line Diff line number Diff line
@@ -120,6 +120,7 @@ public class ActivityView extends ViewGroup {


        mActivityTaskManager = ActivityTaskManager.getService();
        mActivityTaskManager = ActivityTaskManager.getService();
        mSurfaceView = new SurfaceView(context);
        mSurfaceView = new SurfaceView(context);
        mSurfaceView.setAlpha(0f);
        mSurfaceCallback = new SurfaceCallback();
        mSurfaceCallback = new SurfaceCallback();
        mSurfaceView.getHolder().addCallback(mSurfaceCallback);
        mSurfaceView.getHolder().addCallback(mSurfaceCallback);
        addView(mSurfaceView);
        addView(mSurfaceView);
@@ -346,6 +347,16 @@ public class ActivityView extends ViewGroup {
        mSurfaceView.layout(0 /* left */, 0 /* top */, r - l /* right */, b - t /* bottom */);
        mSurfaceView.layout(0 /* left */, 0 /* top */, r - l /* right */, b - t /* bottom */);
    }
    }


    @Override
    public void setAlpha(float alpha) {
        mSurfaceView.setAlpha(alpha);
    }

    @Override
    public float getAlpha() {
        return mSurfaceView.getAlpha();
    }

    @Override
    @Override
    public boolean gatherTransparentRegion(Region region) {
    public boolean gatherTransparentRegion(Region region) {
        // The tap exclude region may be affected by any view on top of it, so we detect the
        // The tap exclude region may be affected by any view on top of it, so we detect the
+8 −0
Original line number Original line Diff line number Diff line
@@ -169,4 +169,12 @@ oneway interface ITaskStackListener {
     * @param taskInfo info about the task which received the back press
     * @param taskInfo info about the task which received the back press
     */
     */
    void onBackPressedOnTaskRoot(in ActivityManager.RunningTaskInfo taskInfo);
    void onBackPressedOnTaskRoot(in ActivityManager.RunningTaskInfo taskInfo);

    /*
     * Called when contents are drawn for the first time on a display which can only contain one
     * task.
     *
     * @param displayId the id of the display on which contents are drawn.
     */
    void onSingleTaskDisplayDrawn(int displayId);
}
}
+4 −0
Original line number Original line Diff line number Diff line
@@ -173,4 +173,8 @@ public abstract class TaskStackListener extends ITaskStackListener.Stub {
    public void onBackPressedOnTaskRoot(ActivityManager.RunningTaskInfo taskInfo)
    public void onBackPressedOnTaskRoot(ActivityManager.RunningTaskInfo taskInfo)
            throws RemoteException {
            throws RemoteException {
    }
    }

    @Override
    public void onSingleTaskDisplayDrawn(int displayId) throws RemoteException {
    }
}
}
+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);
}
}
Loading