Add screen for notification history
Bug: 137396965 Test: manual (cherry picked from commit 84b593d592a74aeddfce453bc8700180192199ed) Change-Id: Icac4000bd7323583f8a5f462ccb40826a4151765
This commit is contained in:
@@ -21,6 +21,7 @@ import static android.app.NotificationManager.IMPORTANCE_UNSPECIFIED;
|
||||
import android.app.INotificationManager;
|
||||
import android.app.NotificationChannel;
|
||||
import android.app.NotificationChannelGroup;
|
||||
import android.app.NotificationHistory;
|
||||
import android.app.role.RoleManager;
|
||||
import android.app.usage.IUsageStatsManager;
|
||||
import android.app.usage.UsageEvents;
|
||||
@@ -367,6 +368,15 @@ public class NotificationBackend {
|
||||
return false;
|
||||
}
|
||||
|
||||
public NotificationHistory getNotificationHistory(String pkg) {
|
||||
try {
|
||||
return sINM.getNotificationHistory(pkg);
|
||||
} catch (Exception e) {
|
||||
Log.w(TAG, "Error calling NoMan", e);
|
||||
}
|
||||
return new NotificationHistory();
|
||||
}
|
||||
|
||||
protected void recordAggregatedUsageEvents(Context context, AppRow appRow) {
|
||||
long now = System.currentTimeMillis();
|
||||
long startTime = now - (DateUtils.DAY_IN_MILLIS * DAYS_TO_CHECK);
|
||||
|
Reference in New Issue
Block a user