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);
}
}
};
}
Aggregations