Merge "Updating some comments and variables" into ub-launcher3-rvc-qpr-dev

This commit is contained in:
TreeHugger Robot
2020-07-10 00:50:36 +00:00
committed by Android (Google) Code Review
7 changed files with 10 additions and 10 deletions
@@ -547,7 +547,7 @@ public class TouchInteractionService extends Service implements PluginListener<O
gestureState.updatePreviouslyAppearedTaskIds(
previousGestureState.getPreviouslyAppearedTaskIds());
} else {
gestureState.updateRunningTask(TraceHelper.whitelistIpcs("getRunningTask.0",
gestureState.updateRunningTask(TraceHelper.allowIpcs("getRunningTask.0",
() -> mAM.getRunningTask(false /* filterOnlyVisibleRecents */)));
}
return gestureState;
@@ -660,7 +660,7 @@ public class TouchInteractionService extends Service implements PluginListener<O
if (AssistantUtilities.isExcludedAssistant(gestureState.getRunningTask())) {
// In the case where we are in the excluded assistant state, ignore it and treat the
// running activity as the task behind the assistant
gestureState.updateRunningTask(TraceHelper.whitelistIpcs("getRunningTask.assistant",
gestureState.updateRunningTask(TraceHelper.allowIpcs("getRunningTask.assistant",
() -> mAM.getRunningTask(true /* filterOnlyVisibleRecents */)));
ComponentName homeComponent = mOverviewComponentObserver.getHomeIntent().getComponent();
ComponentName runningComponent =
@@ -189,7 +189,7 @@ public class LauncherRecentsView extends RecentsView<BaseQuickstepLauncher>
@Override
public boolean shouldUseMultiWindowTaskSizeStrategy() {
return TraceHelper.whitelistIpcs("isInMultiWindowMode", mActivity::isInMultiWindowMode);
return TraceHelper.allowIpcs("isInMultiWindowMode", mActivity::isInMultiWindowMode);
}
@Override
@@ -82,7 +82,7 @@ public abstract class BaseDraggingActivity extends BaseActivity
super.onCreate(savedInstanceState);
mIsSafeModeEnabled = TraceHelper.whitelistIpcs("isSafeMode",
mIsSafeModeEnabled = TraceHelper.allowIpcs("isSafeMode",
() -> getPackageManager().isSafeMode());
DefaultDisplay.INSTANCE.get(this).addChangeListener(this);
@@ -123,7 +123,7 @@ public class LauncherPreviewRenderer {
*/
public static class PreviewContext extends ContextWrapper {
private static final Set<MainThreadInitializedObject> WHITELIST = new HashSet<>(
private final Set<MainThreadInitializedObject> mAllowedObjects = new HashSet<>(
Arrays.asList(UserCache.INSTANCE, InstallSessionHelper.INSTANCE,
LauncherAppState.INSTANCE, InvariantDeviceProfile.INSTANCE,
CustomWidgetManager.INSTANCE, PluginManagerWrapper.INSTANCE));
@@ -157,7 +157,7 @@ public class LauncherPreviewRenderer {
*/
public <T> T getObject(MainThreadInitializedObject<T> mainThreadInitializedObject,
MainThreadInitializedObject.ObjectProvider<T> provider) {
if (!WHITELIST.contains(mainThreadInitializedObject)) {
if (!mAllowedObjects.contains(mainThreadInitializedObject)) {
throw new IllegalStateException("Leaking unknown objects");
}
if (mainThreadInitializedObject == LauncherAppState.INSTANCE) {
@@ -46,7 +46,7 @@ public class MainThreadInitializedObject<T> {
if (mValue == null) {
if (Looper.myLooper() == Looper.getMainLooper()) {
mValue = TraceHelper.whitelistIpcs("main.thread.object",
mValue = TraceHelper.allowIpcs("main.thread.object",
() -> mProvider.get(context.getApplicationContext()));
} else {
try {
@@ -78,7 +78,7 @@ public class TraceHelper {
* Temporarily ignore blocking binder calls for the duration of this {@link Supplier}.
*/
@MainThread
public static <T> T whitelistIpcs(String rpcName, Supplier<T> supplier) {
public static <T> T allowIpcs(String rpcName, Supplier<T> supplier) {
Object traceToken = INSTANCE.beginSection(rpcName, FLAG_IGNORE_BINDERS);
try {
return supplier.get();
@@ -602,13 +602,13 @@ public abstract class BaseDragLayer<T extends Context & ActivityContext>
*/
private boolean computeAllowSysuiScrims(@Nullable WallpaperInfo newWallpaperInfo) {
if (newWallpaperInfo == null) {
// New wallpaper is static, not live. Thus, blacklist isn't applicable.
// Static wallpapers need scrim unless determined otherwise by wallpaperColors.
return true;
}
ComponentName newWallpaper = newWallpaperInfo.getComponent();
for (String wallpaperWithoutScrim : mWallpapersWithoutSysuiScrims) {
if (newWallpaper.equals(ComponentName.unflattenFromString(wallpaperWithoutScrim))) {
// New wallpaper is blacklisted from showing a scrim.
// New wallpaper does not need a scrim.
return false;
}
}