Pre-revamped UI unused grid option cleanup
Bug: 262780002
Test: manually verified
Change-Id: Ia16c4461a10d07172dbd3be00fc732b104b7cda9
diff --git a/res/layout/grid_option.xml b/res/layout/grid_option.xml
deleted file mode 100644
index 0931dea..0000000
--- a/res/layout/grid_option.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2019 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.
--->
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:paddingBottom="@dimen/option_bottom_margin"
- android:clipChildren="false"
- android:clipToPadding="false"
- android:orientation="vertical">
-
- <FrameLayout
- android:id="@+id/option_tile"
- android:layout_width="@dimen/option_tile_width"
- android:layout_height="@dimen/option_tile_width"
- android:layout_gravity="center_horizontal"
- android:padding="@dimen/option_tile_padding_vertical"
- android:background="@drawable/option_border"
- android:gravity="center">
- <ImageView
- android:id="@+id/grid_option_thumbnail"
- android:layout_width="match_parent"
- android:layout_height="match_parent"/>
- </FrameLayout>
-
- <TextView
- android:id="@+id/option_label"
- android:layout_width="wrap_content"
- android:layout_height="24dp"
- android:layout_gravity="center_horizontal"
- android:layout_marginTop="@dimen/theme_option_label_margin"
- android:gravity="center"
- android:textAppearance="@style/OptionTitleTextAppearance" />
-</LinearLayout>
diff --git a/src/com/android/customization/model/grid/GridOption.java b/src/com/android/customization/model/grid/GridOption.java
index a5307c9..10a5db6 100644
--- a/src/com/android/customization/model/grid/GridOption.java
+++ b/src/com/android/customization/model/grid/GridOption.java
@@ -15,14 +15,11 @@
*/
package com.android.customization.model.grid;
-import android.content.Context;
-import android.graphics.PorterDuff.Mode;
import android.net.Uri;
import android.os.Parcel;
import android.os.Parcelable;
import android.text.TextUtils;
import android.view.View;
-import android.widget.ImageView;
import androidx.annotation.Nullable;
@@ -30,7 +27,6 @@
import com.android.customization.model.CustomizationOption;
import com.android.customization.widget.GridTileDrawable;
import com.android.wallpaper.R;
-import com.android.wallpaper.util.ResourceUtils;
/**
* Represents a grid layout option available in the current launcher.
@@ -94,21 +90,7 @@
@Override
public void bindThumbnailTile(View view) {
- Context context = view.getContext();
-
- int colorFilter = ResourceUtils.getColorAttr(context,
- view.isActivated()
- ? (mIsCurrent
- ? android.R.attr.textColorPrimary
- : android.R.attr.textColorPrimaryInverse)
- : android.R.attr.textColorTertiary);
- mTileDrawable.setColorFilter(colorFilter, Mode.SRC_ATOP);
- ((ImageView) view.findViewById(R.id.grid_option_thumbnail))
- .setImageDrawable(mTileDrawable);
-
- int backgroundResource = view.isActivated() && !mIsCurrent
- ? R.drawable.option_border_new_selection : R.drawable.option_border;
- view.findViewById(R.id.option_tile).setBackgroundResource(backgroundResource);
+ // Do nothing. This function will no longer be used in the Revamped UI
}
@Override
@@ -133,7 +115,7 @@
@Override
public int getLayoutResId() {
- return R.layout.grid_option;
+ return R.layout.grid_option_2;
}
@Override