aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDake Gu <dake@google.com>2018-05-07 12:32:33 -0700
committerandroid-build-merger <android-build-merger@google.com>2018-05-07 12:32:33 -0700
commitd195718c2e752876c207fe6d3d7a9a7e5f3692d4 (patch)
tree78779c80a8dd9949f0e68319c482c5743c35dc29
parent0ff776a045d66bad07eac29720413b4e0c0a9a9d (diff)
parent17850fe0bfcfed514c3e7a346a93f09c648abc83 (diff)
downloadTV-d195718c2e752876c207fe6d3d7a9a7e5f3692d4.tar.gz
convert LiveTv to aapt2
am: 17850fe0bf Change-Id: I9f5d1d04a51ec13b0b00ff04deeb4df3408500cd
-rw-r--r--Android.mk42
-rw-r--r--common/Android.mk16
-rw-r--r--common/src/com/android/tv/common/ui/setup/SetupGuidedStepFragment.java14
-rw-r--r--common/src/com/android/tv/common/ui/setup/SetupMultiPaneFragment.java8
-rw-r--r--common/src/com/android/tv/common/ui/setup/animation/TranslationAnimationCreator.java2
5 files changed, 33 insertions, 49 deletions
diff --git a/Android.mk b/Android.mk
index a238b192..76e429b9 100644
--- a/Android.mk
+++ b/Android.mk
@@ -36,26 +36,23 @@ LOCAL_PRIVILEGED_MODULE := true
LOCAL_SDK_VERSION := system_current
LOCAL_MIN_SDK_VERSION := 23 # M
+
+LOCAL_USE_AAPT2 := true
+
LOCAL_RESOURCE_DIR := \
$(LOCAL_PATH)/res \
- $(LOCAL_PATH)/usbtuner-res \
- $(LOCAL_PATH)/common/res
-
-ifdef TARGET_BUILD_APPS
-LOCAL_RESOURCE_DIR += \
- $(TOP)/prebuilts/sdk/current/support/compat/res \
- $(TOP)/prebuilts/sdk/current/support/v17/leanback/res \
- $(TOP)/prebuilts/sdk/current/support/v7/recyclerview/res
-else # !TARGET_BUILD_APPS
-LOCAL_RESOURCE_DIR += \
- $(TOP)/frameworks/support/compat/res \
- $(TOP)/frameworks/support/v17/leanback/res \
- $(TOP)/frameworks/support/v7/recyclerview/res
-endif
+ $(LOCAL_PATH)/usbtuner-res
+
LOCAL_SRC_FILES += \
src/com/android/tv/tuner/exoplayer/ffmpeg/IFfmpegDecoder.aidl
LOCAL_STATIC_JAVA_LIBRARIES := \
+ icu4j-usbtuner \
+ lib-exoplayer \
+ lib-exoplayer-v2 \
+ lib-exoplayer-v2-ext-ffmpeg
+
+LOCAL_STATIC_ANDROID_LIBRARIES := \
android-support-annotations \
android-support-compat \
android-support-core-ui \
@@ -63,23 +60,11 @@ LOCAL_STATIC_JAVA_LIBRARIES := \
android-support-v7-palette \
android-support-v7-recyclerview \
android-support-v17-leanback \
- icu4j-usbtuner \
- lib-exoplayer \
- lib-exoplayer-v2 \
- lib-exoplayer-v2-ext-ffmpeg \
- tv-common \
-
-
-
-
+ tv-common
LOCAL_JAVACFLAGS := -Xlint:deprecation -Xlint:unchecked
-LOCAL_AAPT_FLAGS += --auto-add-overlay \
- --extra-packages android.support.compat \
- --extra-packages android.support.v7.recyclerview \
- --extra-packages android.support.v17.leanback \
- --extra-packages com.android.tv.common \
+LOCAL_AAPT_FLAGS += \
--version-name "$(version_name_package)" \
--version-code $(version_code_package) \
@@ -127,3 +112,4 @@ include $(BUILD_MULTI_PREBUILT)
include $(call all-makefiles-under,$(LOCAL_PATH))
+
diff --git a/common/Android.mk b/common/Android.mk
index d632597f..ff19392e 100644
--- a/common/Android.mk
+++ b/common/Android.mk
@@ -9,25 +9,17 @@ LOCAL_MODULE_CLASS := STATIC_JAVA_LIBRARIES
LOCAL_MODULE_TAGS := optional
LOCAL_SDK_VERSION := system_current
-LOCAL_RESOURCE_DIR := \
- $(TOP)/prebuilts/sdk/current/support/compat/res \
- $(TOP)/prebuilts/sdk/current/support/v7/recyclerview/res \
- $(TOP)/prebuilts/sdk/current/support/v17/leanback/res \
- $(LOCAL_PATH)/res \
+LOCAL_USE_AAPT2 := true
-LOCAL_STATIC_JAVA_LIBRARIES := \
+LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
+
+LOCAL_SHARED_ANDROID_LIBRARIES := \
android-support-annotations \
android-support-compat \
android-support-core-ui \
android-support-v7-recyclerview \
android-support-v17-leanback \
-LOCAL_AAPT_FLAGS := --auto-add-overlay \
- --extra-packages android.support.compat \
- --extra-packages android.support.v7.recyclerview \
- --extra-packages android.support.v17.leanback \
-
-
include $(LOCAL_PATH)/buildconfig.mk
include $(BUILD_STATIC_JAVA_LIBRARY)
diff --git a/common/src/com/android/tv/common/ui/setup/SetupGuidedStepFragment.java b/common/src/com/android/tv/common/ui/setup/SetupGuidedStepFragment.java
index 88159da9..7bce9c27 100644
--- a/common/src/com/android/tv/common/ui/setup/SetupGuidedStepFragment.java
+++ b/common/src/com/android/tv/common/ui/setup/SetupGuidedStepFragment.java
@@ -45,9 +45,11 @@ public abstract class SetupGuidedStepFragment extends GuidedStepFragment {
Bundle savedInstanceState) {
View view = super.onCreateView(inflater, container, savedInstanceState);
Bundle arguments = getArguments();
- view.findViewById(R.id.action_fragment_root).setPadding(0, 0, 0, 0);
+ view.findViewById(android.support.v17.leanback.R.id.action_fragment_root)
+ .setPadding(0, 0, 0, 0);
LinearLayout.LayoutParams guidanceLayoutParams = (LinearLayout.LayoutParams)
- view.findViewById(R.id.content_fragment).getLayoutParams();
+ view.findViewById(android.support.v17.leanback.R.id.content_fragment)
+ .getLayoutParams();
guidanceLayoutParams.weight = 0;
if (arguments != null && arguments.getBoolean(KEY_THREE_PANE, false)) {
// Content fragment.
@@ -56,7 +58,7 @@ public abstract class SetupGuidedStepFragment extends GuidedStepFragment {
int doneButtonWidth = getResources().getDimensionPixelOffset(
R.dimen.setup_done_button_container_width);
// Guided actions list
- View list = view.findViewById(R.id.guidedactions_list);
+ View list = view.findViewById(android.support.v17.leanback.R.id.guidedactions_list);
MarginLayoutParams marginLayoutParams = (MarginLayoutParams) list.getLayoutParams();
// Use content view to check layout direction while view is being created.
if (getResources().getConfiguration().getLayoutDirection()
@@ -77,10 +79,12 @@ public abstract class SetupGuidedStepFragment extends GuidedStepFragment {
gridView.setWindowAlignmentOffset(offset);
gridView.setWindowAlignmentOffsetPercent(0);
gridView.setItemAlignmentOffsetPercent(0);
- ((ViewGroup) view.findViewById(R.id.guidedactions_list)).setTransitionGroup(false);
+ ((ViewGroup) view.findViewById(android.support.v17.leanback.R.id.guidedactions_list))
+ .setTransitionGroup(false);
// Needed for the shared element transition.
// content_frame is defined in leanback.
- ViewGroup group = (ViewGroup) view.findViewById(R.id.content_frame);
+ ViewGroup group = (ViewGroup) view.findViewById(
+ android.support.v17.leanback.R.id.content_frame);
group.setClipChildren(false);
group.setClipToPadding(false);
return view;
diff --git a/common/src/com/android/tv/common/ui/setup/SetupMultiPaneFragment.java b/common/src/com/android/tv/common/ui/setup/SetupMultiPaneFragment.java
index b9ad4657..f5c2bf26 100644
--- a/common/src/com/android/tv/common/ui/setup/SetupMultiPaneFragment.java
+++ b/common/src/com/android/tv/common/ui/setup/SetupMultiPaneFragment.java
@@ -102,11 +102,13 @@ public abstract class SetupMultiPaneFragment extends SetupFragment {
@Override
protected int[] getParentIdsForDelay() {
- return new int[] {R.id.content_fragment, R.id.guidedactions_list};
+ return new int[] {android.support.v17.leanback.R.id.content_fragment,
+ android.support.v17.leanback.R.id.guidedactions_list};
}
@Override
public int[] getSharedElementIds() {
- return new int[] {R.id.action_fragment_background, R.id.done_button_container};
+ return new int[] {android.support.v17.leanback.R.id.action_fragment_background,
+ R.id.done_button_container};
}
-} \ No newline at end of file
+}
diff --git a/common/src/com/android/tv/common/ui/setup/animation/TranslationAnimationCreator.java b/common/src/com/android/tv/common/ui/setup/animation/TranslationAnimationCreator.java
index 99b8811a..7705f7a7 100644
--- a/common/src/com/android/tv/common/ui/setup/animation/TranslationAnimationCreator.java
+++ b/common/src/com/android/tv/common/ui/setup/animation/TranslationAnimationCreator.java
@@ -9,7 +9,7 @@ import android.transition.Transition;
import android.transition.TransitionValues;
import android.view.View;
-import com.android.tv.common.R;
+import android.support.v17.leanback.R;
/**
* This class is used by Slide and Explode to create an animator that goes from the start position