summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2021-06-17 17:45:53 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2021-06-17 17:45:53 +0000
commitc51787e954f518f98e43f16eaeffeeb1796019c6 (patch)
treee7ba5e5264a3f4be2968a97a08434383107db59e
parent17cea68d53ca81a184f317357f91ba8e71b51de2 (diff)
parentd2ece574d224dc84c0fd4643af1f258df2121228 (diff)
downloadThemePicker-c51787e954f518f98e43f16eaeffeeb1796019c6.tar.gz
Merge "Fix ThemePicker build and exclude unused features" into sc-dev
-rw-r--r--Android.bp17
-rwxr-xr-xAndroidManifest.xml5
-rw-r--r--res/layout/theme_info_view.xml4
-rw-r--r--src/com/android/customization/picker/ViewOnlyFullPreviewActivity.java10
-rw-r--r--src/com/android/customization/picker/clock/ClockFacePickerActivity.java (renamed from src/com/android/customization/picker/ClockFacePickerActivity.java)3
-rw-r--r--src/com/android/customization/picker/theme/ThemeFragment.java1
-rw-r--r--src/com/android/customization/picker/theme/ThemeFullPreviewFragment.java1
-rw-r--r--src/com/android/customization/picker/theme/ThemeInfoView.java (renamed from src/com/android/customization/widget/ThemeInfoView.java)2
8 files changed, 22 insertions, 21 deletions
diff --git a/Android.bp b/Android.bp
index 8f02388a..57d30ce5 100644
--- a/Android.bp
+++ b/Android.bp
@@ -24,6 +24,22 @@ filegroup {
srcs: [
"src/**/*.java",
"src/**/*.kt",
+ // Min requirement for CustomizationInjector and StatsLogUserEventLogger to build without Clock and Theme feature.
+ "src/com/android/customization/model/clock/BaseClockManager.java",
+ "src/com/android/customization/model/clock/Clockface.java",
+ "src/com/android/customization/model/clock/ClockManager.java",
+ "src/com/android/customization/model/clock/ClockProvider.java",
+ "src/com/android/customization/model/theme/OverlayManagerCompat.java",
+ "src/com/android/customization/model/theme/ThemeBundleProvider.java",
+ "src/com/android/customization/model/theme/ThemeManager.java",
+ "src/com/android/customization/model/theme/ThemeBundle.java",
+ "src/com/android/customization/model/theme/custom/CustomTheme.java",
+ ],
+ exclude_srcs: [
+ "src/com/android/customization/model/clock/**/*.java",
+ "src/com/android/customization/model/theme/**/*.java",
+ "src/com/android/customization/picker/clock/**/*.java",
+ "src/com/android/customization/picker/theme/**/*.java",
],
}
@@ -80,5 +96,6 @@ android_app {
system_ext_specific: true,
platform_apis: true,
manifest: "AndroidManifest.xml",
+ additional_manifests: [":WallpaperPicker2_Manifest"],
overrides: ["WallpaperPicker2"],
}
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 4f624296..bae1cb37 100755
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -48,6 +48,7 @@
android:name="com.android.customization.picker.CustomizationPickerApplication"
android:theme="@style/CustomizationTheme">
<activity
+ tools:node="replace"
android:name="com.android.wallpaper.picker.CustomizationPickerActivity"
android:label="@string/app_name"
android:resizeableActivity="false"
@@ -65,10 +66,6 @@
</intent-filter>
</activity-alias>
- <activity android:name="com.android.customization.picker.theme.CustomThemeActivity"
- android:resizeableActivity="false"
- android:theme="@style/CustomizationTheme.NoActionBar"/>
-
<activity android:name="com.android.customization.picker.ViewOnlyFullPreviewActivity"
android:resizeableActivity="false"
android:theme="@style/CustomizationTheme.NoActionBar"/>
diff --git a/res/layout/theme_info_view.xml b/res/layout/theme_info_view.xml
index 83422ed9..085a35e3 100644
--- a/res/layout/theme_info_view.xml
+++ b/res/layout/theme_info_view.xml
@@ -14,7 +14,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<com.android.customization.widget.ThemeInfoView
+<com.android.customization.picker.theme.ThemeInfoView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -73,4 +73,4 @@
android:layout_height="@dimen/theme_info_icon_size"
android:layout_marginHorizontal="@dimen/theme_info_margin"/>
</LinearLayout>
-</com.android.customization.widget.ThemeInfoView> \ No newline at end of file
+</com.android.customization.picker.theme.ThemeInfoView> \ No newline at end of file
diff --git a/src/com/android/customization/picker/ViewOnlyFullPreviewActivity.java b/src/com/android/customization/picker/ViewOnlyFullPreviewActivity.java
index 91c310c2..44c6835b 100644
--- a/src/com/android/customization/picker/ViewOnlyFullPreviewActivity.java
+++ b/src/com/android/customization/picker/ViewOnlyFullPreviewActivity.java
@@ -15,8 +15,6 @@
*/
package com.android.customization.picker;
-import static com.android.customization.picker.theme.ThemeFullPreviewFragment.EXTRA_THEME_OPTION_TITLE;
-
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
@@ -28,7 +26,6 @@ import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import com.android.customization.picker.grid.GridFullPreviewFragment;
-import com.android.customization.picker.theme.ThemeFullPreviewFragment;
import com.android.wallpaper.R;
import com.android.wallpaper.picker.AppbarFragment.AppbarFragmentHost;
import com.android.wallpaper.widget.BottomActionBar;
@@ -81,13 +78,6 @@ public class ViewOnlyFullPreviewActivity extends FragmentActivity implements App
if (section == SECTION_GRID) {
showFragment(GridFullPreviewFragment.newInstance(
getString(R.string.grid_title), bundle));
- } else if (section == SECTION_STYLE) {
- final String themeTitle = bundle.getString(EXTRA_THEME_OPTION_TITLE);
- showFragment(ThemeFullPreviewFragment.newInstance(
- TextUtils.isEmpty(themeTitle)
- ? getString(R.string.theme_title)
- : themeTitle,
- bundle));
}
}
diff --git a/src/com/android/customization/picker/ClockFacePickerActivity.java b/src/com/android/customization/picker/clock/ClockFacePickerActivity.java
index 5065aef4..5e512341 100644
--- a/src/com/android/customization/picker/ClockFacePickerActivity.java
+++ b/src/com/android/customization/picker/clock/ClockFacePickerActivity.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.android.customization.picker;
+package com.android.customization.picker.clock;
import android.content.Intent;
import android.os.Bundle;
@@ -23,7 +23,6 @@ import androidx.fragment.app.FragmentTransaction;
import com.android.customization.model.clock.BaseClockManager;
import com.android.customization.model.clock.Clockface;
import com.android.customization.model.clock.ContentProviderClockProvider;
-import com.android.customization.picker.clock.ClockFragment;
import com.android.customization.picker.clock.ClockFragment.ClockFragmentHost;
import com.android.wallpaper.R;
diff --git a/src/com/android/customization/picker/theme/ThemeFragment.java b/src/com/android/customization/picker/theme/ThemeFragment.java
index 5ff5ef82..965a2ad9 100644
--- a/src/com/android/customization/picker/theme/ThemeFragment.java
+++ b/src/com/android/customization/picker/theme/ThemeFragment.java
@@ -51,7 +51,6 @@ import com.android.customization.module.ThemesUserEventLogger;
import com.android.customization.picker.ViewOnlyFullPreviewActivity;
import com.android.customization.picker.WallpaperPreviewer;
import com.android.customization.widget.OptionSelectorController;
-import com.android.customization.widget.ThemeInfoView;
import com.android.wallpaper.R;
import com.android.wallpaper.model.WallpaperInfo;
import com.android.wallpaper.module.CurrentWallpaperInfoFactory;
diff --git a/src/com/android/customization/picker/theme/ThemeFullPreviewFragment.java b/src/com/android/customization/picker/theme/ThemeFullPreviewFragment.java
index 77325e7c..5ea84ce8 100644
--- a/src/com/android/customization/picker/theme/ThemeFullPreviewFragment.java
+++ b/src/com/android/customization/picker/theme/ThemeFullPreviewFragment.java
@@ -37,7 +37,6 @@ import com.android.customization.model.theme.ThemeBundle;
import com.android.customization.model.theme.ThemeBundleProvider;
import com.android.customization.module.CustomizationInjector;
import com.android.customization.picker.WallpaperPreviewer;
-import com.android.customization.widget.ThemeInfoView;
import com.android.wallpaper.R;
import com.android.wallpaper.model.WallpaperInfo;
import com.android.wallpaper.module.InjectorProvider;
diff --git a/src/com/android/customization/widget/ThemeInfoView.java b/src/com/android/customization/picker/theme/ThemeInfoView.java
index 9eb0320b..e929c4d2 100644
--- a/src/com/android/customization/widget/ThemeInfoView.java
+++ b/src/com/android/customization/picker/theme/ThemeInfoView.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.android.customization.widget;
+package com.android.customization.picker.theme;
import android.content.Context;
import android.content.res.ColorStateList;