Loading src/com/android/gallery3d/filtershow/FilterShowActivity.java +12 −2 Original line number Diff line number Diff line Loading @@ -138,6 +138,7 @@ public class FilterShowActivity extends FragmentActivity implements OnItemClickL public static final String TINY_PLANET_ACTION = "com.android.camera.action.TINY_PLANET"; public static final String LAUNCH_FULLSCREEN = "launch-fullscreen"; public static final boolean RESET_TO_LOADED = false; private ImageShow mImageShow = null; private View mSaveButton = null; Loading Loading @@ -1264,8 +1265,17 @@ public class FilterShowActivity extends FragmentActivity implements OnItemClickL HistoryManager adapter = mMasterImage.getHistory(); adapter.reset(); HistoryItem historyItem = adapter.getItem(0); ImagePreset original = new ImagePreset(historyItem.getImagePreset()); mMasterImage.setPreset(original, historyItem.getFilterRepresentation(), true); ImagePreset original = null; if (RESET_TO_LOADED) { original = new ImagePreset(historyItem.getImagePreset()); } else { original = new ImagePreset(); } FilterRepresentation rep = null; if (historyItem != null) { rep = historyItem.getFilterRepresentation(); } mMasterImage.setPreset(original, rep, true); invalidateViews(); backToMain(); } Loading src/com/android/gallery3d/filtershow/history/HistoryManager.java +4 −3 Original line number Diff line number Diff line Loading @@ -42,6 +42,9 @@ public class HistoryManager { } public HistoryItem getItem(int position) { if (position > mHistoryItems.size() - 1) { return null; } return mHistoryItems.elementAt(position); } Loading @@ -58,7 +61,7 @@ public class HistoryManager { } public boolean canReset() { if (getCount() <= 1) { if (getCount() <= 0) { return false; } return true; Loading Loading @@ -108,9 +111,7 @@ public class HistoryManager { if (getCount() == 0) { return; } HistoryItem first = getItem(getCount() - 1); clear(); addHistoryItem(first); updateMenuItems(); } Loading Loading
src/com/android/gallery3d/filtershow/FilterShowActivity.java +12 −2 Original line number Diff line number Diff line Loading @@ -138,6 +138,7 @@ public class FilterShowActivity extends FragmentActivity implements OnItemClickL public static final String TINY_PLANET_ACTION = "com.android.camera.action.TINY_PLANET"; public static final String LAUNCH_FULLSCREEN = "launch-fullscreen"; public static final boolean RESET_TO_LOADED = false; private ImageShow mImageShow = null; private View mSaveButton = null; Loading Loading @@ -1264,8 +1265,17 @@ public class FilterShowActivity extends FragmentActivity implements OnItemClickL HistoryManager adapter = mMasterImage.getHistory(); adapter.reset(); HistoryItem historyItem = adapter.getItem(0); ImagePreset original = new ImagePreset(historyItem.getImagePreset()); mMasterImage.setPreset(original, historyItem.getFilterRepresentation(), true); ImagePreset original = null; if (RESET_TO_LOADED) { original = new ImagePreset(historyItem.getImagePreset()); } else { original = new ImagePreset(); } FilterRepresentation rep = null; if (historyItem != null) { rep = historyItem.getFilterRepresentation(); } mMasterImage.setPreset(original, rep, true); invalidateViews(); backToMain(); } Loading
src/com/android/gallery3d/filtershow/history/HistoryManager.java +4 −3 Original line number Diff line number Diff line Loading @@ -42,6 +42,9 @@ public class HistoryManager { } public HistoryItem getItem(int position) { if (position > mHistoryItems.size() - 1) { return null; } return mHistoryItems.elementAt(position); } Loading @@ -58,7 +61,7 @@ public class HistoryManager { } public boolean canReset() { if (getCount() <= 1) { if (getCount() <= 0) { return false; } return true; Loading Loading @@ -108,9 +111,7 @@ public class HistoryManager { if (getCount() == 0) { return; } HistoryItem first = getItem(getCount() - 1); clear(); addHistoryItem(first); updateMenuItems(); } Loading