mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-28 15:56:49 +00:00
Merge "Follow up for ag/11916646" into ub-launcher3-rvc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
5c33e250fc
@@ -125,11 +125,9 @@ public class HotseatPredictionController implements DragController.DragListener,
|
||||
if (mLauncher.getWorkspace().isSwitchingState()) return false;
|
||||
if (!mLauncher.getOnboardingPrefs().getBoolean(
|
||||
OnboardingPrefs.HOTSEAT_LONGPRESS_TIP_SEEN)) {
|
||||
Intent intent = new Intent(SETTINGS_ACTION);
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
Snackbar.show(mLauncher, R.string.hotseat_tip_gaps_filled,
|
||||
R.string.hotseat_prediction_settings, null,
|
||||
() -> mLauncher.startActivity(intent));
|
||||
() -> mLauncher.startActivity(getSettingsIntent()));
|
||||
mLauncher.getOnboardingPrefs().markChecked(OnboardingPrefs.HOTSEAT_LONGPRESS_TIP_SEEN);
|
||||
mLauncher.getDragLayer().performHapticFeedback(HapticFeedbackConstants.LONG_PRESS);
|
||||
return true;
|
||||
|
||||
@@ -99,6 +99,13 @@ public class OnboardingPrefs<T extends Launcher> {
|
||||
return mSharedPrefs.getBoolean(key, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Marks on-boarding preference boolean at true
|
||||
*/
|
||||
public void markChecked(String flag) {
|
||||
mSharedPrefs.edit().putBoolean(flag, true).apply();
|
||||
}
|
||||
|
||||
/**
|
||||
* Add 1 to the given event count, if we haven't already reached the max count.
|
||||
* @return Whether we have now reached the max count.
|
||||
@@ -112,11 +119,4 @@ public class OnboardingPrefs<T extends Launcher> {
|
||||
mSharedPrefs.edit().putInt(eventKey, count).apply();
|
||||
return hasReachedMaxCount(count, eventKey);
|
||||
}
|
||||
|
||||
/**
|
||||
* Marks on-boarding preference boolean at true
|
||||
*/
|
||||
public void markChecked(String flag) {
|
||||
mSharedPrefs.edit().putBoolean(flag, true).apply();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user