Search in sources :

Example 6 with SuggestionFeatureProvider

use of com.android.settings.dashboard.suggestions.SuggestionFeatureProvider in project android_packages_apps_Settings by crdroidandroid.

the class NewDeviceIntroSuggestionActivity method hasLaunchedBefore.

private static boolean hasLaunchedBefore(Context context) {
    final SuggestionFeatureProvider featureProvider = FeatureFactory.getFactory(context).getSuggestionFeatureProvider(context);
    final SharedPreferences prefs = featureProvider.getSharedPrefs(context);
    return prefs.getBoolean(PREF_KEY_SUGGGESTION_COMPLETE, false);
}
Also used : SharedPreferences(android.content.SharedPreferences) SuggestionFeatureProvider(com.android.settings.dashboard.suggestions.SuggestionFeatureProvider)

Example 7 with SuggestionFeatureProvider

use of com.android.settings.dashboard.suggestions.SuggestionFeatureProvider in project android_packages_apps_Settings by crdroidandroid.

the class NewDeviceIntroSuggestionActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    final Intent intent = getLaunchIntent(this);
    if (intent != null) {
        final SuggestionFeatureProvider featureProvider = FeatureFactory.getFactory(this).getSuggestionFeatureProvider(this);
        final SharedPreferences prefs = featureProvider.getSharedPrefs(this);
        prefs.edit().putBoolean(PREF_KEY_SUGGGESTION_COMPLETE, true).commit();
        startActivity(intent);
    }
    finish();
}
Also used : SharedPreferences(android.content.SharedPreferences) Intent(android.content.Intent) SuggestionFeatureProvider(com.android.settings.dashboard.suggestions.SuggestionFeatureProvider)

Example 8 with SuggestionFeatureProvider

use of com.android.settings.dashboard.suggestions.SuggestionFeatureProvider in project android_packages_apps_Settings by crdroidandroid.

the class PickupGestureSettings method onAttach.

@Override
public void onAttach(Context context) {
    super.onAttach(context);
    SuggestionFeatureProvider suggestionFeatureProvider = FeatureFactory.getFactory(context).getSuggestionFeatureProvider(context);
    SharedPreferences prefs = suggestionFeatureProvider.getSharedPrefs(context);
    prefs.edit().putBoolean(PREF_KEY_SUGGESTION_COMPLETE, true).apply();
}
Also used : SharedPreferences(android.content.SharedPreferences) SuggestionFeatureProvider(com.android.settings.dashboard.suggestions.SuggestionFeatureProvider)

Example 9 with SuggestionFeatureProvider

use of com.android.settings.dashboard.suggestions.SuggestionFeatureProvider in project android_packages_apps_Settings by crdroidandroid.

the class DoubleTapScreenSettings method onAttach.

@Override
public void onAttach(Context context) {
    super.onAttach(context);
    SuggestionFeatureProvider suggestionFeatureProvider = FeatureFactory.getFactory(context).getSuggestionFeatureProvider(context);
    SharedPreferences prefs = suggestionFeatureProvider.getSharedPrefs(context);
    prefs.edit().putBoolean(PREF_KEY_SUGGESTION_COMPLETE, true).apply();
}
Also used : SharedPreferences(android.content.SharedPreferences) SuggestionFeatureProvider(com.android.settings.dashboard.suggestions.SuggestionFeatureProvider)

Example 10 with SuggestionFeatureProvider

use of com.android.settings.dashboard.suggestions.SuggestionFeatureProvider in project android_packages_apps_Settings by SudaMod.

the class PickupGestureSettings method onAttach.

@Override
public void onAttach(Context context) {
    super.onAttach(context);
    SuggestionFeatureProvider suggestionFeatureProvider = FeatureFactory.getFactory(context).getSuggestionFeatureProvider(context);
    SharedPreferences prefs = suggestionFeatureProvider.getSharedPrefs(context);
    prefs.edit().putBoolean(PREF_KEY_SUGGESTION_COMPLETE, true).apply();
}
Also used : SharedPreferences(android.content.SharedPreferences) SuggestionFeatureProvider(com.android.settings.dashboard.suggestions.SuggestionFeatureProvider)

Aggregations

SharedPreferences (android.content.SharedPreferences)59 SuggestionFeatureProvider (com.android.settings.dashboard.suggestions.SuggestionFeatureProvider)59 Intent (android.content.Intent)6 AmbientDisplayConfiguration (android.hardware.display.AmbientDisplayConfiguration)6 VideoPreference (com.android.settings.widget.VideoPreference)1 IllustrationPreference (com.android.settingslib.widget.IllustrationPreference)1