diff options
-rw-r--r-- | InCallUI/src/com/android/incallui/InCallPresenter.java | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/InCallUI/src/com/android/incallui/InCallPresenter.java b/InCallUI/src/com/android/incallui/InCallPresenter.java index 241056d89..3342c7d6b 100644 --- a/InCallUI/src/com/android/incallui/InCallPresenter.java +++ b/InCallUI/src/com/android/incallui/InCallPresenter.java @@ -603,13 +603,20 @@ public class InCallPresenter implements CallList.Listener, InCallPhoneListener { mProximitySensor.onInCallShowing(showing); } - if (showing) { - Intent broadcastIntent = ObjectFactory.getUiReadyBroadcastIntent(); - if (broadcastIntent != null) { - broadcastIntent.putExtra(EXTRA_FIRST_TIME_SHOWN, !mIsActivityPreviouslyStarted); - mContext.sendBroadcast(broadcastIntent, Manifest.permission.READ_PHONE_STATE); + Intent broadcastIntent = ObjectFactory.getUiReadyBroadcastIntent(); + if (broadcastIntent != null) { + broadcastIntent.putExtra(EXTRA_FIRST_TIME_SHOWN, !mIsActivityPreviouslyStarted); + + if (showing) { + Log.d(this, "Sending sticky broadcast: ", broadcastIntent); + mContext.sendStickyBroadcast(broadcastIntent); + } else { + Log.d(this, "Removing sticky broadcast: ", broadcastIntent); + mContext.removeStickyBroadcast(broadcastIntent); } + } + if (showing) { mIsActivityPreviouslyStarted = true; } } |