Home | History | Annotate | Download | only in settings
      1 /*
      2  * Copyright (C) 2014 The Android Open Source Project
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  */
     16 
     17 package com.android.inputmethod.latin.settings;
     18 
     19 /**
     20  * Collection of device specific preference constants.
     21  */
     22 public class LocalSettingsConstants {
     23     // Preference file for storing preferences that are tied to a device
     24     // and are not backed up.
     25     public static final String PREFS_FILE = "local_prefs";
     26 
     27     // Preference key for the current account.
     28     // Do not restore.
     29     public static final String PREF_ACCOUNT_NAME = "pref_account_name";
     30     // Preference key for enabling cloud sync feature.
     31     // Do not restore.
     32     public static final String PREF_ENABLE_CLOUD_SYNC = "pref_enable_cloud_sync";
     33 
     34     // List of preference keys to skip from being restored by backup agent.
     35     // These preferences are tied to a device and hence should not be restored.
     36     // e.g. account name.
     37     // Ideally they could have been kept in a separate file that wasn't backed up
     38     // however the preference UI currently only deals with the default
     39     // shared preferences which makes it non-trivial to move these out to
     40     // a different shared preferences file.
     41     public static final String[] PREFS_TO_SKIP_RESTORING = new String[] {
     42         PREF_ACCOUNT_NAME,
     43         PREF_ENABLE_CLOUD_SYNC,
     44         // The debug settings are not restored on a new device.
     45         // If a feature relies on these, it should ensure that the defaults are
     46         // correctly set for it to work on a new device.
     47         DebugSettings.PREF_DEBUG_MODE,
     48         DebugSettings.PREF_FORCE_NON_DISTINCT_MULTITOUCH,
     49         DebugSettings.PREF_HAS_CUSTOM_KEY_PREVIEW_ANIMATION_PARAMS,
     50         DebugSettings.PREF_KEYBOARD_HEIGHT_SCALE,
     51         DebugSettings.PREF_KEY_PREVIEW_DISMISS_DURATION,
     52         DebugSettings.PREF_KEY_PREVIEW_DISMISS_END_X_SCALE,
     53         DebugSettings.PREF_KEY_PREVIEW_DISMISS_END_Y_SCALE,
     54         DebugSettings.PREF_KEY_PREVIEW_SHOW_UP_DURATION,
     55         DebugSettings.PREF_KEY_PREVIEW_SHOW_UP_START_X_SCALE,
     56         DebugSettings.PREF_KEY_PREVIEW_SHOW_UP_START_Y_SCALE,
     57         DebugSettings.PREF_RESIZE_KEYBOARD,
     58         DebugSettings.PREF_SHOULD_SHOW_LXX_SUGGESTION_UI,
     59         DebugSettings.PREF_SLIDING_KEY_INPUT_PREVIEW
     60     };
     61 }
     62