summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authord34d <clark@cyngn.com>2015-11-05 13:21:43 -0800
committerd34d <clark@cyngn.com>2015-11-05 13:22:15 -0800
commit4b847d1262bd0f3038a2cdee8c9743c56bb0b803 (patch)
tree5aa6823d06b1e3f8de701157909846f666f3e9cd /src
parent22b8c53850bb9839723e51e898ab25c0b4421474 (diff)
downloadpackages_apps_ThemeChooser-4b847d1262bd0f3038a2cdee8c9743c56bb0b803.tar.gz
packages_apps_ThemeChooser-4b847d1262bd0f3038a2cdee8c9743c56bb0b803.tar.bz2
packages_apps_ThemeChooser-4b847d1262bd0f3038a2cdee8c9743c56bb0b803.zip
Revert "Add live lock screen support for dogefood"
This reverts commit 590804752bc280f2905b3bf86b49e467fd0fd610. Change-Id: Ifc42fe865677179d6570d457242c6ee469947afc
Diffstat (limited to 'src')
-rw-r--r--src/com/cyngn/theme/chooser/ChooserActivity.java3
-rw-r--r--src/com/cyngn/theme/chooser/ComponentSelector.java24
-rw-r--r--src/com/cyngn/theme/chooser/ThemeFragment.java51
-rw-r--r--src/com/cyngn/theme/util/CursorLoaderHelper.java23
4 files changed, 3 insertions, 98 deletions
diff --git a/src/com/cyngn/theme/chooser/ChooserActivity.java b/src/com/cyngn/theme/chooser/ChooserActivity.java
index b395ecc..c851abe 100644
--- a/src/com/cyngn/theme/chooser/ChooserActivity.java
+++ b/src/com/cyngn/theme/chooser/ChooserActivity.java
@@ -65,7 +65,6 @@ import java.util.Map;
import static android.provider.ThemesContract.ThemesColumns.MODIFIES_ALARMS;
import static android.provider.ThemesContract.ThemesColumns.MODIFIES_BOOT_ANIM;
-import static android.provider.ThemesContract.ThemesColumns.MODIFIES_LIVE_LOCK_SCREEN;
import static android.provider.ThemesContract.ThemesColumns.MODIFIES_NOTIFICATIONS;
import static android.provider.ThemesContract.ThemesColumns.MODIFIES_RINGTONES;
@@ -507,7 +506,7 @@ public class ChooserActivity extends FragmentActivity
final Resources res = getResources();
int itemsPerPage = res.getInteger(R.integer.default_items_per_page);
int height = res.getDimensionPixelSize(R.dimen.component_selection_cell_height);
- if (MODIFIES_BOOT_ANIM.equals(component) || MODIFIES_LIVE_LOCK_SCREEN.equals(component)) {
+ if (MODIFIES_BOOT_ANIM.equals(component)) {
itemsPerPage = res.getInteger(R.integer.bootani_items_per_page);
height = res.getDimensionPixelSize(
R.dimen.component_selection_cell_height_boot_anim);
diff --git a/src/com/cyngn/theme/chooser/ComponentSelector.java b/src/com/cyngn/theme/chooser/ComponentSelector.java
index 9f63344..1898a94 100644
--- a/src/com/cyngn/theme/chooser/ComponentSelector.java
+++ b/src/com/cyngn/theme/chooser/ComponentSelector.java
@@ -50,7 +50,6 @@ import com.cyngn.theme.util.Utils;
import static android.provider.ThemesContract.ThemesColumns.MODIFIES_ALARMS;
import static android.provider.ThemesContract.ThemesColumns.MODIFIES_BOOT_ANIM;
import static android.provider.ThemesContract.ThemesColumns.MODIFIES_LAUNCHER;
-import static android.provider.ThemesContract.ThemesColumns.MODIFIES_LIVE_LOCK_SCREEN;
import static android.provider.ThemesContract.ThemesColumns.MODIFIES_LOCKSCREEN;
import static android.provider.ThemesContract.ThemesColumns.MODIFIES_NOTIFICATIONS;
import static android.provider.ThemesContract.ThemesColumns.MODIFIES_OVERLAYS;
@@ -60,7 +59,6 @@ import static android.provider.ThemesContract.ThemesColumns.MODIFIES_NAVIGATION_
import static android.provider.ThemesContract.ThemesColumns.MODIFIES_ICONS;
import static android.provider.ThemesContract.ThemesColumns.MODIFIES_FONTS;
-import static com.cyngn.theme.util.CursorLoaderHelper.LOADER_ID_LIVE_LOCK_SCREEN;
import static com.cyngn.theme.util.CursorLoaderHelper.LOADER_ID_STATUS_BAR;
import static com.cyngn.theme.util.CursorLoaderHelper.LOADER_ID_FONT;
import static com.cyngn.theme.util.CursorLoaderHelper.LOADER_ID_ICONS;
@@ -320,9 +318,6 @@ public class ComponentSelector extends LinearLayout
if (MODIFIES_LOCKSCREEN.equals(component)) {
return LOADER_ID_LOCKSCREEN;
}
- if (MODIFIES_LIVE_LOCK_SCREEN.equals(component)) {
- return LOADER_ID_LIVE_LOCK_SCREEN;
- }
return -1;
}
@@ -353,7 +348,6 @@ public class ComponentSelector extends LinearLayout
mContent.setShowDividers(LinearLayout.SHOW_DIVIDER_NONE);
break;
case LOADER_ID_BOOT_ANIMATION:
- case LOADER_ID_LIVE_LOCK_SCREEN:
dividerPadding = res.getDimensionPixelSize(
R.dimen.component_divider_padding_top_bootani);
dividerHeight = res.getDimensionPixelSize(R.dimen.component_divider_height_bootani);
@@ -419,9 +413,6 @@ public class ComponentSelector extends LinearLayout
return newWallpapersView(cursor, container, position,
cursor.getColumnIndex(PreviewColumns.LOCK_WALLPAPER_THUMBNAIL));
}
- if (MODIFIES_LIVE_LOCK_SCREEN.equals(mComponentType)) {
- return newLiveLockScreenView(cursor, container, position);
- }
return null;
}
@@ -622,21 +613,6 @@ public class ComponentSelector extends LinearLayout
return container;
}
- private View newLiveLockScreenView(Cursor cursor, ViewGroup parent, int position) {
- cursor.moveToPosition(position);
- View v = mInflater.inflate(R.layout.bootani_component_selection_item, parent,
- false);
- int wallpaperIndex = cursor.getColumnIndex(PreviewColumns.LIVE_LOCK_SCREEN_THUMBNAIL);
- int pkgNameIndex = cursor.getColumnIndex(ThemesContract.ThemesColumns.PKG_NAME);
-
- ((ImageView) v.findViewById(R.id.preview)).setImageBitmap(
- Utils.loadBitmapBlob(cursor, wallpaperIndex));
- setTitle(((TextView) v.findViewById(R.id.title)), cursor);
- v.setTag(R.id.tag_key_package_name, cursor.getString(pkgNameIndex));
- v.setOnClickListener(mItemClickListener);
- return v;
- }
-
private class LoadItemsTask extends AsyncTask<Object, Void, Void> {
@Override
diff --git a/src/com/cyngn/theme/chooser/ThemeFragment.java b/src/com/cyngn/theme/chooser/ThemeFragment.java
index f4cec1a..30090b9 100644
--- a/src/com/cyngn/theme/chooser/ThemeFragment.java
+++ b/src/com/cyngn/theme/chooser/ThemeFragment.java
@@ -102,7 +102,6 @@ import java.util.zip.ZipFile;
import static android.provider.ThemesContract.ThemesColumns.MODIFIES_ALARMS;
import static android.provider.ThemesContract.ThemesColumns.MODIFIES_BOOT_ANIM;
import static android.provider.ThemesContract.ThemesColumns.MODIFIES_LAUNCHER;
-import static android.provider.ThemesContract.ThemesColumns.MODIFIES_LIVE_LOCK_SCREEN;
import static android.provider.ThemesContract.ThemesColumns.MODIFIES_LOCKSCREEN;
import static android.provider.ThemesContract.ThemesColumns.MODIFIES_NOTIFICATIONS;
import static android.provider.ThemesContract.ThemesColumns.MODIFIES_OVERLAYS;
@@ -127,7 +126,6 @@ import static com.cyngn.theme.util.CursorLoaderHelper.LOADER_ID_BOOT_ANIMATION;
import static com.cyngn.theme.util.CursorLoaderHelper.LOADER_ID_RINGTONE;
import static com.cyngn.theme.util.CursorLoaderHelper.LOADER_ID_NOTIFICATION;
import static com.cyngn.theme.util.CursorLoaderHelper.LOADER_ID_ALARM;
-import static com.cyngn.theme.util.CursorLoaderHelper.LOADER_ID_LIVE_LOCK_SCREEN;
import static android.content.pm.ThemeUtils.SYSTEM_TARGET_API;
@@ -217,7 +215,6 @@ public class ThemeFragment extends Fragment implements LoaderManager.LoaderCallb
protected ComponentCardView mFontCard;
protected ComponentCardView mIconCard;
protected ComponentCardView mBootAnimationCard;
- protected ComponentCardView mLiveLockScreenCard;
protected BootAniImageView mBootAnimation;
// Nav Bar Views
@@ -246,9 +243,6 @@ public class ThemeFragment extends Fragment implements LoaderManager.LoaderCallb
// Style views
protected ImageView mStylePreview;
- // Live lock screen view
- protected ImageView mLiveLockScreenView;
-
// Sound cards
protected ComponentCardView mRingtoneCard;
protected ImageView mRingtonePlayPause;
@@ -351,8 +345,6 @@ public class ThemeFragment extends Fragment implements LoaderManager.LoaderCallb
mCardIdsToComponentTypes.put(R.id.ringtone_preview_container, MODIFIES_RINGTONES);
mCardIdsToComponentTypes.put(R.id.notification_preview_container, MODIFIES_NOTIFICATIONS);
mCardIdsToComponentTypes.put(R.id.alarm_preview_container, MODIFIES_ALARMS);
- mCardIdsToComponentTypes.put(R.id.live_lock_screen_preview_container,
- MODIFIES_LIVE_LOCK_SCREEN);
mMediaPlayers = new HashMap<ImageView, MediaPlayer>(3);
}
@@ -482,9 +474,6 @@ public class ThemeFragment extends Fragment implements LoaderManager.LoaderCallb
mWallpaperCard = (WallpaperCardView) v.findViewById(R.id.wallpaper_card);
mLockScreenCard = (WallpaperCardView) v.findViewById(R.id.lockscreen_card);
- mLiveLockScreenCard =
- (ComponentCardView) v.findViewById(R.id.live_lock_screen_preview_container);
- mLiveLockScreenView = (ImageView) v.findViewById(R.id.live_lock_screen_preview);
int translationY = getDistanceToMoveBelowScreen(mAdditionalCards);
mAdditionalCards.setTranslationY(translationY);
@@ -1297,9 +1286,6 @@ public class ThemeFragment extends Fragment implements LoaderManager.LoaderCallb
case LOADER_ID_ALARM:
loadAudible(RingtoneManager.TYPE_ALARM, c, animate);
break;
- case LOADER_ID_LIVE_LOCK_SCREEN:
- loadLiveLockScreen(c, animate);
- break;
}
}
@@ -1367,14 +1353,6 @@ public class ThemeFragment extends Fragment implements LoaderManager.LoaderCallb
setAddComponentTitle(mAlarmCard,
getAudibleLabel(RingtoneManager.TYPE_ALARM));
}
- } else if (MODIFIES_LIVE_LOCK_SCREEN.equals(component)) {
- if (hasContent) {
- loadLiveLockScreen(c, false);
- } else {
- mLiveLockScreenCard.setEmptyViewEnabled(true);
- setAddComponentTitle(mLiveLockScreenCard,
- getString(R.string.live_lock_screen_label));
- }
} else {
throw new IllegalArgumentException("Don't know how to load: " + component);
}
@@ -1798,33 +1776,6 @@ public class ThemeFragment extends Fragment implements LoaderManager.LoaderCallb
thread.start();
}
- protected void loadLiveLockScreen(Cursor c, boolean animate) {
- Drawable overlay = null;
- if (animate) {
- overlay = getOverlayDrawable(mLiveLockScreenView, false);
- }
- if (mLiveLockScreenCard.isShowingEmptyView()) {
- mLiveLockScreenCard.setEmptyViewEnabled(false);
- }
-
- int pkgNameIdx = c.getColumnIndex(ThemesColumns.PKG_NAME);
- int styleIdx = c.getColumnIndex(PreviewColumns.LIVE_LOCK_SCREEN_PREVIEW);
- mLiveLockScreenView.setImageBitmap(Utils.loadBitmapBlob(c, styleIdx));
- if (pkgNameIdx > -1) {
- String pkgName = c.getString(pkgNameIdx);
- if (!mPkgName.equals(pkgName) || (mPkgName.equals(pkgName)
- && mBaseThemeSupportedComponents.contains(MODIFIES_LIVE_LOCK_SCREEN))) {
- mSelectedComponentsMap.put(MODIFIES_LIVE_LOCK_SCREEN, pkgName);
- setCardTitle(mLiveLockScreenCard, pkgName,
- getString(R.string.live_lock_screen_label));
- }
- }
- if (animate) {
- animateContentChange(R.id.live_lock_screen_preview_container, mLiveLockScreenView,
- overlay);
- }
- }
-
protected Drawable getOverlayDrawable(View v, boolean requiresTransparency) {
if (!v.isDrawingCacheEnabled()) v.setDrawingCacheEnabled(true);
Bitmap cache = v.getDrawingCache(true).copy(
@@ -2017,8 +1968,6 @@ public class ThemeFragment extends Fragment implements LoaderManager.LoaderCallb
loaderId = LOADER_ID_NOTIFICATION;
} else if (MODIFIES_ALARMS.equals(component)) {
loaderId = LOADER_ID_ALARM;
- } else if (MODIFIES_LIVE_LOCK_SCREEN.equals(component)) {
- loaderId = LOADER_ID_LIVE_LOCK_SCREEN;
} else {
return;
}
diff --git a/src/com/cyngn/theme/util/CursorLoaderHelper.java b/src/com/cyngn/theme/util/CursorLoaderHelper.java
index fdbb64f..e4f2ebe 100644
--- a/src/com/cyngn/theme/util/CursorLoaderHelper.java
+++ b/src/com/cyngn/theme/util/CursorLoaderHelper.java
@@ -18,7 +18,6 @@ import cyanogenmod.app.ThemeVersion;
import static android.provider.ThemesContract.ThemesColumns.MODIFIES_ALARMS;
import static android.provider.ThemesContract.ThemesColumns.MODIFIES_BOOT_ANIM;
import static android.provider.ThemesContract.ThemesColumns.MODIFIES_LAUNCHER;
-import static android.provider.ThemesContract.ThemesColumns.MODIFIES_LIVE_LOCK_SCREEN;
import static android.provider.ThemesContract.ThemesColumns.MODIFIES_LOCKSCREEN;
import static android.provider.ThemesContract.ThemesColumns.MODIFIES_NOTIFICATIONS;
import static android.provider.ThemesContract.ThemesColumns.MODIFIES_OVERLAYS;
@@ -43,7 +42,6 @@ public class CursorLoaderHelper {
public static final int LOADER_ID_RINGTONE = 9;
public static final int LOADER_ID_NOTIFICATION = 10;
public static final int LOADER_ID_ALARM = 11;
- public static final int LOADER_ID_LIVE_LOCK_SCREEN = 12;
public static final int LOADER_ID_INSTALLED_THEMES = 1000;
public static final int LOADER_ID_APPLIED = 1001;
@@ -186,14 +184,6 @@ public class CursorLoaderHelper {
};
}
break;
- case LOADER_ID_LIVE_LOCK_SCREEN:
- selection = MODIFIES_LIVE_LOCK_SCREEN + "=?";
- projection = new String[] {
- PreviewColumns.LIVE_LOCK_SCREEN_THUMBNAIL,
- ThemesColumns.TITLE,
- ThemesColumns.PKG_NAME
- };
- break;
default:
return null;
}
@@ -225,8 +215,7 @@ public class CursorLoaderHelper {
PreviewColumns.ICON_PREVIEW_3,
PreviewColumns.LOCK_WALLPAPER_PREVIEW,
PreviewColumns.STYLE_PREVIEW,
- PreviewColumns.NAVBAR_BACKGROUND,
- PreviewColumns.LIVE_LOCK_SCREEN_PREVIEW
+ PreviewColumns.NAVBAR_BACKGROUND
};
uri = PreviewColumns.APPLIED_URI;
return new CursorLoader(context, uri, projection, null, null, null);
@@ -285,8 +274,7 @@ public class CursorLoaderHelper {
PreviewColumns.ICON_PREVIEW_2,
PreviewColumns.ICON_PREVIEW_3,
PreviewColumns.LOCK_WALLPAPER_PREVIEW,
- PreviewColumns.STYLE_PREVIEW,
- PreviewColumns.LIVE_LOCK_SCREEN_PREVIEW
+ PreviewColumns.STYLE_PREVIEW
};
break;
case LOADER_ID_STATUS_BAR:
@@ -378,13 +366,6 @@ public class CursorLoaderHelper {
ThemesColumns.TITLE
};
break;
- case LOADER_ID_LIVE_LOCK_SCREEN:
- projection = new String[] {
- ThemesColumns.PKG_NAME,
- ThemesColumns.TITLE,
- PreviewColumns.LIVE_LOCK_SCREEN_PREVIEW
- };
- break;
}
return new CursorLoader(context, uri, projection, selection, selectionArgs, null);
}