summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--InCallUI/res/drawable-ldrtl-hdpi/ic_lockscreen_answer_activated.pngbin5620 -> 0 bytes
-rw-r--r--InCallUI/res/drawable-ldrtl-hdpi/stat_sys_phone_call_on_hold.pngbin5109 -> 0 bytes
-rw-r--r--InCallUI/res/drawable-ldrtl-mdpi/ic_lockscreen_answer_activated.pngbin4987 -> 0 bytes
-rw-r--r--InCallUI/res/drawable-ldrtl-mdpi/stat_sys_phone_call_on_hold.pngbin4626 -> 0 bytes
-rw-r--r--InCallUI/res/drawable-ldrtl-xhdpi/ic_lockscreen_answer_activated.pngbin6245 -> 0 bytes
-rw-r--r--InCallUI/res/drawable-mdpi/ic_lockscreen_answer_activated.pngbin1075 -> 0 bytes
-rw-r--r--InCallUI/res/drawable-xhdpi/ic_lockscreen_answer_activated.pngbin1941 -> 0 bytes
-rw-r--r--InCallUI/res/drawable-xxhdpi/ic_lockscreen_answer_activated.pngbin2638 -> 0 bytes
-rw-r--r--InCallUI/src/com/android/incallui/AnswerFragment.java4
-rw-r--r--InCallUI/src/com/android/incallui/AnswerPresenter.java4
-rw-r--r--InCallUI/src/com/android/incallui/GlowPadWrapper.java9
-rw-r--r--InCallUI/src/com/android/incallui/InCallApp.java15
-rw-r--r--InCallUI/src/com/android/incallui/InCallPresenter.java10
-rw-r--r--InCallUI/src/com/android/incallui/TelecommAdapter.java4
14 files changed, 27 insertions, 19 deletions
diff --git a/InCallUI/res/drawable-ldrtl-hdpi/ic_lockscreen_answer_activated.png b/InCallUI/res/drawable-ldrtl-hdpi/ic_lockscreen_answer_activated.png
deleted file mode 100644
index f1deb759b..000000000
--- a/InCallUI/res/drawable-ldrtl-hdpi/ic_lockscreen_answer_activated.png
+++ /dev/null
Binary files differ
diff --git a/InCallUI/res/drawable-ldrtl-hdpi/stat_sys_phone_call_on_hold.png b/InCallUI/res/drawable-ldrtl-hdpi/stat_sys_phone_call_on_hold.png
deleted file mode 100644
index 18de2480e..000000000
--- a/InCallUI/res/drawable-ldrtl-hdpi/stat_sys_phone_call_on_hold.png
+++ /dev/null
Binary files differ
diff --git a/InCallUI/res/drawable-ldrtl-mdpi/ic_lockscreen_answer_activated.png b/InCallUI/res/drawable-ldrtl-mdpi/ic_lockscreen_answer_activated.png
deleted file mode 100644
index 3d68ff923..000000000
--- a/InCallUI/res/drawable-ldrtl-mdpi/ic_lockscreen_answer_activated.png
+++ /dev/null
Binary files differ
diff --git a/InCallUI/res/drawable-ldrtl-mdpi/stat_sys_phone_call_on_hold.png b/InCallUI/res/drawable-ldrtl-mdpi/stat_sys_phone_call_on_hold.png
deleted file mode 100644
index 60f665d0c..000000000
--- a/InCallUI/res/drawable-ldrtl-mdpi/stat_sys_phone_call_on_hold.png
+++ /dev/null
Binary files differ
diff --git a/InCallUI/res/drawable-ldrtl-xhdpi/ic_lockscreen_answer_activated.png b/InCallUI/res/drawable-ldrtl-xhdpi/ic_lockscreen_answer_activated.png
deleted file mode 100644
index 1acdc5991..000000000
--- a/InCallUI/res/drawable-ldrtl-xhdpi/ic_lockscreen_answer_activated.png
+++ /dev/null
Binary files differ
diff --git a/InCallUI/res/drawable-mdpi/ic_lockscreen_answer_activated.png b/InCallUI/res/drawable-mdpi/ic_lockscreen_answer_activated.png
deleted file mode 100644
index 6a78f817e..000000000
--- a/InCallUI/res/drawable-mdpi/ic_lockscreen_answer_activated.png
+++ /dev/null
Binary files differ
diff --git a/InCallUI/res/drawable-xhdpi/ic_lockscreen_answer_activated.png b/InCallUI/res/drawable-xhdpi/ic_lockscreen_answer_activated.png
deleted file mode 100644
index cd6a6abb2..000000000
--- a/InCallUI/res/drawable-xhdpi/ic_lockscreen_answer_activated.png
+++ /dev/null
Binary files differ
diff --git a/InCallUI/res/drawable-xxhdpi/ic_lockscreen_answer_activated.png b/InCallUI/res/drawable-xxhdpi/ic_lockscreen_answer_activated.png
deleted file mode 100644
index 173b54c66..000000000
--- a/InCallUI/res/drawable-xxhdpi/ic_lockscreen_answer_activated.png
+++ /dev/null
Binary files differ
diff --git a/InCallUI/src/com/android/incallui/AnswerFragment.java b/InCallUI/src/com/android/incallui/AnswerFragment.java
index 7462b12e6..db441237f 100644
--- a/InCallUI/src/com/android/incallui/AnswerFragment.java
+++ b/InCallUI/src/com/android/incallui/AnswerFragment.java
@@ -322,8 +322,8 @@ public class AnswerFragment extends BaseFragment<AnswerPresenter, AnswerPresente
}
@Override
- public void onAnswer() {
- getPresenter().onAnswer();
+ public void onAnswer(int videoState) {
+ getPresenter().onAnswer(videoState);
}
@Override
diff --git a/InCallUI/src/com/android/incallui/AnswerPresenter.java b/InCallUI/src/com/android/incallui/AnswerPresenter.java
index 86594545b..746e6434c 100644
--- a/InCallUI/src/com/android/incallui/AnswerPresenter.java
+++ b/InCallUI/src/com/android/incallui/AnswerPresenter.java
@@ -126,13 +126,13 @@ public class AnswerPresenter extends Presenter<AnswerPresenter.AnswerUi>
}
}
- public void onAnswer() {
+ public void onAnswer(int videoState) {
if (mCallId == null) {
return;
}
Log.d(this, "onAnswer " + mCallId);
- TelecommAdapter.getInstance().answerCall(mCall.getId());
+ TelecommAdapter.getInstance().answerCall(mCall.getId(), videoState);
}
/**
diff --git a/InCallUI/src/com/android/incallui/GlowPadWrapper.java b/InCallUI/src/com/android/incallui/GlowPadWrapper.java
index 28ccb956c..77e074498 100644
--- a/InCallUI/src/com/android/incallui/GlowPadWrapper.java
+++ b/InCallUI/src/com/android/incallui/GlowPadWrapper.java
@@ -19,6 +19,7 @@ package com.android.incallui;
import android.content.Context;
import android.os.Handler;
import android.os.Message;
+import android.telecomm.VideoCallProfile;
import android.util.AttributeSet;
import android.view.View;
@@ -111,7 +112,7 @@ public class GlowPadWrapper extends GlowPadView implements GlowPadView.OnTrigger
final int resId = getResourceIdForTarget(target);
switch (resId) {
case R.drawable.ic_lockscreen_answer:
- mAnswerListener.onAnswer();
+ mAnswerListener.onAnswer(VideoCallProfile.VIDEO_STATE_AUDIO_ONLY);
mTargetTriggered = true;
break;
case R.drawable.ic_lockscreen_decline:
@@ -122,6 +123,10 @@ public class GlowPadWrapper extends GlowPadView implements GlowPadView.OnTrigger
mAnswerListener.onText();
mTargetTriggered = true;
break;
+ case R.drawable.ic_videocam:
+ mAnswerListener.onAnswer(VideoCallProfile.VIDEO_STATE_BIDIRECTIONAL);
+ mTargetTriggered = true;
+ break;
default:
// Code should never reach here.
Log.e(this, "Trigger detected on unhandled resource. Skipping.");
@@ -143,7 +148,7 @@ public class GlowPadWrapper extends GlowPadView implements GlowPadView.OnTrigger
}
public interface AnswerListener {
- void onAnswer();
+ void onAnswer(int videoState);
void onDecline();
void onText();
}
diff --git a/InCallUI/src/com/android/incallui/InCallApp.java b/InCallUI/src/com/android/incallui/InCallApp.java
index 77fac7f53..0894fb45a 100644
--- a/InCallUI/src/com/android/incallui/InCallApp.java
+++ b/InCallUI/src/com/android/incallui/InCallApp.java
@@ -21,6 +21,7 @@ import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.res.Configuration;
+import android.telecomm.VideoCallProfile;
/**
* Top-level Application class for the InCall app.
@@ -57,7 +58,6 @@ public class InCallApp extends Application {
* Accepts broadcast Intents which will be prepared by {@link StatusBarNotifier} and thus
* sent from framework's notification mechanism (which is outside Phone context).
* This should be visible from outside, but shouldn't be in "exported" state.
- *
*/
public static class NotificationBroadcastReceiver extends BroadcastReceiver {
@Override
@@ -66,13 +66,14 @@ public class InCallApp extends Application {
Log.i(this, "Broadcast from Notification: " + action);
// TODO: Commands of this nature should exist in the CallList.
- if (action.equals(ACTION_DECLINE_INCOMING_CALL)) {
- InCallPresenter.getInstance().declineIncomingCall(context);
+ if (action.equals(ACTION_ANSWER_VIDEO_INCOMING_CALL)) {
+ InCallPresenter.getInstance().answerIncomingCall(
+ context, VideoCallProfile.VIDEO_STATE_BIDIRECTIONAL);
} else if (action.equals(ACTION_ANSWER_VOICE_INCOMING_CALL)) {
- InCallPresenter.getInstance().answerIncomingCall(context);
- } else if (action.equals(ACTION_ANSWER_VIDEO_INCOMING_CALL)) {
- //TODO: Answer as a video call here instead of an audio call.
- InCallPresenter.getInstance().answerIncomingCall(context);
+ InCallPresenter.getInstance().answerIncomingCall(
+ context, VideoCallProfile.VIDEO_STATE_AUDIO_ONLY);
+ } else if (action.equals(ACTION_DECLINE_INCOMING_CALL)) {
+ InCallPresenter.getInstance().declineIncomingCall(context);
} else if (action.equals(ACTION_HANG_UP_ONGOING_CALL)) {
InCallPresenter.getInstance().hangUpOngoingCall(context);
}
diff --git a/InCallUI/src/com/android/incallui/InCallPresenter.java b/InCallUI/src/com/android/incallui/InCallPresenter.java
index 83d21b83f..1cd9751d7 100644
--- a/InCallUI/src/com/android/incallui/InCallPresenter.java
+++ b/InCallUI/src/com/android/incallui/InCallPresenter.java
@@ -21,6 +21,7 @@ import android.content.Intent;
import android.telecomm.CallCapabilities;
import android.telecomm.Phone;
import android.telecomm.PhoneAccount;
+import android.telecomm.VideoCallProfile;
import com.google.common.base.Preconditions;
import com.google.common.collect.Sets;
@@ -437,7 +438,7 @@ public class InCallPresenter implements CallList.Listener, InCallPhoneListener {
/**
* Answers any incoming call.
*/
- public void answerIncomingCall(Context context) {
+ public void answerIncomingCall(Context context, int videoState) {
// By the time we receive this intent, we could be shut down and call list
// could be null. Bail in those cases.
if (mCallList == null) {
@@ -447,8 +448,8 @@ public class InCallPresenter implements CallList.Listener, InCallPhoneListener {
Call call = mCallList.getIncomingCall();
if (call != null) {
- TelecommAdapter.getInstance().answerCall(call.getId());
- showInCall(false, false /* newOutgoingCall */);
+ TelecommAdapter.getInstance().answerCall(call.getId(), videoState);
+ showInCall(false, false/* newOutgoingCall */);
}
}
@@ -550,7 +551,8 @@ public class InCallPresenter implements CallList.Listener, InCallPhoneListener {
// (1) Attempt to answer a call
if (incomingCall != null) {
- TelecommAdapter.getInstance().answerCall(incomingCall.getId());
+ TelecommAdapter.getInstance().answerCall(
+ incomingCall.getId(), VideoCallProfile.VIDEO_STATE_AUDIO_ONLY);
return true;
}
diff --git a/InCallUI/src/com/android/incallui/TelecommAdapter.java b/InCallUI/src/com/android/incallui/TelecommAdapter.java
index 745931cfe..11ddc42b2 100644
--- a/InCallUI/src/com/android/incallui/TelecommAdapter.java
+++ b/InCallUI/src/com/android/incallui/TelecommAdapter.java
@@ -63,9 +63,9 @@ final class TelecommAdapter implements InCallPhoneListener {
return CallList.getInstance().getCallById(callId).getTelecommCall();
}
- void answerCall(String callId) {
+ void answerCall(String callId, int videoState) {
if (mPhone != null) {
- getTelecommCallById(callId).answer();
+ getTelecommCallById(callId).answer(videoState);
} else {
Log.e(this, "error answerCall, mPhone is null");
}