Search in sources :

Example 6 with SynchronizedHandler

use of com.android.gallery3d.ui.SynchronizedHandler in project android_packages_apps_Gallery2 by LineageOS.

the class AlbumPage method onCreate.

@Override
protected void onCreate(Bundle data, Bundle restoreState) {
    super.onCreate(data, restoreState);
    mUserDistance = GalleryUtils.meterToPixel(USER_DISTANCE_METER);
    mCurrentView = GalleryUtils.getIntPref(mActivity, PREF_VIEWTYPE, GRID_VIEW);
    mViewType = mCurrentView == GRID_VIEW;
    mData = data;
    initializeViews();
    initializeData(data);
    mGetContent = data.getBoolean(GalleryActivity.KEY_GET_CONTENT, false);
    mIsVideoScreen = data.getBoolean(KEY_IS_VIDEOS_SCREEN, false);
    mDetailsSource = new MyDetailsSource();
    Context context = mActivity.getAndroidContext();
    mActionBar = mActivity.getGalleryActionBar();
    if (data.getBoolean(KEY_AUTO_SELECT_ALL)) {
        mSelectionManager.selectAll();
    }
    mLaunchedFromPhotoPage = mActivity.getStateManager().hasStateClass(FilmstripPage.class);
    mInCameraApp = data.getBoolean(PhotoPage.KEY_APP_BRIDGE, false);
    mHandler = new SynchronizedHandler(mActivity.getGLRoot()) {

        @Override
        public void handleMessage(Message message) {
            switch(message.what) {
                case MSG_PICK_PHOTO:
                    {
                        pickPhoto(message.arg1);
                        break;
                    }
                default:
                    throw new AssertionError(message.what);
            }
        }
    };
}
Also used : Context(android.content.Context) Message(android.os.Message) SynchronizedHandler(com.android.gallery3d.ui.SynchronizedHandler)

Aggregations

Message (android.os.Message)6 SynchronizedHandler (com.android.gallery3d.ui.SynchronizedHandler)6 Context (android.content.Context)2 Activity (android.app.Activity)1 Intent (android.content.Intent)1 Uri (android.net.Uri)1 View (android.view.View)1 RelativeLayout (android.widget.RelativeLayout)1 ThreeDimensionalActivity (com.android.gallery3d.app.dualcam3d.ThreeDimensionalActivity)1 ComboAlbum (com.android.gallery3d.data.ComboAlbum)1 MediaItem (com.android.gallery3d.data.MediaItem)1 MediaSet (com.android.gallery3d.data.MediaSet)1 Path (com.android.gallery3d.data.Path)1 FilterShowActivity (com.android.gallery3d.filtershow.FilterShowActivity)1 CacheStorageUsageInfo (com.android.gallery3d.ui.CacheStorageUsageInfo)1 GLRootView (com.android.gallery3d.ui.GLRootView)1 GLView (com.android.gallery3d.ui.GLView)1 MenuExecutor (com.android.gallery3d.ui.MenuExecutor)1 PhotoView (com.android.gallery3d.ui.PhotoView)1 SelectionManager (com.android.gallery3d.ui.SelectionManager)1