summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
Diffstat (limited to 'java')
-rw-r--r--java/com/android/bubble/Bubble.java (renamed from java/com/android/newbubble/NewBubble.java)15
-rw-r--r--java/com/android/bubble/BubbleComponent.java (renamed from java/com/android/newbubble/NewBubbleComponent.java)14
-rw-r--r--java/com/android/bubble/BubbleInfo.java (renamed from java/com/android/newbubble/NewBubbleInfo.java)18
-rw-r--r--java/com/android/bubble/stub/BubbleStub.java (renamed from java/com/android/newbubble/stub/NewBubbleStub.java)17
-rw-r--r--java/com/android/bubble/stub/StubBubbleModule.java (renamed from java/com/android/newbubble/stub/StubNewBubbleModule.java)10
-rw-r--r--java/com/android/dialer/binary/aosp/AospDialerRootComponent.java4
-rw-r--r--java/com/android/dialer/binary/basecomponent/BaseDialerRootComponent.java4
-rw-r--r--java/com/android/dialer/binary/google/GoogleStubDialerRootComponent.java4
-rw-r--r--java/com/android/incallui/AndroidManifest.xml2
-rw-r--r--java/com/android/incallui/InCallServiceImpl.java14
-rw-r--r--java/com/android/incallui/ReturnToCallActionReceiver.java (renamed from java/com/android/incallui/NewReturnToCallActionReceiver.java)2
-rw-r--r--java/com/android/incallui/ReturnToCallController.java (renamed from java/com/android/incallui/NewReturnToCallController.java)69
-rw-r--r--java/com/android/incallui/StatusBarNotifier.java4
13 files changed, 86 insertions, 91 deletions
diff --git a/java/com/android/newbubble/NewBubble.java b/java/com/android/bubble/Bubble.java
index 785593c5c..e192e06f4 100644
--- a/java/com/android/newbubble/NewBubble.java
+++ b/java/com/android/bubble/Bubble.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2017 The Android Open Source Project
+ * Copyright (C) 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,19 +14,18 @@
* limitations under the License
*/
-package com.android.newbubble;
+package com.android.bubble;
import android.graphics.drawable.Drawable;
import android.support.annotation.NonNull;
-import com.android.newbubble.NewBubbleInfo.Action;
import java.util.List;
/**
- * Creates and manages a bubble window from information in a {@link NewBubbleInfo}. Before creating,
- * be sure to check whether bubbles may be shown using {@code Settings.canDrawOverlays(context)} and
+ * Creates and manages a bubble window from information in a {@link BubbleInfo}. Before creating, be
+ * sure to check whether bubbles may be shown using {@code Settings.canDrawOverlays(context)} and
* request permission if necessary
*/
-public interface NewBubble {
+public interface Bubble {
/**
* Make the bubble visible. Will show a short entrance animation as it enters. If the bubble is
@@ -45,14 +44,14 @@ public interface NewBubble {
*
* @param bubbleInfo the BubbleInfo to display in this Bubble.
*/
- void setBubbleInfo(@NonNull NewBubbleInfo bubbleInfo);
+ void setBubbleInfo(@NonNull BubbleInfo bubbleInfo);
/**
* Update the state and behavior of actions.
*
* @param actions the new state of the bubble's actions
*/
- void updateActions(@NonNull List<Action> actions);
+ void updateActions(@NonNull List<BubbleInfo.Action> actions);
/**
* Update the avatar from photo.
diff --git a/java/com/android/newbubble/NewBubbleComponent.java b/java/com/android/bubble/BubbleComponent.java
index e7edba6b4..7a4665e74 100644
--- a/java/com/android/newbubble/NewBubbleComponent.java
+++ b/java/com/android/bubble/BubbleComponent.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2017 The Android Open Source Project
+ * Copyright (C) 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.newbubble;
+package com.android.bubble;
import android.content.Context;
import android.support.annotation.NonNull;
@@ -22,18 +22,18 @@ import com.android.dialer.inject.HasRootComponent;
import dagger.Subcomponent;
@Subcomponent
-public abstract class NewBubbleComponent {
+public abstract class BubbleComponent {
@NonNull
- public abstract NewBubble getNewBubble();
+ public abstract Bubble getBubble();
- public static NewBubbleComponent get(Context context) {
+ public static BubbleComponent get(Context context) {
return ((HasComponent) ((HasRootComponent) context.getApplicationContext()).component())
- .newBubbleComponent();
+ .bubbleComponent();
}
/** Used to refer to the root application component. */
public interface HasComponent {
- NewBubbleComponent newBubbleComponent();
+ BubbleComponent bubbleComponent();
}
}
diff --git a/java/com/android/newbubble/NewBubbleInfo.java b/java/com/android/bubble/BubbleInfo.java
index d9232a5a0..28793a78c 100644
--- a/java/com/android/newbubble/NewBubbleInfo.java
+++ b/java/com/android/bubble/BubbleInfo.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2017 The Android Open Source Project
+ * Copyright (C) 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License
*/
-package com.android.newbubble;
+package com.android.bubble;
import android.app.PendingIntent;
import android.graphics.drawable.Drawable;
@@ -27,9 +27,9 @@ import com.google.auto.value.AutoValue;
import java.util.Collections;
import java.util.List;
-/** Info for displaying a {@link NewBubble} */
+/** Info for displaying a {@link Bubble} */
@AutoValue
-public abstract class NewBubbleInfo {
+public abstract class BubbleInfo {
@ColorInt
public abstract int getPrimaryColor();
@@ -45,10 +45,10 @@ public abstract class NewBubbleInfo {
public abstract List<Action> getActions();
public static Builder builder() {
- return new AutoValue_NewBubbleInfo.Builder().setActions(Collections.emptyList());
+ return new AutoValue_BubbleInfo.Builder().setActions(Collections.emptyList());
}
- public static Builder from(@NonNull NewBubbleInfo bubbleInfo) {
+ public static Builder from(@NonNull BubbleInfo bubbleInfo) {
return builder()
.setPrimaryColor(bubbleInfo.getPrimaryColor())
.setPrimaryIcon(bubbleInfo.getPrimaryIcon())
@@ -57,7 +57,7 @@ public abstract class NewBubbleInfo {
.setAvatar(bubbleInfo.getAvatar());
}
- /** Builder for {@link NewBubbleInfo} */
+ /** Builder for {@link BubbleInfo} */
@AutoValue.Builder
public abstract static class Builder {
@@ -71,7 +71,7 @@ public abstract class NewBubbleInfo {
public abstract Builder setActions(List<Action> actions);
- public abstract NewBubbleInfo build();
+ public abstract BubbleInfo build();
}
/** Represents actions to be shown in the bubble when expanded */
@@ -94,7 +94,7 @@ public abstract class NewBubbleInfo {
public abstract boolean isChecked();
public static Builder builder() {
- return new AutoValue_NewBubbleInfo_Action.Builder().setCheckable(true).setChecked(false);
+ return new AutoValue_BubbleInfo_Action.Builder().setCheckable(true).setChecked(false);
}
public static Builder from(@NonNull Action action) {
diff --git a/java/com/android/newbubble/stub/NewBubbleStub.java b/java/com/android/bubble/stub/BubbleStub.java
index f5121cff9..267f33f31 100644
--- a/java/com/android/newbubble/stub/NewBubbleStub.java
+++ b/java/com/android/bubble/stub/BubbleStub.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2017 The Android Open Source Project
+ * Copyright (C) 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,20 +14,19 @@
* limitations under the License
*/
-package com.android.newbubble.stub;
+package com.android.bubble.stub;
import android.graphics.drawable.Drawable;
import android.support.annotation.NonNull;
-import com.android.newbubble.NewBubble;
-import com.android.newbubble.NewBubbleInfo;
-import com.android.newbubble.NewBubbleInfo.Action;
+import com.android.bubble.Bubble;
+import com.android.bubble.BubbleInfo;
import java.util.List;
import javax.inject.Inject;
-public class NewBubbleStub implements NewBubble {
+public class BubbleStub implements Bubble {
@Inject
- public NewBubbleStub() {}
+ public BubbleStub() {}
@Override
public void show() {}
@@ -41,10 +40,10 @@ public class NewBubbleStub implements NewBubble {
}
@Override
- public void setBubbleInfo(@NonNull NewBubbleInfo bubbleInfo) {}
+ public void setBubbleInfo(@NonNull BubbleInfo bubbleInfo) {}
@Override
- public void updateActions(@NonNull List<Action> actions) {}
+ public void updateActions(@NonNull List<BubbleInfo.Action> actions) {}
@Override
public void updatePhotoAvatar(@NonNull Drawable avatar) {}
diff --git a/java/com/android/newbubble/stub/StubNewBubbleModule.java b/java/com/android/bubble/stub/StubBubbleModule.java
index 227ba5e7e..783983f2e 100644
--- a/java/com/android/newbubble/stub/StubNewBubbleModule.java
+++ b/java/com/android/bubble/stub/StubBubbleModule.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2017 The Android Open Source Project
+ * Copyright (C) 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,17 +14,17 @@
* limitations under the License.
*/
-package com.android.newbubble.stub;
+package com.android.bubble.stub;
-import com.android.newbubble.NewBubble;
+import com.android.bubble.Bubble;
import dagger.Binds;
import dagger.Module;
import javax.inject.Singleton;
@Module
-public abstract class StubNewBubbleModule {
+public abstract class StubBubbleModule {
@Binds
@Singleton
- public abstract NewBubble bindsNewBubble(NewBubbleStub newBubbleStub);
+ public abstract Bubble bindsBubble(BubbleStub bubbleStub);
}
diff --git a/java/com/android/dialer/binary/aosp/AospDialerRootComponent.java b/java/com/android/dialer/binary/aosp/AospDialerRootComponent.java
index 35f854010..969172b7f 100644
--- a/java/com/android/dialer/binary/aosp/AospDialerRootComponent.java
+++ b/java/com/android/dialer/binary/aosp/AospDialerRootComponent.java
@@ -16,6 +16,7 @@
package com.android.dialer.binary.aosp;
+import com.android.bubble.stub.StubBubbleModule;
import com.android.dialer.binary.basecomponent.BaseDialerRootComponent;
import com.android.dialer.calllog.CallLogModule;
import com.android.dialer.commandline.CommandLineModule;
@@ -39,7 +40,6 @@ import com.android.dialer.strictmode.impl.SystemStrictModeModule;
import com.android.incallui.calllocation.stub.StubCallLocationModule;
import com.android.incallui.maps.stub.StubMapsModule;
import com.android.incallui.speakeasy.StubSpeakEasyModule;
-import com.android.newbubble.stub.StubNewBubbleModule;
import com.android.voicemail.impl.VoicemailModule;
import dagger.Component;
import javax.inject.Singleton;
@@ -63,7 +63,7 @@ import javax.inject.Singleton;
StubCallLocationModule.class,
StubDuoModule.class,
StubEnrichedCallModule.class,
- StubNewBubbleModule.class,
+ StubBubbleModule.class,
StubMetricsModule.class,
StubFeedbackModule.class,
StubMapsModule.class,
diff --git a/java/com/android/dialer/binary/basecomponent/BaseDialerRootComponent.java b/java/com/android/dialer/binary/basecomponent/BaseDialerRootComponent.java
index cd95c3ee7..0495ba6ef 100644
--- a/java/com/android/dialer/binary/basecomponent/BaseDialerRootComponent.java
+++ b/java/com/android/dialer/binary/basecomponent/BaseDialerRootComponent.java
@@ -16,6 +16,7 @@
package com.android.dialer.binary.basecomponent;
+import com.android.bubble.BubbleComponent;
import com.android.dialer.calllog.CallLogComponent;
import com.android.dialer.calllog.database.CallLogDatabaseComponent;
import com.android.dialer.calllog.ui.CallLogUiComponent;
@@ -39,7 +40,6 @@ import com.android.dialer.strictmode.StrictModeComponent;
import com.android.incallui.calllocation.CallLocationComponent;
import com.android.incallui.maps.MapsComponent;
import com.android.incallui.speakeasy.SpeakEasyComponent;
-import com.android.newbubble.NewBubbleComponent;
import com.android.voicemail.VoicemailComponent;
/**
@@ -61,7 +61,7 @@ public interface BaseDialerRootComponent
MainComponent.HasComponent,
MapsComponent.HasComponent,
MetricsComponent.HasComponent,
- NewBubbleComponent.HasComponent,
+ BubbleComponent.HasComponent,
PhoneLookupComponent.HasComponent,
PhoneNumberGeoUtilComponent.HasComponent,
PreCallComponent.HasComponent,
diff --git a/java/com/android/dialer/binary/google/GoogleStubDialerRootComponent.java b/java/com/android/dialer/binary/google/GoogleStubDialerRootComponent.java
index 497d97724..f9f561a0e 100644
--- a/java/com/android/dialer/binary/google/GoogleStubDialerRootComponent.java
+++ b/java/com/android/dialer/binary/google/GoogleStubDialerRootComponent.java
@@ -16,6 +16,7 @@
package com.android.dialer.binary.google;
+import com.android.bubble.stub.StubBubbleModule;
import com.android.dialer.binary.basecomponent.BaseDialerRootComponent;
import com.android.dialer.calllog.CallLogModule;
import com.android.dialer.commandline.CommandLineModule;
@@ -39,7 +40,6 @@ import com.android.dialer.strictmode.impl.SystemStrictModeModule;
import com.android.incallui.calllocation.impl.CallLocationModule;
import com.android.incallui.maps.impl.MapsModule;
import com.android.incallui.speakeasy.StubSpeakEasyModule;
-import com.android.newbubble.stub.StubNewBubbleModule;
import com.android.voicemail.impl.VoicemailModule;
import dagger.Component;
import javax.inject.Singleton;
@@ -69,7 +69,7 @@ import javax.inject.Singleton;
StubEnrichedCallModule.class,
StubFeedbackModule.class,
StubMetricsModule.class,
- StubNewBubbleModule.class,
+ StubBubbleModule.class,
StubSimSuggestionModule.class,
StubSpamModule.class,
StubSpeakEasyModule.class,
diff --git a/java/com/android/incallui/AndroidManifest.xml b/java/com/android/incallui/AndroidManifest.xml
index a45330b73..1b5f09973 100644
--- a/java/com/android/incallui/AndroidManifest.xml
+++ b/java/com/android/incallui/AndroidManifest.xml
@@ -115,7 +115,7 @@
<receiver
android:exported="false"
- android:name=".NewReturnToCallActionReceiver"/>
+ android:name=".ReturnToCallActionReceiver"/>
</application>
diff --git a/java/com/android/incallui/InCallServiceImpl.java b/java/com/android/incallui/InCallServiceImpl.java
index a7095f818..959f13f2e 100644
--- a/java/com/android/incallui/InCallServiceImpl.java
+++ b/java/com/android/incallui/InCallServiceImpl.java
@@ -40,7 +40,7 @@ import com.android.incallui.speakeasy.SpeakEasyComponent;
*/
public class InCallServiceImpl extends InCallService {
- private NewReturnToCallController newReturnToCallController;
+ private ReturnToCallController returnToCallController;
private CallList.Listener feedbackListener;
// We only expect there to be one speakEasyCallManager to be instantiated at a time.
// We did not use a singleton SpeakEasyCallManager to avoid holding on to state beyond the
@@ -111,9 +111,9 @@ public class InCallServiceImpl extends InCallService {
InCallPresenter.getInstance().onServiceBind();
InCallPresenter.getInstance().maybeStartRevealAnimation(intent);
TelecomAdapter.getInstance().setInCallService(this);
- if (NewReturnToCallController.isEnabled(this)) {
- newReturnToCallController =
- new NewReturnToCallController(this, ContactInfoCache.getInstance(context));
+ if (ReturnToCallController.isEnabled(this)) {
+ returnToCallController =
+ new ReturnToCallController(this, ContactInfoCache.getInstance(context));
}
feedbackListener = FeedbackComponent.get(context).getCallFeedbackListener();
CallList.getInstance().addListener(feedbackListener);
@@ -141,9 +141,9 @@ public class InCallServiceImpl extends InCallService {
// Tear down the InCall system
InCallPresenter.getInstance().tearDown();
TelecomAdapter.getInstance().clearInCallService();
- if (newReturnToCallController != null) {
- newReturnToCallController.tearDown();
- newReturnToCallController = null;
+ if (returnToCallController != null) {
+ returnToCallController.tearDown();
+ returnToCallController = null;
}
if (feedbackListener != null) {
CallList.getInstance().removeListener(feedbackListener);
diff --git a/java/com/android/incallui/NewReturnToCallActionReceiver.java b/java/com/android/incallui/ReturnToCallActionReceiver.java
index 527a79b51..d6014aac6 100644
--- a/java/com/android/incallui/NewReturnToCallActionReceiver.java
+++ b/java/com/android/incallui/ReturnToCallActionReceiver.java
@@ -30,7 +30,7 @@ import com.android.incallui.call.DialerCall;
import com.android.incallui.call.TelecomAdapter;
/** Handles clicks on the return-to-call bubble */
-public class NewReturnToCallActionReceiver extends BroadcastReceiver {
+public class ReturnToCallActionReceiver extends BroadcastReceiver {
public static final String ACTION_RETURN_TO_CALL = "returnToCallV2";
public static final String ACTION_TOGGLE_SPEAKER = "toggleSpeakerV2";
diff --git a/java/com/android/incallui/NewReturnToCallController.java b/java/com/android/incallui/ReturnToCallController.java
index e77920524..6227c77bd 100644
--- a/java/com/android/incallui/NewReturnToCallController.java
+++ b/java/com/android/incallui/ReturnToCallController.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2017 The Android Open Source Project
+ * Copyright (C) 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -26,6 +26,10 @@ import android.support.annotation.NonNull;
import android.support.annotation.VisibleForTesting;
import android.telecom.CallAudioState;
import android.text.TextUtils;
+import com.android.bubble.Bubble;
+import com.android.bubble.BubbleComponent;
+import com.android.bubble.BubbleInfo;
+import com.android.bubble.BubbleInfo.Action;
import com.android.contacts.common.util.ContactDisplayUtils;
import com.android.dialer.common.LogUtil;
import com.android.dialer.configprovider.ConfigProviderBindings;
@@ -41,10 +45,6 @@ import com.android.incallui.call.CallList.Listener;
import com.android.incallui.call.DialerCall;
import com.android.incallui.speakerbuttonlogic.SpeakerButtonInfo;
import com.android.incallui.speakerbuttonlogic.SpeakerButtonInfo.IconSize;
-import com.android.newbubble.NewBubble;
-import com.android.newbubble.NewBubbleComponent;
-import com.android.newbubble.NewBubbleInfo;
-import com.android.newbubble.NewBubbleInfo.Action;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.List;
@@ -59,12 +59,12 @@ import java.util.List;
* <p>Bubble hides when one of following happens: 1. a call disconnect and there is no more
* outgoing/ongoing call 2. show in-call UI
*/
-public class NewReturnToCallController implements InCallUiListener, Listener, AudioModeListener {
+public class ReturnToCallController implements InCallUiListener, Listener, AudioModeListener {
private final Context context;
@VisibleForTesting(otherwise = VisibleForTesting.PRIVATE)
- NewBubble bubble;
+ Bubble bubble;
private static Boolean canShowBubblesForTesting = null;
@@ -82,16 +82,16 @@ public class NewReturnToCallController implements InCallUiListener, Listener, Au
return ConfigProviderBindings.get(context).getBoolean("enable_return_to_call_bubble_v2", false);
}
- public NewReturnToCallController(Context context, ContactInfoCache contactInfoCache) {
+ public ReturnToCallController(Context context, ContactInfoCache contactInfoCache) {
this.context = context;
this.contactInfoCache = contactInfoCache;
- toggleSpeaker = createActionIntent(NewReturnToCallActionReceiver.ACTION_TOGGLE_SPEAKER);
+ toggleSpeaker = createActionIntent(ReturnToCallActionReceiver.ACTION_TOGGLE_SPEAKER);
showSpeakerSelect =
- createActionIntent(NewReturnToCallActionReceiver.ACTION_SHOW_AUDIO_ROUTE_SELECTOR);
- toggleMute = createActionIntent(NewReturnToCallActionReceiver.ACTION_TOGGLE_MUTE);
- endCall = createActionIntent(NewReturnToCallActionReceiver.ACTION_END_CALL);
- fullScreen = createActionIntent(NewReturnToCallActionReceiver.ACTION_RETURN_TO_CALL);
+ createActionIntent(ReturnToCallActionReceiver.ACTION_SHOW_AUDIO_ROUTE_SELECTOR);
+ toggleMute = createActionIntent(ReturnToCallActionReceiver.ACTION_TOGGLE_MUTE);
+ endCall = createActionIntent(ReturnToCallActionReceiver.ACTION_END_CALL);
+ fullScreen = createActionIntent(ReturnToCallActionReceiver.ACTION_RETURN_TO_CALL);
InCallPresenter.getInstance().addInCallUiListener(this);
CallList.getInstance().addListener(this);
@@ -156,12 +156,12 @@ public class NewReturnToCallController implements InCallUiListener, Listener, Au
}
@VisibleForTesting
- public NewBubble startBubble() {
+ public Bubble startBubble() {
if (!canShowBubbles(context)) {
- LogUtil.i("ReturnToCallController.startNewBubble", "can't show bubble, no permission");
+ LogUtil.i("ReturnToCallController.startBubble", "can't show bubble, no permission");
return null;
}
- NewBubble returnToCallBubble = NewBubbleComponent.get(context).getNewBubble();
+ Bubble returnToCallBubble = BubbleComponent.get(context).getBubble();
returnToCallBubble.setBubbleInfo(generateBubbleInfo());
returnToCallBubble.show();
return returnToCallBubble;
@@ -181,7 +181,7 @@ public class NewReturnToCallController implements InCallUiListener, Listener, Au
if ((bubble == null || !bubble.isVisible())
&& getCall() != null
&& !InCallPresenter.getInstance().isShowingInCallUi()) {
- LogUtil.i("NewReturnToCallController.onCallListChange", "going to show bubble");
+ LogUtil.i("ReturnToCallController.onCallListChange", "going to show bubble");
show();
}
}
@@ -248,8 +248,8 @@ public class NewReturnToCallController implements InCallUiListener, Listener, Au
}
}
- private NewBubbleInfo generateBubbleInfo() {
- return NewBubbleInfo.builder()
+ private BubbleInfo generateBubbleInfo() {
+ return BubbleInfo.builder()
.setPrimaryColor(context.getResources().getColor(R.color.dialer_theme_color, null))
.setPrimaryIcon(Icon.createWithResource(context, R.drawable.on_going_call))
.setStartingYPosition(
@@ -306,7 +306,7 @@ public class NewReturnToCallController implements InCallUiListener, Listener, Au
@NonNull
private PendingIntent createActionIntent(String action) {
- Intent intent = new Intent(context, NewReturnToCallActionReceiver.class);
+ Intent intent = new Intent(context, ReturnToCallActionReceiver.class);
intent.setAction(action);
return PendingIntent.getBroadcast(context, 0, intent, 0);
}
@@ -339,45 +339,42 @@ public class NewReturnToCallController implements InCallUiListener, Listener, Au
private static class ReturnToCallContactInfoCacheCallback implements ContactInfoCacheCallback {
- private final WeakReference<NewReturnToCallController> newReturnToCallControllerWeakReference;
+ private final WeakReference<ReturnToCallController> returnToCallControllerWeakReference;
- private ReturnToCallContactInfoCacheCallback(
- NewReturnToCallController newReturnToCallController) {
- newReturnToCallControllerWeakReference = new WeakReference<>(newReturnToCallController);
+ private ReturnToCallContactInfoCacheCallback(ReturnToCallController returnToCallController) {
+ returnToCallControllerWeakReference = new WeakReference<>(returnToCallController);
}
@Override
public void onContactInfoComplete(String callId, ContactCacheEntry entry) {
- NewReturnToCallController newReturnToCallController =
- newReturnToCallControllerWeakReference.get();
- if (newReturnToCallController == null) {
+ ReturnToCallController returnToCallController = returnToCallControllerWeakReference.get();
+ if (returnToCallController == null) {
return;
}
if (entry.photo != null) {
- newReturnToCallController.onPhotoAvatarReceived(entry.photo);
+ returnToCallController.onPhotoAvatarReceived(entry.photo);
} else {
DialerCall dialerCall = CallList.getInstance().getCallById(callId);
if (dialerCall != null) {
- newReturnToCallController.onLetterTileAvatarReceived(
- newReturnToCallController.createLettleTileDrawable(dialerCall, entry));
+ returnToCallController.onLetterTileAvatarReceived(
+ returnToCallController.createLettleTileDrawable(dialerCall, entry));
}
}
}
@Override
public void onImageLoadComplete(String callId, ContactCacheEntry entry) {
- NewReturnToCallController newReturnToCallController =
- newReturnToCallControllerWeakReference.get();
- if (newReturnToCallController == null) {
+ ReturnToCallController returnToCallController = returnToCallControllerWeakReference.get();
+ if (returnToCallController == null) {
return;
}
if (entry.photo != null) {
- newReturnToCallController.onPhotoAvatarReceived(entry.photo);
+ returnToCallController.onPhotoAvatarReceived(entry.photo);
} else {
DialerCall dialerCall = CallList.getInstance().getCallById(callId);
if (dialerCall != null) {
- newReturnToCallController.onLetterTileAvatarReceived(
- newReturnToCallController.createLettleTileDrawable(dialerCall, entry));
+ returnToCallController.onLetterTileAvatarReceived(
+ returnToCallController.createLettleTileDrawable(dialerCall, entry));
}
}
}
diff --git a/java/com/android/incallui/StatusBarNotifier.java b/java/com/android/incallui/StatusBarNotifier.java
index 87f332a1d..e2340b5e7 100644
--- a/java/com/android/incallui/StatusBarNotifier.java
+++ b/java/com/android/incallui/StatusBarNotifier.java
@@ -657,8 +657,8 @@ public class StatusBarNotifier
} else if (call.hasProperty(Details.PROPERTY_HAS_CDMA_VOICE_PRIVACY)) {
return R.drawable.quantum_ic_phone_locked_vd_theme_24;
}
- // If NewReturnToCall is enabled, use the static icon. The animated one will show in the bubble.
- if (NewReturnToCallController.isEnabled(context)) {
+ // If ReturnToCall is enabled, use the static icon. The animated one will show in the bubble.
+ if (ReturnToCallController.isEnabled(context)) {
return R.drawable.quantum_ic_call_vd_theme_24;
} else {
return R.drawable.on_going_call;