Remove FeatureHighlight lib from AOSP contacts.
BUG 31039865
Change-Id: Iddbd3e62bcaf62f16ace928058297d7dac9c4a47
diff --git a/Android.mk b/Android.mk
index b19df65..2ed0e69 100644
--- a/Android.mk
+++ b/Android.mk
@@ -27,14 +27,11 @@
--auto-add-overlay \
--extra-packages com.android.contacts.common \
--extra-packages com.android.phone.common \
- --extra-packages com.google.android.libraries.material.featurehighlight \
--extra-packages android.support.design \
--extra-packages android.support.v7.appcompat \
--extra-packages android.support.v7.cardview \
--extra-packages android.support.v7.recyclerview
-LOCAL_STATIC_JAVA_AAR_LIBRARIES := aar_feature_highlight
-
LOCAL_STATIC_JAVA_LIBRARIES := \
android-common \
android-support-design \
@@ -46,13 +43,7 @@
android-support-v4 \
com.android.vcard \
guava \
- libphonenumber \
- lib_animation \
- lib_math \
- lib_navigation_finder \
- lib_path \
- lib_util_objects \
- lib_util_preconditions
+ libphonenumber
LOCAL_PACKAGE_NAME := Contacts
LOCAL_CERTIFICATE := shared
@@ -65,21 +56,5 @@
include $(BUILD_PACKAGE)
-#########################################################################################
-
-include $(CLEAR_VARS)
-# Import FeatureHighlight aar and its dependencies.
-LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := aar_feature_highlight:libs/featurehighlight.aar \
- lib_animation:libs/libanimation.jar \
- lib_math:libs/libmath.jar \
- lib_navigation_finder:libs/libappcompat.jar \
- lib_path:libs/libpath.jar \
- lib_util_objects:libs/libutil_Objects.jar \
- lib_util_preconditions:libs/libutil_Preconditions.jar
-
-include $(BUILD_MULTI_PREBUILT)
-
-#########################################################################################
-
# Use the following include to make our test apk.
include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/libs/README.txt b/libs/README.txt
deleted file mode 100644
index 6232d95..0000000
--- a/libs/README.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-featurehighlight.aar was generated from google3:
-blaze build java/com/google/android/libraries/material/featurehighlight:featurehighlight.aar
-
-Other libs are dependencies of featurehighlight.aar:
-blaze build java/com/google/android/libraries/material/featurehighlight/appcompat:appcompat for libappcompat.jar
-blaze build java/com/google/android/libraries/material/animation:animation for libanimation.jar
-blaze build java/com/google/android/libraries/stitch/util:util for libutil_Objects.jar and libutil_Preconditions.jar
-blaze build java/com/google/android/libraries/material/math:math for libmath.jar
-blaze build java/com/google/android/libraries/material/path:path for libpath.jar
diff --git a/libs/featurehighlight.aar b/libs/featurehighlight.aar
deleted file mode 100644
index 5497f57..0000000
--- a/libs/featurehighlight.aar
+++ /dev/null
Binary files differ
diff --git a/libs/libanimation.jar b/libs/libanimation.jar
deleted file mode 100644
index 868ffff..0000000
--- a/libs/libanimation.jar
+++ /dev/null
Binary files differ
diff --git a/libs/libappcompat.jar b/libs/libappcompat.jar
deleted file mode 100644
index 1cff196..0000000
--- a/libs/libappcompat.jar
+++ /dev/null
Binary files differ
diff --git a/libs/libmath.jar b/libs/libmath.jar
deleted file mode 100644
index cec2e2a..0000000
--- a/libs/libmath.jar
+++ /dev/null
Binary files differ
diff --git a/libs/libpath.jar b/libs/libpath.jar
deleted file mode 100644
index cb31ec0..0000000
--- a/libs/libpath.jar
+++ /dev/null
Binary files differ
diff --git a/libs/libutil_Objects.jar b/libs/libutil_Objects.jar
deleted file mode 100644
index d55a3e9..0000000
--- a/libs/libutil_Objects.jar
+++ /dev/null
Binary files differ
diff --git a/libs/libutil_Preconditions.jar b/libs/libutil_Preconditions.jar
deleted file mode 100644
index 0f27ae2..0000000
--- a/libs/libutil_Preconditions.jar
+++ /dev/null
Binary files differ
diff --git a/src-bind/com/android/contactsbind/FeatureHighlightHelper.java b/src-bind/com/android/contactsbind/FeatureHighlightHelper.java
new file mode 100644
index 0000000..c246141
--- /dev/null
+++ b/src-bind/com/android/contactsbind/FeatureHighlightHelper.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2016 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 com.android.contactsbind;
+
+import android.support.v4.app.FragmentActivity;
+
+public final class FeatureHighlightHelper {
+
+ private FeatureHighlightHelper () {
+ }
+
+ public static boolean showHamburgerFeatureHighlight(final FragmentActivity activity) {
+ return false;
+ }
+}
diff --git a/src/com/android/contacts/activities/ActionBarAdapter.java b/src/com/android/contacts/activities/ActionBarAdapter.java
index b896406..9d7907d 100644
--- a/src/com/android/contacts/activities/ActionBarAdapter.java
+++ b/src/com/android/contacts/activities/ActionBarAdapter.java
@@ -50,8 +50,6 @@
import com.android.contacts.activities.ActionBarAdapter.Listener.Action;
import com.android.contacts.common.compat.CompatUtils;
import com.android.contacts.list.ContactsRequest;
-import com.google.android.libraries.material.featurehighlight.FeatureHighlight;
-import com.google.android.libraries.material.featurehighlight.appcompat.ToolbarNavigationIconFinder;
import java.util.ArrayList;
@@ -122,8 +120,6 @@
private int mSearchHintResId;
- private FeatureHighlight mHamburgerFeatureHighlight;
-
private ValueAnimator mStatusBarAnimator;
public interface TabState {
@@ -260,7 +256,6 @@
if (mSearchMode && !TextUtils.isEmpty(mQueryString)) {
setQueryString(mQueryString);
}
- addHamburgerFeatureHighlight();
}
public void setListener(Listener listener) {
@@ -435,25 +430,6 @@
}
}
- private void addHamburgerFeatureHighlight() {
- if (mHamburgerFeatureHighlight == null) {
- mHamburgerFeatureHighlight = FeatureHighlight.Builder
- .forView(new ToolbarNavigationIconFinder())
- .setHeader(mActivity.getResources().getString(
- R.string.hamburger_feature_highlight_header))
- .setBody(mActivity.getResources().getString(
- R.string.hamburger_feature_highlight_body))
- .setTargetDrawable(
- R.drawable.ic_menu_hamburger,
- ContextCompat.getColor(mActivity, R.color.primary_color))
- .build();
- }
- }
-
- public FeatureHighlight getHamburgerFeatureHighlight() {
- return mHamburgerFeatureHighlight;
- }
-
private void update(boolean skipAnimation) {
updateOverflowButtonColor();
diff --git a/src/com/android/contacts/activities/PeopleActivity.java b/src/com/android/contacts/activities/PeopleActivity.java
index 5f53396..492cd8b 100644
--- a/src/com/android/contacts/activities/PeopleActivity.java
+++ b/src/com/android/contacts/activities/PeopleActivity.java
@@ -97,7 +97,7 @@
import com.android.contacts.util.DialogManager;
import com.android.contacts.util.SharedPreferenceUtil;
import com.android.contacts.widget.FloatingActionButtonBehavior;
-import com.google.android.libraries.material.featurehighlight.FeatureHighlight;
+import com.android.contactsbind.FeatureHighlightHelper;
import java.util.List;
import java.util.Locale;
@@ -257,10 +257,7 @@
private void maybeShowHamburgerFeatureHighlight() {
if (!mActionBarAdapter.isSearchMode() && !mActionBarAdapter.isSelectionMode()
&& SharedPreferenceUtil.getShouldShowHamburgerPromo(this)) {
- final FeatureHighlight hamburgerFeatureHighlight =
- mActionBarAdapter.getHamburgerFeatureHighlight();
- if (hamburgerFeatureHighlight != null) {
- hamburgerFeatureHighlight.show(this);
+ if (FeatureHighlightHelper.showHamburgerFeatureHighlight(this)) {
SharedPreferenceUtil.setHamburgerPromoDisplayedBefore(this);
}
}