Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9ab4a070 authored by Chloris Kuo's avatar Chloris Kuo
Browse files

Add Toast to show notification importance reset is completed.

Test: make RunSettingsRoboTests, manual test on device
Bug: 172467473
Change-Id: I5f024c82fedf4dc596dcece9ea2f2444f9d86ad5
parent d58a9cdd
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -12436,4 +12436,7 @@
    <!-- Summary for preference when Bedtime mode is on [CHAR LIMIT=NONE] -->
    <!-- Summary for preference when Bedtime mode is on [CHAR LIMIT=NONE] -->
    <string name="aware_summary_when_bedtime_on">Unavailable because bedtime mode is on</string>
    <string name="aware_summary_when_bedtime_on">Unavailable because bedtime mode is on</string>
    <!-- Toast message to inform reset notification importance is completed [CHAR LIMIT=NONE] -->
    <string name="reset_importance_completed">Reset notification importance completed.</string>
</resources>
</resources>
+3 −0
Original line number Original line Diff line number Diff line
@@ -19,6 +19,7 @@ package com.android.settings.notification;
import android.content.Context;
import android.content.Context;
import android.view.View;
import android.view.View;
import android.widget.Button;
import android.widget.Button;
import android.widget.Toast;


import androidx.preference.Preference;
import androidx.preference.Preference;


@@ -57,6 +58,8 @@ public class ImportanceResetPreferenceController extends BasePreferenceControlle
    @Override
    @Override
    public void onClick(View v) {
    public void onClick(View v) {
        mBackend.resetNotificationImportance();
        mBackend.resetNotificationImportance();
        Toast.makeText(mContext, R.string.reset_importance_completed, Toast.LENGTH_SHORT)
                            .show();
    }
    }


    @Override
    @Override