diff --git a/AnalyticsInterface/src/main/java/com/amazon/analytics/AnalyticsConstants.java b/AnalyticsInterface/src/main/java/com/amazon/analytics/AnalyticsConstants.java deleted file mode 100644 index 9104d74..0000000 --- a/AnalyticsInterface/src/main/java/com/amazon/analytics/AnalyticsConstants.java +++ /dev/null @@ -1,185 +0,0 @@ -/** - * Copyright 2015-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0/ - * - * or in the "license" file accompanying this file. This file 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. - */ -package com.amazon.analytics; - -import java.util.HashMap; -import java.util.Map; - -/** - * This class defines a set of constants that are used to pass data between the app and the - * interface implementation. The constants describe different actions, attributes, metrics, - * and screens. - */ -public class AnalyticsConstants { - - /** - * An action is performed by the end user. - */ - public static final String ACTION_NAME = "action"; - - /** - * Attributes describe specific aspects of an action. - */ - public static final String ATTRIBUTES = "attributes"; - - /** - * Metrics describe specific values that are related to an action. - */ - public static final String METRICS = "metrics"; - - /** - * To be used for configuration values. - */ - public Map config = new HashMap<>(); - - /** - * Action and attributes for when app starts. - */ - public static final String ACTION_START_APP = "App Start"; - public static final String ATTRIBUTE_APP_NAME = "App"; - public static final String ATTRIBUTE_MINUTE = "Minute"; - public static final String ATTRIBUTE_HOUR = "Hour"; - public static final String ATTRIBUTE_DAY = "Day"; - public static final String ATTRIBUTE_DATE = "Date"; - public static final String ATTRIBUTE_PLATFORM = "Platform"; - - /** - * Search action and attribute. - */ - public static final String ACTION_SEARCH = "Search"; - public static final String ATTRIBUTE_SEARCH_TERM = "Term"; - - /** - * Error action and attribute. - */ - public static final String ACTION_ERROR = "Error"; - public static final String ATTRIBUTE_ERROR_MSG = "Message"; - - /** - * Play video action and attributes. - */ - public static final String ACTION_PLAY_VIDEO = "Play"; - public static final String ATTRIBUTE_PLAY_SOURCE = "Playback Source"; - - /** - * Purchase initiated action and attributes - */ - public static final String ACTION_PURCHASE_INITIATED = "Purchase Initiated"; - public static final String ATTRIBUTE_PURCHASE_TYPE = "Purchase Type"; - - /** - * Purchase completed action and attributes - */ - public static final String ACTION_PURCHASE_COMPLETE = "Purchase Complete"; - public static final String ATTRIBUTE_PURCHASE_RESULT = "Purchase Result"; - public static final String ATTRIBUTE_PURCHASE_SKU = "Purchase SKU"; - - /** - * Common Video attributes - */ - public static final String ATTRIBUTE_TITLE = "Title"; - public static final String ATTRIBUTE_SUBTITLE = "Subtitle"; - public static final String ATTRIBUTE_VIDEO_TYPE = "Type"; - public static final String ATTRIBUTE_VIDEO_ID = "Video ID"; - - /** - * Common Ad attributes - */ - public static final String ATTRIBUTE_AD_ID = "Ad ID"; - - /** - * Playback and ad ended attributes. - */ - public static final String ATTRIBUTE_AD_SECONDS_WATCHED = "Ad Seconds"; - public static final String ATTRIBUTE_VIDEO_SECONDS_WATCHED = "Video Seconds"; - - /** - * Actions for ad start and completion. - */ - public static final String ACTION_AD_START = "Ad Start"; - public static final String ACTION_AD_COMPLETE = "Ad Complete"; - - /** - * Action for rewinding video. - */ - public static final String ACTION_PLAYBACK_CONTROL_REWIND = "Playback Control Rewind"; - - /** - * Action for fast forwarding video. - */ - public static final String ACTION_PLAYBACK_CONTROL_FF = "Playback Control Forward"; - - /** - * Action for going to previous video. - */ - public static final String ACTION_PLAYBACK_CONTROL_PRE = "Playback Control Previous"; - - /** - * Action for going to next video. - */ - public static final String ACTION_PLAYBACK_CONTROL_NEXT = "Playback Control Next"; - - /** - * Action for pausing video playback. - */ - public static final String ACTION_PLAYBACK_CONTROL_PAUSE = "Playback Control Pause"; - - /** - * Action for playing video playback. - */ - public static final String ACTION_PLAYBACK_CONTROL_PLAY = "Playback Control Play"; - - /** - * Action for toggling CC. - */ - public static final String ACTION_PLAYBACK_CONTROL_TOGGLE_CC = "Playback Control Toggle CC"; - - /** - * Action for multi actions. - */ - public static final String ACTION_PLAYBACK_CONTROL_MULTI_ACTION = "Playback Control Multi " + - "Action"; - - /** - * Action for finishing video playback. - */ - public static final String ACTION_PLAYBACK_FINISHED = "Playback Finished"; - - /** - * Action for clicking recommended content - */ - public static final String ACTION_RECOMMENDED_CONTENT_CLICKED = "Recommended Movie Clicked"; - - /** - * Action for authentication login and attributes. - */ - public static String ACTION_LOGIN = "Login"; - public static String ATTRIBUTE_ADOBE_PASS_NETWORK = "Network"; - public static String ATTRIBUTE_ADOBE_PASS_MVPD = "MVPD"; - public static String ATTRIBUTE_ADOBE_PASS_AUTHENTICATION_STATUS = "Authentication"; - public static String ATTRIBUTE_ADOBE_PASS_AUTHORIZATION_STATUS = "Authorization"; - public static String ATTRIBUTE_ADOBE_PASS_USER_ID = "User ID"; - - /** - * Screen names. - */ - public static final String SCREEN_BROWSE = "BROWSE"; - public static final String SCREEN_SPLASH = "SPLASH"; - public static final String SCREEN_DETAILS = "DETAILS"; - public static final String SCREEN_PLAYBACK = "PLAYBACK"; - public static final String SCREEN_ERROR = "ERROR"; - public static final String SCREEN_AUTH = "AUTHENTICATION"; - public static final String SCREEN_SEARCH = "SEARCH"; -} diff --git a/Application/app/src/androidTest/java/performance/PerformanceTest.java b/Application/app/src/androidTest/java/performance/PerformanceTest.java deleted file mode 100644 index 6409909..0000000 --- a/Application/app/src/androidTest/java/performance/PerformanceTest.java +++ /dev/null @@ -1,73 +0,0 @@ -/** - * Copyright 2015-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0/ - * - * or in the "license" file accompanying this file. This file 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. - */ - -package performance; - -import com.amazon.android.tv.tenfoot.ui.activities.SplashActivity; -import com.robotium.solo.Solo; - -import android.test.ActivityInstrumentationTestCase2; -import android.util.Log; - -import com.amazon.android.tv.tenfoot.R; - -/** - * This is a test case for measuring performance data. - */ -public class PerformanceTest extends ActivityInstrumentationTestCase2 { - - private Solo solo; - - private final String TAG = PerformanceTest.class.getName(); - - // allow 15 seconds for app to initialize; it can take this long - // in the event of a slow network connection - final int SPLASH_LOAD_TIME_LIMIT_MS = 15000; - long startTime; - - public PerformanceTest() { - - super(SplashActivity.class); - } - - @Override - public void setUp() throws Exception { - - solo = new Solo(getInstrumentation(), getActivity()); - startTime = System.currentTimeMillis(); - } - - @Override - public void tearDown() throws Exception { - - solo.finishOpenedActivities(); - } - - /** - * Check time it takes for main Activity to load - */ - public void testPerformanceSplashScreen() { - - solo.waitForView(R.id.full_content_browse_fragment); - int loadTime = (int) (System.currentTimeMillis() - startTime); - Log.d(TAG, "Loading time: " + loadTime + " ms"); - if (loadTime > SPLASH_LOAD_TIME_LIMIT_MS) { - Log.w(TAG, "Splash screen took longer to load than " + SPLASH_LOAD_TIME_LIMIT_MS - + " ms"); - } - } - - -} diff --git a/Application/app/src/main/assets/GenericMediaData.xml b/Application/app/src/main/assets/GenericMediaData.xml deleted file mode 100644 index 9ac9db3..0000000 --- a/Application/app/src/main/assets/GenericMediaData.xml +++ /dev/null @@ -1,108 +0,0 @@ - - - - - Generic mrss feed - http://www.developer.amazon.com/ - Generic mrss data - - 1 - Nullamtus - http://www.developer.amazon.com/ - Wed, 14 Jan 2015 00:36:00 +0000 - Sed a sagittis urna, a fermentum ligula. In sagittis sagittis libero, ut tincidunt sapien egestas. - https://raw.githubusercontent.com/amzn/web-app-starter-kit-for-fire-tv/master/src/common/assets/images/l1.jpg - Lifestyle - - - 2 - Ut at augue - http://www.developer.amazon.com/ - Wed, 14 Jan 2015 00:36:00 +0000 - Phasellus vulputate tellus vitae volutpat viverra. Praesent posuere rutrum erat nec suscipit. Fusce interdum porta porta. Integer vulputate malesuada dictum. - https://raw.githubusercontent.com/amzn/web-app-starter-kit-for-fire-tv/master/src/common/assets/images/l2.jpg - Travel - - - 3 - Quisque porttitor augue - http://www.developer.amazon.com/ - Wed, 14 Jan 2015 00:36:00 +0000 - Pellentesque vel metus sem. Aenean porta elementum sagittis. - https://raw.githubusercontent.com/amzn/web-app-starter-kit-for-fire-tv/master/src/common/assets/images/l3.jpg - Sports - - - 4 - Nullam leo lectus - http://www.developer.amazon.com/ - Wed, 14 Jan 2015 00:36:00 +0000 - Sed a sagittis urna, a fermentum ligula. In sagittis sagittis libero, ut tincidunt sapien egestas. - https://raw.githubusercontent.com/amzn/web-app-starter-kit-for-fire-tv/master/src/common/assets/images/l4.jpg - Travel - - - 5 - Quisque porttitor augue - http://www.developer.amazon.com/ - Wed, 14 Jan 2015 00:36:00 +0000 - Phasellus vulputate tellus vitae volutpat viverra. Praesent posuere rutrum erat nec suscipit. Fusce interdum porta porta. Integer vulputate malesuada dictum. - https://raw.githubusercontent.com/amzn/web-app-starter-kit-for-fire-tv/master/src/common/assets/images/l5.jpg - Sports - - - 6 - Ut at augue - http://www.developer.amazon.com/ - Wed, 14 Jan 2015 00:36:00 +0000 - Pellentesque vel metus sem. Aenean porta elementum sagittis. - https://raw.githubusercontent.com/amzn/web-app-starter-kit-for-fire-tv/master/src/common/assets/images/l6.jpg - Travel - - - 7 - Nullam leo lectus - http://www.developer.amazon.com/ - Wed, 14 Jan 2015 00:36:00 +0000 - Phasellus vulputate tellus vitae volutpat viverra. Praesent posuere rutrum erat nec suscipit. Fusce interdum porta porta. Integer vulputate malesuada dictum. - https://raw.githubusercontent.com/amzn/web-app-starter-kit-for-fire-tv/master/src/common/assets/images/l7.jpg - Lifestyle - - - 8 - Nullamtus - http://www.developer.amazon.com/ - Wed, 14 Jan 2015 00:36:00 +0000 - Sed a sagittis urna, a fermentum ligula. In sagittis sagittis libero, ut tincidunt sapien egestas. - https://raw.githubusercontent.com/amzn/web-app-starter-kit-for-fire-tv/master/src/common/assets/images/l8.jpg - Lifestyle - - - 9 - Quisque porttitor augue - http://www.developer.amazon.com/ - Wed, 14 Jan 2015 00:36:00 +0000 - Pellentesque vel metus sem. Aenean porta elementum sagittis. - https://raw.githubusercontent.com/amzn/web-app-starter-kit-for-fire-tv/master/src/common/assets/images/l9.jpg - Sports - - - 10 - Ut at augue - http://www.developer.amazon.com/ - Wed, 14 Jan 2015 00:36:00 +0000 - Phasellus vulputate tellus vitae volutpat viverra. Praesent posuere rutrum erat nec suscipit. Fusce interdum porta porta. Integer vulputate malesuada dictum. - https://raw.githubusercontent.com/amzn/web-app-starter-kit-for-fire-tv/master/src/common/assets/images/l10.jpg - Travel - - - 11 - Nullam leo lectus - http://www.developer.amazon.com/ - Wed, 14 Jan 2015 00:36:00 +0000 - Pellentesque vel metus sem. Aenean porta elementum sagittis. - https://raw.githubusercontent.com/amzn/web-app-starter-kit-for-fire-tv/master/src/common/assets/images/l11.jpg - Lifestyle - - - \ No newline at end of file diff --git a/Application/app/src/main/assets/recipes/GenericMediaDataRecipe.json b/Application/app/src/main/assets/recipes/GenericMediaDataRecipe.json deleted file mode 100644 index ceebbac..0000000 --- a/Application/app/src/main/assets/recipes/GenericMediaDataRecipe.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "cooker": "DynamicParser", - "format": "xml", - "model": "com.amazon.android.model.content.Content", - "translator": "ContentTranslator", - "modelType": "array", - "query": "rss/channel/item", - "matchList": [ - "title/#text@title", - "id/#text@id", - "description/#text@description", - "image/#text@url", - "image/#text@cardImageUrl", - "image/#text@backgroundImageUrl" - ] -} \ No newline at end of file diff --git a/Application/app/src/main/assets/recipes/LightCastDataLoaderRecipe2.json b/Application/app/src/main/assets/recipes/LightCastDataLoaderRecipe2.json deleted file mode 100644 index af1a152..0000000 --- a/Application/app/src/main/assets/recipes/LightCastDataLoaderRecipe2.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "task": "load_data", - "url_generator": { - "url_index": "1" - } -} \ No newline at end of file diff --git a/ContentBrowser/src/main/res/drawable-mdpi/ic_login_logout.png b/ContentBrowser/src/main/res/drawable-mdpi/ic_login_logout.png deleted file mode 100644 index adf9040..0000000 Binary files a/ContentBrowser/src/main/res/drawable-mdpi/ic_login_logout.png and /dev/null differ diff --git a/LoggerAnalyticsComponent/src/main/java/com/amazon/analytics/logger/testresources/SampleActivity.java b/LoggerAnalyticsComponent/src/main/java/com/amazon/analytics/logger/testresources/SampleActivity.java deleted file mode 100644 index d72d71f..0000000 --- a/LoggerAnalyticsComponent/src/main/java/com/amazon/analytics/logger/testresources/SampleActivity.java +++ /dev/null @@ -1,31 +0,0 @@ -/** - * Copyright 2015-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0/ - * - * or in the "license" file accompanying this file. This file 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. - */ - -package com.amazon.analytics.logger.testresources; - -import android.app.Activity; -import android.os.Bundle; - -/** - * Sample Activity used for testing - */ -public class SampleActivity extends Activity { - - @Override - protected void onCreate(Bundle savedInstanceState) { - - super.onCreate(savedInstanceState); - } -} diff --git a/TVUIComponent/lib/src/main/java/android/support/v17/leanback/app/CardPresenter.java b/TVUIComponent/lib/src/main/java/android/support/v17/leanback/app/CardPresenter.java deleted file mode 100644 index 56aebc2..0000000 --- a/TVUIComponent/lib/src/main/java/android/support/v17/leanback/app/CardPresenter.java +++ /dev/null @@ -1,168 +0,0 @@ -/** - * This file was modified by Amazon: - * Copyright 2015-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0/ - * - * or in the "license" file accompanying this file. This file 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. - */ -/* - * Copyright (C) 2015 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. - */ -package android.support.v17.leanback.app; - -import com.amazon.android.model.content.Content; -import com.amazon.android.model.content.ContentContainer; -import com.amazon.android.tv.tenfoot.R; -import com.amazon.android.utils.Helpers; -import com.bumptech.glide.Glide; - -import android.content.Context; -import android.content.res.Resources; -import android.graphics.drawable.ColorDrawable; -import android.graphics.drawable.Drawable; -import android.support.v17.leanback.widget.BaseCardView; -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.View; -import android.view.ViewGroup; -import android.widget.TextView; - -// TODO: this file will be removed when we get fragment injection for UAMP in. This will be in -// sync with {@link CardPresenter} -/** - * A CardPresenter is used to generate Views and bind Objects to them on demand. - * It contains an ImageCardView. - */ -public class CardPresenter extends Presenter { - - private static final String TAG = "CardPresenter"; - - private int mCardWidthDp; - private int mCardHeightDp; - - private Drawable mDefaultCardImage; - private static Drawable sFocusedFadeMask; - private View mInfoField; - - /** - * {@inheritDoc} - */ - @Override - public ViewHolder onCreateViewHolder(ViewGroup parent) { - - Context context = parent.getContext(); - try { - mDefaultCardImage = new ColorDrawable(0x00000000); - sFocusedFadeMask = new ColorDrawable(0x00000000); - } - catch (Resources.NotFoundException e) { - Log.e(TAG, "Could not find resource ", e); - throw e; - } - - ImageCardView cardView = new ImageCardView(context) { - @Override - public void setSelected(boolean selected) { - super.setSelected(selected); - if (mInfoField != null) { - mInfoField.setBackground(sFocusedFadeMask); - } - } - }; - cardView.setFocusable(true); - cardView.setFocusableInTouchMode(true); - - // Set the type and visibility of the info area. - cardView.setCardType(BaseCardView.CARD_TYPE_INFO_OVER); - cardView.setInfoVisibility(BaseCardView.CARD_REGION_VISIBLE_ALWAYS); - - int CARD_WIDTH_PX = 160; - mCardWidthDp = Helpers.convertPixelToDp(context, CARD_WIDTH_PX); - - int CARD_HEIGHT_PX = 120; - mCardHeightDp = Helpers.convertPixelToDp(context, CARD_HEIGHT_PX); - - TextView subtitle = (TextView) cardView.findViewById(R.id.content_text); - if (subtitle != null) { - subtitle.setEllipsize(TextUtils.TruncateAt.END); - } - - mInfoField = cardView.findViewById(R.id.info_field); - if (mInfoField != null) { - mInfoField.setBackground(sFocusedFadeMask); - } - - return new ViewHolder(cardView); - } - - /** - * {@inheritDoc} - */ - @Override - public void onBindViewHolder(ViewHolder viewHolder, Object item) { - - ImageCardView cardView = (ImageCardView) viewHolder.view; - - if (item instanceof Content) { - Content content = (Content) item; - - if (content.getCardImageUrl() != null) { - if (content.getSubtitle() != null) { - // The word 'Title' is not logically correct in setTitleText, the 'TitleText' - // is actually smaller text compared to 'ContentText', so we are using - // TitleText to show subtitle and ContentText to show the actual Title. - cardView.setTitleText(content.getSubtitle()); - } - - cardView.setContentText(content.getTitle()); - cardView.setMainImageDimensions(mCardWidthDp, mCardHeightDp); - Glide.with(viewHolder.view.getContext()) - .load(content.getCardImageUrl()) - .centerCrop() - .error(mDefaultCardImage) - .into(cardView.getMainImageView()); - } - } - else if (item instanceof ContentContainer) { - ContentContainer contentContainer = (ContentContainer) item; - cardView.setContentText(contentContainer.getName()); - cardView.setMainImageDimensions(mCardWidthDp, mCardHeightDp); - cardView.getMainImageView().setImageDrawable(mDefaultCardImage); - } - } - - /** - * {@inheritDoc} - */ - @Override - public void onUnbindViewHolder(ViewHolder viewHolder) { - - ImageCardView cardView = (ImageCardView) viewHolder.view; - // Remove references to images so that the garbage collector can free up memory. - cardView.setBadgeImage(null); - cardView.setMainImage(null); - } -} - diff --git a/TVUIComponent/lib/src/main/res/drawable-hdpi/default_background.xml b/TVUIComponent/lib/src/main/res/drawable-hdpi/default_background.xml deleted file mode 100644 index dbd619c..0000000 --- a/TVUIComponent/lib/src/main/res/drawable-hdpi/default_background.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - diff --git a/TVUIComponent/lib/src/main/res/drawable-xhdpi/default_background.xml b/TVUIComponent/lib/src/main/res/drawable-xhdpi/default_background.xml deleted file mode 100644 index dbd619c..0000000 --- a/TVUIComponent/lib/src/main/res/drawable-xhdpi/default_background.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - diff --git a/TVUIComponent/lib/src/main/res/layout/lb_search_orb.xml b/TVUIComponent/lib/src/main/res/layout/lb_search_orb.xml deleted file mode 100644 index fc69a67..0000000 --- a/TVUIComponent/lib/src/main/res/layout/lb_search_orb.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - -