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

Commit a293fbab authored by Android Build Merger (Role)'s avatar Android Build Merger (Role) Committed by Android (Google) Code Review
Browse files

Merge changes Ib2ff7e44,I950d614d,Ic87c2f8e into stage-aosp-master

* changes:
  Merge "Move Binder.clearCallingIdentity" am: bd46b1c4
  Merge "Move Binder.clearCallingIdentity"
  Move Binder.clearCallingIdentity
parents 93b95bf6 bed4fde0
Loading
Loading
Loading
Loading
+9 −9
Original line number Diff line number Diff line
@@ -43,19 +43,19 @@ public class InternalDownloadProgressListener extends IDownloadProgressListener.
            return;
        }

        long token = Binder.clearCallingIdentity();
        try {
            mExecutor.execute(new Runnable() {
                @Override
                public void run() {
                long token = Binder.clearCallingIdentity();
                try {
                    mAppListener.onProgressUpdated(request, fileInfo, currentDownloadSize,
                            fullDownloadSize, currentDecodedSize, fullDecodedSize);
                }
            });
        } finally {
            Binder.restoreCallingIdentity(token);
        }
    }
        });
    }

    public void stop() {
        mIsStopped = true;
+27 −27
Original line number Diff line number Diff line
@@ -40,18 +40,18 @@ public class InternalDownloadSessionCallback extends IMbmsDownloadSessionCallbac
            return;
        }

        long token = Binder.clearCallingIdentity();
        try {
            mExecutor.execute(new Runnable() {
                @Override
                public void run() {
                long token = Binder.clearCallingIdentity();
                try {
                    mAppCallback.onError(errorCode, message);
                }
            });
        } finally {
            Binder.restoreCallingIdentity(token);
        }
    }
        });
    }

    @Override
    public void onFileServicesUpdated(final List<FileServiceInfo> services) {
@@ -59,18 +59,18 @@ public class InternalDownloadSessionCallback extends IMbmsDownloadSessionCallbac
            return;
        }

        long token = Binder.clearCallingIdentity();
        try {
            mExecutor.execute(new Runnable() {
                @Override
                public void run() {
                long token = Binder.clearCallingIdentity();
                try {
                    mAppCallback.onFileServicesUpdated(services);
                }
            });
        } finally {
            Binder.restoreCallingIdentity(token);
        }
    }
        });
    }

    @Override
    public void onMiddlewareReady() {
@@ -78,18 +78,18 @@ public class InternalDownloadSessionCallback extends IMbmsDownloadSessionCallbac
            return;
        }

        long token = Binder.clearCallingIdentity();
        try {
            mExecutor.execute(new Runnable() {
                @Override
                public void run() {
                long token = Binder.clearCallingIdentity();
                try {
                    mAppCallback.onMiddlewareReady();
                }
            });
        } finally {
            Binder.restoreCallingIdentity(token);
        }
    }
        });
    }

    public void stop() {
        mIsStopped = true;
+9 −9
Original line number Diff line number Diff line
@@ -42,18 +42,18 @@ public class InternalDownloadStatusListener extends IDownloadStatusListener.Stub
            return;
        }

        long token = Binder.clearCallingIdentity();
        try {
            mExecutor.execute(new Runnable() {
                @Override
                public void run() {
                long token = Binder.clearCallingIdentity();
                try {
                    mAppListener.onStatusUpdated(request, fileInfo, status);
                }
            });
        } finally {
            Binder.restoreCallingIdentity(token);
        }
    }
        });
    }

    public void stop() {
        mIsStopped = true;
+27 −27
Original line number Diff line number Diff line
@@ -38,18 +38,18 @@ public class InternalGroupCallCallback extends IGroupCallCallback.Stub {
            return;
        }

        long token = Binder.clearCallingIdentity();
        try {
            mExecutor.execute(new Runnable() {
                @Override
                public void run() {
                long token = Binder.clearCallingIdentity();
                try {
                    mAppCallback.onError(errorCode, message);
                }
            });
        } finally {
            Binder.restoreCallingIdentity(token);
        }
    }
        });
    }

    @Override
    public void onGroupCallStateChanged(final int state, final int reason) {
@@ -57,18 +57,18 @@ public class InternalGroupCallCallback extends IGroupCallCallback.Stub {
            return;
        }

        long token = Binder.clearCallingIdentity();
        try {
            mExecutor.execute(new Runnable() {
                @Override
                public void run() {
                long token = Binder.clearCallingIdentity();
                try {
                    mAppCallback.onGroupCallStateChanged(state, reason);
                }
            });
        } finally {
            Binder.restoreCallingIdentity(token);
        }
    }
        });
    }

    @Override
    public void onBroadcastSignalStrengthUpdated(final int signalStrength) {
@@ -76,18 +76,18 @@ public class InternalGroupCallCallback extends IGroupCallCallback.Stub {
            return;
        }

        long token = Binder.clearCallingIdentity();
        try {
            mExecutor.execute(new Runnable() {
                @Override
                public void run() {
                long token = Binder.clearCallingIdentity();
                try {
                    mAppCallback.onBroadcastSignalStrengthUpdated(signalStrength);
                }
            });
        } finally {
            Binder.restoreCallingIdentity(token);
        }
    }
        });
    }

    /** Prevents this callback from calling the app */
    public void stop() {
+36 −36
Original line number Diff line number Diff line
@@ -39,18 +39,18 @@ public class InternalGroupCallSessionCallback extends IMbmsGroupCallSessionCallb
            return;
        }

        long token = Binder.clearCallingIdentity();
        try {
            mExecutor.execute(new Runnable() {
                @Override
                public void run() {
                long token = Binder.clearCallingIdentity();
                try {
                    mAppCallback.onError(errorCode, message);
                }
            });
        } finally {
            Binder.restoreCallingIdentity(token);
        }
    }
        });
    }

    @Override
    public void onAvailableSaisUpdated(final List currentSais, final List availableSais) {
@@ -58,18 +58,18 @@ public class InternalGroupCallSessionCallback extends IMbmsGroupCallSessionCallb
            return;
        }

        long token = Binder.clearCallingIdentity();
        try {
            mExecutor.execute(new Runnable() {
                @Override
                public void run() {
                long token = Binder.clearCallingIdentity();
                try {
                    mAppCallback.onAvailableSaisUpdated(currentSais, availableSais);
                }
            });
        } finally {
            Binder.restoreCallingIdentity(token);
        }
    }
        });
    }

    @Override
    public void onServiceInterfaceAvailable(final String interfaceName, final int index) {
@@ -77,18 +77,18 @@ public class InternalGroupCallSessionCallback extends IMbmsGroupCallSessionCallb
            return;
        }

        long token = Binder.clearCallingIdentity();
        try {
            mExecutor.execute(new Runnable() {
                @Override
                public void run() {
                long token = Binder.clearCallingIdentity();
                try {
                    mAppCallback.onServiceInterfaceAvailable(interfaceName, index);
                }
            });
        } finally {
            Binder.restoreCallingIdentity(token);
        }
    }
        });
    }

    @Override
    public void onMiddlewareReady() {
@@ -96,18 +96,18 @@ public class InternalGroupCallSessionCallback extends IMbmsGroupCallSessionCallb
            return;
        }

        long token = Binder.clearCallingIdentity();
        try {
            mExecutor.execute(new Runnable() {
                @Override
                public void run() {
                long token = Binder.clearCallingIdentity();
                try {
                    mAppCallback.onMiddlewareReady();
                }
            });
        } finally {
            Binder.restoreCallingIdentity(token);
        }
    }
        });
    }

    /** Prevents this callback from calling the app */
    public void stop() {
Loading