From b9a04962585eacdb3dd91694977b3edc80127237 Mon Sep 17 00:00:00 2001 From: Tyler Gunn Date: Thu, 17 Feb 2022 08:23:54 -0800 Subject: [PATCH 1/2] Update API documentation for onRttInitiationFailure. Add intdef for reason code. Clarifying when this callback can be expected and how to handle RTT state when requested at the start of a call. Test: Docs only change Bug: 216608696 Change-Id: I86e46fbb2b0693564a41d1ca0d9f8c180d775c1a --- telecomm/java/android/telecom/Call.java | 15 ++++++++++++--- telecomm/java/android/telecom/Connection.java | 12 ++++++++++++ 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/telecomm/java/android/telecom/Call.java b/telecomm/java/android/telecom/Call.java index d94fafc6a5bf6..980ea5cd7f8cc 100644 --- a/telecomm/java/android/telecom/Call.java +++ b/telecomm/java/android/telecom/Call.java @@ -1476,12 +1476,21 @@ public final class Call { /** * Invoked when the RTT session failed to initiate for some reason, including rejection * by the remote party. + *

+ * This callback will ONLY be invoked to report a failure related to a user initiated + * session modification request (i.e. {@link Call#sendRttRequest()}). + *

+ * If a call is initiated with {@link TelecomManager#EXTRA_START_CALL_WITH_RTT} specified, + * the availability of RTT can be determined by checking {@link Details#PROPERTY_RTT} + * once the call enters state {@link Details#STATE_ACTIVE}. + * * @param call The call which the RTT initiation failure occurred on. * @param reason One of the status codes defined in - * {@link android.telecom.Connection.RttModifyStatus}, with the exception of - * {@link android.telecom.Connection.RttModifyStatus#SESSION_MODIFY_REQUEST_SUCCESS}. + * {@link android.telecom.Connection.RttModifyStatus}, with the exception of + * {@link android.telecom.Connection.RttModifyStatus#SESSION_MODIFY_REQUEST_SUCCESS}. */ - public void onRttInitiationFailure(Call call, int reason) {} + public void onRttInitiationFailure(Call call, + @android.telecom.Connection.RttModifyStatus.RttSessionModifyStatus int reason) {} /** * Invoked when Call handover from one {@link PhoneAccount} to other {@link PhoneAccount} diff --git a/telecomm/java/android/telecom/Connection.java b/telecomm/java/android/telecom/Connection.java index 467084a716a0d..21c6b479616ec 100644 --- a/telecomm/java/android/telecom/Connection.java +++ b/telecomm/java/android/telecom/Connection.java @@ -1399,6 +1399,18 @@ public abstract class Connection extends Conferenceable { * Session modify request rejected by remote user. */ public static final int SESSION_MODIFY_REQUEST_REJECTED_BY_REMOTE = 5; + + + /**@hide*/ + @Retention(RetentionPolicy.SOURCE) + @IntDef(prefix = "SESSION_MODIFY_REQUEST_", value = { + SESSION_MODIFY_REQUEST_SUCCESS, + SESSION_MODIFY_REQUEST_FAIL, + SESSION_MODIFY_REQUEST_INVALID, + SESSION_MODIFY_REQUEST_TIMED_OUT, + SESSION_MODIFY_REQUEST_REJECTED_BY_REMOTE + }) + public @interface RttSessionModifyStatus {} } /** From 9ef19b85cbc8ccc55ef8607c9420967443b20461 Mon Sep 17 00:00:00 2001 From: Yoshiaki Maruoka Date: Wed, 25 Oct 2017 13:55:49 +0900 Subject: [PATCH 2/2] Add additional logs for bootanimation The information will be printed - Message if no animation file - File name when it's loaded - Image name and path, loop information when playing - Play time at the end Bug: 220161782 Test: Manual, check logcat with and without bootanimation.zip Change-Id: I0e16bdeb4456a423649a27f7ae88f256e3fa3d19 --- cmds/bootanimation/BootAnimation.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cmds/bootanimation/BootAnimation.cpp b/cmds/bootanimation/BootAnimation.cpp index 30a8a8e724378..52fd7be0d7684 100644 --- a/cmds/bootanimation/BootAnimation.cpp +++ b/cmds/bootanimation/BootAnimation.cpp @@ -764,6 +764,7 @@ bool BootAnimation::threadLoop() { // We have no bootanimation file, so we use the stock android logo // animation. if (mZipFileName.isEmpty()) { + ALOGD("No animation file"); result = android(); } else { result = movie(); @@ -1474,6 +1475,10 @@ bool BootAnimation::playAnimation(const Animation& animation) { part.backgroundColor[2], 1.0f); + ALOGD("Playing files = %s/%s, Requested repeat = %d, playUntilComplete = %s", + animation.fileName.string(), part.path.string(), part.count, + part.playUntilComplete ? "true" : "false"); + // For the last animation, if we have progress indicator from // the system, display it. int currentProgress = android::base::GetIntProperty(PROGRESS_PROP_NAME, 0); @@ -1607,6 +1612,9 @@ bool BootAnimation::playAnimation(const Animation& animation) { } } + ALOGD("%sAnimationShownTiming End time: %" PRId64 "ms", mShuttingDown ? "Shutdown" : "Boot", + elapsedRealtime()); + return true; } @@ -1682,6 +1690,8 @@ BootAnimation::Animation* BootAnimation::loadAnimation(const String8& fn) { return nullptr; } + ALOGD("%s is loaded successfully", fn.string()); + Animation *animation = new Animation; animation->fileName = fn; animation->zip = zip;