Merge "Add onUnbind from OverviewProxyService, and destroy taskbar" into main
This commit is contained in:
committed by
Android (Google) Code Review
commit
2d4fff55a6
@@ -47,7 +47,9 @@ import android.content.res.Configuration;
|
||||
import android.graphics.Region;
|
||||
import android.os.Bundle;
|
||||
import android.os.IBinder;
|
||||
import android.os.IRemoteCallback;
|
||||
import android.os.Looper;
|
||||
import android.os.RemoteException;
|
||||
import android.os.SystemClock;
|
||||
import android.util.Log;
|
||||
import android.view.Choreographer;
|
||||
@@ -385,6 +387,20 @@ public class TouchInteractionService extends Service {
|
||||
taskbarManager.onNavigationBarLumaSamplingEnabled(displayId, enable));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUnbind(IRemoteCallback reply) {
|
||||
// Run everything in the same main thread block to ensure the cleanup happens before
|
||||
// sending the reply.
|
||||
MAIN_EXECUTOR.execute(() -> {
|
||||
executeForTaskbarManager(TaskbarManager::destroy);
|
||||
try {
|
||||
reply.sendResult(null);
|
||||
} catch (RemoteException e) {
|
||||
Log.w(TAG, "onUnbind: Failed to reply to OverviewProxyService", e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void executeForTouchInteractionService(
|
||||
@NonNull Consumer<TouchInteractionService> tisConsumer) {
|
||||
TouchInteractionService tis = mTis.get();
|
||||
|
||||
Reference in New Issue
Block a user