diff --git a/res/drawable/accessibility_color_inversion_banner.gif b/res/drawable/accessibility_color_inversion_banner.gif
new file mode 100644
index 0000000..dc7c8ac
--- /dev/null
+++ b/res/drawable/accessibility_color_inversion_banner.gif
Binary files differ
diff --git a/res/drawable/accessibility_color_inversion_banner.png b/res/drawable/accessibility_color_inversion_banner.png
deleted file mode 100644
index 2d068e3..0000000
--- a/res/drawable/accessibility_color_inversion_banner.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/accessibility_magnification_banner.gif b/res/drawable/accessibility_magnification_banner.gif
new file mode 100644
index 0000000..f9b7e36
--- /dev/null
+++ b/res/drawable/accessibility_magnification_banner.gif
Binary files differ
diff --git a/res/drawable/accessibility_screen_magnification_background.xml b/res/drawable/accessibility_screen_magnification_background.xml
deleted file mode 100644
index e22cfec..0000000
--- a/res/drawable/accessibility_screen_magnification_background.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<!--
-  ~ Copyright (C) 2016 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
-  -->
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
-        android:width="360dp"
-        android:height="184dp"
-        android:viewportWidth="360"
-        android:viewportHeight="184">
-
-    <path
-        android:fillColor="#E9F0F9"
-        android:pathData="M 0 0 H 360 V 184 H 0 V 0 Z" />
-    <path
-        android:fillColor="#444445"
-        android:pathData="M217.6,179h-75.1c-5,0-9-4-9-9V14c0-5,4-9,9-9h75.1c5,0,9,4,9,9V170C226.6,174.9,222.5,179,217.6,179z" />
-    <path
-        android:fillColor="#000000"
-        android:pathData="M 180 9.6 C 181.1045695 9.6 182 10.4954305003 182 11.6 C 182 12.7045694997 181.1045695 13.6 180 13.6 C 178.8954305 13.6 178 12.7045694997 178 11.6 C 178 10.4954305003 178.8954305 9.6 180 9.6 Z" />
-</vector>
diff --git a/res/layout/magnification_video_preference.xml b/res/layout/magnification_video_preference.xml
deleted file mode 100644
index ff7089c..0000000
--- a/res/layout/magnification_video_preference.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2016 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.
--->
-<RelativeLayout
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:clipChildren="true"
-    android:clipToPadding="true">
-
-    <ImageView
-        android:id="@+id/video_background"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:src="@drawable/accessibility_screen_magnification_background"
-        android:scaleType="fitXY"
-        android:adjustViewBounds="true"
-        android:importantForAccessibility="noHideDescendants" />
-
-    <VideoView
-        android:id="@+id/video"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_alignTop="@id/video_background"
-        android:layout_centerHorizontal="true"
-        android:importantForAccessibility="noHideDescendants" />
-
-</RelativeLayout>
\ No newline at end of file
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index a7e003c..9c990f0 100755
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -280,13 +280,6 @@
     <dimen name="accessibility_layout_margin_start_end">16dp</dimen>
     <dimen name="accessibility_button_preference_padding_top_bottom">18dp</dimen>
 
-    <!-- Accessibility, Screen magnification. These values are meant to be relative values and the actual layout value will be set programmatically. -->
-    <dimen name="screen_magnification_video_background_width">750dp</dimen>
-    <dimen name="screen_magnification_video_background_height">383dp</dimen>
-    <dimen name="screen_magnification_video_width">170dp</dimen>
-    <dimen name="screen_magnification_video_height">311dp</dimen>
-    <dimen name="screen_magnification_video_margin_top">40dp</dimen>
-
     <!-- Restricted icon in switch bar -->
     <dimen name="restricted_icon_margin_end">16dp</dimen>
     <!-- Restricted icon size in switch bar -->
diff --git a/src/com/android/settings/accessibility/ToggleScreenMagnificationPreferenceFragment.java b/src/com/android/settings/accessibility/ToggleScreenMagnificationPreferenceFragment.java
index 2ca644d..797a332 100644
--- a/src/com/android/settings/accessibility/ToggleScreenMagnificationPreferenceFragment.java
+++ b/src/com/android/settings/accessibility/ToggleScreenMagnificationPreferenceFragment.java
@@ -25,10 +25,6 @@
 import android.content.ContentResolver;
 import android.content.Context;
 import android.content.DialogInterface;
-import android.content.res.Resources;
-import android.media.AudioManager;
-import android.media.MediaPlayer;
-import android.media.MediaPlayer.OnPreparedListener;
 import android.net.Uri;
 import android.os.Bundle;
 import android.provider.Settings;
@@ -36,18 +32,12 @@
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
-import android.view.ViewTreeObserver.OnGlobalLayoutListener;
 import android.view.accessibility.AccessibilityManager;
 import android.view.accessibility.AccessibilityManager.TouchExplorationStateChangeListener;
 import android.widget.CheckBox;
-import android.widget.ImageView;
-import android.widget.RelativeLayout.LayoutParams;
-import android.widget.VideoView;
 
 import androidx.appcompat.app.AlertDialog;
 import androidx.preference.Preference;
-import androidx.preference.PreferenceScreen;
-import androidx.preference.PreferenceViewHolder;
 
 import com.android.internal.annotations.VisibleForTesting;
 import com.android.settings.R;
@@ -81,83 +71,6 @@
     private static final char COMPONENT_NAME_SEPARATOR = ':';
     private static final TextUtils.SimpleStringSplitter sStringColonSplitter =
             new TextUtils.SimpleStringSplitter(COMPONENT_NAME_SEPARATOR);
-    protected VideoPreference mVideoPreference;
-
-    protected class VideoPreference extends Preference {
-        private ImageView mVideoBackgroundView;
-        private OnGlobalLayoutListener mLayoutListener;
-
-        public VideoPreference(Context context) {
-            super(context);
-        }
-
-        @Override
-        public void onBindViewHolder(PreferenceViewHolder view) {
-            super.onBindViewHolder(view);
-            Resources res = getPrefContext().getResources();
-            final int backgroundAssetWidth = res.getDimensionPixelSize(
-                    R.dimen.screen_magnification_video_background_width);
-            final int videoAssetWidth = res
-                    .getDimensionPixelSize(R.dimen.screen_magnification_video_width);
-            final int videoAssetHeight = res
-                    .getDimensionPixelSize(R.dimen.screen_magnification_video_height);
-            final int videoAssetMarginTop = res.getDimensionPixelSize(
-                    R.dimen.screen_magnification_video_margin_top);
-            view.setDividerAllowedAbove(false);
-            view.setDividerAllowedBelow(false);
-            mVideoBackgroundView = (ImageView) view.findViewById(R.id.video_background);
-            final VideoView videoView = (VideoView) view.findViewById(R.id.video);
-
-            // Loop the video.
-            videoView.setOnPreparedListener(new OnPreparedListener() {
-                @Override
-                public void onPrepared(MediaPlayer mediaPlayer) {
-                    mediaPlayer.setLooping(true);
-                }
-            });
-
-            // Make sure the VideoView does not request audio focus.
-            videoView.setAudioFocusRequest(AudioManager.AUDIOFOCUS_NONE);
-
-            // Resolve and set the video content
-            Bundle args = getArguments();
-            if ((args != null) && args.containsKey(
-                    AccessibilitySettings.EXTRA_VIDEO_RAW_RESOURCE_ID)) {
-                videoView.setVideoURI(Uri.parse(String.format("%s://%s/%s",
-                        ContentResolver.SCHEME_ANDROID_RESOURCE,
-                        getPrefContext().getPackageName(),
-                        args.getInt(AccessibilitySettings.EXTRA_VIDEO_RAW_RESOURCE_ID))));
-            }
-
-            // Make sure video controls (e.g. for pausing) are not displayed.
-            videoView.setMediaController(null);
-
-            // LayoutListener for adjusting the position of the VideoView on the background image.
-            mLayoutListener = new OnGlobalLayoutListener() {
-                @Override
-                public void onGlobalLayout() {
-                    final int backgroundViewWidth = mVideoBackgroundView.getWidth();
-
-                    LayoutParams videoLp = (LayoutParams) videoView.getLayoutParams();
-                    videoLp.width = videoAssetWidth * backgroundViewWidth / backgroundAssetWidth;
-                    videoLp.height = videoAssetHeight * backgroundViewWidth / backgroundAssetWidth;
-                    videoLp.setMargins(0,
-                            videoAssetMarginTop * backgroundViewWidth / backgroundAssetWidth, 0, 0);
-                    videoView.setLayoutParams(videoLp);
-                    videoView.invalidate();
-                    videoView.start();
-                }
-            };
-
-            mVideoBackgroundView.getViewTreeObserver().addOnGlobalLayoutListener(mLayoutListener);
-        }
-
-        @Override
-        protected void onPrepareForRemoval() {
-            mVideoBackgroundView.getViewTreeObserver()
-                    .removeOnGlobalLayoutListener(mLayoutListener);
-        }
-    }
 
     @Override
     public void onCreate(Bundle savedInstanceState) {
@@ -169,6 +82,10 @@
     public View onCreateView(LayoutInflater inflater, ViewGroup container,
             Bundle savedInstanceState) {
         mPackageName = getString(R.string.accessibility_screen_magnification_title);
+        mImageUri = new Uri.Builder().scheme(ContentResolver.SCHEME_ANDROID_RESOURCE)
+                .authority(getPrefContext().getPackageName())
+                .appendPath(String.valueOf(R.drawable.accessibility_magnification_banner))
+                .build();
         mTouchExplorationStateChangeListener = isTouchExplorationEnabled -> {
             removeDialog(DialogEnums.EDIT_SHORTCUT);
             mShortcutPreference.setSummary(getShortcutTypeSummary(getPrefContext()));
@@ -178,13 +95,6 @@
 
     @Override
     public void onViewCreated(View view, Bundle savedInstanceState) {
-        final PreferenceScreen preferenceScreen = getPreferenceScreen();
-        mVideoPreference = new VideoPreference(getPrefContext());
-        mVideoPreference.setSelectable(false);
-        mVideoPreference.setPersistent(false);
-        mVideoPreference.setLayoutResource(R.layout.magnification_video_preference);
-        preferenceScreen.addPreference(mVideoPreference);
-
         initShortcutPreference();
 
         mSettingsPreference = new Preference(getPrefContext());
@@ -209,11 +119,6 @@
                 AccessibilityManager.class);
         am.addTouchExplorationStateChangeListener(mTouchExplorationStateChangeListener);
 
-        VideoView videoView = (VideoView) getView().findViewById(R.id.video);
-        if (videoView != null) {
-            videoView.start();
-        }
-
         updateShortcutPreferenceData();
         updateShortcutPreference();
     }
@@ -438,20 +343,6 @@
     }
 
     @Override
-    protected void onProcessArguments(Bundle arguments) {
-        super.onProcessArguments(arguments);
-        if (arguments == null) {
-            return;
-        }
-
-        if (arguments.containsKey(AccessibilitySettings.EXTRA_VIDEO_RAW_RESOURCE_ID)) {
-            mVideoPreference.setVisible(true);
-        } else {
-            mVideoPreference.setVisible(false);
-        }
-    }
-
-    @Override
     public void onToggleClicked(ShortcutPreference preference) {
         final int shortcutTypes = getUserShortcutTypes(getPrefContext(), UserShortcutType.SOFTWARE);
         if (preference.isChecked()) {
