Modified to display valid value set in Role when capturing log dump
Though the value is set in Role, it only has been displayed when there is overrided value for test.
So now, the value set in Role is displayed regardless of override when capturing log dump.
Test: Capture log dump
Bug: 293817231
Change-Id: Ia071e78c6245f3a712fe8142d666e955803fcc49
Signed-off-by: Junyeong Bak <junyeong.bak@samsung.com>
diff --git a/src/com/android/server/telecom/RoleManagerAdapterImpl.java b/src/com/android/server/telecom/RoleManagerAdapterImpl.java
index ac35b3d..e8f5604 100644
--- a/src/com/android/server/telecom/RoleManagerAdapterImpl.java
+++ b/src/com/android/server/telecom/RoleManagerAdapterImpl.java
@@ -185,8 +185,8 @@
pw.print("(override ");
pw.print(mOverrideDefaultCallRedirectionApp);
pw.print(") ");
- pw.print(getRoleManagerCallRedirectionApp(Binder.getCallingUserHandle()));
}
+ pw.print(getRoleManagerCallRedirectionApp(Binder.getCallingUserHandle()));
pw.println();
pw.print("DefaultCallScreeningApp: ");
@@ -194,19 +194,19 @@
pw.print("(override ");
pw.print(mOverrideDefaultCallScreeningApp);
pw.print(") ");
- pw.print(getRoleManagerCallScreeningApp(Binder.getCallingUserHandle()));
}
+ pw.print(getRoleManagerCallScreeningApp(Binder.getCallingUserHandle()));
pw.println();
pw.print("DefaultCallCompanionApps: ");
- if (mOverrideCallCompanionApps != null) {
+ if (!mOverrideCallCompanionApps.isEmpty()) {
pw.print("(override ");
pw.print(mOverrideCallCompanionApps.stream().collect(Collectors.joining(", ")));
pw.print(") ");
- List<String> appsInRole = getRoleManagerCallCompanionApps();
- if (appsInRole != null) {
- pw.print(appsInRole.stream().collect(Collectors.joining(", ")));
- }
+ }
+ List<String> appsInRole = getRoleManagerCallCompanionApps();
+ if (!appsInRole.isEmpty()) {
+ pw.print(appsInRole.stream().collect(Collectors.joining(", ")));
}
pw.println();
}