diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2017-12-28 02:35:07 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-12-28 02:35:07 +0000 |
commit | 281998c825ad48d842bb653e2f462719fdb0c1d9 (patch) | |
tree | bc8bfcce809257b3ddbb423a9808082292b9f6a3 /java/com/android/dialer/voicemailstatus/VisualVoicemailEnabledChecker.java | |
parent | fc81a030a7b4f6d4a497f71aed593d398795e7da (diff) | |
parent | 183cb71663320f16149d83eeebaff7795a4b55f2 (diff) |
Merge "Remove field prefixes."
Diffstat (limited to 'java/com/android/dialer/voicemailstatus/VisualVoicemailEnabledChecker.java')
-rw-r--r-- | java/com/android/dialer/voicemailstatus/VisualVoicemailEnabledChecker.java | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/java/com/android/dialer/voicemailstatus/VisualVoicemailEnabledChecker.java b/java/com/android/dialer/voicemailstatus/VisualVoicemailEnabledChecker.java index 3f519ad82..8010e025e 100644 --- a/java/com/android/dialer/voicemailstatus/VisualVoicemailEnabledChecker.java +++ b/java/com/android/dialer/voicemailstatus/VisualVoicemailEnabledChecker.java @@ -42,17 +42,17 @@ public class VisualVoicemailEnabledChecker implements CallLogQueryHandler.Listen public static final String PREF_KEY_HAS_ACTIVE_VOICEMAIL_PROVIDER = "has_active_voicemail_provider"; - private SharedPreferences mPrefs; - private boolean mHasActiveVoicemailProvider; - private CallLogQueryHandler mCallLogQueryHandler; - private Context mContext; - private Callback mCallback; + private SharedPreferences prefs; + private boolean hasActiveVoicemailProvider; + private CallLogQueryHandler callLogQueryHandler; + private Context context; + private Callback callback; public VisualVoicemailEnabledChecker(Context context, @Nullable Callback callback) { - mContext = context; - mCallback = callback; - mPrefs = PreferenceManager.getDefaultSharedPreferences(mContext); - mHasActiveVoicemailProvider = mPrefs.getBoolean(PREF_KEY_HAS_ACTIVE_VOICEMAIL_PROVIDER, false); + this.context = context; + this.callback = callback; + prefs = PreferenceManager.getDefaultSharedPreferences(this.context); + hasActiveVoicemailProvider = prefs.getBoolean(PREF_KEY_HAS_ACTIVE_VOICEMAIL_PROVIDER, false); } /** @@ -60,7 +60,7 @@ public class VisualVoicemailEnabledChecker implements CallLogQueryHandler.Listen * result. */ public boolean isVisualVoicemailEnabled() { - return mHasActiveVoicemailProvider; + return hasActiveVoicemailProvider; } /** @@ -68,22 +68,22 @@ public class VisualVoicemailEnabledChecker implements CallLogQueryHandler.Listen * has changed, Callback.onVisualVoicemailEnabledStatusChanged() will be called. */ public void asyncUpdate() { - mCallLogQueryHandler = new CallLogQueryHandler(mContext, mContext.getContentResolver(), this); - mCallLogQueryHandler.fetchVoicemailStatus(); + callLogQueryHandler = new CallLogQueryHandler(context, context.getContentResolver(), this); + callLogQueryHandler.fetchVoicemailStatus(); } @Override public void onVoicemailStatusFetched(Cursor statusCursor) { boolean hasActiveVoicemailProvider = VoicemailStatusHelper.getNumberActivityVoicemailSources(statusCursor) > 0; - if (hasActiveVoicemailProvider != mHasActiveVoicemailProvider) { - mHasActiveVoicemailProvider = hasActiveVoicemailProvider; - mPrefs + if (hasActiveVoicemailProvider != this.hasActiveVoicemailProvider) { + this.hasActiveVoicemailProvider = hasActiveVoicemailProvider; + prefs .edit() - .putBoolean(PREF_KEY_HAS_ACTIVE_VOICEMAIL_PROVIDER, mHasActiveVoicemailProvider) + .putBoolean(PREF_KEY_HAS_ACTIVE_VOICEMAIL_PROVIDER, this.hasActiveVoicemailProvider) .apply(); - if (mCallback != null) { - mCallback.onVisualVoicemailEnabledStatusChanged(mHasActiveVoicemailProvider); + if (callback != null) { + callback.onVisualVoicemailEnabledStatusChanged(this.hasActiveVoicemailProvider); } } } |