From 86a6430e526efc9656c539f9d7e5dea34219ef44 Mon Sep 17 00:00:00 2001 From: Kenny Guy Date: Fri, 25 Apr 2014 20:48:32 +0100 Subject: [PATCH] Provide access to ActivityInfo.name from LauncherActivityInfo Change-Id: Ia34900f3e232b59f3879dbb3cb3131498023b8ac --- api/current.txt | 1 + core/java/android/content/pm/LauncherActivityInfo.java | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/api/current.txt b/api/current.txt index 81362f17ce17a..2a7432eb8987c 100644 --- a/api/current.txt +++ b/api/current.txt @@ -7735,6 +7735,7 @@ package android.content.pm { method public long getFirstInstallTime(); method public android.graphics.drawable.Drawable getIcon(int); method public java.lang.CharSequence getLabel(); + method public java.lang.String getName(); method public android.os.UserHandle getUser(); } diff --git a/core/java/android/content/pm/LauncherActivityInfo.java b/core/java/android/content/pm/LauncherActivityInfo.java index 92b91468d12d4..6bf36389b9f51 100644 --- a/core/java/android/content/pm/LauncherActivityInfo.java +++ b/core/java/android/content/pm/LauncherActivityInfo.java @@ -120,6 +120,14 @@ public class LauncherActivityInfo { return mFirstInstallTime; } + /** + * Returns the name for the acitivty from android:name in the manifest. + * @return the name from android:name for the acitivity. + */ + public String getName() { + return mActivityInfo.name; + } + /** * Returns the activity icon with badging appropriate for the profile. * @param density Optional density for the icon, or 0 to use the default density.