summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/data/PanoramaMetadataJob.java
diff options
context:
space:
mode:
authorMangesh Ghiware <mghiware@google.com>2012-10-10 18:37:24 -0700
committerMangesh Ghiware <mghiware@google.com>2012-10-11 15:21:29 -0700
commit825afb1b3e7d15b5c258d664ee008dc68da1c407 (patch)
tree24ad9a0859a4f850193d70faebae93798aaf59fa /src/com/android/gallery3d/data/PanoramaMetadataJob.java
parent47df0d2ffb68ae01ee7732b890c4510b8a167616 (diff)
downloadandroid_packages_apps_Gallery2-825afb1b3e7d15b5c258d664ee008dc68da1c407.tar.gz
android_packages_apps_Gallery2-825afb1b3e7d15b5c258d664ee008dc68da1c407.tar.bz2
android_packages_apps_Gallery2-825afb1b3e7d15b5c258d664ee008dc68da1c407.zip
Move calls to LightCycleHelper off the UI thread.
Bug: 7320303 Replace multiple methods in LightCycleHelper with a single one that returns relevant metadata. Change-Id: Iaa75b3c1ccc8a5b724b253cec654b5b5acb4878e
Diffstat (limited to 'src/com/android/gallery3d/data/PanoramaMetadataJob.java')
-rw-r--r--src/com/android/gallery3d/data/PanoramaMetadataJob.java40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/data/PanoramaMetadataJob.java b/src/com/android/gallery3d/data/PanoramaMetadataJob.java
new file mode 100644
index 000000000..e0a69c41f
--- /dev/null
+++ b/src/com/android/gallery3d/data/PanoramaMetadataJob.java
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.gallery3d.data;
+
+import android.content.Context;
+import android.net.Uri;
+
+import com.android.gallery3d.util.LightCycleHelper;
+import com.android.gallery3d.util.LightCycleHelper.PanoramaMetadata;
+import com.android.gallery3d.util.ThreadPool.Job;
+import com.android.gallery3d.util.ThreadPool.JobContext;
+
+class PanoramaMetadataJob implements Job<PanoramaMetadata> {
+ Context mContext;
+ Uri mUri;
+
+ public PanoramaMetadataJob(Context context, Uri uri) {
+ mContext = context;
+ mUri = uri;
+ }
+
+ @Override
+ public PanoramaMetadata run(JobContext jc) {
+ return LightCycleHelper.getPanoramaMetadata(mContext, mUri);
+ }
+}