NAS Setting Migration
Change NAS setting to a toggle setting and move the settings to Notifications/General Bug: 173106358 Test: tested manually on device, make RunSettingsRoboTests Change-Id: I1ba1214511dceea6faf5fb39692d920e761b33d8
This commit is contained in:
@@ -19,7 +19,6 @@ import static android.app.NotificationManager.IMPORTANCE_NONE;
|
||||
import static android.app.NotificationManager.IMPORTANCE_UNSPECIFIED;
|
||||
import static android.content.pm.LauncherApps.ShortcutQuery.FLAG_MATCH_CACHED;
|
||||
import static android.content.pm.LauncherApps.ShortcutQuery.FLAG_MATCH_DYNAMIC;
|
||||
import static android.content.pm.LauncherApps.ShortcutQuery.FLAG_MATCH_PINNED;
|
||||
import static android.content.pm.LauncherApps.ShortcutQuery.FLAG_MATCH_PINNED_BY_ANY_LAUNCHER;
|
||||
|
||||
import android.app.INotificationManager;
|
||||
@@ -50,7 +49,6 @@ import android.service.notification.NotificationListenerFilter;
|
||||
import android.text.format.DateUtils;
|
||||
import android.util.IconDrawableFactory;
|
||||
import android.util.Log;
|
||||
import android.util.Slog;
|
||||
|
||||
import androidx.annotation.VisibleForTesting;
|
||||
|
||||
@@ -563,6 +561,23 @@ public class NotificationBackend {
|
||||
}
|
||||
}
|
||||
|
||||
public ComponentName getDefaultNotificationAssistant() {
|
||||
try {
|
||||
return sINM.getDefaultNotificationAssistant();
|
||||
} catch (Exception e) {
|
||||
Log.w(TAG, "Error calling NoMan", e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public void resetDefaultNotificationAssistant(boolean loadFromConfig) {
|
||||
try {
|
||||
sINM.resetDefaultNotificationAssistant(loadFromConfig);
|
||||
} catch (Exception e) {
|
||||
Log.w(TAG, "Error calling NoMan", e);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean setNotificationAssistantGranted(ComponentName cn) {
|
||||
try {
|
||||
sINM.setNotificationAssistantAccessGranted(cn, true);
|
||||
|
Reference in New Issue
Block a user