summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build/sdk-darwin-x86.atree2
-rw-r--r--build/sdk-linux-x86.atree1
-rw-r--r--build/sdk-windows-x86.atree2
-rw-r--r--build/sdk.atree6
-rw-r--r--samples/SupportLeanbackDemos/src/com/example/android/leanback/BrowseFragment.java8
-rw-r--r--samples/SupportLeanbackDemos/src/com/example/android/leanback/CardPresenter.java4
-rw-r--r--samples/SupportLeanbackDemos/src/com/example/android/leanback/DetailsFragment.java33
-rw-r--r--samples/SupportLeanbackDemos/src/com/example/android/leanback/PhotoItem.java10
-rw-r--r--sdk/build_tools_source.prop_template2
-rw-r--r--sdk/support_source.prop_template2
-rw-r--r--sys-img/images_arm64-v8a_source.prop_template2
-rw-r--r--sys-img/images_armeabi-v7a_source.prop_template2
-rw-r--r--sys-img/images_armeabi_source.prop_template2
-rw-r--r--sys-img/images_mips_source.prop_template2
-rw-r--r--sys-img/images_x86_64_source.prop_template2
-rw-r--r--sys-img/images_x86_source.prop_template2
16 files changed, 60 insertions, 22 deletions
diff --git a/build/sdk-darwin-x86.atree b/build/sdk-darwin-x86.atree
index 9f1eb38b7..e220246b1 100644
--- a/build/sdk-darwin-x86.atree
+++ b/build/sdk-darwin-x86.atree
@@ -32,6 +32,8 @@ prebuilts/sdk/tools/darwin/arm-linux-androideabi-ld strip build-tools/${PLATFO
prebuilts/sdk/tools/darwin/i686-linux-android-ld strip build-tools/${PLATFORM_NAME}/i686-linux-android-ld
prebuilts/sdk/tools/darwin/mipsel-linux-android-ld strip build-tools/${PLATFORM_NAME}/mipsel-linux-android-ld
+dalvik/dx/etc/mainDexClasses build-tools/${PLATFORM_NAME}/multidex/mainDexClasses
+
##############################################################################
# Docs Component
##############################################################################
diff --git a/build/sdk-linux-x86.atree b/build/sdk-linux-x86.atree
index 745be4925..ce359a2de 100644
--- a/build/sdk-linux-x86.atree
+++ b/build/sdk-linux-x86.atree
@@ -32,4 +32,5 @@ prebuilts/sdk/tools/linux/arm-linux-androideabi-ld strip build-tools/${PLATFOR
prebuilts/sdk/tools/linux/i686-linux-android-ld strip build-tools/${PLATFORM_NAME}/i686-linux-android-ld
prebuilts/sdk/tools/linux/mipsel-linux-android-ld strip build-tools/${PLATFORM_NAME}/mipsel-linux-android-ld
+dalvik/dx/etc/mainDexClasses build-tools/${PLATFORM_NAME}/multidex/mainDexClasses
diff --git a/build/sdk-windows-x86.atree b/build/sdk-windows-x86.atree
index 7820b8674..0653e91c9 100644
--- a/build/sdk-windows-x86.atree
+++ b/build/sdk-windows-x86.atree
@@ -101,6 +101,8 @@ prebuilts/sdk/tools/windows/i686-linux-android-ld.exe strip build-tools/${P
rm build-tools/${PLATFORM_NAME}/mipsel-linux-android-ld
prebuilts/sdk/tools/windows/mipsel-linux-android-ld.exe strip build-tools/${PLATFORM_NAME}/mipsel-linux-android-ld.exe
+dalvik/dx/etc/mainDexClasses.bat build-tools/${PLATFORM_NAME}/multidex/mainDexClasses.bat
+
##############################################################################
# Docs Component
diff --git a/build/sdk.atree b/build/sdk.atree
index 8a82f7941..d4f8973ca 100644
--- a/build/sdk.atree
+++ b/build/sdk.atree
@@ -118,6 +118,12 @@ bin/dx build-tools/${PLATFORM_NAME}/dx
framework/dx.jar build-tools/${PLATFORM_NAME}/lib/dx.jar
bin/dexdump build-tools/${PLATFORM_NAME}/dexdump
+# multi-dex
+prebuilts/sdk/tools/lib/shrinkedAndroid.jar build-tools/${PLATFORM_NAME}/multidex/shrinkedAndroid.jar
+prebuilts/sdk/tools/jack.jar build-tools/${PLATFORM_NAME}/jack.jar
+prebuilts/sdk/tools/jill.jar build-tools/${PLATFORM_NAME}/jill.jar
+dalvik/dx/etc/mainDexClasses.rules build-tools/${PLATFORM_NAME}/multidex/mainDexClasses.rules
+
##############################################################################
# Platform Component
diff --git a/samples/SupportLeanbackDemos/src/com/example/android/leanback/BrowseFragment.java b/samples/SupportLeanbackDemos/src/com/example/android/leanback/BrowseFragment.java
index abf82e385..6ce511195 100644
--- a/samples/SupportLeanbackDemos/src/com/example/android/leanback/BrowseFragment.java
+++ b/samples/SupportLeanbackDemos/src/com/example/android/leanback/BrowseFragment.java
@@ -78,12 +78,12 @@ public class BrowseFragment extends android.support.v17.leanback.app.BrowseFragm
for (int i = 0; i < NUM_ROWS; ++i) {
ArrayObjectAdapter listRowAdapter = new ArrayObjectAdapter(cardPresenter);
listRowAdapter.add(new PhotoItem("Hello world", R.drawable.gallery_photo_1));
- listRowAdapter.add(new PhotoItem("This is a test", R.drawable.gallery_photo_2));
- listRowAdapter.add(new PhotoItem("Android TV", R.drawable.gallery_photo_3));
+ listRowAdapter.add(new PhotoItem("This is a test", "Only a test", R.drawable.gallery_photo_2));
+ listRowAdapter.add(new PhotoItem("Android TV", "by Google", R.drawable.gallery_photo_3));
listRowAdapter.add(new PhotoItem("Leanback", R.drawable.gallery_photo_4));
listRowAdapter.add(new PhotoItem("Hello world", R.drawable.gallery_photo_5));
- listRowAdapter.add(new PhotoItem("This is a test", R.drawable.gallery_photo_6));
- listRowAdapter.add(new PhotoItem("Android TV", R.drawable.gallery_photo_7));
+ listRowAdapter.add(new PhotoItem("This is a test", "Only a test", R.drawable.gallery_photo_6));
+ listRowAdapter.add(new PhotoItem("Android TV", "by Google", R.drawable.gallery_photo_7));
listRowAdapter.add(new PhotoItem("Leanback", R.drawable.gallery_photo_8));
HeaderItem header = new HeaderItem(i, "Row " + i, null);
mRowsAdapter.add(new ListRow(header, listRowAdapter));
diff --git a/samples/SupportLeanbackDemos/src/com/example/android/leanback/CardPresenter.java b/samples/SupportLeanbackDemos/src/com/example/android/leanback/CardPresenter.java
index 17688c298..f5e486b86 100644
--- a/samples/SupportLeanbackDemos/src/com/example/android/leanback/CardPresenter.java
+++ b/samples/SupportLeanbackDemos/src/com/example/android/leanback/CardPresenter.java
@@ -17,6 +17,7 @@ import android.content.Context;
import android.graphics.drawable.Drawable;
import android.support.v17.leanback.widget.ImageCardView;
import android.support.v17.leanback.widget.Presenter;
+import android.text.TextUtils;
import android.util.Log;
import android.view.ViewGroup;
import android.view.View.MeasureSpec;
@@ -87,6 +88,9 @@ public class CardPresenter extends Presenter {
.getDrawable(photoItem.getImageResourceId());
((ImageCardView) viewHolder.view).setMainImage(drawable);
((ImageCardView) viewHolder.view).setTitleText(photoItem.getTitle());
+ if (!TextUtils.isEmpty(photoItem.getContent())) {
+ ((ImageCardView) viewHolder.view).setContentText(photoItem.getContent());
+ }
}
@Override
diff --git a/samples/SupportLeanbackDemos/src/com/example/android/leanback/DetailsFragment.java b/samples/SupportLeanbackDemos/src/com/example/android/leanback/DetailsFragment.java
index 5cf086793..a5266452f 100644
--- a/samples/SupportLeanbackDemos/src/com/example/android/leanback/DetailsFragment.java
+++ b/samples/SupportLeanbackDemos/src/com/example/android/leanback/DetailsFragment.java
@@ -16,9 +16,7 @@ package com.example.android.leanback;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
-import android.support.v4.app.ActivityCompat;
import android.support.v4.app.ActivityOptionsCompat;
-import android.support.v4.view.ViewCompat;
import android.support.v17.leanback.widget.Action;
import android.support.v17.leanback.widget.ArrayObjectAdapter;
import android.support.v17.leanback.widget.ClassPresenterSelector;
@@ -35,13 +33,8 @@ import android.support.v17.leanback.widget.Presenter;
import android.support.v17.leanback.widget.Row;
import android.support.v17.leanback.widget.RowPresenter;
import android.util.Log;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
import android.widget.Toast;
-import java.util.ArrayList;
-
public class DetailsFragment extends android.support.v17.leanback.app.DetailsFragment {
private static final String TAG = "leanback.DetailsFragment";
private static final String ITEM = "item";
@@ -50,6 +43,10 @@ public class DetailsFragment extends android.support.v17.leanback.app.DetailsFra
private ArrayObjectAdapter mRowsAdapter;
private PhotoItem mPhotoItem;
+ private static final int ACTION_BUY = 1;
+ private static final int ACTION_RENT = 2;
+ private static final int ACTION_PLAY = 3;
+
@Override
public void onCreate(Bundle savedInstanceState) {
Log.i(TAG, "onCreate");
@@ -59,8 +56,24 @@ public class DetailsFragment extends android.support.v17.leanback.app.DetailsFra
DetailsOverviewRowPresenter dorPresenter =
new DetailsOverviewRowPresenter(new DetailsDescriptionPresenter());
dorPresenter.setOnActionClickedListener(new OnActionClickedListener() {
+ @Override
public void onActionClicked(Action action) {
Toast.makeText(getActivity(), action.toString(), Toast.LENGTH_SHORT).show();
+ if (action.getId() == ACTION_BUY) {
+ DetailsOverviewRow dor = new DetailsOverviewRow(mPhotoItem.getTitle() + "(Owned)");
+ dor.setImageDrawable(getResources().getDrawable(mPhotoItem.getImageResourceId()));
+ dor.addAction(new Action(ACTION_PLAY, "Play"));
+ mRowsAdapter.replace(0, dor);
+ } else if (action.getId() == ACTION_RENT) {
+ DetailsOverviewRow dor = new DetailsOverviewRow(mPhotoItem.getTitle() + "(Rented)");
+ dor.setImageDrawable(getResources().getDrawable(mPhotoItem.getImageResourceId()));
+ dor.addAction(new Action(ACTION_PLAY, "Play"));
+ dor.addAction(new Action(ACTION_BUY, "Buy $9.99"));
+ mRowsAdapter.replace(0, dor);
+ } else if (action.getId() == ACTION_PLAY) {
+ Intent intent = new Intent(getActivity(), PlaybackOverlayActivity.class);
+ getActivity().startActivity(intent);
+ }
}
});
@@ -114,10 +127,10 @@ public class DetailsFragment extends android.support.v17.leanback.app.DetailsFra
mRowsAdapter.clear();
Resources res = getActivity().getResources();
- DetailsOverviewRow dor = new DetailsOverviewRow("Details Overview");
+ DetailsOverviewRow dor = new DetailsOverviewRow(photoItem.getTitle());
dor.setImageDrawable(res.getDrawable(photoItem.getImageResourceId()));
- dor.addAction(new Action(1, "Buy $9.99"));
- dor.addAction(new Action(2, "Rent", "$3.99", res.getDrawable(R.drawable.ic_action_a)));
+ dor.addAction(new Action(ACTION_BUY, "Buy $9.99"));
+ dor.addAction(new Action(ACTION_RENT, "Rent", "$3.99", res.getDrawable(R.drawable.ic_action_a)));
mRowsAdapter.add(dor);
final CardPresenter cardPresenter = new CardPresenter();
diff --git a/samples/SupportLeanbackDemos/src/com/example/android/leanback/PhotoItem.java b/samples/SupportLeanbackDemos/src/com/example/android/leanback/PhotoItem.java
index be3c8a6b1..adde7d350 100644
--- a/samples/SupportLeanbackDemos/src/com/example/android/leanback/PhotoItem.java
+++ b/samples/SupportLeanbackDemos/src/com/example/android/leanback/PhotoItem.java
@@ -19,10 +19,16 @@ import android.os.Parcelable;
public class PhotoItem implements Parcelable {
private String mTitle;
+ private String mContent;
private int mImageResourceId;
public PhotoItem(String title, int imageResourceId) {
+ this(title, null, imageResourceId);
+ }
+
+ public PhotoItem(String title, String content, int imageResourceId) {
mTitle = title;
+ mContent = content;
mImageResourceId = imageResourceId;
}
@@ -34,6 +40,10 @@ public class PhotoItem implements Parcelable {
return mTitle;
}
+ public String getContent() {
+ return mContent;
+ }
+
@Override
public String toString() {
return mTitle;
diff --git a/sdk/build_tools_source.prop_template b/sdk/build_tools_source.prop_template
index c9bfc2fe9..b465a0725 100644
--- a/sdk/build_tools_source.prop_template
+++ b/sdk/build_tools_source.prop_template
@@ -1,3 +1,3 @@
Pkg.UserSrc=false
-Pkg.Revision=${PLATFORM_SDK_VERSION}.0.2
+Pkg.Revision=${PLATFORM_SDK_VERSION}.1.0
diff --git a/sdk/support_source.prop_template b/sdk/support_source.prop_template
index f5b217eec..f89771291 100644
--- a/sdk/support_source.prop_template
+++ b/sdk/support_source.prop_template
@@ -1,5 +1,5 @@
Pkg.UserSrc=false
-Pkg.Revision=${PLATFORM_SDK_VERSION}.0.0
+Pkg.Revision=${PLATFORM_SDK_VERSION}.0.1
Extra.Vendor=android
Extra.VendorId=android
Extra.VendorDisplay=Android
diff --git a/sys-img/images_arm64-v8a_source.prop_template b/sys-img/images_arm64-v8a_source.prop_template
index 1a18cf874..0fa83e91e 100644
--- a/sys-img/images_arm64-v8a_source.prop_template
+++ b/sys-img/images_arm64-v8a_source.prop_template
@@ -1,6 +1,6 @@
Pkg.Desc=Android SDK Platform ${PLATFORM_VERSION}
Pkg.UserSrc=false
-Pkg.Revision=1
+Pkg.Revision=3
AndroidVersion.ApiLevel=${PLATFORM_SDK_VERSION}
AndroidVersion.CodeName=${PLATFORM_VERSION_CODENAME}
SystemImage.Abi=${TARGET_CPU_ABI}
diff --git a/sys-img/images_armeabi-v7a_source.prop_template b/sys-img/images_armeabi-v7a_source.prop_template
index 9c7a332a5..9def03da9 100644
--- a/sys-img/images_armeabi-v7a_source.prop_template
+++ b/sys-img/images_armeabi-v7a_source.prop_template
@@ -1,6 +1,6 @@
Pkg.Desc=Android SDK Platform ${PLATFORM_VERSION}
Pkg.UserSrc=false
-Pkg.Revision=1
+Pkg.Revision=3
AndroidVersion.ApiLevel=${PLATFORM_SDK_VERSION}
AndroidVersion.CodeName=${PLATFORM_VERSION_CODENAME}
SystemImage.Abi=armeabi-v7a
diff --git a/sys-img/images_armeabi_source.prop_template b/sys-img/images_armeabi_source.prop_template
index 91e9d212f..98281d2db 100644
--- a/sys-img/images_armeabi_source.prop_template
+++ b/sys-img/images_armeabi_source.prop_template
@@ -1,6 +1,6 @@
Pkg.Desc=Android SDK Platform ${PLATFORM_VERSION}
Pkg.UserSrc=false
-Pkg.Revision=1
+Pkg.Revision=3
AndroidVersion.ApiLevel=${PLATFORM_SDK_VERSION}
AndroidVersion.CodeName=${PLATFORM_VERSION_CODENAME}
SystemImage.Abi=armeabi
diff --git a/sys-img/images_mips_source.prop_template b/sys-img/images_mips_source.prop_template
index 78dc63f29..a53eb04e5 100644
--- a/sys-img/images_mips_source.prop_template
+++ b/sys-img/images_mips_source.prop_template
@@ -1,6 +1,6 @@
Pkg.Desc=Android SDK Platform ${PLATFORM_VERSION}
Pkg.UserSrc=false
-Pkg.Revision=1
+Pkg.Revision=3
AndroidVersion.ApiLevel=${PLATFORM_SDK_VERSION}
AndroidVersion.CodeName=${PLATFORM_VERSION_CODENAME}
SystemImage.Abi=mips
diff --git a/sys-img/images_x86_64_source.prop_template b/sys-img/images_x86_64_source.prop_template
index 1a18cf874..0fa83e91e 100644
--- a/sys-img/images_x86_64_source.prop_template
+++ b/sys-img/images_x86_64_source.prop_template
@@ -1,6 +1,6 @@
Pkg.Desc=Android SDK Platform ${PLATFORM_VERSION}
Pkg.UserSrc=false
-Pkg.Revision=1
+Pkg.Revision=3
AndroidVersion.ApiLevel=${PLATFORM_SDK_VERSION}
AndroidVersion.CodeName=${PLATFORM_VERSION_CODENAME}
SystemImage.Abi=${TARGET_CPU_ABI}
diff --git a/sys-img/images_x86_source.prop_template b/sys-img/images_x86_source.prop_template
index 1a18cf874..0fa83e91e 100644
--- a/sys-img/images_x86_source.prop_template
+++ b/sys-img/images_x86_source.prop_template
@@ -1,6 +1,6 @@
Pkg.Desc=Android SDK Platform ${PLATFORM_VERSION}
Pkg.UserSrc=false
-Pkg.Revision=1
+Pkg.Revision=3
AndroidVersion.ApiLevel=${PLATFORM_SDK_VERSION}
AndroidVersion.CodeName=${PLATFORM_VERSION_CODENAME}
SystemImage.Abi=${TARGET_CPU_ABI}