History log of /packages/apps/Phone/src/com/android/phone/NotificationMgr.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
a1aebfe09f1d72bec61917cb562b3e889d5b95cd 25-Mar-2013 Jeff Sharkey <jsharkey@android.com> Larger roaming notification.

Bug: 6777372
Change-Id: Ic0f2c8d9498f92ac527bf876a9a87c7cd4f65f4a
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
6658e2092ab529501fb66f3c3356e7b60599c9ed 11-Jan-2013 Jay Shrauner <shrauner@google.com> Revert "Make voicemail notification dismissable"

Voicemail notification is required to be a non-dismissable alert for some carriers.

This reverts commit 44be27432a984f9072150c9525477e54cbfe96fd

Bug: 7888110
Change-Id: Iaf6523cff53850422ab06c2c80cc30c6b2987499
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
44be27432a984f9072150c9525477e54cbfe96fd 10-Jan-2013 Jay Shrauner <shrauner@google.com> Make voicemail notification dismissable

Bug:7888110
Change-Id: Id60afbc40b6d2d10fc5afb6273a225162e6a2aae
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
91280b55aa182bf222152e328f413239d3cf9d25 29-Nov-2012 Yorke Lee <yorkelee@google.com> Change notification settings in Phone

Add ringtone summary for Voicemail notification setting
Change Voicemail notification vibrate setting to checkbox

Bug: 7633821
Change-Id: Ifa10eb1989146ab10dc0e4b0218ff85906a7ae8f
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
a1a9601840e50e18ff8ca4be9b888e592287577b 11-Sep-2012 Dianne Hackborn <hackbod@google.com> Don't crash phone app when running as non-primary user.

Rename PhoneApp to PhoneGlobals. Add new PhoneApp that only
instantiates PhoneGlobals when running as the primary user. Add
check in PhoneGlobals.getInstance() to immediately throw if called
when there are no globals for that process. Add new
PhoneGlobals.getInstanceIfPrimary() that doesn't throw;
OtaStartupReceiver uses to abort early if receiving a BOOT_COMPLETED
for a non-primary user.

All of the other files here are just due to the rename of PhoneApp
to PhoneGlobals.

Change-Id: Ic3999d956198ac836cb6a07fa3c77f36c1754ea3
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
2ec34a7ddae83f1c1c0684797b6740b24f75ff72 12-Jul-2012 Wink Saville <wink@google.com> Merge commit 'b0f85b4a' into mit

* commit 'b0f85b4a':
Use telephony-common
b0f85b4a78abead921c363f9c8e247d5bdd20c74 14-Jun-2012 Wink Saville <wink@google.com> Use telephony-common

Change-Id: I1710418850040fc20afff4795ee4a85027203fc9
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
e9c4593d2d74736dc1421a0889e39e59eacf2916 22-Jun-2012 Santos Cordon <santoscordon@google.com> Adding notification status for dialing a call.

Previously, we only showed "Ongoing call" even while the call was still
unconnected. On GSM phones, where the distinction between dialing/active
and connected can reliably be made, we set the status to "Calling" if
the call is not yet connected.

Tested: Notification says "Calling" on an outgoing GSM call and changed
to "Ongoing Call" when the call is connected. CDMA phones display only
"Ongoing call" throughout the entire call sequence.

Bug: 6271256
Change-Id: I59af316e6156c98c9f7148f756a2192031d48bc0
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
dcd8d08302d638474376e7bde9b5d0f69dcc22f5 30-May-2012 Daisuke Miyakawa <dmiyakawa@google.com> Make ongoing call notification have higher priority.

This will make the notification on top of others with normal
priority, with which users can use "hang-up" action during the call
even when other notifications appear.

TESTED:
- receive a phone call and get a SMS message after answering it.
Without the flag, SMS message will be above the ongoing call, which
makes the "hang-up" button collapsed.
With the flag, the ongoing call notification is still on top of the
list and because fo that the action is clickable by the user.

Bug: 6580973
Change-Id: I2ad1c66ad7b394b603c8ec0bc04a50e730ae338c
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
4420cda791069579c20dd8ff49d07b43ca136ed6 15-May-2012 Daisuke Miyakawa <dmiyakawa@google.com> Suppress notification actions when number is unknown

Fixing the issue 6476275 Call back notification should not appear for
unknown numbers.

It happens when a caller party hides its phone number and thus the
device cannot obtain a valid number, at which the "number" given to
notifyMissedCall() may become a non-empty but not-callable String.

The fundemental fix would be to stop using the wrong String, but for
a quick workaround, this change just have two checks for the problem.

TESTED:
- Miss an incoming call and check if the current behavior is preserved
- Tweak GsmConnection/CdmaConnection in telephony layer to return
"ABSENT NUMBER" to fake the behavior. Then miss an incoming call.
Check if the missed call notification does not have any actions.

Bug: 6476275
Change-Id: I0e194a7d6e2e51af1e902061f8d09582f1cc4b3d
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
8632ba75bacd8a9df90a1193d510e486bfd3f57e 04-May-2012 Daisuke Miyakawa <dmiyakawa@google.com> Merge "Use new assets for notifications" into jb-dev
276d346d9af81f65ed2bb42dca552a6434a8d381 04-May-2012 Daisuke Miyakawa <dmiyakawa@google.com> Use new assets for notifications

Bug: 6316281
Change-Id: I243c8867c9a9149e22ca73a4e3c316590ca32cd8
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
25e144bdf493f30187ce534eb78f2fd6163d19f6 02-May-2012 Daisuke Miyakawa <dmiyakawa@google.com> Prevent obvious NPE

Drawable should be used in the block.

Bug: 6427820
Change-Id: I7cad3f430987eedb9c8c33be281128f6fad147dd
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
c49d1c9004f3151d1cc5f31d6fc617bfc9603267 30-Apr-2012 Daisuke Miyakawa <dmiyakawa@google.com> Suppress debug logs

Because of remaining issues to be fixed, some are still remained.

Bug: 6201805
Change-Id: Ic5d9deb3775c59bbfb63f353fcebb5c24a18c7a3
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
691ef5d7cc8d6861921039bf9c96029f93b84265 26-Apr-2012 Daisuke Miyakawa <dmiyakawa@google.com> Remove a previous hack for ongoing call notification

Originally we had I43625f4f69ce75c662c211dadc7292fb14641073 and
Id5f7dd711037b28a4dc5b431ec02dbb819fcefe8 to cope with bugs around
notification.

Now the notification framework is already taking care of the cases
we have coped with.

TESTED (based on the tests described in the change above):
- While on a call, with in-call UI visible, trigger prox sensor several
times
==> no glitches; icon is never visible.

- While on a call, bail out to Home screen, then, trigger prox sensor
several times
==> no glitches; icon is steadily visible whenever the screen is on.

- Launched an outgoing call
==> no glitches; icon doesn't appear at all (even as a brief flicker)
during the transition from the dialer to the InCallScreen.

- Incoming call
==> no glitches; icon is visible while ringing (which is WAI),
disappears cleanly when you answer the call.

- Make an outgoing call, before it being answered, bail out of the
screen. Then turn off the screen using prox sensor (the device must be
put vertically to enable the sensor). See the screen after the phone
is answered.
==> the icon should be shown there.

(new sequence)
- During a phone call, press Setting button in notification and press
button similtaneously.
==> the icon should be shown if the Setting screen is shown.

Bug: 6398749
Change-Id: I4b2e7c659267c412b27921e8aa2590837b201a7a
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
dba9a8971738f350a1c7af9dde1fd3727a818066 18-Apr-2012 Daisuke Miyakawa <dmiyakawa@google.com> Refactor ContactsAsyncHelper

It now only takes care of loading photo asynchronously.

Previously it has been responsible for modifying CallerInfo (and even
before that it had been for ImageView), while there's no feasible reason
for helper class to touch those objects. They should be managed by
UI side instead.

Also with this change, the class is not Handler anymore. It is probably not
a good idea to let other codes possibly rely on the fact this is Handler.
Instead let's just instanciate another Handler object inside the class.

Change-Id: Ic3c35f4ad0aa073e1fe29f2ecaec6ef05286bde5
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
a990977fd5f2474167ec90c1f2b78f47362bce25 17-Apr-2012 Daisuke Miyakawa <dmiyakawa@google.com> Fix broken part of previous change

- Ongoing notification is *not* using the new icon.
- Filter isn't applied, which will cause lower quality picture
- use more appropriate size for the notification icon

Bug: 6336293
Change-Id: Ieeb03082d0387e042749a28b64ce84c79622a71e
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
25428a6eb620a5cd4bc320352797df276cafb412 17-Apr-2012 Daisuke Miyakawa <dmiyakawa@google.com> Create down-scaled bitmap for notification icon

Requires I0892357498db0ee89b8f4f9630dd980aa0f744ba

Phone app may have high resolution photo for contact picture, which
is not suitable for notification's large icon because it is too big.
This change lets the phone down-scale the picture and use it when
appropriate.

TESTED:
- make a phone call to the person whose contact picture is with higher
resolution. Bail out of the in-call screen and see notification.
- miss a phone call from someone with higher resolution photo
- reboot the device before seeing missed-call notification. And check
the notification after the reboot.

Bug: 6336293
Change-Id: I0892357498db0ee89b8f4f9630dd980aa0f744ba
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
e3edabe9209b23f64e7b8432d41801d83b262470 12-Apr-2012 Daisuke Miyakawa <dmiyakawa@google.com> Merge "Implement new JB wonder-notifications for missed calls"
952f698041052bf9069c9eb7c29567de4d1dcc95 11-Apr-2012 Daisuke Miyakawa <dmiyakawa@google.com> Use notification sound instead of ringtone for fallback

Bug: 6320785
Change-Id: Idd303539c3477e36d9438ecac176c8f422852051
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
bda8f0cf8bb1f347d7e48dd03ede5c6413051891 04-Apr-2012 Daisuke Miyakawa <dmiyakawa@google.com> Implement new JB wonder-notifications for missed calls

- Use Builder and addAction
- Show photo for a missed notification

TESTED:
- have an incoming call and ignore it relentlesly.
-> Missed call notification should have call back button.

- have two missed calls
-> no action should be available (the user should go to call log)

- reboot the device
-> missed call notification should have contact picture on reboot.

Bug: 6289104
Change-Id: I3cb974fef48625f3c4d3a45b46f65e42ad899819
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
ee586de9bfeb3c17f0b172c269a8d7af4ea6f16f 10-Apr-2012 Daisuke Miyakawa <dmiyakawa@google.com> Merge "Use new notification style for ongoing call"
d649d4dcc7832139e6237cc2ffebf9680c7e2438 05-Apr-2012 Daisuke Miyakawa <dmiyakawa@google.com> Use new notification style for ongoing call

- Use Notification.Builder's Chronometer support, which was introduced
by Ib6ca3a8262f676d49d81e081a30c6d994c732a6b, instead of preparing
RemoteViews by ourselves.
- Use Notificatior.Builder#addAction() for hanging up the current call.

TESTED:
- hang up ongoing phone calls from ongoing-call notification
- hang up one of ongoing calls from the notification when having
multiple calls
- hang up holding phone calls from the notification
- (GSM) hang up conference call

Bug: 5161272
Change-Id: Iab7342df7c89057ef0d077b1e2a44b7e9f0190b9
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
4afa0467601f2e3fbcb3dc5c3b5913c96dd529fa 10-Apr-2012 Daisuke Miyakawa <dmiyakawa@google.com> Merge "Introduce custom ringtone for carrier voicemail"
7e9dd98f0eb398cf123bb2eb2087148fe2af0cfb 07-Apr-2012 Daisuke Miyakawa <dmiyakawa@google.com> Introduce custom ringtone for carrier voicemail

Bug: 6303662
Change-Id: I90b9b8bc912d1f5db596ae4da4bba41edcf4bd36
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
bca13fb64264f37d592c4ddac6d002d71fea895c 09-Apr-2012 Daisuke Miyakawa <dmiyakawa@google.com> Show call icon when outside in-call screen

To suppress icon flicker in in-call screen we had
I43625f4f69ce75c662c211dadc7292fb14641073, while it may
dismiss the icon when we definitely need it.

The problem happens when:
- the user bails out of the in-call screen during making an outgoing
call.
- the screen becomes turned off (maybe by prox sensor)
- the call is answered at that moment
- the user starts seeing the screen again

With this sequence there becomes almost no way to go back to in-call
screen (though there's only one unintuitive way to do that; go to
dialer and choose "go back to in-call screen" choice from dialpad
chooser)

In the sequence above, updateInCallNotification() is called (per
telephony's call back) while the screen is actually turned off.
mPowerManager#isScreenOn() returns false, which makes NotificationMgr
choose not to show the notification.
.. But wait, we *should* show the icon anyway even when the screen is
off, because the user is logically outside the in-call screen.

The new (and hacky) method isShowingCallScreenForProximity() allows
the app to detect if the user is in in-call screen or not, so let's
use the method instead of isShowingCallScreen().

TESTED (based on the tests described in the change above):
- While on a call, with in-call UI visible, trigger prox sensor several
times
==> no glitches; icon is never visible.

- While on a call, bail out to Home screen, then, trigger prox sensor
several times
==> no glitches; icon is steadily visible whenever the screen is on.

- Launched an outgoing call
==> no glitches; icon doesn't appear at all (even as a brief flicker)
during the transition from the dialer to the InCallScreen.

- Incoming call
==> no glitches; icon is visible while ringing (which is WAI),
disappears cleanly when you answer the call.

(new sequence)
- Make an outgoing call, before it being answered, bail out of the
screen. Then turn off the screen using prox sensor (the device must be
put vertically to enable the sensor). See the screen after the phone
is answered.
==> the icon should be shown there.

Bug: 6303484
Change-Id: Id5f7dd711037b28a4dc5b431ec02dbb819fcefe8
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
1152cf95773caaec07f764fdce974045a0b5a83d 30-Mar-2012 Daisuke Miyakawa <dmiyakawa@google.com> Stop relying on person_id on notification photo

Fixing bug 6258768 : Default avatar is not displayed in the notification
tray while call is in progress.

It happens when there's no photo found for the contact. At that moment
the NotificationMgr tries to use Uri with person_id, which fails because
there's no photo anyway. We probably want to show some default icon
there, while at that moment Notification is already fired.

To conditionally show photo or other default icons, it takes too much work
with less fruit; we need to setup async task and send notification
afterward. Note that if ContactsProvider can return the photo, it should
have been done during or even before RINGING state in most of the cases.

Also, eventually we will need to rely on Notification.Builder to fix
bug 5161272, which just supports Bitmap for large icon; we cannot rely
on Uri nor resource id.

So this change just relys on the cases which are able to use Bitmap for
icons. For other cases (which should be hopefully rare) we just use same
default icons as before.

TESTED:
- make/receive a phone call from a contact with photo. Users should be
able to see the contact photo on ongoing call notification.

- make/receive a phone call from a contact without photo. Users should
be able to see default icons.

- receive a phone call, answer it, and press Home immediately. Users can
briefly see remaining "incoming call" notification (not ongoing call
notification). At this point CallerInfo doesn't have correct photo
even when it will be available eventually, so users should be able to
see default icons at least.

Bug: 6258768
Change-Id: Ifdb5c6782dcfbe24563a7231b4adb4371a4e8c53
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
f8a9fbe31969b4f97ea03d233684efc117888879 29-Mar-2012 Daisuke Miyakawa <dmiyakawa@google.com> Move TelephonyCapabilities from Phone to telephony

Must be after I0d4ca2f8e4d775004d146fe6f9c60165a94366a9 (framework)

- Use the class in framework and remove the original class.
- Add useShortDtmfTones() to PhoneUtils. It was originally in (old)
TelephonyCapabilities but it is more suitable to have it in the other
place.
- Remove now unused strings.

Bug: 6252254
Change-Id: Iee8964cd13f9a2fa9212b1655de0f49b04153ee5
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
e02733dfa045c8204514c041a1a015a474cceadf 29-Feb-2012 Daisuke Miyakawa <dmiyakawa@google.com> Show photo in expanded views of ongoing call notification

Bug: 5161272
Change-Id: Ie55a70a1f940ed300eacfba9567ad6167306e067
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
67e8219b3cc09369db4296542fe39f55ba0e0976 23-Feb-2012 David Brown <dab@google.com> am dd628ee2: am f21e8f25: am fcdab673: Merge "Fix in-call notification icon flicker when screen goes on/off" into ics-mr1

* commit 'dd628ee20ce315bdfcd5f2b8b5ffc6dff5f67dbb':
Fix in-call notification icon flicker when screen goes on/off
55ceed4444ebc741273a17ed997401f236e613e5 17-Feb-2012 Daisuke Miyakawa <dmiyakawa@google.com> resolved conflicts for merge of ec85aeb5 to master

Change-Id: Ic31edb98bab69421ec15050238f300f984d76405
fcdab67302256cbeaf950bd591b03d55e1917d85 17-Feb-2012 David Brown <dab@google.com> Merge "Fix in-call notification icon flicker when screen goes on/off" into ics-mr1
3fc17a2beb10d2a9b830f3672b197f26ac1d0cb6 17-Feb-2012 David Brown <dab@google.com> Fix in-call notification icon flicker when screen goes on/off

We currently suppress the "in-call" status bar notification if the
InCallScreen is the foreground activity. This helps reduce clutter in the
status bar, since it's already obvious that you're on a call.

Unfortunately, when the screen is off (like when the prox sensor is
active), the InCallScreen is technically not the foreground activity, so
we *were* enabling the status bar icon in that state. This was causing a
brief flicker of the status bar icon any time the screen turned on during
a call (like when pulling the phone away from your face.)

The fix is simple: just suppress the notification when the screen is off.
This way the transition from "screen off" to "InCallScreen in foreground"
doesn't cause the notification to change state.

TESTED:

- While on a call, with in-call UI visible, trigger prox sensor several
times
==> no glitches; icon is never visible.

- While on a call, bail out to Home screen, then, trigger prox sensor
several times
==> no glitches; icon is steadily visible whenever the screen is on.
(Specifically, this test shows that this CL has no effect if some
other app is active. That's because once you bail out of the
in-call UI, the updateInCallNotification() method doesn't even get
called when the screen goes on and off; it's only called for phone
state transitions, or when the InCallScreen gets paused or
resumed. So the notification remains enabled the whole time.)

- Launched an outgoing call
==> no glitches; icon doesn't appear at all (even as a brief flicker)
during the transition from the dialer to the InCallScreen.

- Incoming call
==> no glitches; icon is visible while ringing (which is WAI),
disappears cleanly when you answer the call.

Bug: 6021909
Change-Id: I43625f4f69ce75c662c211dadc7292fb14641073
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
73031492772779079308aa981ce5dc76655dc71a 16-Feb-2012 Daisuke Miyakawa <dmiyakawa@google.com> Introduce vibration options for voicemail notification

Bug: 6014374
Change-Id: I1e0dff2e958b804e140b2d0d1d286f3392efecd1
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
67ecce1278a0c8c123a2d8f9a969e1fb218144e1 01-Feb-2012 Daisuke Miyakawa <dmiyakawa@google.com> Rename Settings to MobileNetworkSettings

"Settings" is just confusing. Note that we already have
NetworkSetting, so "NetworkSettings" (suggested in TODO) is also
confusing.

Because Settings package points to the class name directly, we need
I994c6278c0c1a7cb2ae33cdb94f32083ce146045 too.

Change-Id: I5d152bf7c55fb2f7bc038ebcebf8452653224fb6
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
2a5f795c4602bf519235a875b6a4003965642ddd 18-Jan-2012 Daisuke Miyakawa <dmiyakawa@google.com> Bunch of cleanups

- Add/fix comments (including misc ones for making IDE happier)
- Change visibility of some methods to make the intention clearer

Change-Id: I18cc8df323cd020b9376405c94f12177d9d712d9
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
24ecfc99654c94b619268978b50716b2393fd15c 06-Jan-2012 Daisuke Miyakawa <dmiyakawa@google.com> Remove BT specific icons for phone notifications

Phone app uses a call icon with Bluetooth symbol for its notifications,
but it is so small and thus not so informative.
Also because of bug 5439643 it isn't shown appropriately.

This change just removes the entire logic, showing a call icon without
the BT symbol.

Also this change removes stat_sys_phone_call_ringing, which are
identical to stat_sys_phone_call.

TESTED:
- Connect BT headset and receive a phone call. After that
press home, exiting the in-call UI. See notification icon and see
if BT symbol is gone.
- Try the sequence above without using BT headset.

Bug: 5439643
Change-Id: I3ae36b8e83009d2e39608d9ac7e3754dbd22f576
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
68a38b59d51c1b42ec47fef25728363592fa7327 18-Oct-2011 Flavio Lerda <flerda@google.com> Merge "Use default vibration for MWI."
532b49ab1e4ed2c6a33320175e173747f9f72a48 17-Oct-2011 Flavio Lerda <flerda@google.com> Use default vibration for MWI.

Previously we were using the default sound and set the lights to a
specific value, but not the default vibration setting from the device.

Bug: 5422234
Change-Id: I4f7c2176508bbafafe5bf01e00ff22ad1881bfbb
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
57bb26f8da77cbdc13995f472a40df566599326c 14-Oct-2011 David Brown <dab@google.com> Force in-call notification to be shown if "voice privacy" is active

Normally we suppress the in-call status bar notification if the
InCallScreen is the foreground activity. (The goal is to reduce clutter
in the status bar; that icon isn't needed since it's already obvious that
you're on a call.)

But we shouldn't do that if "Voice Privacy" mode is active, since the
status bar icon is the only indication we have for "voice privacy" mode.

So if voice privacy is in effect, force the status bar icon to be visible
regardless of whether the InCallScreen is active.

TESTED:

- NOTE I couldn't do a real end-to-end test because the "voice privacy"
feature isn't available at all on my device for some reason. So
instead, I tested this change by simply hacking getVoicePrivacyState()
to return true.

(1) Made a call with Voice Privacy "enabled":
==> Status bar icon showing phone with tiny lock symbol is visible
when I'm on the InCallScreen *and* when I bail out to some other app

(2) Made a call with Voice Privacy disabled:
==> Status bar icon is visible *only* after I bail out of the
InCallScreen. Also, the icon is just a plain phone, with no lock
symbol.

Bug: 5371658

Change-Id: I230bed89eae137d4cd106f3e44d7ad0105d6998c
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
b6b3d264aa8d4f3762ce7b1c7e7ec0660588d03a 12-Oct-2011 Daniel Sandler <dsandler@android.com> Use new status bar disable flags.

Requires frameworks/base change I04eb2245.

Bug: 5380495
Change-Id: I37ab08a55a9e2ff675a4501d3391a2188bc69e9d
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
238e0a1134e5ce2394a382fe9630d0d8fab1b593 08-Sep-2011 David Brown <dab@google.com> Suppress "mute" and "speaker" status bar icons while in-call UI is active

There's no need for these icons while the InCallScreen is active, since
the in-call touch UI already provides an onscreen indication of the mute /
speaker state. So hide them, to reduce clutter in the status bar.

Bug: 5270678

Change-Id: Iddf20908f9ec49770466a9aea79dee36d4189165
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
b14fb7f988e480ad206819851afc3e0a1fc28d6a 02-Sep-2011 David Brown <dab@google.com> In-call UI should put the system bar in 'lights out' mode

Since we want this for the entire activity (not just for a specific view),
we do this by setting the SYSTEM_UI_FLAG_LOW_PROFILE flag in our window's
params.systemUiVisibility field.

Also, a minor followup to change I02140881 (bug 5161286), which disabled
navigation in the system bar while an incoming call is ringing. I
originally implemented that using the StatusBarManager DISABLE_NAVIGATION
flag. But the DISABLE_NAVIGATION flag only affects the "Home" and
"Recents" buttons, so I actually should set the DISABLE_BACK flag too.
(This also has the nice side-effect that the system bar will now
*completely* disappear while an incoming call is ringing.)

Tested (on a non-capacitive-soft-buttons device):
(1) In-call UI for an outgoing call
==> The system bar now shows little dots instead of the usual
Back/Home/Recents icons.
(2) Incoming-call UI
==> The system bar is now totally hidden (and inactive).
(3) In-call UI after answering an incoming call:
==> Same behavior as (1).

Bug: 5252945

Change-Id: I971678ac565aa16d5e5b4c024fcf504ed2d74017
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
1027a51b1033df606f1b19b4b5cb0b8cf1b448fa 23-Aug-2011 Daisuke Miyakawa <dmiyakawa@google.com> update notification layout for on-going call

Bug: 5197507
Change-Id: I77d0be5a58dd95989a579d1b4ed05dca8804ecdb
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
405544c8f5bd63845b1d2ba60ad7be2073a3b530 19-Aug-2011 Flavio Lerda <flerda@google.com> Merge "Clear missed calls when clearing their notification."
32f398d85d0306adde40cfc77de447f1f4f03033 12-Aug-2011 Flavio Lerda <flerda@google.com> Clear missed calls when clearing their notification.

Currently, when the missed call notification is dismissed, no action is
taken. This means the phone still believes those missed calls need to be
shown to the user and on reboot it will add them back to the
notification.

This change adds a deleteIntent, which will be triggered when the
notification is dismissed. The service answering to the intent will in
term update the call log and clear the notification count.

Bug: 2142718
Change-Id: I0ee2270f5aca9380a808d7bd3d7e208be838581c
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
c3e9fcc498a0212fde17f1b4ef09356c42b1af55 28-Jul-2011 David Brown <dab@google.com> Disable navigation in the system bar while an incoming call is ringing

This prevents the "Recents" button from interfering with the incoming call
UI (like if you accidentally press it while pulling the phone out of your
pocket.)

TESTED (on a device without capacitive buttons):
- Normal in-call state: Recents button works normally
- Incoming call: Recents button has no effect (same with Back and
Home too)
- No change to the "Status bar" at the top of the screen: it's (still)
disabled in all InCallScreen states

Also, after ending a call, make sure we don't accidentally leave
navigation disabled(!) Tested these cases:
- Receive incoming call, answer it, hang up
- Receive incoming call, reject it
- Receive incoming call, wait till it stops ringing by itself
...and made sure that the Recents button works correctly after the in-call
UI goes away.

Bug: 5161286

Change-Id: I02140881a276dfb651beeea7f7d0c1dc2998a07c
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
df266ade99188365d4a52f89a6d26b549c2aaf9a 18-Aug-2011 David Brown <dab@google.com> Clean up StatusBarManager usage in the phone app

In preparation for adding the DISABLE_NAVIGATION flag while an incoming
call is ringing (see bug 5161286), here's a big cleanup / simplification
of the phone app's use of the StatusBarManager.

Previously, we had two separate helper methods to disable the status bar
"notification windowshade" while in-call: one in the PhoneApp
(disable/reenableStatusBar()) and the other in the NotificationMgr
(NotificationMgr$StatusBarMgr.enableExpandedView()).

The InCallScreen was calling them both(!) and they could potentially
interfere with each other.

Now, the InCallScreen purely uses the NotificationMgr's helper class for
this, so we can totally get rid of those two PhoneApp methods. (The
EmergencyDialer also used these, but it's a totally separate activity so
it can just call StatusBarManager.disable() directly.)

Also, some other related cleanup:

- Update the NotificationMgr to be more explicit about being a singleton,
and use the exact same naming conventions as we already use with the
CallController / CallNotifier / InCallUiState / etc.

- Rename the helper class from StatusBarMgr to StatusBarHelper to be less
confusing (since "StatusBarManager" means something already)

- Improve javadoc in several places

TESTED to make sure no regressions from Gingerbread:

- While on a call, with the in-call UI up:
- Status bar "windowshade" not draggable in all call states
- Speakerphone and Mute icons appear correctly when necessary
- Alert notifications (like when receiving a text) are silenced

- While still in-call, bail out of the in-call UI:
- Status bar "windowshade" is now draggable
- Speakerphone and Mute icons still appear correctly
- Alert notifications are still silenced

- End the call and return to the home screen
- Status bar "windowshade" is draggable
- Speakerphone and Mute icons are properly cleaned up
- Alert notifications make their usual sounds

- Also, tested bailing out of the in-call UI and then ending the call
remotely (by hanging up the other end): all status bar icons got
cleaned up correctly.

- Emergency dialer (from lockscreen): make sure "windowshade" is not
draggable

Bug: 5161286

Change-Id: I4fa0f0f305d038943b93494ce8500dc339304691
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
0fcb3901bf032e722385489bd6488fef49371f16 12-Aug-2011 David Brown <dab@google.com> Fix repeated (re)launching of InCallScreen for call-waiting calls

Fix a bad side-effect of change I439930, which added code to refresh the
in-call notification when resuming or pausing the in-call UI. The problem
was that in the call-waiting case, the notification update from
InCallScreen.onResume() would *also* (re)launch the InCallScreen :-(

The fix is to separate updateInCallNotification() into two distinct APIs,
one for use by the CallNotifier's incoming call sequence (which is allowed
to launch the InCallScreen), and one that *only* updates the status bar
icon and is used everywhere else. (See updateInCallNotification() and
updateNotificationAndLaunchIncomingCallUi() for the exact details.)

TESTED: all 3 incoming-call actions (answer / reject / respond via SMS),
for the following incoming-call scenarios:
- Regular incoming call with screen off
- Regular incoming call with device unlocked
- Call-waiting call with screen off
- Call-waiting call with device unlocked, showing the in-call UI
- Call-waiting call with device unlocked, in some other app

Bug: 5167337

Change-Id: Ifa76e28c27517b0b85df5ba4dccda403073a2efe
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
e08c8e4cbee3b2434f9222394ac0dafd13009eff 25-Jul-2011 David Brown <dab@google.com> Hide the "ongoing call" status bar icon if the in-call UI is active

If the InCallScreen is the foreground activity, the in-call status bar
icon is pretty redundant (since it's already obvious that you're on a
call.)

So now, only show that icon if you navigate away from the in-call UI.

Also, a slight tweak to the onPhoneStateChanged() sequence: we now add a
slight delay before refreshing the notification to avoid a brief flicker
of the icon when first launching an outgoing call.

Bug: 5070354

Change-Id: I4399301926e3b56ddaf1d98ceae3167effba8317
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
fd72063ad31e35bdcd28607b52b10f60dc1f4c21 19-Jul-2011 Svetoslav Ganov <svetoslavganov@google.com> Adding content description for accessibility.

Change-Id: Ib1e377059bafd3d1eff98fd5ff45120fa03972a7
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
65454c803eb305c4740885ad4995a871b034a58a 22-Jun-2011 David Brown <dab@google.com> Use constants for URI schemes

Use SCHEME_* constants instead of hardcoding
"tel" / "sip" / "sms" / etc. everywhere.

Change-Id: I1858384909a54ae86a27a5f557a80ee185873927
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
0f451f442deaffd832c0b52e7a1eb4ffb1c995d5 03-Jun-2011 David Brown <dab@google.com> Set FLAG_AUTO_CANCEL on missed call notification

When the call log was converted from an activity to a fragment, we
accidentally broke the code that clears the "missed call" notification
upon viewing the call log.

That's slightly nontrivial to fix (see bug 4521535), so as a short-term
workaround let's instead set FLAG_AUTO_CANCEL on the initial notification.
This is only a partial fix, but at least the notification will be cleared
in the most common use case (i.e. selecting the missed call notification
from the windowshade).

Bug: 4521535
Change-Id: I8dddbf88f9b0728f0b623d6c67d02a577223b8f7
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
3886cbec6d3eafe37494fd094bca95c841c779f0 10-May-2011 Daniel Lehmann <lehmannd@google.com> Apply renames from Contacts

Change-Id: Ibafa920b7db2b54b7cbc1d3f195114166dd88479
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
34cf937d84511acbfdb36d80a104c288f8359551 03-Mar-2011 David Brown <dab@google.com> Fix notification for "data disabled because of roaming" setting

The notification's "content intent" was incorrectly trying to launch
android.provider.Settings instead of com.android.phone.Settings :-(

TESTED: on Stingray, using a temporary hack to trigger that notification
manually.
- Before this change, tapping the notification had no effect.
- With this change, it now correctly brings up the "Mobile network
settings" dialog.

Bug: 2821968
Change-Id: I21dbb7f3cd72348d26e4f3cfefa19945ecf948f9
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
687748279e836f9ec9716a6d2eff5501aa8d9536 30-Dec-2010 David Brown <dab@google.com> resolved conflicts for merge of 38faa16a to master

Change-Id: If48fe57643c6195a38db74c491e52008d2e93d11
38faa16a0d906b45d496a6baebc7f9acaec5f018 29-Dec-2010 David Brown <dab@google.com> am f23a09ed: Force incoming-call UI to come up for call-waiting calls.

* commit 'f23a09ed8f8605262ffacfc8c488c0cee026a91f':
Force incoming-call UI to come up for call-waiting calls.
f23a09ed8f8605262ffacfc8c488c0cee026a91f 22-Oct-2010 David Brown <dab@google.com> Force incoming-call UI to come up for call-waiting calls.

Pre-gingerbread, when an incoming call came in we'd manually launch the
incoming call UI via a startActivity() call. But now, we launch it by
posting a Notification, using the "fullScreenIntent" field to specify the
activity to launch.

But there's a quirk in the NotificationManager's behavior: it will
*ignore* the fullScreenIntent field if you post a new Notification that
matches the ID of one that already exists. Unfortunately this is exactly
what happens when you get an incoming call-waiting call, since an "ongoing
call" notification is already visible. So the NotificationManager never
launches our fullScreenIntent, which means that the incoming call UI
doesn't come up :-(

(In most cases this isn't a major problem: the InCallScreen is usually the
foreground activity while you're in a call, so you'll still see the
incoming call UI when you pull the phone away from your face after hearing
the call-waiting tone. But if you bail out of the in-call UI by pressing
HOME during a call, you're hosed: the incoming call UI will *not* come up
automatically. The only way to answer the call is to manually go to the
InCallScreen via the notification bar, which is pretty much
undiscoverable.)

This change works around the NotificationManager behavior by explicitly
canceling and then re-posting the in-call notification, only in this
specific case.

TESTED:
- Regular incoming call while screen on
- Regular incoming call while screen off
- Incoming call-waiting call while screen on, still on InCallScreen
- Incoming call-waiting call while screen on, after bailing out to Home
- Incoming call-waiting call while screen off, still on InCallScreen
- Incoming call-waiting call while screen off, after bailing out to Home
- Incoming call-waiting call while screen off due to prox sensor
The incoming-call UI correctly appeared onscreen in all cases.

Bug: 3184149
Change-Id: Ic8469fdbe7733134f3f52a439c8b4b5658ac0322
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
1aa254b1cecfb2eb9b4cad78d2788874b8f11dab 04-Nov-2010 David Brown <dab@google.com> Correctly disable "missed call" notifications on non-voice-capable devices

We now explicitly make sure that the phone app doesn't do anything "call
log" related on non-voice-capable devices, namely (1) don't try go to the
call log after a call ends, and (2) don't ever display "missed call"
notifications.

I initially fixed this <https://android-git.corp.google.com/g/75328> by
detecting the presence or absence of the call log based on whether there
were any registered handlers for a VIEW intent with mime type
"vnd.android.cursor.dir/calls".

But as of change https://android-git.corp.google.com/g/76050 in
apps/Contacts, that's no longer a valid way to detect whether the device
has a call log UI, since the contacts app now provides an activity called
NonPhoneActivity which *does* handle that intent on non-voice devices.

So we now disable call-log-related stuff based on the system-wide
"config_voice_capable" resource, which is simpler (and more correct) than
trying to detect whether the Call log UI exists or not.

Also: in PhoneApp, set sVoiceCapable at the very top of onCreate to make
sure it'll be valid when we initialize the NotificationMgr/CallNotifier/etc.

Bug: 3159601
Change-Id: I95a40410e2acee7eb1f11bbff1409963ffbd6a33
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
2e97fab35871f41a9a8d8099ccb664b17d92554c 26-Oct-2010 David Brown <dab@google.com> Disable "ongoing call" notification on non-voice-capable devices

The "ongoing call" notification allows you to reach the in-call UI, so
totally disable it on non-voice-capable devices (even when the phone is
technically "in use" like during the OTASP call.)

Also some other related cleanup:

- Cache the config_voice_capable resource as a static PhoneApp field to
save a bunch of resource lookups. (This also minimizes the number of
places that know about that resource, in case we ever switch to using a
system feature instead of a resource.)

- Tracked down all other possible ways of bringing up the in-call screen:
- the ITelephony showCallScreen() API
- the internal displayCallScreen() method
and disabled those too on non-voice-capable devices.

Bug: 3121559
Change-Id: I13343233e8af7aef0846e3cacb429c6736902fd0
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
3ff152c80b97c32a5764c54d2aeb888509cf84ad 31-Jul-2010 David Brown <dab@google.com> Don't try to go to the call log on devices with no call log

Clean up some code in the phone app that assumed the existence of the
"Call Log" screen, and would lead to bad behavior on non-voice-capable
devices where there's no such thing as the Call log.

(1) After a call ends, in situations where we're supposed to go to the call
log, don't crash if there's nobody to handle the call log intent.

(2) When there's a missed call, don't bother posting the missed call
notification at all if there's no call log.

and also:

(3) Sanity check the other startActivity() calls in the phone app to confirm
that there are no other lurking problems (like bug 3056334, or any other
cases where future products might not have all same the built-in apps as
current ones.)

(Result: Fixed two internal helper methods where we were manually
bringing up the InCallScreen.)

NOTE that on Stingray you shouldn't have been able to get to the phone app
in the first place(!)

But there are currently some ways this can happen (see bug 3038102 and bug
3116625 for a couple of examples), so this fix really just makes the code
more robust in case you *do* somehow get to the phone UI on a
non-voice-capable device.

Bug: 3056334

Change-Id: I8ab41398a3a096a4462bbc5fc08aca56eae49376
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
8efefd616a3f2d50fab33f3a8579fa38153c1f69 14-Oct-2010 Wink Saville <wink@google.com> am eab118a3: am 571372d9: Merge "Remove some PII." into gingerbread

Merge commit 'eab118a3411d446a50b08638ac951eb8ef7ac5c3'

* commit 'eab118a3411d446a50b08638ac951eb8ef7ac5c3':
Remove some PII.
eab118a3411d446a50b08638ac951eb8ef7ac5c3 12-Oct-2010 Wink Saville <wink@google.com> am 571372d9: Merge "Remove some PII." into gingerbread

Merge commit '571372d9e8fb298422d337e57e755d508fa0bd89' into gingerbread-plus-aosp

* commit '571372d9e8fb298422d337e57e755d508fa0bd89':
Remove some PII.
6323823dec8d1fde89c7450e57a9ffe733a0b053 12-Oct-2010 Wink Saville <wink@google.com> Remove some PII.

Change-Id: I760cc7d59d7e210d429559d605ec5e4c1cb79122
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
01bb2e988cf70cdda36173b5ebcde5d6265b621f 08-Sep-2010 John Wang <johnwang@google.com> am 1330a3ad: am d5dbb44f: Fix notifyMute.

Merge commit '1330a3addbfeb2e2048cea7964776998661659cd'

* commit '1330a3addbfeb2e2048cea7964776998661659cd':
Fix notifyMute.
1330a3addbfeb2e2048cea7964776998661659cd 08-Sep-2010 John Wang <johnwang@google.com> am d5dbb44f: Fix notifyMute.

Merge commit 'd5dbb44fb1c5259dbc3545d903fedc140ecf80a7' into gingerbread-plus-aosp

* commit 'd5dbb44fb1c5259dbc3545d903fedc140ecf80a7':
Fix notifyMute.
d5dbb44fb1c5259dbc3545d903fedc140ecf80a7 08-Sep-2010 John Wang <johnwang@google.com> Fix notifyMute.

To fix bug 2969427 "Mute" icon doesn't appear in status bar.

Change-Id: I629d0e0f2696f89cc56d09624c203a7916625ac3
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
138423ea2126035f7e316de18fc478362cf3b891 03-Sep-2010 John Wang <johnwang@google.com> am 507876ad: am 2b250f76: Merge "Fix mute/unmute operation with CallManager." into gingerbread

Merge commit '507876ad11ae076c2eae93ff219843b62eb7113d'

* commit '507876ad11ae076c2eae93ff219843b62eb7113d':
Fix mute/unmute operation with CallManager.
507876ad11ae076c2eae93ff219843b62eb7113d 03-Sep-2010 John Wang <johnwang@google.com> am 2b250f76: Merge "Fix mute/unmute operation with CallManager." into gingerbread

Merge commit '2b250f76e11c76c37ad89a590cb690491548311a' into gingerbread-plus-aosp

* commit '2b250f76e11c76c37ad89a590cb690491548311a':
Fix mute/unmute operation with CallManager.
a50e10e2efadac960987eaadc0938c6f92d3ee90 03-Sep-2010 John Wang <johnwang@google.com> Fix mute/unmute operation with CallManager.

It is for bug 2968263.

The Mute concept is call based. PhoneUitls maintains a connectionMuteTable to track

the mute state of each connection. For every preciseCallSateChanged event, the table

gets updated for all foreground and background connections. For every UI mute/unmute

operation the table gets updated for affected foreground connections.

Meanwhile, clean up setMute() and getMute() APIs in PhoneUtils since all in-call operation

can only mute/unmute foreground call, which means works on foreground phone.

Also enforce all in-call UI use setMute() instead of setMuteInternal().

Change-Id: Ib608e040230d46b57434a0ac2597a6fb676ad639
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
074f24f08ce2e68f5fa6eef6733c84978b92405d 28-Aug-2010 Daniel Sandler <dsandler@android.com> am 10dd8fe2: Merge "Update to reflect current Notifications API. DO NOT MERGE" into gingerbread

Merge commit '10dd8fe2eb3c498bcec1560e2a725ea66b335554' into gingerbread-plus-aosp

* commit '10dd8fe2eb3c498bcec1560e2a725ea66b335554':
Update to reflect current Notifications API. DO NOT MERGE
7741cf9c8a33b1870243f7a92db56a09ab98b58b 26-Aug-2010 Daniel Sandler <dsandler@android.com> Update to reflect current Notifications API. DO NOT MERGE

Bug: 2949215

Change-Id: Ia0e15c20c7d21fd7a8879f75f18e06be9f970f67
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
9afe1de771110096822a2501d78135575101421d 14-Aug-2010 John Wang <johnwang@google.com> resolved conflicts for merge of 17509be3 to master

Change-Id: Ie52e3bfd5f127788840b11e56ba5fe9dd5b97cf0
17509be39f0f3daadc669a76ca993cce361afa33 13-Aug-2010 John Wang <johnwang@google.com> am 8343169c: Enable CallManager to handle SIP call.

Merge commit '8343169cc89621d46dce86449f5ee1ff5d3a4919' into gingerbread-plus-aosp

* commit '8343169cc89621d46dce86449f5ee1ff5d3a4919':
Enable CallManager to handle SIP call.
8343169cc89621d46dce86449f5ee1ff5d3a4919 11-Aug-2010 John Wang <johnwang@google.com> Enable CallManager to handle SIP call.

Using CallManager to handle SIP call

1. Register SIP phone in SipBroadcastReceiver

2. Answer SIP incoming call

3. Reject SIP incoming call

4. Make SIP outgoing call

5. hangup SIP outgoing call

6. Add SIP call while there is foreground call

7. Answer SIP call while there is foreground call

8. Swap SIP call and background call

Change-Id: I2fc1f88e0fc100da45eb497469d69c784f44d06a
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
c254af0936d912dde73044c560be7996cfc49bd8 05-Aug-2010 John Wang <johnwang@google.com> am 9498d7f5: Merge "Use CallManager register methods "do not merge"." into gingerbread

Merge commit '9498d7f519b59becbfa6f36f436cdbba07dfa09f' into gingerbread-plus-aosp

* commit '9498d7f519b59becbfa6f36f436cdbba07dfa09f':
Use CallManager register methods "do not merge".
862cd3adad2b2cdf7ca6a1a5750c43882aeeaa3c 26-Jul-2010 John Wang <johnwang@google.com> Use CallManager register methods "do not merge".

Merge code from master to gingerbread.

Replace the phone.register methods with CallManager.register in CallNotifier class.

Change-Id: Ic059edf6d74e10c469281a0a5f2f47fffbdf1d4c
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
170160f6550b2933ff5a6c96c879d074a3ca2f16 26-Jul-2010 John Wang <johnwang@google.com> Use CallManager register methods.

Replace the phone.register methods with CallManager.register in CallNotifier class.

Change-Id: I89d9fabe14cc0022709e47ded683d2f24263ecc8
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
bba529eb8b174ccbc03b46e91101376e5e727be1 13-Jul-2010 The Android Open Source Project <initial-contribution@android.com> am cc7716bc: merge from open-source master

Merge commit 'cc7716bc366332af76cd7a47332cf9dabe0e24fb'

* commit 'cc7716bc366332af76cd7a47332cf9dabe0e24fb':
Replaced deprecated Notification Constructor
cc7716bc366332af76cd7a47332cf9dabe0e24fb 13-Jul-2010 The Android Open Source Project <initial-contribution@android.com> merge from open-source master

Change-Id: I83d2957d0ffcef2db1e48cd43a36413c271c4643
2888454a4152f7423b7fa4de6fae421665226cc0 09-Jul-2010 David Brown <dab@google.com> am f71b5538: am 8004b65b: Copy phone-related status bar notification icons into the phone app

Merge commit 'f71b55387f0fb44a7bc012e83e3a25aeaaddf877'

* commit 'f71b55387f0fb44a7bc012e83e3a25aeaaddf877':
Copy phone-related status bar notification icons into the phone app
8004b65b39a67fa5d1ee560d6693a2fc3c04fcaf 08-Jul-2010 David Brown <dab@google.com> Copy phone-related status bar notification icons into the phone app

Till now these icon resources have been part of the framework, but status
bar icons really belong to specific apps (not the framework.)

So this change copies em into apps/Phone, and updates the NotificationMgr
code to use the phone app versions rather than the ones from
com.android.internal.R.drawable.

(In fact this change gets us a tiny bit closer to unbundling the phone app,
since NotificationMgr.java no longer refers to any com.android.internal.R.*
resources.)

Next step: remove the icons in question from frameworks/base. (But note that
a couple of them were accidentally marked "public" at some point, so we'll
never be able to get rid of those. But I'll remove the private ones.)

Change-Id: I1fac3787f94ef4ccdcce71ca5a30c6765e7076fc
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
9537852545bf97d9e4d903c1eb2b528adc22dbc8 02-Jul-2010 David Brown <dab@google.com> resolved conflicts for merge of 7ef43908 to master

Change-Id: I485f26e74aaed88638deadad72da3c1e766f2453
49c2f55d9544b3262b82ff956cc84c06cfed7f41 02-Jul-2010 David Brown <dab@google.com> Don't post the "incoming call" notification till we're ready.

Remove the call to NotificationMgr.updateInCallNotification() that was
happening directly from CallNotifier.onNewRingingConnection().

At that point we don't want to post a status bar notification (yet), since
we still need to run the caller-id query (and we may ultimately not even
ring at all, if the "send directly to voicemail" flag is set.)

(This is also why incoming calls would show up in the mini-me with a raw
phone number like "16505551212" rather than a contact name.)

We now update the notification -- and potentially launch the InCallScreen --
only from the showIncomingCall() method, which runs when the caller-id
query completes or times out.

Also add a bit more logging for the overall updateInCallNotification()
sequence. (Like before, only for userdebug or eng builds.)

Tested: incoming calls, both immersive and non-immersive. Also confirmed
the contact name (not raw phone number) now shows up in the mini-me.

Bug: 2768760
Change-Id: Iccbc88f224377d967945c260dc1416b5e44faaa0
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
b93df61080c3d6784d776a7c78baf6ab0682df03 01-Jul-2010 David Brown <dab@google.com> am b8fc7d84: am 7636c3d2: Minor tweaks to the phone app\'s incoming-call notification.

Merge commit 'b8fc7d847302f1cea8adbedd1daecab57b3d81b2'

* commit 'b8fc7d847302f1cea8adbedd1daecab57b3d81b2':
Minor tweaks to the phone app's incoming-call notification.
7636c3d270183078ac24824c9efa504a4da36db8 01-Jul-2010 David Brown <dab@google.com> Minor tweaks to the phone app's incoming-call notification.

- Set the notification's tickerText field so that we'll get some text in
the mini-me popup.

- Make it more clear that the notification's "fullScreenIntent" and
"contentIntent" are identical

- Enable slightly more debug logging by default (only for userdebug+eng
builds), to help track down why a single incoming call sometimes causes
multiple notifications to be posted.

- Some minor comment cleanup

Bug: 2768760
Change-Id: If2eedc93b5da3ae72e4793bf41f6a43875ce3ebc
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
50af50953c053c7822362a59d14bc32c20d873ee 01-Jul-2010 David Brown <dab@google.com> am 42e8d8de: am 7f63f08c: Launch incoming call UI via notification, not with startActivity()

Merge commit '42e8d8de0a8e31692c0f936f810bd1a6e5048b00'

* commit '42e8d8de0a8e31692c0f936f810bd1a6e5048b00':
Launch incoming call UI via notification, not with startActivity()
7f63f08c5c88d604abba447032ed42f4f972f3ef 25-Jun-2010 David Brown <dab@google.com> Launch incoming call UI via notification, not with startActivity()

This is step 2 toward the new notification-based incoming call UI, which
will allow for special behavior if a call comes in while a
non-interruptable ("immersive") activity is in the foreground.

Previously, we'd explicitly call PhoneApp.displayCallScreen() as the very
last step of the "incoming call" sequence in CallNotifier.java. Now, we
instead post a notification that includes a "fullScreenIntent" field,
which the framework will automagically launch as long as we're *not* in
the middle of an immersive activity.

(Note that we specify a non-null fullScreenIntent only while the phone is
ringing, so the regular "ongoing call" notification is unchanged. We also
set the notification's FLAG_HIGH_PRIORITY bit if the phone is ringing.)

Next: implement UI for the case where we *are* in an immersive activity.

Other refactoring/cleanup in this change:

- Replaced PhoneUtils.showIncomingCallUi() with the new
CallNotifier.showIncomingCall() method. The functionality is the same
*except* that the new version puts up a notification instead of
explicitly calling startActivity() to bring up the InCallScreen.

(I moved the code from PhoneUtils to CallNotifier since it's only ever
called from CallNotifier methods.)

- Update NotificationMgr to use the new stat_sys_phone_call_ringing
resource for the "incoming call" notification. (That's still a
placeholder icon, though.)

- Remove the totally obsolete PhoneApp.handleInCallOrRinging() method

Tested: incoming calls in both immersive and non-immersive activities.
(Note that there's currently no way to actually *answer* the call if
you're in an immersive activity, though.)

Bug: 2768760

Change-Id: If33a64d7c2fba3a4eb1ecab7db8f03f7593ca5c5
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
b08aa5ed7d52eda9670f59ad5f83e81ed040f2cd 25-Jun-2010 David Brown <dab@google.com> resolved conflicts for merge of 6fb11010 to master

Change-Id: I8b87f7daf717e20eeedfed77ea7d8f2c1d0b037b
47abf25faf4e513394f6f10dac03562913be04c1 25-Jun-2010 Christian Mehlmauer <FireFart@gmail.com> Replaced deprecated Notification Constructor

Change-Id: I10eceddae9dc0be5f0adf5d2d3af5d39f15808e0
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
4f76ebacc88f5c69608a7a4f258887fe2036c55d 09-Jun-2010 David Brown <dab@google.com> Update the phone app's status bar notification even while ringing

The phone app now puts up a notification any time the phone is OFFHOOK
*or* RINGING, rather than only in the OFFHOOK state.

This is a first step toward a new notification-based incoming call UI,
which we're planning to use if a call comes in while a non-interruptable
("immersive") activity is in the foreground.

Side note: this behavior is also useful in the (very obscure) case where
you somehow manage to escape the incoming-call UI while a call is still
ringing; see bug 2248148 for an example. If this happens, you can now
select the "incoming call" notification to return to the incoming-call UI.

Also removed some old dead code that was trying to update the "expanded
view" RemoteViews *after* sending it over to the NotificationMgr (which
has no effect.) Now, when the caller-id query finishes, we just
completely regenerate the in-call notification.

Tested: on Passion, using a temporary hack that let me press BACK to
escape the incoming-call UI. After doing that, verified that the new
"incoming call" notification looked correct, and (when selected) took me
back to the incoming-call UI.

Bug: 2768760

Change-Id: I57bb072c746e944608324e8ed6cd1b230fdb96ce
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
6acb4ad5e5df987a12607fa5648523f7f8d1c093 03-Jun-2010 Joe Onorato <joeo@android.com> am da31cf7d: Update for new private status bar api.
da31cf7d18e1ef928e68522e7cd02b70304cb44d 06-May-2010 Joe Onorato <joeo@android.com> Update for new private status bar api.

Change-Id: I3fad870e30a19e8e272f592b0cd8fd1d8b247b38
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
24f2ad06f72bda5d06281ff082598aad60f74a66 22-May-2010 Martin Hibdon <mah@android.com> CDMA/GSM cleanup in CallNotifier

Previously, the CallNotifier would register for certain
messages if the phone of was a phoneType that
was expected to provide that type of message.
For example, we would only register for
displayInfo and signalInfo messages on CDMA
devices.
Now, CallNotifier will always register for these
messages, regardless of phone type. If the
current phone does not actually support that
functionality, then it will simply never deliver
that message. This simplifies the code in the
phone app.

Change-Id: I77a7b0895010b1f402f814fbf16e13d9157a01fa
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
4255de8ccf5680c75a4e0ade7b63981f33ec355a 22-May-2010 Martin Hibdon <mah@android.com> Cleanup CDMA and GSM differences in NotificationMgr

add two more policy methods to TelephonyCapabilities:
- supportsVoiceMessageCount()
- supportsNetworkSelection()

These are now used in NotificationMgr in place of
checking phone type.

Change-Id: Ie907aba18e664bad69c30bf7dafcae86ab766ef8
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
027987172fa2033d10657a03cbce661d2546f0f4 05-Feb-2010 David Brown <dab@google.com> FIX 2172935 -- Descenders are cut off in the CallCard 'name' field

The fix: Add some leading between "name" and "number".

Also, some minor code cleanup (no functional changes) in PhoneApp.java and
NotificationMgr.java.

TESTED: on passion, confirmed:
- Descenders are completely visible (not clipped at all) when
label+number fields are not present. This was the original bug.
- When the label and number *are* present, the leading between the two
lines looks good (i.e. not too tight or too loose), regardless of
whether the name field contains characters with descenders.

BUG=2172935
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
13628f225b21bc813bb0f9fd04314d89b47bdb69 20-Jan-2010 Mike Lockwood <lockwood@android.com> Use default values rather than hard coding green for LED notification color.

Change-Id: I800fb28842d36648ec9b2822b3f1f6b3e84e7eef
BUG: 2329568

Signed-off-by: Mike Lockwood <lockwood@android.com>
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
6bfbc4db43492e59d9b2050b93024245483e2c63 19-Oct-2009 Virgil King <virgilking@google.com> Add LED indication for missed calls

Use the same LED parameters in the "missed call" notification as in the "message waiting" case.

Bug: 1663038
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
1e8a3579f8e49fd1f1a078d6be6864a6a8bac306 03-Oct-2009 David Brown <dab@google.com> Reduce Phone App logging verbosity

- Update PhoneUtils.dumpCallState() to use a (much) more compact format
- Turn down verbosity of some other stuff that's not needed any more
- STOPSHIP cleanup: Remove a runtime exception that should just be a Log.e()

TESTED=GSM,CDMA.
BUG=2163789
DRNO=timsullivan
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
f3847c6db88db001c9fa280a219b8897ca09decf 01-Oct-2009 Dmitri Plotnikov <dplotnikov@google.com> Upgrading NotificationMgr to new contacts API

The API in question is used ONLY if the Phone.app is restarted. It looks up
the contact for missed calls.

I verified that it correctly picks up contacts from a secondary Exchange account
after this change.

Change-Id: I9dec54ace926c72a02da1c51beac331ec969ee69
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
79b9f6e30e8402b103f1ec3ed9dda1fcad2b1cd5 22-Sep-2009 Tammo Spalink <tammo@google.com> Replace Phone.getPhoneName() calls with getPhoneType().

The latter is numeric, and hence allows some compiler protection
against typos.

Addresses issue:
http://buganizer/issue?id=1905415

Change-Id: If46c709fd7bfb817a2801d0200eac0ad8cf819e0
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
99d10538d840f0103c36dafa44db9f649ca884c8 09-Sep-2009 johnwang <johnwang@google.com> Add notification while selected network fails.

Provide a notification to user when the chosen network cannot be found. When tapping it the user could be taken to the settings to change the network selection.
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
b3e1e0012986738034dab1e0625cde8095c61542 28-Jul-2009 Peng Zhu <w46254@motorola.com> Fix the issue of no Voice Privacy icon on MO calls
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
4e879989bb6e23763802ceb128e8785f8f063ac0 28-Jul-2009 Robert Kowalski <r.kowalski@motorola.com> Modified UI for Emergency Callback Mode

Specific list of changes that are needed for the support of CDMA emergency
callback mode:
1. Removed Teleca's implementation of the ECM UI - it had limited functionality
2. Added service that inserts ongoing ECM notification in the status bar and updates countdown
info in the notification in 1sec intervals when phone enters ECM.
3. Added dialog box prompting to exit ECM when any application wants to prompt a user to exit
ECM or a user selects ongoing ECM notification. It responds to
ACTION_SHOW_NOTICE_ECM_BLOCK_OTHERS intent.
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
7957f63826136b71474d24f29954dfb03758003b 02-Jul-2009 David Brown <dab@google.com> resolved conflicts for merge of 87258b2b to master
87258b2b589c3afea4b89b840251012378e0d3b4 27-Jun-2009 David Brown <dab@google.com> Misc phone app code cleanup.

- remove unused String "finalTitle" in NotificationMgr (accidentally
included in one of the Moto changes)

- tweak bottom margin of one CallCard text field to avoid cutting off
descenders

- remove the unused PhoneUtils getCompactName() methods

- remove unused CallCard showCall* methods

- remove useless CallCard reset() method

- When the radio technology changes, have PhoneApp call a new InCallScreen
method that unregisters then re-registers for phone state events.
(Even though we don't have any devices yet that can switch on the fly
between GSM and CDMA, the code still ought to do this.)

- some minor debug logging cleanup

TESTED: ran basic telephony test cases.
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
3800ac871d6548790ac6119bb68b9be0640af261 10-Jun-2009 David Krause <david.krause@motorola.com> CDMA lost call dialog and auto-retry feature
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
cad797743af366c66a149b1db5356e816f437125 02-Jun-2009 David Krause <david.krause@motorola.com> apps/phone: CDMA voicemail support

Depends on change 76, which includes the necessary framework support
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
691eae1fa5e1d4e2a9ae318f9dad5320ed5ec5c1 01-Jun-2009 Wink Saville <wink@google.com> TODO fixes from Teleca 090527
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
404edc94de563aef5fd5ba48be9114a970cb93bb 18-May-2009 Wink Saville <wink@google.com> Teleca 2b changes.
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
2901f71e62770bfd9f689ff834be14bab8367c09 15-Apr-2009 Tammo Spalink <tammo@google.com> clean up resId logic
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
a69de9f9a2e99fe08f0009bb218b95ed7985c575 02-Apr-2009 Wink Saville <> AI 144185: Integrate cdma into the main code base.

Automated import of CL 144185
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
4b8337277ec2e375c3536b97c40e6617a7b12990 19-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake_rel/...@140373
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
4079f559beb3e414036056b4b33ad40de5e89c4a 13-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake_rel/...@138607
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
8bb467d9a1106dedd79e42166c7b6e9fc9a897a7 09-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@137197
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
b16363f5fc191b769e88c364243e34b92eb22688 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
a412e78a7bba553a66503370b4c618db83528916 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java
abc47110c17fa8e8cb6161bc045e87f31eeb7a1c 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution
/packages/apps/Phone/src/com/android/phone/NotificationMgr.java