summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/app/DialtactsActivity.java
diff options
context:
space:
mode:
authorEric Erfanian <erfanian@google.com>2017-05-04 08:23:17 -0700
committerEric Erfanian <erfanian@google.com>2017-05-04 14:04:39 -0700
commit10b34a5ebf12e97ecba0caf3c8e30b476b038a96 (patch)
tree3a325b0effac02fbd228b8ddf2f96589e5df72cd /java/com/android/dialer/app/DialtactsActivity.java
parent8369df095a73a77b3715f8ae7ba06089cebca4ce (diff)
Update Dialer to V10 RC16
This release was created following the instructions at: go/dialer-aosp-release Subsequent dialer releases will follow as O bugs are fixed, until we reach our final RC. Version: 10 Candidate: RC16 Branch: dialer-android_release_branch/153304843.1 dialer-android/dialer-android_20170416.00/dialer-android_20170416.00_RC16 This release contains the following bug fixes since RC00: Bug: 37324705 35304403 36067503 35304446 33203808 37280992 37346084 35766990 37481880 37424493 36470282 37347691 37519015 37168472 35805360 37545472 27704934 36515614 35766990 37577470 34739750 35801628 36788693 35264204 36708536 37628370 36904650 37314436 37642171 37530847 37637799 37666625 37548549 37648036 37636412 37323529 37630507 35919141 37198343 37548572 36178218 37640315 37663896 37720467 37275944 37710497 31634477 37744796 37348506 37744796 37568534 37672424 34872683 34873026 37681461 34873295 37748373 37526812 37618638 37663896 37536088 37727455 37165687 36651204 36900708 37323529 36902926 37256480 37328353 37432034 37436952 34093562 37720889 37321935 37780300 37781115 37755902 36588206 34258266 37290464 37698062 37618638 37473004 37432034 37918676 37870494 37722091 Test: make, on device Change-Id: I99e1a484ccd578c1f8a13e7a6a4b4952f0791297
Diffstat (limited to 'java/com/android/dialer/app/DialtactsActivity.java')
-rw-r--r--java/com/android/dialer/app/DialtactsActivity.java69
1 files changed, 39 insertions, 30 deletions
diff --git a/java/com/android/dialer/app/DialtactsActivity.java b/java/com/android/dialer/app/DialtactsActivity.java
index 139f27af8..3318c506d 100644
--- a/java/com/android/dialer/app/DialtactsActivity.java
+++ b/java/com/android/dialer/app/DialtactsActivity.java
@@ -18,6 +18,7 @@ package com.android.dialer.app;
import android.app.Fragment;
import android.app.FragmentTransaction;
+import android.app.KeyguardManager;
import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.Intent;
@@ -161,6 +162,7 @@ public class DialtactsActivity extends TransactionSafeActivity
private static final int ACTIVITY_REQUEST_CODE_VOICE_SEARCH = 1;
public static final int ACTIVITY_REQUEST_CODE_CALL_COMPOSE = 2;
+ public static final int ACTIVITY_REQUEST_CODE_LIGHTBRINGER = 3;
private static final int FAB_SCALE_IN_DELAY_MS = 300;
@@ -379,12 +381,8 @@ public class DialtactsActivity extends TransactionSafeActivity
mSearchView.addTextChangedListener(mPhoneSearchQueryTextListener);
mVoiceSearchButton = searchEditTextLayout.findViewById(R.id.voice_search_button);
searchEditTextLayout
- .findViewById(R.id.search_magnifying_glass)
+ .findViewById(R.id.search_box_collapsed)
.setOnClickListener(mSearchViewOnClickListener);
- searchEditTextLayout
- .findViewById(R.id.search_box_start_search)
- .setOnClickListener(mSearchViewOnClickListener);
- searchEditTextLayout.setOnClickListener(mSearchViewOnClickListener);
searchEditTextLayout.setCallback(
new SearchEditTextLayout.Callback() {
@Override
@@ -505,8 +503,6 @@ public class DialtactsActivity extends TransactionSafeActivity
mVoiceSearchQuery = null;
}
- mFirstLaunch = false;
-
if (mIsRestarting) {
// This is only called when the activity goes from resumed -> paused -> resumed, so it
// will not cause an extra view to be sent out on rotation
@@ -522,33 +518,39 @@ public class DialtactsActivity extends TransactionSafeActivity
}
mFloatingActionButtonController.align(getFabAlignment(), false /* animate */);
- if (Calls.CONTENT_TYPE.equals(getIntent().getType())) {
- // Externally specified extras take precedence to EXTRA_SHOW_TAB, which is only
- // used internally.
- final Bundle extras = getIntent().getExtras();
- if (extras != null && extras.getInt(Calls.EXTRA_CALL_TYPE_FILTER) == Calls.VOICEMAIL_TYPE) {
- mListsFragment.showTab(DialtactsPagerAdapter.TAB_INDEX_VOICEMAIL);
- Logger.get(this).logImpression(DialerImpression.Type.VVM_NOTIFICATION_CLICKED);
- } else {
- mListsFragment.showTab(DialtactsPagerAdapter.TAB_INDEX_HISTORY);
+ if (mFirstLaunch) {
+ // Only process the Intent the first time onResume() is called after receiving it
+ if (Calls.CONTENT_TYPE.equals(getIntent().getType())) {
+ // Externally specified extras take precedence to EXTRA_SHOW_TAB, which is only
+ // used internally.
+ final Bundle extras = getIntent().getExtras();
+ if (extras != null && extras.getInt(Calls.EXTRA_CALL_TYPE_FILTER) == Calls.VOICEMAIL_TYPE) {
+ mListsFragment.showTab(DialtactsPagerAdapter.TAB_INDEX_VOICEMAIL);
+ Logger.get(this).logImpression(DialerImpression.Type.VVM_NOTIFICATION_CLICKED);
+ } else {
+ mListsFragment.showTab(DialtactsPagerAdapter.TAB_INDEX_HISTORY);
+ }
+ } else if (getIntent().hasExtra(EXTRA_SHOW_TAB)) {
+ int index =
+ getIntent().getIntExtra(EXTRA_SHOW_TAB, DialtactsPagerAdapter.TAB_INDEX_SPEED_DIAL);
+ if (index < mListsFragment.getTabCount()) {
+ // Hide dialpad since this is an explicit intent to show a specific tab, which is coming
+ // from missed call or voicemail notification.
+ hideDialpadFragment(false, false);
+ exitSearchUi();
+ mListsFragment.showTab(index);
+ }
}
- } else if (getIntent().hasExtra(EXTRA_SHOW_TAB)) {
- int index =
- getIntent().getIntExtra(EXTRA_SHOW_TAB, DialtactsPagerAdapter.TAB_INDEX_SPEED_DIAL);
- if (index < mListsFragment.getTabCount()) {
- // Hide dialpad since this is an explicit intent to show a specific tab, which is coming
- // from missed call or voicemail notification.
- hideDialpadFragment(false, false);
- exitSearchUi();
- mListsFragment.showTab(index);
+
+ if (getIntent().getBooleanExtra(EXTRA_CLEAR_NEW_VOICEMAILS, false)) {
+ CallLogNotificationsService.markNewVoicemailsAsOld(this, null);
}
}
- if (getIntent().getBooleanExtra(EXTRA_CLEAR_NEW_VOICEMAILS, false)) {
- CallLogNotificationsService.markNewVoicemailsAsOld(this, null);
- }
+ mFirstLaunch = false;
setSearchBoxHint();
+ timeTabSelected = SystemClock.elapsedRealtime();
mP13nLogger.reset();
mP13nRanker.refresh(
@@ -586,7 +588,10 @@ public class DialtactsActivity extends TransactionSafeActivity
SystemClock.elapsedRealtime() - timeTabSelected >= HISTORY_TAB_SEEN_TIMEOUT;
boolean isOnHistoryTab =
mListsFragment.getCurrentTabIndex() == DialtactsPagerAdapter.TAB_INDEX_HISTORY;
- if (isOnHistoryTab && timeoutElapsed && !isChangingConfigurations()) {
+ if (isOnHistoryTab
+ && timeoutElapsed
+ && !isChangingConfigurations()
+ && !getSystemService(KeyguardManager.class).isKeyguardLocked()) {
mListsFragment.markMissedCallsAsReadAndRemoveNotifications();
}
}
@@ -857,7 +862,10 @@ public class DialtactsActivity extends TransactionSafeActivity
/** Finishes hiding the dialpad fragment after any animations are completed. */
private void commitDialpadFragmentHide() {
- if (!mStateSaved && mDialpadFragment != null && !mDialpadFragment.isHidden()) {
+ if (!mStateSaved
+ && mDialpadFragment != null
+ && !mDialpadFragment.isHidden()
+ && !isDestroyed()) {
final FragmentTransaction ft = getFragmentManager().beginTransaction();
ft.hide(mDialpadFragment);
ft.commit();
@@ -1006,6 +1014,7 @@ public class DialtactsActivity extends TransactionSafeActivity
@Override
public void onNewIntent(Intent newIntent) {
setIntent(newIntent);
+ mFirstLaunch = true;
mStateSaved = false;
displayFragment(newIntent);