Merge "Don't crash if there is no phone app and someone presses the phone button."

This commit is contained in:
Joe Onorato
2010-10-07 10:03:46 -07:00
committed by Android (Google) Code Review

View File

@@ -1504,7 +1504,11 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
sendCloseSystemWindows();
Intent intent = new Intent(Intent.ACTION_CALL_BUTTON);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
getContext().startActivity(intent);
try {
getContext().startActivity(intent);
} catch (ActivityNotFoundException e) {
Log.w(TAG, "No activity found for android.intent.action.CALL_BUTTON.");
}
}
@Override