1825afb1b3e7d15b5c258d664ee008dc68da1c407Mangesh Ghiware/*
2825afb1b3e7d15b5c258d664ee008dc68da1c407Mangesh Ghiware * Copyright (C) 2012 The Android Open Source Project
3825afb1b3e7d15b5c258d664ee008dc68da1c407Mangesh Ghiware *
4825afb1b3e7d15b5c258d664ee008dc68da1c407Mangesh Ghiware * Licensed under the Apache License, Version 2.0 (the "License");
5825afb1b3e7d15b5c258d664ee008dc68da1c407Mangesh Ghiware * you may not use this file except in compliance with the License.
6825afb1b3e7d15b5c258d664ee008dc68da1c407Mangesh Ghiware * You may obtain a copy of the License at
7825afb1b3e7d15b5c258d664ee008dc68da1c407Mangesh Ghiware *
8825afb1b3e7d15b5c258d664ee008dc68da1c407Mangesh Ghiware *      http://www.apache.org/licenses/LICENSE-2.0
9825afb1b3e7d15b5c258d664ee008dc68da1c407Mangesh Ghiware *
10825afb1b3e7d15b5c258d664ee008dc68da1c407Mangesh Ghiware * Unless required by applicable law or agreed to in writing, software
11825afb1b3e7d15b5c258d664ee008dc68da1c407Mangesh Ghiware * distributed under the License is distributed on an "AS IS" BASIS,
12825afb1b3e7d15b5c258d664ee008dc68da1c407Mangesh Ghiware * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13825afb1b3e7d15b5c258d664ee008dc68da1c407Mangesh Ghiware * See the License for the specific language governing permissions and
14825afb1b3e7d15b5c258d664ee008dc68da1c407Mangesh Ghiware * limitations under the License.
15825afb1b3e7d15b5c258d664ee008dc68da1c407Mangesh Ghiware */
16825afb1b3e7d15b5c258d664ee008dc68da1c407Mangesh Ghiware
17825afb1b3e7d15b5c258d664ee008dc68da1c407Mangesh Ghiwarepackage com.android.gallery3d.data;
18825afb1b3e7d15b5c258d664ee008dc68da1c407Mangesh Ghiware
19825afb1b3e7d15b5c258d664ee008dc68da1c407Mangesh Ghiwareimport android.content.Context;
20825afb1b3e7d15b5c258d664ee008dc68da1c407Mangesh Ghiwareimport android.net.Uri;
21825afb1b3e7d15b5c258d664ee008dc68da1c407Mangesh Ghiware
22825afb1b3e7d15b5c258d664ee008dc68da1c407Mangesh Ghiwareimport com.android.gallery3d.util.LightCycleHelper;
23825afb1b3e7d15b5c258d664ee008dc68da1c407Mangesh Ghiwareimport com.android.gallery3d.util.LightCycleHelper.PanoramaMetadata;
24825afb1b3e7d15b5c258d664ee008dc68da1c407Mangesh Ghiwareimport com.android.gallery3d.util.ThreadPool.Job;
25825afb1b3e7d15b5c258d664ee008dc68da1c407Mangesh Ghiwareimport com.android.gallery3d.util.ThreadPool.JobContext;
26825afb1b3e7d15b5c258d664ee008dc68da1c407Mangesh Ghiware
274b4dbd225685502f4249c2bf25bf74f7ce526645George Mountpublic class PanoramaMetadataJob implements Job<PanoramaMetadata> {
28825afb1b3e7d15b5c258d664ee008dc68da1c407Mangesh Ghiware    Context mContext;
29825afb1b3e7d15b5c258d664ee008dc68da1c407Mangesh Ghiware    Uri mUri;
30825afb1b3e7d15b5c258d664ee008dc68da1c407Mangesh Ghiware
31825afb1b3e7d15b5c258d664ee008dc68da1c407Mangesh Ghiware    public PanoramaMetadataJob(Context context, Uri uri) {
32825afb1b3e7d15b5c258d664ee008dc68da1c407Mangesh Ghiware        mContext = context;
33825afb1b3e7d15b5c258d664ee008dc68da1c407Mangesh Ghiware        mUri = uri;
34825afb1b3e7d15b5c258d664ee008dc68da1c407Mangesh Ghiware    }
35825afb1b3e7d15b5c258d664ee008dc68da1c407Mangesh Ghiware
36825afb1b3e7d15b5c258d664ee008dc68da1c407Mangesh Ghiware    @Override
37825afb1b3e7d15b5c258d664ee008dc68da1c407Mangesh Ghiware    public PanoramaMetadata run(JobContext jc) {
38825afb1b3e7d15b5c258d664ee008dc68da1c407Mangesh Ghiware        return LightCycleHelper.getPanoramaMetadata(mContext, mUri);
39825afb1b3e7d15b5c258d664ee008dc68da1c407Mangesh Ghiware    }
40825afb1b3e7d15b5c258d664ee008dc68da1c407Mangesh Ghiware}
41