Search in sources :

Example 1 with GLRoot

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

the class AbstractGalleryActivity method onBackPressed.

@Override
public void onBackPressed() {
    // send the back event to the top sub-state
    GLRoot root = getGLRoot();
    root.lockRenderThread();
    try {
        getStateManager().onBackPressed();
    } finally {
        root.unlockRenderThread();
    }
}
Also used : GLRoot(com.android.gallery3d.ui.GLRoot)

Example 2 with GLRoot

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

the class AbstractGalleryActivity method onOptionsItemSelected.

@Override
public boolean onOptionsItemSelected(MenuItem item) {
    GLRoot root = getGLRoot();
    root.lockRenderThread();
    try {
        return getStateManager().itemSelected(item);
    } finally {
        root.unlockRenderThread();
    }
}
Also used : GLRoot(com.android.gallery3d.ui.GLRoot)

Example 3 with GLRoot

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

the class ManageCachePage method onClick.

@Override
public void onClick(View view) {
    Utils.assertTrue(view.getId() == R.id.done);
    GLRoot root = mActivity.getGLRoot();
    root.lockRenderThread();
    try {
        ArrayList<Path> ids = mSelectionManager.getSelected(false);
        if (ids.size() == 0) {
            onBackPressed();
            return;
        }
        showToast();
        MenuExecutor menuExecutor = new MenuExecutor(mActivity, mSelectionManager);
        menuExecutor.startAction(R.id.action_toggle_full_caching, R.string.process_caching_requests, this);
    } finally {
        root.unlockRenderThread();
    }
}
Also used : Path(com.android.gallery3d.data.Path) GLRoot(com.android.gallery3d.ui.GLRoot) MenuExecutor(com.android.gallery3d.ui.MenuExecutor)

Aggregations

GLRoot (com.android.gallery3d.ui.GLRoot)3 Path (com.android.gallery3d.data.Path)1 MenuExecutor (com.android.gallery3d.ui.MenuExecutor)1