diff options
author | Yorke Lee <yorkelee@google.com> | 2015-07-03 20:34:13 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-07-03 20:34:13 +0000 |
commit | a8bd8552a3d232b3df373058a903bd6150d2e74b (patch) | |
tree | 4e76ff561a246cab26a5e05021544b45c5bc7b8b | |
parent | 44aa791099718ecddb4445b46a57c5e5ab0f1b2a (diff) | |
parent | ace779434cb82410aa44469be37119296c124b9e (diff) |
am ace77943: am 94291c6f: am 265aafcd: Merge "Restore Dialer content after permissions granted" into mnc-dev
* commit 'ace779434cb82410aa44469be37119296c124b9e':
Restore Dialer content after permissions granted
4 files changed, 12 insertions, 1 deletions
diff --git a/src/com/android/dialer/CallDetailActivity.java b/src/com/android/dialer/CallDetailActivity.java index 734e78f46..ec92f3f94 100644 --- a/src/com/android/dialer/CallDetailActivity.java +++ b/src/com/android/dialer/CallDetailActivity.java @@ -47,6 +47,7 @@ import android.widget.Toast; import com.android.contacts.common.ContactPhotoManager; import com.android.contacts.common.ContactPhotoManager.DefaultImageRequest; +import com.android.contacts.common.util.PermissionsUtil; import com.android.contacts.common.GeoUtil; import com.android.contacts.common.CallUtil; import com.android.dialer.calllog.CallDetailHistoryAdapter; @@ -267,6 +268,7 @@ public class CallDetailActivity extends Activity @Override public void onResume() { super.onResume(); + PermissionsUtil.updateCachedPermissions(this); getCallDetails(); } diff --git a/src/com/android/dialer/DialtactsActivity.java b/src/com/android/dialer/DialtactsActivity.java index 546a64666..52a33f2b3 100644 --- a/src/com/android/dialer/DialtactsActivity.java +++ b/src/com/android/dialer/DialtactsActivity.java @@ -511,6 +511,8 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O protected void onResume() { Trace.beginSection(TAG + " onResume"); super.onResume(); + + PermissionsUtil.updateCachedPermissions(this); mStateSaved = false; if (mFirstLaunch) { displayFragment(getIntent()); diff --git a/src/com/android/dialer/calllog/CallLogActivity.java b/src/com/android/dialer/calllog/CallLogActivity.java index d5444de8a..0f2f83860 100644 --- a/src/com/android/dialer/calllog/CallLogActivity.java +++ b/src/com/android/dialer/calllog/CallLogActivity.java @@ -35,6 +35,7 @@ import android.view.ViewGroup; import com.android.contacts.common.interactions.TouchPointManager; import com.android.contacts.common.list.ViewPagerTabs; +import com.android.contacts.common.util.PermissionsUtil; import com.android.contacts.commonbind.analytics.AnalyticsUtil; import com.android.dialer.DialtactsActivity; import com.android.dialer.R; @@ -150,6 +151,7 @@ public class CallLogActivity extends Activity implements ViewPager.OnPageChangeL protected void onResume() { mIsResumed = true; super.onResume(); + PermissionsUtil.updateCachedPermissions(this); sendScreenViewForChildFragment(mViewPager.getCurrentItem()); } diff --git a/src/com/android/dialer/list/SpeedDialFragment.java b/src/com/android/dialer/list/SpeedDialFragment.java index 541cdf6e1..bf9575858 100644 --- a/src/com/android/dialer/list/SpeedDialFragment.java +++ b/src/com/android/dialer/list/SpeedDialFragment.java @@ -194,7 +194,12 @@ public class SpeedDialFragment extends Fragment implements OnItemClickListener, super.onResume(); if (PermissionsUtil.hasContactsPermissions(getActivity())) { - getLoaderManager().getLoader(LOADER_ID_CONTACT_TILE).forceLoad(); + if (getLoaderManager().getLoader(LOADER_ID_CONTACT_TILE) == null) { + getLoaderManager().initLoader(LOADER_ID_CONTACT_TILE, null, + mContactTileLoaderListener); + } else { + getLoaderManager().getLoader(LOADER_ID_CONTACT_TILE).forceLoad(); + } } Trace.endSection(); } |