Should popup the confirmation toast after clicking the reset button.

Goal: Users may not notice what the change after resetting all settings configs in the Text and reading options. So we will use the toast to give nice feedback for them.

Fix: 220126995
Test: make RunSettingsRoboTests  ROBOTEST_FILTER=TextReadingPreferenceFragmentTest
Change-Id: Ife42b0c9d8a0241d7b8c3e5dbe7f9f1e2a6d759a
This commit is contained in:
Peter_Liang
2022-04-20 15:27:46 +08:00
parent 39e1357748
commit b833fe1bad
3 changed files with 21 additions and 0 deletions

View File

@@ -23,6 +23,7 @@ import android.app.settings.SettingsEnums;
import android.content.Context;
import android.content.DialogInterface;
import android.os.Bundle;
import android.widget.Toast;
import androidx.appcompat.app.AlertDialog;
@@ -178,6 +179,9 @@ public class TextReadingPreferenceFragment extends DashboardFragment {
} else {
mResetStateListeners.forEach(ResetStateListener::resetState);
}
Toast.makeText(getPrefContext(), R.string.accessibility_text_reading_reset_message,
Toast.LENGTH_SHORT).show();
}
private List<ResetStateListener> getResetStateListeners() {