Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d2ece574 authored by Chihhang Chuang's avatar Chihhang Chuang
Browse files

Fix ThemePicker build and exclude unused features

- Exclude Theme and Clock from builds since they are unused, should add
them back when the features are needed.

Screenshot: https://screenshot.googleplex.com/AeLSMUFq5EdndWr.png

Bug: 190354625
Test: m ThemePicker
Change-Id: I0219fa5b27354fc7afdcb5526e1b8e8e3d29b755
parent e4ba3f48
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
@@ -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"],
}
+1 −4
Original line number Diff line number Diff line
@@ -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"/>
+2 −2
Original line number Diff line number Diff line
@@ -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
+0 −10
Original line number Diff line number Diff line
@@ -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));
        }
    }

+1 −2
Original line number Diff line number Diff line
@@ -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;

Loading