Loading AndroidManifest.xml +0 −1 Original line number Diff line number Diff line Loading @@ -20,7 +20,6 @@ <manifest android:versionCode="40030" android:versionName="1.1.40030" xmlns:android="http://schemas.android.com/apk/res/android" android:sharedUserId="android.uid.system" package="com.android.gallery3d"> <original-package android:name="com.android.gallery3d" /> Loading src/com/android/gallery3d/app/AbstractGalleryActivity.java +27 −9 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ import android.view.Menu; import android.view.MenuItem; import android.view.Window; import android.view.WindowManager; import android.os.Handler; import com.android.gallery3d.R; import com.android.gallery3d.common.ApiHelper; Loading @@ -60,6 +61,7 @@ public class AbstractGalleryActivity extends Activity implements GalleryContext private TransitionStore mTransitionStore = new TransitionStore(); private boolean mDisableToggleStatusBar; private PanoramaViewHelper mPanoramaViewHelper; private static final int ONRESUME_DELAY = 50; private AlertDialog mAlertDialog = null; private BroadcastReceiver mMountReceiver = new BroadcastReceiver() { Loading Loading @@ -212,6 +214,17 @@ public class AbstractGalleryActivity extends Activity implements GalleryContext @Override protected void onResume() { super.onResume(); delayedOnResume(ONRESUME_DELAY); } private void delayedOnResume(final int delay){ final Handler handler = new Handler(); Runnable delayTask = new Runnable() { @Override public void run() { handler.postDelayed(new Runnable() { @Override public void run() { mGLRootView.lockRenderThread(); try { getStateManager().resume(); Loading @@ -221,6 +234,11 @@ public class AbstractGalleryActivity extends Activity implements GalleryContext } mGLRootView.onResume(); mOrientationManager.resume(); }}, delay); } }; Thread delayThread = new Thread(delayTask); delayThread.start(); } @Override Loading src/com/android/gallery3d/app/MovieActivity.java +10 −1 Original line number Diff line number Diff line Loading @@ -197,7 +197,7 @@ public class MovieActivity extends Activity { @Override public void onCompletion() { if (mFinishOnCompletion) { finish(); finishActivity(); mControlResumed = false; Bookmarker mBookmarker = new Bookmarker(MovieActivity.this); mBookmarker.setBookmark(mMovieItem.getUri(), 0, 1); Loading Loading @@ -801,4 +801,13 @@ public class MovieActivity extends Activity { actionBar.setTitle(title); } } @Override public void onBackPressed() { finishActivity(); } private void finishActivity(){ MovieActivity.this.finish(); overridePendingTransition(0,0); return; } } src/com/android/gallery3d/app/PhotoDataAdapter.java +7 −0 Original line number Diff line number Diff line Loading @@ -72,6 +72,7 @@ public class PhotoDataAdapter implements PhotoPage.Model { private static final int BIT_SCREEN_NAIL = 1; private static final int BIT_FULL_IMAGE = 2; private static final long NOTIFY_DIRTY_WAIT_TIME = 10; // sImageFetchSeq is the fetching sequence for images. // We want to fetch the current screennail first (offset = 0), the next // screennail (offset = +1), then the previous screennail (offset = -1) etc. Loading Loading @@ -1207,6 +1208,12 @@ public class PhotoDataAdapter implements PhotoPage.Model { } public synchronized void notifyDirty() { while (mDirty) { try { wait(NOTIFY_DIRTY_WAIT_TIME); } catch (Exception ex) { } } mDirty = true; notifyAll(); } Loading src/com/android/gallery3d/app/SinglePhotoDataAdapter.java +10 −2 Original line number Diff line number Diff line Loading @@ -89,7 +89,16 @@ public class SinglePhotoDataAdapter extends TileImageViewAdapter @Override public void onFutureDone(Future<BitmapRegionDecoder> future) { BitmapRegionDecoder decoder = future.get(); if (decoder == null) return; // cannot get large bitmap, then try to get thumb bitmap if (decoder == null) { if (mTask != null && !mTask.isCancelled()) { Log.w(TAG, "fail to get region decoder, try to request thumb image"); mHasFullImage = false; pause(); resume(); } return; } int width = decoder.getWidth(); int height = decoder.getHeight(); BitmapFactory.Options options = new BitmapFactory.Options(); Loading Loading @@ -136,7 +145,6 @@ public class SinglePhotoDataAdapter extends TileImageViewAdapter Bitmap backup = future.get(); if (backup == null) { mLoadingState = LOADING_FAIL; return; } else { mLoadingState = LOADING_COMPLETE; } Loading Loading
AndroidManifest.xml +0 −1 Original line number Diff line number Diff line Loading @@ -20,7 +20,6 @@ <manifest android:versionCode="40030" android:versionName="1.1.40030" xmlns:android="http://schemas.android.com/apk/res/android" android:sharedUserId="android.uid.system" package="com.android.gallery3d"> <original-package android:name="com.android.gallery3d" /> Loading
src/com/android/gallery3d/app/AbstractGalleryActivity.java +27 −9 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ import android.view.Menu; import android.view.MenuItem; import android.view.Window; import android.view.WindowManager; import android.os.Handler; import com.android.gallery3d.R; import com.android.gallery3d.common.ApiHelper; Loading @@ -60,6 +61,7 @@ public class AbstractGalleryActivity extends Activity implements GalleryContext private TransitionStore mTransitionStore = new TransitionStore(); private boolean mDisableToggleStatusBar; private PanoramaViewHelper mPanoramaViewHelper; private static final int ONRESUME_DELAY = 50; private AlertDialog mAlertDialog = null; private BroadcastReceiver mMountReceiver = new BroadcastReceiver() { Loading Loading @@ -212,6 +214,17 @@ public class AbstractGalleryActivity extends Activity implements GalleryContext @Override protected void onResume() { super.onResume(); delayedOnResume(ONRESUME_DELAY); } private void delayedOnResume(final int delay){ final Handler handler = new Handler(); Runnable delayTask = new Runnable() { @Override public void run() { handler.postDelayed(new Runnable() { @Override public void run() { mGLRootView.lockRenderThread(); try { getStateManager().resume(); Loading @@ -221,6 +234,11 @@ public class AbstractGalleryActivity extends Activity implements GalleryContext } mGLRootView.onResume(); mOrientationManager.resume(); }}, delay); } }; Thread delayThread = new Thread(delayTask); delayThread.start(); } @Override Loading
src/com/android/gallery3d/app/MovieActivity.java +10 −1 Original line number Diff line number Diff line Loading @@ -197,7 +197,7 @@ public class MovieActivity extends Activity { @Override public void onCompletion() { if (mFinishOnCompletion) { finish(); finishActivity(); mControlResumed = false; Bookmarker mBookmarker = new Bookmarker(MovieActivity.this); mBookmarker.setBookmark(mMovieItem.getUri(), 0, 1); Loading Loading @@ -801,4 +801,13 @@ public class MovieActivity extends Activity { actionBar.setTitle(title); } } @Override public void onBackPressed() { finishActivity(); } private void finishActivity(){ MovieActivity.this.finish(); overridePendingTransition(0,0); return; } }
src/com/android/gallery3d/app/PhotoDataAdapter.java +7 −0 Original line number Diff line number Diff line Loading @@ -72,6 +72,7 @@ public class PhotoDataAdapter implements PhotoPage.Model { private static final int BIT_SCREEN_NAIL = 1; private static final int BIT_FULL_IMAGE = 2; private static final long NOTIFY_DIRTY_WAIT_TIME = 10; // sImageFetchSeq is the fetching sequence for images. // We want to fetch the current screennail first (offset = 0), the next // screennail (offset = +1), then the previous screennail (offset = -1) etc. Loading Loading @@ -1207,6 +1208,12 @@ public class PhotoDataAdapter implements PhotoPage.Model { } public synchronized void notifyDirty() { while (mDirty) { try { wait(NOTIFY_DIRTY_WAIT_TIME); } catch (Exception ex) { } } mDirty = true; notifyAll(); } Loading
src/com/android/gallery3d/app/SinglePhotoDataAdapter.java +10 −2 Original line number Diff line number Diff line Loading @@ -89,7 +89,16 @@ public class SinglePhotoDataAdapter extends TileImageViewAdapter @Override public void onFutureDone(Future<BitmapRegionDecoder> future) { BitmapRegionDecoder decoder = future.get(); if (decoder == null) return; // cannot get large bitmap, then try to get thumb bitmap if (decoder == null) { if (mTask != null && !mTask.isCancelled()) { Log.w(TAG, "fail to get region decoder, try to request thumb image"); mHasFullImage = false; pause(); resume(); } return; } int width = decoder.getWidth(); int height = decoder.getHeight(); BitmapFactory.Options options = new BitmapFactory.Options(); Loading Loading @@ -136,7 +145,6 @@ public class SinglePhotoDataAdapter extends TileImageViewAdapter Bitmap backup = future.get(); if (backup == null) { mLoadingState = LOADING_FAIL; return; } else { mLoadingState = LOADING_COMPLETE; } Loading