From 7891733c73245bddf0a53f150187fa9fc3f97866 Mon Sep 17 00:00:00 2001 From: Dan Zivkovic Date: Thu, 21 May 2015 08:58:36 -0700 Subject: [PATCH] Remove dogfood history reset. Change-Id: I1d7ebe5962fc3176c376e1ce34c7ac98cdf41373 --- .../latin/SystemBroadcastReceiver.java | 33 ------------------- 1 file changed, 33 deletions(-) diff --git a/java/src/com/android/inputmethod/latin/SystemBroadcastReceiver.java b/java/src/com/android/inputmethod/latin/SystemBroadcastReceiver.java index 0d1853bc4..d37f70b42 100644 --- a/java/src/com/android/inputmethod/latin/SystemBroadcastReceiver.java +++ b/java/src/com/android/inputmethod/latin/SystemBroadcastReceiver.java @@ -16,10 +16,8 @@ package com.android.inputmethod.latin; -import android.accounts.Account; import android.content.BroadcastReceiver; import android.content.ComponentName; -import android.content.ContentResolver; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; @@ -33,14 +31,10 @@ import android.view.inputmethod.InputMethodSubtype; import com.android.inputmethod.dictionarypack.DictionaryPackConstants; import com.android.inputmethod.keyboard.KeyboardLayoutSet; -import com.android.inputmethod.latin.settings.LocalSettingsConstants; -import com.android.inputmethod.latin.accounts.LoginAccountUtils; import com.android.inputmethod.latin.settings.Settings; import com.android.inputmethod.latin.setup.SetupActivity; import com.android.inputmethod.latin.utils.UncachedInputMethodManagerUtils; -import java.util.Locale; - /** * This class detects the {@link Intent#ACTION_MY_PACKAGE_REPLACED} broadcast intent when this IME * package has been replaced by a newer version of the same package. This class also detects @@ -81,33 +75,6 @@ public final class SystemBroadcastReceiver extends BroadcastReceiver { richImm.setAdditionalInputMethodSubtypes(additionalSubtypes); toggleAppIcon(context); downloadLatestDictionaries(context); - //////////////////////////////////////////////////////////////////////////// - // TODO: This is only for dogfood builds. Remove this from the final release. - DictionaryFacilitator keyboardFacilitator = - DictionaryFacilitatorProvider.getDictionaryFacilitator(false); - boolean historyCleared = keyboardFacilitator.clearUserHistoryDictionary(context); - Locale keyboardLocale = keyboardFacilitator.getLocale(); - if (historyCleared && keyboardLocale != null) { - keyboardFacilitator.resetDictionaries( - context, - keyboardLocale, - keyboardFacilitator.usesContacts(), - true /* history */, - true /* force */, - keyboardFacilitator.getAccount(), - "" /* prefix */, - null /* listener */); - } - final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); - final String syncAccount = prefs.getString( - LocalSettingsConstants.PREF_ACCOUNT_NAME, null /* default */); - if (syncAccount != null) { - ContentResolver.setSyncAutomatically( - new Account(syncAccount, LoginAccountUtils.ACCOUNT_TYPE), - "com.android.inputmethod.latin.provider", - true); - } - //////////////////////////////////////////////////////////////////////////// } else if (Intent.ACTION_BOOT_COMPLETED.equals(intentAction)) { Log.i(TAG, "Boot has been completed"); toggleAppIcon(context);