diff options
author | Eric Erfanian <erfanian@google.com> | 2017-05-05 15:23:13 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2017-05-05 15:23:13 +0000 |
commit | 300a8683b9c28424fb0f0c571a0abe128c461f69 (patch) | |
tree | 3a325b0effac02fbd228b8ddf2f96589e5df72cd /java/com/android/dialer/postcall/PostCallActivity.java | |
parent | d67f1627521b174f12e0c247f154c7c93c5e408e (diff) | |
parent | 10b34a5ebf12e97ecba0caf3c8e30b476b038a96 (diff) |
Update Dialer to V10 RC16
am: 10b34a5ebf
Change-Id: Iea3e96ccdeaf1fa796ceca702cace82ca20f298c
Diffstat (limited to 'java/com/android/dialer/postcall/PostCallActivity.java')
-rw-r--r-- | java/com/android/dialer/postcall/PostCallActivity.java | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/java/com/android/dialer/postcall/PostCallActivity.java b/java/com/android/dialer/postcall/PostCallActivity.java index 28cf5709e..1d3b611e0 100644 --- a/java/com/android/dialer/postcall/PostCallActivity.java +++ b/java/com/android/dialer/postcall/PostCallActivity.java @@ -29,7 +29,6 @@ import android.support.v7.app.AppCompatActivity; import android.telephony.SmsManager; import com.android.dialer.common.Assert; import com.android.dialer.common.LogUtil; -import com.android.dialer.enrichedcall.EnrichedCallCapabilities; import com.android.dialer.enrichedcall.EnrichedCallComponent; import com.android.dialer.enrichedcall.EnrichedCallManager; import com.android.dialer.util.PermissionsUtil; @@ -41,13 +40,16 @@ public class PostCallActivity extends AppCompatActivity implements MessageFragme public static final String KEY_PHONE_NUMBER = "phone_number"; public static final String KEY_MESSAGE = "message"; + public static final String KEY_RCS_POST_CALL = "rcs_post_call"; private static final int REQUEST_CODE_SEND_SMS = 1; private boolean useRcs; - public static Intent newIntent(@NonNull Context context, @NonNull String number) { + public static Intent newIntent( + @NonNull Context context, @NonNull String number, boolean isRcsPostCall) { Intent intent = new Intent(Assert.isNotNull(context), PostCallActivity.class); intent.putExtra(KEY_PHONE_NUMBER, Assert.isNotNull(number)); + intent.putExtra(KEY_RCS_POST_CALL, isRcsPostCall); return intent; } @@ -57,7 +59,7 @@ public class PostCallActivity extends AppCompatActivity implements MessageFragme setContentView(R.layout.post_call_activity); ((DialerToolbar) findViewById(R.id.toolbar)).setTitle(R.string.post_call_message); - useRcs = canUseRcs(getIntent().getStringExtra(KEY_PHONE_NUMBER)); + useRcs = getIntent().getBooleanExtra(KEY_RCS_POST_CALL, false); LogUtil.i("PostCallActivity.onCreate", "useRcs: %b", useRcs); int postCallCharLimit = @@ -82,17 +84,6 @@ public class PostCallActivity extends AppCompatActivity implements MessageFragme .commit(); } - private boolean canUseRcs(@NonNull String number) { - EnrichedCallCapabilities capabilities = - getEnrichedCallManager().getCapabilities(Assert.isNotNull(number)); - LogUtil.i( - "PostCallActivity.canUseRcs", - "number: %s, capabilities: %s", - LogUtil.sanitizePhoneNumber(number), - capabilities); - return capabilities != null && capabilities.supportsPostCall(); - } - @Override public void onMessageFragmentSendMessage(@NonNull String message) { String number = Assert.isNotNull(getIntent().getStringExtra(KEY_PHONE_NUMBER)); |