RectF values.
- */
-public class RectFEvaluator implements TypeEvaluatorfraction representing the proportion
- * between the start and end values. The calculation is a simple parametric
- * calculation on each of the separate components in the Rect objects
- * (left, top, right, and bottom).
- *
- * The object returned will be the reuseRect passed into the constructor.
fraction parameter.
- */
- @Override
- public RectF evaluate(float fraction, RectF startValue, RectF endValue) {
- float left = startValue.left + ((endValue.left - startValue.left) * fraction);
- float top = startValue.top + ((endValue.top - startValue.top) * fraction);
- float right = startValue.right + ((endValue.right - startValue.right) * fraction);
- float bottom = startValue.bottom + ((endValue.bottom - startValue.bottom) * fraction);
- mRect.set(left, top, right, bottom);
- return mRect;
- }
-}
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/system/ActivityCompat.java b/packages/SystemUI/shared/src/com/android/systemui/shared/system/ActivityCompat.java
index 0c7e56e0715e7..0f937bdfe449a 100644
--- a/packages/SystemUI/shared/src/com/android/systemui/shared/system/ActivityCompat.java
+++ b/packages/SystemUI/shared/src/com/android/systemui/shared/system/ActivityCompat.java
@@ -42,31 +42,4 @@ public class ActivityCompat {
public void unregisterRemoteAnimations() {
mWrapped.unregisterRemoteAnimations();
}
-
- /**
- * @see android.view.ViewDebug#dumpv2(View, ByteArrayOutputStream)
- */
- public boolean encodeViewHierarchy(ByteArrayOutputStream out) {
- View view = null;
- if (mWrapped.getWindow() != null &&
- mWrapped.getWindow().peekDecorView() != null &&
- mWrapped.getWindow().peekDecorView().getViewRootImpl() != null) {
- view = mWrapped.getWindow().peekDecorView().getViewRootImpl().getView();
- }
- if (view == null) {
- return false;
- }
-
- final ViewHierarchyEncoder encoder = new ViewHierarchyEncoder(out);
- int[] location = view.getLocationOnScreen();
- encoder.addProperty("window:left", location[0]);
- encoder.addProperty("window:top", location[1]);
- view.encode(encoder);
- encoder.endStream();
- return true;
- }
-
- public int getDisplayId() {
- return mWrapped.getDisplayId();
- }
}
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/system/ActivityManagerWrapper.java b/packages/SystemUI/shared/src/com/android/systemui/shared/system/ActivityManagerWrapper.java
index 48fcbbda7e467..461c2dc2c2af6 100644
--- a/packages/SystemUI/shared/src/com/android/systemui/shared/system/ActivityManagerWrapper.java
+++ b/packages/SystemUI/shared/src/com/android/systemui/shared/system/ActivityManagerWrapper.java
@@ -262,7 +262,6 @@ public class ActivityManagerWrapper {
* Starts a task from Recents synchronously.
*/
public boolean startActivityFromRecents(Task.TaskKey taskKey, ActivityOptions options) {
- ActivityOptionsCompat.addTaskInfo(options, taskKey);
return startActivityFromRecents(taskKey.id, options);
}
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/system/ActivityOptionsCompat.java b/packages/SystemUI/shared/src/com/android/systemui/shared/system/ActivityOptionsCompat.java
index e2ca349cc5c8c..db62f88325dcf 100644
--- a/packages/SystemUI/shared/src/com/android/systemui/shared/system/ActivityOptionsCompat.java
+++ b/packages/SystemUI/shared/src/com/android/systemui/shared/system/ActivityOptionsCompat.java
@@ -104,15 +104,4 @@ public abstract class ActivityOptionsCompat {
opts.setSourceInfo(ActivityOptions.SourceInfo.TYPE_LAUNCHER, uptimeMillis);
return opts;
}
-
- /**
- * Sets Task specific information to the activity options
- */
- public static void addTaskInfo(ActivityOptions opts, Task.TaskKey taskKey) {
- if (taskKey.windowingMode == WINDOWING_MODE_SPLIT_SCREEN_PRIMARY) {
- // We show non-visible docked tasks in Recents, but we always want to launch
- // them in the fullscreen stack.
- opts.setLaunchWindowingMode(WINDOWING_MODE_SPLIT_SCREEN_SECONDARY);
- }
- }
}
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/system/ClipDescriptionCompat.java b/packages/SystemUI/shared/src/com/android/systemui/shared/system/ClipDescriptionCompat.java
deleted file mode 100644
index 0b1141ee9b30e..0000000000000
--- a/packages/SystemUI/shared/src/com/android/systemui/shared/system/ClipDescriptionCompat.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (C) 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License
- */
-
-package com.android.systemui.shared.system;
-
-import android.content.ClipDescription;
-import android.content.Intent;
-
-/**
- * Wrapper around ClipDescription.
- */
-public abstract class ClipDescriptionCompat {
-
- public static String MIMETYPE_APPLICATION_ACTIVITY =
- ClipDescription.MIMETYPE_APPLICATION_ACTIVITY;
-
- public static String MIMETYPE_APPLICATION_SHORTCUT =
- ClipDescription.MIMETYPE_APPLICATION_SHORTCUT;
-
- public static String MIMETYPE_APPLICATION_TASK =
- ClipDescription.MIMETYPE_APPLICATION_TASK;
-
- public static String EXTRA_PENDING_INTENT = ClipDescription.EXTRA_PENDING_INTENT;
-
- public static String EXTRA_TASK_ID = Intent.EXTRA_TASK_ID;
-}
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/system/ConfigurationCompat.java b/packages/SystemUI/shared/src/com/android/systemui/shared/system/ConfigurationCompat.java
deleted file mode 100644
index d1c77a6e7c5a2..0000000000000
--- a/packages/SystemUI/shared/src/com/android/systemui/shared/system/ConfigurationCompat.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.systemui.shared.system;
-
-import android.content.res.Configuration;
-
-/**
- * Wraps the Configuration to access the window configuration.
- */
-public class ConfigurationCompat {
-
- public static int getWindowConfigurationRotation(Configuration c) {
- return c.windowConfiguration.getRotation();
- }
-}
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/system/DockedStackListenerCompat.java b/packages/SystemUI/shared/src/com/android/systemui/shared/system/DockedStackListenerCompat.java
deleted file mode 100644
index bb319e625b441..0000000000000
--- a/packages/SystemUI/shared/src/com/android/systemui/shared/system/DockedStackListenerCompat.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.systemui.shared.system;
-
-import android.view.IDockedStackListener;
-
-/**
- * An interface to track docked stack changes.
- */
-public class DockedStackListenerCompat {
-
- IDockedStackListener.Stub mListener = new IDockedStackListener.Stub() {
- @Override
- public void onDividerVisibilityChanged(boolean visible) {}
-
- @Override
- public void onDockedStackExistsChanged(boolean exists) {
- DockedStackListenerCompat.this.onDockedStackExistsChanged(exists);
- }
-
- @Override
- public void onDockedStackMinimizedChanged(boolean minimized, long animDuration,
- boolean isHomeStackResizable) {
- DockedStackListenerCompat.this.onDockedStackMinimizedChanged(minimized, animDuration,
- isHomeStackResizable);
- }
-
- @Override
- public void onAdjustedForImeChanged(boolean adjustedForIme, long animDuration) {}
-
- @Override
- public void onDockSideChanged(final int newDockSide) {
- DockedStackListenerCompat.this.onDockSideChanged(newDockSide);
- }
- };
-
- public void onDockedStackExistsChanged(boolean exists) {
- // To be overridden
- }
-
- public void onDockedStackMinimizedChanged(boolean minimized, long animDuration,
- boolean isHomeStackResizable) {
- // To be overridden
- }
-
- public void onDockSideChanged(final int newDockSide) {
- // To be overridden
- }
-}
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/system/LatencyTrackerCompat.java b/packages/SystemUI/shared/src/com/android/systemui/shared/system/LatencyTrackerCompat.java
index a8c19ec241246..e6ae19eebc722 100644
--- a/packages/SystemUI/shared/src/com/android/systemui/shared/system/LatencyTrackerCompat.java
+++ b/packages/SystemUI/shared/src/com/android/systemui/shared/system/LatencyTrackerCompat.java
@@ -24,14 +24,6 @@ import com.android.internal.util.LatencyTracker;
* @see LatencyTracker
*/
public class LatencyTrackerCompat {
- /**
- * @see LatencyTracker
- * @deprecated Please use {@link LatencyTrackerCompat#logToggleRecents(Context, int)} instead.
- */
- @Deprecated
- public static void logToggleRecents(int duration) {
- LatencyTracker.logActionDeprecated(LatencyTracker.ACTION_TOGGLE_RECENTS, duration, false);
- }
/** @see LatencyTracker */
public static void logToggleRecents(Context context, int duration) {
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/system/LauncherAppsCompat.java b/packages/SystemUI/shared/src/com/android/systemui/shared/system/LauncherAppsCompat.java
deleted file mode 100644
index d24c779b14160..0000000000000
--- a/packages/SystemUI/shared/src/com/android/systemui/shared/system/LauncherAppsCompat.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (C) 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License
- */
-
-package com.android.systemui.shared.system;
-
-import android.app.PendingIntent;
-import android.content.ComponentName;
-import android.content.pm.LauncherApps;
-import android.os.Bundle;
-import android.os.UserHandle;
-
-/**
- * Wrapper around LauncherApps.
- */
-public abstract class LauncherAppsCompat {
-
- public static PendingIntent getMainActivityLaunchIntent(LauncherApps launcherApps,
- ComponentName component, Bundle startActivityOptions, UserHandle user) {
- return launcherApps.getMainActivityLaunchIntent(component, startActivityOptions, user);
- }
-}
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/system/LauncherEventUtil.java b/packages/SystemUI/shared/src/com/android/systemui/shared/system/LauncherEventUtil.java
deleted file mode 100644
index a51d668c82242..0000000000000
--- a/packages/SystemUI/shared/src/com/android/systemui/shared/system/LauncherEventUtil.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License
- */
-
-package com.android.systemui.shared.system;
-
-public class LauncherEventUtil {
-
- // Constants for the Action
- public static final int VISIBLE = 0;
- public static final int DISMISS = 1;
-}
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/system/MetricsLoggerCompat.java b/packages/SystemUI/shared/src/com/android/systemui/shared/system/MetricsLoggerCompat.java
deleted file mode 100644
index 952c8aee24083..0000000000000
--- a/packages/SystemUI/shared/src/com/android/systemui/shared/system/MetricsLoggerCompat.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License
- */
-
-package com.android.systemui.shared.system;
-
-import com.android.internal.logging.MetricsLogger;
-import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
-
-public class MetricsLoggerCompat {
-
- private final MetricsLogger mMetricsLogger;
- public static final int OVERVIEW_ACTIVITY = MetricsEvent.OVERVIEW_ACTIVITY;
-
- public MetricsLoggerCompat() {
- mMetricsLogger = new MetricsLogger();
- }
-
- public void action(int category) {
- mMetricsLogger.action(category);
- }
-
- public void action(int category, int value) {
- mMetricsLogger.action(category, value);
- }
-
- public void visible(int category) {
- mMetricsLogger.visible(category);
- }
-
- public void hidden(int category) {
- mMetricsLogger.hidden(category);
- }
-
- public void visibility(int category, boolean visible) {
- mMetricsLogger.visibility(category, visible);
- }
-}
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/system/RotationWatcher.java b/packages/SystemUI/shared/src/com/android/systemui/shared/system/RotationWatcher.java
deleted file mode 100644
index 7c8c23eba73b4..0000000000000
--- a/packages/SystemUI/shared/src/com/android/systemui/shared/system/RotationWatcher.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.systemui.shared.system;
-
-import android.content.Context;
-import android.os.RemoteException;
-import android.util.Log;
-import android.view.IRotationWatcher;
-import android.view.WindowManagerGlobal;
-
-public abstract class RotationWatcher {
-
- private static final String TAG = "RotationWatcher";
-
- private final Context mContext;
-
- private final IRotationWatcher mWatcher = new IRotationWatcher.Stub() {
-
- @Override
- public void onRotationChanged(int rotation) {
- RotationWatcher.this.onRotationChanged(rotation);
-
- }
- };
-
- private boolean mIsWatching = false;
-
- public RotationWatcher(Context context) {
- mContext = context;
- }
-
- protected abstract void onRotationChanged(int rotation);
-
- public void enable() {
- if (!mIsWatching) {
- try {
- WindowManagerGlobal.getWindowManagerService().watchRotation(mWatcher,
- mContext.getDisplayId());
- mIsWatching = true;
- } catch (RemoteException e) {
- Log.w(TAG, "Failed to set rotation watcher", e);
- }
- }
- }
-
- public void disable() {
- if (mIsWatching) {
- try {
- WindowManagerGlobal.getWindowManagerService().removeRotationWatcher(mWatcher);
- mIsWatching = false;
- } catch (RemoteException e) {
- Log.w(TAG, "Failed to remove rotation watcher", e);
- }
- }
- }
-}
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/system/TaskDescriptionCompat.java b/packages/SystemUI/shared/src/com/android/systemui/shared/system/TaskDescriptionCompat.java
deleted file mode 100644
index 35952f55ec1e3..0000000000000
--- a/packages/SystemUI/shared/src/com/android/systemui/shared/system/TaskDescriptionCompat.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License
- */
-
-package com.android.systemui.shared.system;
-
-import android.app.ActivityManager;
-import android.graphics.Bitmap;
-
-public class TaskDescriptionCompat {
-
- private ActivityManager.TaskDescription mTaskDescription;
-
- public TaskDescriptionCompat(ActivityManager.TaskDescription td) {
- mTaskDescription = td;
- }
-
- public int getPrimaryColor() {
- return mTaskDescription != null
- ? mTaskDescription.getPrimaryColor()
- : 0;
- }
-
- public int getBackgroundColor() {
- return mTaskDescription != null
- ? mTaskDescription.getBackgroundColor()
- : 0;
- }
-
- public static Bitmap getIcon(ActivityManager.TaskDescription desc, int userId) {
- if (desc.getInMemoryIcon() != null) {
- return desc.getInMemoryIcon();
- }
- return ActivityManager.TaskDescription.loadTaskDescriptionIcon(
- desc.getIconFilename(), userId);
- }
-}
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/system/ThreadedRendererCompat.java b/packages/SystemUI/shared/src/com/android/systemui/shared/system/ThreadedRendererCompat.java
deleted file mode 100644
index ffd8a08905f03..0000000000000
--- a/packages/SystemUI/shared/src/com/android/systemui/shared/system/ThreadedRendererCompat.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License
- */
-
-package com.android.systemui.shared.system;
-
-import android.view.ThreadedRenderer;
-
-/**
- * @see ThreadedRenderer
- */
-public class ThreadedRendererCompat {
-
- public static int EGL_CONTEXT_PRIORITY_REALTIME_NV = 0x3357;
- public static int EGL_CONTEXT_PRIORITY_HIGH_IMG = 0x3101;
- public static int EGL_CONTEXT_PRIORITY_MEDIUM_IMG = 0x3102;
- public static int EGL_CONTEXT_PRIORITY_LOW_IMG = 0x3103;
-
- public static void setContextPriority(int priority) {
- ThreadedRenderer.setContextPriority(priority);
- }
-}
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/system/TonalCompat.java b/packages/SystemUI/shared/src/com/android/systemui/shared/system/TonalCompat.java
deleted file mode 100644
index 4a0f89b7dc7db..0000000000000
--- a/packages/SystemUI/shared/src/com/android/systemui/shared/system/TonalCompat.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.systemui.shared.system;
-
-import android.app.WallpaperColors;
-import android.content.Context;
-
-import com.android.internal.colorextraction.ColorExtractor.GradientColors;
-import com.android.internal.colorextraction.types.Tonal;
-
-public class TonalCompat {
-
- private final Tonal mTonal;
-
- public TonalCompat(Context context) {
- mTonal = new Tonal(context);
- }
-
- public ExtractionInfo extractDarkColors(WallpaperColors colors) {
- GradientColors darkColors = new GradientColors();
- mTonal.extractInto(colors, new GradientColors(), darkColors, new GradientColors());
-
- ExtractionInfo result = new ExtractionInfo();
- result.mainColor = darkColors.getMainColor();
- result.secondaryColor = darkColors.getSecondaryColor();
- result.supportsDarkText = darkColors.supportsDarkText();
- if (colors != null) {
- result.supportsDarkTheme =
- (colors.getColorHints() & WallpaperColors.HINT_SUPPORTS_DARK_THEME) != 0;
- }
- return result;
- }
-
- public static class ExtractionInfo {
- public int mainColor;
- public int secondaryColor;
- public boolean supportsDarkText;
- public boolean supportsDarkTheme;
- }
-}
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/system/ViewRootImplCompat.java b/packages/SystemUI/shared/src/com/android/systemui/shared/system/ViewRootImplCompat.java
deleted file mode 100644
index 89c60f1d3f067..0000000000000
--- a/packages/SystemUI/shared/src/com/android/systemui/shared/system/ViewRootImplCompat.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (C) 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License
- */
-package com.android.systemui.shared.system;
-
-import android.graphics.HardwareRenderer;
-import android.view.SurfaceControl;
-import android.view.View;
-import android.view.ViewRootImpl;
-
-import java.util.function.LongConsumer;
-
-/**
- * Helper class to expose some ViewRoomImpl methods
- */
-public class ViewRootImplCompat {
-
- private final ViewRootImpl mViewRoot;
-
- public ViewRootImplCompat(View view) {
- mViewRoot = view == null ? null : view.getViewRootImpl();
- }
-
- public SurfaceControl getRenderSurfaceControl() {
- return mViewRoot == null ? null : mViewRoot.getSurfaceControl();
- }
-
- public boolean isValid() {
- return mViewRoot != null;
- }
-
- public View getView() {
- return mViewRoot == null ? null : mViewRoot.getView();
- }
-
- public void registerRtFrameCallback(LongConsumer callback) {
- if (mViewRoot != null) {
- mViewRoot.registerRtFrameCallback(
- new HardwareRenderer.FrameDrawingCallback() {
- @Override
- public void onFrameDraw(long l) {
- callback.accept(l);
- }
- });
- }
- }
-
- public void mergeWithNextTransaction(SurfaceControl.Transaction t, long frame) {
- if (mViewRoot != null) {
- mViewRoot.mergeWithNextTransaction(t, frame);
- } else {
- t.apply();
- }
- }
-}
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/system/WallpaperEngineCompat.java b/packages/SystemUI/shared/src/com/android/systemui/shared/system/WallpaperEngineCompat.java
deleted file mode 100644
index 73dc60dbc7dab..0000000000000
--- a/packages/SystemUI/shared/src/com/android/systemui/shared/system/WallpaperEngineCompat.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (C) 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.systemui.shared.system;
-
-import android.graphics.Rect;
-import android.service.wallpaper.IWallpaperEngine;
-import android.util.Log;
-
-/**
- * @see IWallpaperEngine
- */
-public class WallpaperEngineCompat {
-
- private static final String TAG = "WallpaperEngineCompat";
-
- /**
- * Returns true if {@link IWallpaperEngine#scalePreview(Rect)} is available.
- */
- public static boolean supportsScalePreview() {
- try {
- return IWallpaperEngine.class.getMethod("scalePreview", Rect.class) != null;
- } catch (NoSuchMethodException | SecurityException e) {
- return false;
- }
- }
-
- private final IWallpaperEngine mWrappedEngine;
-
- public WallpaperEngineCompat(IWallpaperEngine wrappedEngine) {
- mWrappedEngine = wrappedEngine;
- }
-
- /**
- * @see IWallpaperEngine#scalePreview(Rect)
- */
- public void scalePreview(Rect scaleToRect) {
- try {
- mWrappedEngine.scalePreview(scaleToRect);
- } catch (Exception e) {
- Log.i(TAG, "Couldn't call scalePreview method on WallpaperEngine", e);
- }
- }
-}
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/system/WallpaperManagerCompat.java b/packages/SystemUI/shared/src/com/android/systemui/shared/system/WallpaperManagerCompat.java
deleted file mode 100644
index 1f194eca816fe..0000000000000
--- a/packages/SystemUI/shared/src/com/android/systemui/shared/system/WallpaperManagerCompat.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (C) 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.systemui.shared.system;
-
-import android.app.WallpaperManager;
-import android.content.Context;
-import android.content.res.Resources;
-import android.os.IBinder;
-
-/**
- * @see WallpaperManager
- */
-public class WallpaperManagerCompat {
- private final WallpaperManager mWallpaperManager;
-
- public WallpaperManagerCompat(Context context) {
- mWallpaperManager = context.getSystemService(WallpaperManager.class);
- }
-
- /**
- * @see WallpaperManager#setWallpaperZoomOut(IBinder, float)
- */
- public void setWallpaperZoomOut(IBinder windowToken, float zoom) {
- mWallpaperManager.setWallpaperZoomOut(windowToken, zoom);
- }
-
- /**
- * @return the max scale for the wallpaper when it's fully zoomed out
- */
- public static float getWallpaperZoomOutMaxScale(Context context) {
- return context.getResources()
- .getFloat(Resources.getSystem().getIdentifier(
- /* name= */ "config_wallpaperMaxScale",
- /* defType= */ "dimen",
- /* defPackage= */ "android"));
- }
-}
\ No newline at end of file
diff --git a/packages/SystemUI/src/com/android/systemui/SystemUIApplication.java b/packages/SystemUI/src/com/android/systemui/SystemUIApplication.java
index ec11065682ff9..3a6165c03e246 100644
--- a/packages/SystemUI/src/com/android/systemui/SystemUIApplication.java
+++ b/packages/SystemUI/src/com/android/systemui/SystemUIApplication.java
@@ -38,13 +38,13 @@ import android.util.DumpableContainer;
import android.util.Log;
import android.util.TimingsTraceLog;
import android.view.SurfaceControl;
+import android.view.ThreadedRenderer;
import com.android.internal.protolog.common.ProtoLog;
import com.android.systemui.dagger.ContextComponentHelper;
import com.android.systemui.dagger.GlobalRootComponent;
import com.android.systemui.dagger.SysUIComponent;
import com.android.systemui.dump.DumpManager;
-import com.android.systemui.shared.system.ThreadedRendererCompat;
import com.android.systemui.util.NotificationChannels;
import java.lang.reflect.Constructor;
@@ -118,11 +118,11 @@ public class SystemUIApplication extends Application implements
// The priority is defaulted at medium.
int sfPriority = SurfaceControl.getGPUContextPriority();
Log.i(TAG, "Found SurfaceFlinger's GPU Priority: " + sfPriority);
- if (sfPriority == ThreadedRendererCompat.EGL_CONTEXT_PRIORITY_REALTIME_NV) {
+ if (sfPriority == ThreadedRenderer.EGL_CONTEXT_PRIORITY_REALTIME_NV) {
Log.i(TAG, "Setting SysUI's GPU Context priority to: "
- + ThreadedRendererCompat.EGL_CONTEXT_PRIORITY_HIGH_IMG);
- ThreadedRendererCompat.setContextPriority(
- ThreadedRendererCompat.EGL_CONTEXT_PRIORITY_HIGH_IMG);
+ + ThreadedRenderer.EGL_CONTEXT_PRIORITY_HIGH_IMG);
+ ThreadedRenderer.setContextPriority(
+ ThreadedRenderer.EGL_CONTEXT_PRIORITY_HIGH_IMG);
}
// Enable binder tracing on system server for calls originating from SysUI