diff options
author | Bobby Georgescu <georgescu@google.com> | 2012-12-03 13:56:00 -0800 |
---|---|---|
committer | Bobby Georgescu <georgescu@google.com> | 2012-12-03 16:15:54 -0800 |
commit | a2d0d34a90543ee19ea295e72c112fde18fb3828 (patch) | |
tree | ff18742ea6769f015011b99d3ac425fd988c707f /src/com/android/gallery3d/app/BatchService.java | |
parent | eb3948f488b38bf5e6232c1aada16115589b0b9b (diff) | |
download | android_packages_apps_Gallery2-a2d0d34a90543ee19ea295e72c112fde18fb3828.tar.gz android_packages_apps_Gallery2-a2d0d34a90543ee19ea295e72c112fde18fb3828.tar.bz2 android_packages_apps_Gallery2-a2d0d34a90543ee19ea295e72c112fde18fb3828.zip |
Move MenuExecutor operations into Service
Bug: 6680729
Change-Id: I538bb0a8783f7c1ff467ba8d8eb0deefdc0b6ea2
Diffstat (limited to 'src/com/android/gallery3d/app/BatchService.java')
-rw-r--r-- | src/com/android/gallery3d/app/BatchService.java | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/app/BatchService.java b/src/com/android/gallery3d/app/BatchService.java new file mode 100644 index 000000000..98a1d8215 --- /dev/null +++ b/src/com/android/gallery3d/app/BatchService.java @@ -0,0 +1,45 @@ +/* + * 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.app; + +import android.app.Service; +import android.content.Intent; +import android.os.Binder; +import android.os.IBinder; + +import com.android.gallery3d.util.ThreadPool; + +public class BatchService extends Service { + + public class LocalBinder extends Binder { + BatchService getService() { + return BatchService.this; + } + } + + private final IBinder mBinder = new LocalBinder(); + private ThreadPool mThreadPool = new ThreadPool(1, 1); + + @Override + public IBinder onBind(Intent intent) { + return mBinder; + } + + public ThreadPool getThreadPool() { + return mThreadPool; + } +} |