diff options
author | Yorke Lee <yorkelee@google.com> | 2014-07-18 09:08:51 -0700 |
---|---|---|
committer | Yorke Lee <yorkelee@google.com> | 2014-07-25 18:04:09 -0700 |
commit | 72d59616b7a491d41c9b127b777c63fe315ecd06 (patch) | |
tree | c662686f145d8e835a2a0398b888212a9c7eac92 /src | |
parent | 6cac92e34c11e8e7bee48265fa2775c2b67546e1 (diff) |
Switch from ACTION_CALL_PRIVILEGED TO ACTION_CALL (1/5)
Bug: 6948882
Change-Id: I1f90c9f3f33d875482958d5f565629160ce2177e
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/dialer/util/DialerUtils.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/com/android/dialer/util/DialerUtils.java b/src/com/android/dialer/util/DialerUtils.java index bd1813354..93a055df1 100644 --- a/src/com/android/dialer/util/DialerUtils.java +++ b/src/com/android/dialer/util/DialerUtils.java @@ -15,6 +15,7 @@ */ package com.android.dialer.util; +import android.app.Activity; import android.content.ActivityNotFoundException; import android.content.ComponentName; import android.content.Context; @@ -64,7 +65,11 @@ public class DialerUtils { */ public static void startActivityWithErrorToast(Context context, Intent intent, int msgId) { try { - context.startActivity(intent); + if (Intent.ACTION_CALL.equals(intent.getAction())) { + ((Activity) context).startActivityForResult(intent, 0); + } else { + context.startActivity(intent); + } } catch (ActivityNotFoundException e) { Toast.makeText(context, msgId, Toast.LENGTH_SHORT).show(); } |