Introduce a result class for IStatusBarService#registerStatusBar()
This is a preparation to fix an issue that IME cannot enable light
navigation bar on direct-reply.
The initial state of StatusBar client is provided as return values of
IStatusBarService#registerStatusBar(). However, the way for the
client to receive the return values is to rely on "out" parameters in
the Binder method as follows.
void registerStatusBar(IStatusBar callbacks,
out List<String> iconSlots,
out List<StatusBarIcon> iconList,
out int[] switches,
out List<IBinder> binders,
out Rect fullscreenStackBounds,
out Rect dockedStackBounds);
The issue is that if I want to add a new parameter into
StatusBarManagerService to fix Bug 122439339, then it needs to be
notified back to the client via one of these out values, e.g. a new
element in "switches", which is hard to understand and maintain.
It'd be better to introduce a dedicated return object as follows.
RegisterStatusBarResult registerStatusBar(IStatusBar callbacks);
This is a purely mechanical code clean-up. Hence there should be no
behavior change.
Bug: 122439339
Test: presubmit
Change-Id: Ib1c0ae8f591ca09d0bce7a39f85ba57aad386e47
diff --git a/Android.bp b/Android.bp
index 5b8e6e1..7cc2f30 100644
--- a/Android.bp
+++ b/Android.bp
@@ -436,6 +436,7 @@
"core/java/com/android/internal/os/IShellCallback.aidl",
"core/java/com/android/internal/statusbar/IStatusBar.aidl",
"core/java/com/android/internal/statusbar/IStatusBarService.aidl",
+ "core/java/com/android/internal/statusbar/RegisterStatusBarResult.aidl",
"core/java/com/android/internal/textservice/ISpellCheckerService.aidl",
"core/java/com/android/internal/textservice/ISpellCheckerServiceCallback.aidl",
"core/java/com/android/internal/textservice/ISpellCheckerSession.aidl",