Merge "Mark work profile apps as such for voice a11y services" into rvc-dev am: 6051fa96ab

Change-Id: I0786a1c7403962b9def348e2a5b4961d05427f3f
This commit is contained in:
TreeHugger Robot
2020-04-23 21:13:05 +00:00
committed by Automerger Merge Worker

View File

@@ -30,6 +30,8 @@ import android.content.pm.PackageManager;
import android.os.Bundle;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.UserHandle;
import android.os.UserManager;
import android.provider.Settings;
import android.service.notification.NotificationListenerService;
import android.service.notification.StatusBarNotification;
@@ -71,6 +73,7 @@ public class NotificationHistoryActivity extends Activity {
private HistoryLoader mHistoryLoader;
private INotificationManager mNm;
private UserManager mUm;
private PackageManager mPm;
private CountDownLatch mCountdownLatch;
private Future mCountdownFuture;
@@ -104,6 +107,8 @@ public class NotificationHistoryActivity extends Activity {
TextView label = viewForPackage.findViewById(R.id.label);
label.setText(nhp.label != null ? nhp.label : nhp.pkgName);
label.setContentDescription(mUm.getBadgedLabelForUser(label.getText(),
UserHandle.getUserHandleForUid(nhp.uid)));
ImageView icon = viewForPackage.findViewById(R.id.icon);
icon.setImageDrawable(nhp.icon);
@@ -140,6 +145,7 @@ public class NotificationHistoryActivity extends Activity {
super.onResume();
mPm = getPackageManager();
mUm = getSystemService(UserManager.class);
// wait for history loading and recent/snooze loading
mCountdownLatch = new CountDownLatch(2);