From a55e5516d0f2073ede23a70c10fece977c790b31 Mon Sep 17 00:00:00 2001 From: vineel sadineni Date: Thu, 17 May 2018 16:09:35 -0700 Subject: [PATCH] Migrated various apps under development/samples/ShortcutSample to androidx Bug: 76692459 Test: mmma development/samples/ShortcutSample Change-Id: I5e2430aefe4c8f4ebcd48845393b2e845216bf2b --- samples/ShortcutSample/Android.mk | 20 ++++++++++++++----- .../example/android/shortcutsample/Main.java | 2 +- .../shortcutsample/ShortcutHelper.java | 4 ++-- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/samples/ShortcutSample/Android.mk b/samples/ShortcutSample/Android.mk index 196e7bea5..71a94c1c3 100644 --- a/samples/ShortcutSample/Android.mk +++ b/samples/ShortcutSample/Android.mk @@ -24,6 +24,8 @@ LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) +LOCAL_USE_AAPT2 := true + LOCAL_PACKAGE_NAME := ShortcutSample LOCAL_AAPT_FLAGS += --version-code 10 @@ -34,7 +36,7 @@ LOCAL_SRC_FILES := $(call all-java-files-under, src) LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res -LOCAL_STATIC_JAVA_LIBRARIES = android-support-v4 +LOCAL_STATIC_ANDROID_LIBRARIES = androidx.legacy_legacy-support-v4 LOCAL_SDK_VERSION := current @@ -46,6 +48,8 @@ include $(BUILD_PACKAGE) include $(CLEAR_VARS) +LOCAL_USE_AAPT2 := true + LOCAL_PACKAGE_NAME := ShortcutSample11 LOCAL_AAPT_FLAGS += --version-code 11 @@ -56,7 +60,7 @@ LOCAL_SRC_FILES := $(call all-java-files-under, src) LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res -LOCAL_STATIC_JAVA_LIBRARIES = android-support-v4 +LOCAL_STATIC_ANDROID_LIBRARIES = androidx.legacy_legacy-support-v4 LOCAL_SDK_VERSION := current @@ -68,6 +72,8 @@ include $(BUILD_PACKAGE) include $(CLEAR_VARS) +LOCAL_USE_AAPT2 := true + LOCAL_PACKAGE_NAME := ShortcutSample12 LOCAL_AAPT_FLAGS += --version-code 12 @@ -78,7 +84,7 @@ LOCAL_SRC_FILES := $(call all-java-files-under, src) LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res -LOCAL_STATIC_JAVA_LIBRARIES = android-support-v4 +LOCAL_STATIC_ANDROID_LIBRARIES = androidx.legacy_legacy-support-v4 LOCAL_SDK_VERSION := current @@ -90,6 +96,8 @@ include $(BUILD_PACKAGE) include $(CLEAR_VARS) +LOCAL_USE_AAPT2 := true + LOCAL_PACKAGE_NAME := ShortcutSample11nb LOCAL_AAPT_FLAGS += --version-code 11 @@ -101,7 +109,7 @@ LOCAL_SRC_FILES := $(call all-java-files-under, src) LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res -LOCAL_STATIC_JAVA_LIBRARIES = android-support-v4 +LOCAL_STATIC_ANDROID_LIBRARIES = androidx.legacy_legacy-support-v4 LOCAL_SDK_VERSION := current @@ -113,6 +121,8 @@ include $(BUILD_PACKAGE) include $(CLEAR_VARS) +LOCAL_USE_AAPT2 := true + LOCAL_PACKAGE_NAME := ShortcutSample12nb LOCAL_AAPT_FLAGS += --version-code 12 @@ -124,7 +134,7 @@ LOCAL_SRC_FILES := $(call all-java-files-under, src) LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res -LOCAL_STATIC_JAVA_LIBRARIES = android-support-v4 +LOCAL_STATIC_ANDROID_LIBRARIES = androidx.legacy_legacy-support-v4 LOCAL_SDK_VERSION := current diff --git a/samples/ShortcutSample/src/com/example/android/shortcutsample/Main.java b/samples/ShortcutSample/src/com/example/android/shortcutsample/Main.java index 679994fc5..b40d465ab 100644 --- a/samples/ShortcutSample/src/com/example/android/shortcutsample/Main.java +++ b/samples/ShortcutSample/src/com/example/android/shortcutsample/Main.java @@ -24,7 +24,7 @@ import android.content.pm.ShortcutInfo; import android.content.pm.ShortcutManager; import android.os.AsyncTask; import android.os.Bundle; -import android.support.v4.content.pm.ShortcutManagerCompat; +import androidx.core.content.pm.ShortcutManagerCompat; import android.util.ArraySet; import android.util.Log; import android.view.LayoutInflater; diff --git a/samples/ShortcutSample/src/com/example/android/shortcutsample/ShortcutHelper.java b/samples/ShortcutSample/src/com/example/android/shortcutsample/ShortcutHelper.java index a708e6976..5a9283d87 100644 --- a/samples/ShortcutSample/src/com/example/android/shortcutsample/ShortcutHelper.java +++ b/samples/ShortcutSample/src/com/example/android/shortcutsample/ShortcutHelper.java @@ -25,8 +25,8 @@ import android.graphics.drawable.Icon; import android.net.Uri; import android.os.AsyncTask; import android.os.PersistableBundle; -import android.support.v4.content.pm.ShortcutInfoCompat; -import android.support.v4.content.pm.ShortcutManagerCompat; +import androidx.core.content.pm.ShortcutInfoCompat; +import androidx.core.content.pm.ShortcutManagerCompat; import android.util.Log; import java.io.BufferedInputStream;