summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Charlton <evanc@google.com>2014-09-16 09:18:40 -0700
committerEvan Charlton <evanc@google.com>2014-09-16 09:26:31 -0700
commit71afa1c7d1e1f49af56c24bdc64d30d80cf1ea68 (patch)
treeeaa199e5db78b7ba6f49b2ab401fa17d1b610a1d
parent4a111a07023891fc1e56d71afe41b942aa5417f0 (diff)
Pass Context to InCall ObjectFactory
When calling InCall's ObjectFactory to create Intents, pass along the current Context. Bug: 17523252 Change-Id: I301df3c046d6e2bd5ddf4b3501a567cd23c0471f
-rw-r--r--InCallUI/src/com/android/incallui/CallCardPresenter.java2
-rw-r--r--InCallUI/src/com/android/incallui/InCallPresenter.java2
-rw-r--r--InCallUI/src/com/android/incalluibind/ObjectFactory.java5
3 files changed, 5 insertions, 4 deletions
diff --git a/InCallUI/src/com/android/incallui/CallCardPresenter.java b/InCallUI/src/com/android/incallui/CallCardPresenter.java
index 3baa07267..b8189a7c7 100644
--- a/InCallUI/src/com/android/incallui/CallCardPresenter.java
+++ b/InCallUI/src/com/android/incallui/CallCardPresenter.java
@@ -352,7 +352,7 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi>
}
public void onCallStateButtonTouched() {
- Intent broadcastIntent = ObjectFactory.getCallStateButtonBroadcastIntent();
+ Intent broadcastIntent = ObjectFactory.getCallStateButtonBroadcastIntent(mContext);
if (broadcastIntent != null) {
Log.d(this, "Sending call state button broadcast: ", broadcastIntent);
mContext.sendBroadcast(broadcastIntent, Manifest.permission.READ_PHONE_STATE);
diff --git a/InCallUI/src/com/android/incallui/InCallPresenter.java b/InCallUI/src/com/android/incallui/InCallPresenter.java
index 3342c7d6b..c7a512266 100644
--- a/InCallUI/src/com/android/incallui/InCallPresenter.java
+++ b/InCallUI/src/com/android/incallui/InCallPresenter.java
@@ -603,7 +603,7 @@ public class InCallPresenter implements CallList.Listener, InCallPhoneListener {
mProximitySensor.onInCallShowing(showing);
}
- Intent broadcastIntent = ObjectFactory.getUiReadyBroadcastIntent();
+ Intent broadcastIntent = ObjectFactory.getUiReadyBroadcastIntent(mContext);
if (broadcastIntent != null) {
broadcastIntent.putExtra(EXTRA_FIRST_TIME_SHOWN, !mIsActivityPreviouslyStarted);
diff --git a/InCallUI/src/com/android/incalluibind/ObjectFactory.java b/InCallUI/src/com/android/incalluibind/ObjectFactory.java
index c64e98efb..a2adc102f 100644
--- a/InCallUI/src/com/android/incalluibind/ObjectFactory.java
+++ b/InCallUI/src/com/android/incalluibind/ObjectFactory.java
@@ -16,16 +16,17 @@
package com.android.incalluibind;
+import android.content.Context;
import android.content.Intent;
public class ObjectFactory {
/** @return An {@link Intent} to be broadcast when the InCallUI is visible. */
- public static Intent getUiReadyBroadcastIntent() { return null; }
+ public static Intent getUiReadyBroadcastIntent(Context context) { return null; }
/**
* @return An {@link Intent} to be broadcast when the call state button in the InCallUI is
* touched while in a call.
*/
- public static Intent getCallStateButtonBroadcastIntent() { return null; }
+ public static Intent getCallStateButtonBroadcastIntent(Context context) { return null; }
}