import com.android.gallery3d.filtershow.filters.FilterMirrorRepresentation;
import com.android.gallery3d.filtershow.filters.FilterRepresentation;
import com.android.gallery3d.filtershow.filters.FilterRotateRepresentation;
+import com.android.gallery3d.filtershow.filters.FilterStraightenRepresentation;
import com.android.gallery3d.filtershow.filters.FilterUserPresetRepresentation;
import com.android.gallery3d.filtershow.filters.FiltersManager;
import com.android.gallery3d.filtershow.filters.ImageFilter;
import com.android.gallery3d.filtershow.ui.FramedTextButton;
import com.android.gallery3d.util.GalleryUtils;
import com.android.gallery3d.util.PrintJob;
-import com.android.gallery3d.util.UsageStatistics;
import com.android.photos.data.GalleryBitmapPool;
import java.io.File;
private boolean mIsBound = false;
private Menu mMenu;
private DialogInterface mCurrentDialog = null;
+ private boolean mLoadingVisible = true;
public ProcessingService getProcessingService() {
return mBoundService;
doBindService();
getWindow().setBackgroundDrawable(new ColorDrawable(Color.GRAY));
setContentView(R.layout.filtershow_splashscreen);
- UsageStatistics.onContentViewChanged(UsageStatistics.COMPONENT_EDITOR, "Main");
- UsageStatistics.onEvent(UsageStatistics.COMPONENT_EDITOR,
- UsageStatistics.CATEGORY_LIFECYCLE, UsageStatistics.LIFECYCLE_START);
}
public boolean isShowingImageStatePanel() {
}
private void startLoadBitmap(Uri uri) {
- final View loading = findViewById(R.id.loading);
final View imageShow = findViewById(R.id.imageShow);
imageShow.setVisibility(View.INVISIBLE);
- loading.setVisibility(View.VISIBLE);
+ startLoadingIndicator();
mShowingTinyPlanet = false;
mLoadBitmapTask = new LoadBitmapTask();
mLoadBitmapTask.execute(uri);
}
}
+ public boolean isLoadingVisible() {
+ return mLoadingVisible;
+ }
+
+ public void startLoadingIndicator() {
+ final View loading = findViewById(R.id.loading);
+ mLoadingVisible = true;
+ loading.setVisibility(View.VISIBLE);
+ }
+
public void stopLoadingIndicator() {
final View loading = findViewById(R.id.loading);
loading.setVisibility(View.GONE);
+ mLoadingVisible = false;
}
private class LoadBitmapTask extends AsyncTask<Uri, Boolean, Boolean> {
mMasterImage.onHistoryItemClick(position);
backToMain();
invalidateViews();
- UsageStatistics.onEvent(UsageStatistics.COMPONENT_EDITOR,
- UsageStatistics.CATEGORY_BUTTON_PRESS, "Undo");
return true;
}
case R.id.redoButton: {
int position = adapter.redo();
mMasterImage.onHistoryItemClick(position);
invalidateViews();
- UsageStatistics.onEvent(UsageStatistics.COMPONENT_EDITOR,
- UsageStatistics.CATEGORY_BUTTON_PRESS, "Redo");
return true;
}
case R.id.resetHistoryButton: {
resetHistory();
- UsageStatistics.onEvent(UsageStatistics.COMPONENT_EDITOR,
- UsageStatistics.CATEGORY_BUTTON_PRESS, "ResetHistory");
return true;
}
case R.id.showImageStateButton: {
toggleImageStatePanel();
- UsageStatistics.onEvent(UsageStatistics.COMPONENT_EDITOR,
- UsageStatistics.CATEGORY_BUTTON_PRESS,
- mShowingImageStatePanel ? "ShowPanel" : "HidePanel");
return true;
}
case R.id.exportFlattenButton: {
public void onConfigurationChanged(Configuration newConfig)
{
super.onConfigurationChanged(newConfig);
+
setDefaultValues();
+ if (mMasterImage == null) {
+ return;
+ }
loadXML();
fillCategories();
loadMainPanel();
mMasterImage.setHistoryManager(historyManager);
mMasterImage.setStateAdapter(imageStateAdapter);
mMasterImage.setActivity(this);
- mMasterImage.setFirstLoad(true);
if (Runtime.getRuntime().maxMemory() > LIMIT_SUPPORTS_HIGHRES) {
mMasterImage.setSupportsHighRes(true);