1c6cdc41397bc3ad2c936069af6d448f242790513Chris Banes/*
2c6cdc41397bc3ad2c936069af6d448f242790513Chris Banes * Copyright (C) 2014 The Android Open Source Project
3c6cdc41397bc3ad2c936069af6d448f242790513Chris Banes *
4c6cdc41397bc3ad2c936069af6d448f242790513Chris Banes * Licensed under the Apache License, Version 2.0 (the "License");
5c6cdc41397bc3ad2c936069af6d448f242790513Chris Banes * you may not use this file except in compliance with the License.
6c6cdc41397bc3ad2c936069af6d448f242790513Chris Banes * You may obtain a copy of the License at
7c6cdc41397bc3ad2c936069af6d448f242790513Chris Banes *
8c6cdc41397bc3ad2c936069af6d448f242790513Chris Banes *      http://www.apache.org/licenses/LICENSE-2.0
9c6cdc41397bc3ad2c936069af6d448f242790513Chris Banes *
10c6cdc41397bc3ad2c936069af6d448f242790513Chris Banes * Unless required by applicable law or agreed to in writing, software
11c6cdc41397bc3ad2c936069af6d448f242790513Chris Banes * distributed under the License is distributed on an "AS IS" BASIS,
12c6cdc41397bc3ad2c936069af6d448f242790513Chris Banes * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13c6cdc41397bc3ad2c936069af6d448f242790513Chris Banes * See the License for the specific language governing permissions and
14c6cdc41397bc3ad2c936069af6d448f242790513Chris Banes * limitations under the License.
15c6cdc41397bc3ad2c936069af6d448f242790513Chris Banes */
16c6cdc41397bc3ad2c936069af6d448f242790513Chris Banes
17c6cdc41397bc3ad2c936069af6d448f242790513Chris Banespackage android.support.v4.os;
18c6cdc41397bc3ad2c936069af6d448f242790513Chris Banes
19c6cdc41397bc3ad2c936069af6d448f242790513Chris Banesimport android.os.AsyncTask;
20c6cdc41397bc3ad2c936069af6d448f242790513Chris Banes
21c6cdc41397bc3ad2c936069af6d448f242790513Chris Banes/**
22c6cdc41397bc3ad2c936069af6d448f242790513Chris Banes * Implementation of AsyncTask compatibility that can call Honeycomb APIs.
23c6cdc41397bc3ad2c936069af6d448f242790513Chris Banes */
24c6cdc41397bc3ad2c936069af6d448f242790513Chris Banesclass AsyncTaskCompatHoneycomb {
25c6cdc41397bc3ad2c936069af6d448f242790513Chris Banes
26c6cdc41397bc3ad2c936069af6d448f242790513Chris Banes    static <Params, Progress, Result> void executeParallel(
27c6cdc41397bc3ad2c936069af6d448f242790513Chris Banes            AsyncTask<Params, Progress, Result> task,
28c6cdc41397bc3ad2c936069af6d448f242790513Chris Banes            Params... params) {
29c6cdc41397bc3ad2c936069af6d448f242790513Chris Banes        task.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, params);
30c6cdc41397bc3ad2c936069af6d448f242790513Chris Banes    }
31c6cdc41397bc3ad2c936069af6d448f242790513Chris Banes
32c6cdc41397bc3ad2c936069af6d448f242790513Chris Banes}
33