summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authord34d <clark@cyngn.com>2015-09-25 13:35:33 -0700
committerd34d <clark@cyngn.com>2015-09-25 13:35:33 -0700
commit3bfce4d4ae529ea35b72ac074c2c92defdada2f9 (patch)
tree8ef91d200c694bb307388aa5da79c5e400efe709
parent34fdc34e845ed5ad2059d546f93362dc5c75056e (diff)
downloadpackages_apps_ThemeChooser-3bfce4d4ae529ea35b72ac074c2c92defdada2f9.zip
packages_apps_ThemeChooser-3bfce4d4ae529ea35b72ac074c2c92defdada2f9.tar.gz
packages_apps_ThemeChooser-3bfce4d4ae529ea35b72ac074c2c92defdada2f9.tar.bz2
Use DialerNext icon when available
Change-Id: I68518d94664f0ab9290e1a7ffb0ca955c5dfbf3a TICKET: CYNGNOS-1096
-rw-r--r--src/com/cyngn/theme/chooser/ThemeFragment.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/com/cyngn/theme/chooser/ThemeFragment.java b/src/com/cyngn/theme/chooser/ThemeFragment.java
index bd57798..4d707d6 100644
--- a/src/com/cyngn/theme/chooser/ThemeFragment.java
+++ b/src/com/cyngn/theme/chooser/ThemeFragment.java
@@ -148,6 +148,8 @@ public class ThemeFragment extends Fragment implements LoaderManager.LoaderCallb
private static final ComponentName COMPONENT_DIALER =
new ComponentName("com.android.dialer", "com.android.dialer.DialtactsActivity");
+ private static final ComponentName COMPONENT_DIALERNEXT =
+ new ComponentName("com.cyngn.dialer", "com.cyngn.dialer.DialtactsActivity");
private static final ComponentName COMPONENT_MESSAGING =
new ComponentName("com.android.mms", "com.android.mms.ui.ConversationList");
private static final ComponentName COMPONENT_CAMERANEXT =
@@ -162,7 +164,9 @@ public class ThemeFragment extends Fragment implements LoaderManager.LoaderCallb
new ComponentName("com.android.calendar", "com.android.calendar.AllInOneActivity");
private static final ComponentName COMPONENT_GALERY =
new ComponentName("com.android.gallery3d", "com.android.gallery3d.app.GalleryActivity");
+
private static final String CAMERA_NEXT_PACKAGE = "com.cyngn.cameranext";
+ private static final String DIALER_NEXT_PACKAGE = "com.cyngn.dialer";
private static final int ADDITIONAL_CONTENT_SPACE_ID = 123456;
private static final long SLIDE_CONTENT_ANIM_DURATION = 300L;
@@ -1819,6 +1823,15 @@ public class ThemeFragment extends Fragment implements LoaderManager.LoaderCallb
if (!pm.hasSystemFeature(PackageManager.FEATURE_TELEPHONY)) {
sIconComponents[0] = COMPONENT_CALENDAR;
sIconComponents[1] = COMPONENT_GALERY;
+ } else {
+ // decide on which dialer icon to use
+ try {
+ if (pm.getPackageInfo(DIALER_NEXT_PACKAGE, 0) != null) {
+ sIconComponents[0] = COMPONENT_DIALERNEXT;
+ }
+ } catch (PackageManager.NameNotFoundException e) {
+ // default to COMPONENT_DIALER
+ }
}
if (!pm.hasSystemFeature(PackageManager.FEATURE_CAMERA)) {