Snap for 6512749 from 8bb7e7ccef to mainline-release
Change-Id: I96387d3b5709404f89501ea8ef92defa27582488
This commit is contained in:
@@ -128,10 +128,11 @@ public class MediaDeviceUpdateWorker extends SliceBackgroundWorker
|
||||
|
||||
public void connectDevice(MediaDevice device) {
|
||||
ThreadUtils.postOnBackgroundThread(() -> {
|
||||
mLocalMediaManager.connectDevice(device);
|
||||
if (mLocalMediaManager.connectDevice(device)) {
|
||||
ThreadUtils.postOnMainThread(() -> {
|
||||
notifySliceChange();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ import android.text.TextUtils;
|
||||
import android.util.ArrayMap;
|
||||
import android.util.ArraySet;
|
||||
import android.util.IconDrawableFactory;
|
||||
import android.util.Slog;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.Utils;
|
||||
@@ -294,6 +295,7 @@ public class RecentNotifyingAppsPreferenceController extends AbstractPreferenceC
|
||||
List<NotifyingApp> displayableApps = new ArrayList<>(SHOW_RECENT_APP_COUNT);
|
||||
int count = 0;
|
||||
for (NotifyingApp app : mApps) {
|
||||
try {
|
||||
final ApplicationsState.AppEntry appEntry = mApplicationsState.getEntry(
|
||||
app.getPackage(), app.getUserId());
|
||||
if (appEntry == null) {
|
||||
@@ -304,6 +306,9 @@ public class RecentNotifyingAppsPreferenceController extends AbstractPreferenceC
|
||||
if (count >= SHOW_RECENT_APP_COUNT) {
|
||||
break;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Slog.e(TAG, "Failed to find app " + app.getPackage() + "/" + app.getUserId(), e);
|
||||
}
|
||||
}
|
||||
return displayableApps;
|
||||
}
|
||||
|
||||
@@ -179,7 +179,11 @@ public class ConversationPriorityPreference extends Preference {
|
||||
// a11y service won't always read the newly appearing text in the right order if the
|
||||
// selection happens too soon (readback happens on a different thread as layout). post
|
||||
// the selection to make that conflict less likely
|
||||
parent.post(() -> mSilenceButton.setSelected(true));
|
||||
parent.post(() -> {
|
||||
mSilenceButton.setSelected(true);
|
||||
mAlertButton.setSelected(false);
|
||||
mPriorityButton.setSelected(false);
|
||||
});
|
||||
} else {
|
||||
if (isPriority) {
|
||||
alertSummary.setVisibility(GONE);
|
||||
@@ -197,7 +201,11 @@ public class ConversationPriorityPreference extends Preference {
|
||||
mAlertButton.setBackground(unselectedBackground);
|
||||
mPriorityButton.setBackground(selectedBackground);
|
||||
mSilenceButton.setBackground(unselectedBackground);
|
||||
parent.post(() -> mPriorityButton.setSelected(true));
|
||||
parent.post(() -> {
|
||||
mSilenceButton.setSelected(false);
|
||||
mAlertButton.setSelected(false);
|
||||
mPriorityButton.setSelected(true);
|
||||
});
|
||||
} else {
|
||||
alertSummary.setVisibility(VISIBLE);
|
||||
alertIcon.setImageTintList(colorAccent);
|
||||
@@ -214,7 +222,11 @@ public class ConversationPriorityPreference extends Preference {
|
||||
mAlertButton.setBackground(selectedBackground);
|
||||
mPriorityButton.setBackground(unselectedBackground);
|
||||
mSilenceButton.setBackground(unselectedBackground);
|
||||
parent.post(() -> mAlertButton.setSelected(true));
|
||||
parent.post(() -> {
|
||||
mSilenceButton.setSelected(false);
|
||||
mAlertButton.setSelected(true);
|
||||
mPriorityButton.setSelected(false);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,7 +98,8 @@ public class NotificationHistoryAdapter extends
|
||||
public boolean performAccessibilityAction(View host, int action, Bundle args) {
|
||||
super.performAccessibilityAction(host, action, args);
|
||||
if (action == AccessibilityNodeInfo.AccessibilityAction.ACTION_DISMISS.getId()) {
|
||||
onItemSwipeDeleted(position);
|
||||
int currPosition = mValues.indexOf(hn);
|
||||
onItemSwipeDeleted(currPosition);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -119,6 +120,11 @@ public class NotificationHistoryAdapter extends
|
||||
|
||||
@Override
|
||||
public void onItemSwipeDeleted(int position) {
|
||||
if (position > (mValues.size() - 1)) {
|
||||
Slog.d(TAG, "Tried to swipe element out of list: position: " + position
|
||||
+ " size? " + mValues.size());
|
||||
return;
|
||||
}
|
||||
HistoricalNotification hn = mValues.remove(position);
|
||||
if (hn != null) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user