Remove dogfood history reset.
Change-Id: I1d7ebe5962fc3176c376e1ce34c7ac98cdf41373
This commit is contained in:
parent
0e15ff6b48
commit
7891733c73
1 changed files with 0 additions and 33 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue