18ae0f34db936a649ddaf9cdd086c224f6514efebRoboErik/*
28ae0f34db936a649ddaf9cdd086c224f6514efebRoboErik * Copyright (C) 2014 The Android Open Source Project
38ae0f34db936a649ddaf9cdd086c224f6514efebRoboErik *
48ae0f34db936a649ddaf9cdd086c224f6514efebRoboErik * Licensed under the Apache License, Version 2.0 (the "License");
58ae0f34db936a649ddaf9cdd086c224f6514efebRoboErik * you may not use this file except in compliance with the License.
68ae0f34db936a649ddaf9cdd086c224f6514efebRoboErik * You may obtain a copy of the License at
78ae0f34db936a649ddaf9cdd086c224f6514efebRoboErik *
88ae0f34db936a649ddaf9cdd086c224f6514efebRoboErik *      http://www.apache.org/licenses/LICENSE-2.0
98ae0f34db936a649ddaf9cdd086c224f6514efebRoboErik *
108ae0f34db936a649ddaf9cdd086c224f6514efebRoboErik * Unless required by applicable law or agreed to in writing, software
118ae0f34db936a649ddaf9cdd086c224f6514efebRoboErik * distributed under the License is distributed on an "AS IS" BASIS,
128ae0f34db936a649ddaf9cdd086c224f6514efebRoboErik * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
138ae0f34db936a649ddaf9cdd086c224f6514efebRoboErik * See the License for the specific language governing permissions and
148ae0f34db936a649ddaf9cdd086c224f6514efebRoboErik * limitations under the License.
158ae0f34db936a649ddaf9cdd086c224f6514efebRoboErik */
16bfa153b64b4e8c2faa39a15e87fc9f0300335f20RoboErikpackage com.android.onemedia;
17bfa153b64b4e8c2faa39a15e87fc9f0300335f20RoboErik
18bfa153b64b4e8c2faa39a15e87fc9f0300335f20RoboErikimport android.content.Context;
19bfa153b64b4e8c2faa39a15e87fc9f0300335f20RoboErikimport android.content.Intent;
20bfa153b64b4e8c2faa39a15e87fc9f0300335f20RoboErik
21bfa153b64b4e8c2faa39a15e87fc9f0300335f20RoboErikimport java.util.ArrayList;
22bfa153b64b4e8c2faa39a15e87fc9f0300335f20RoboErik
23bfa153b64b4e8c2faa39a15e87fc9f0300335f20RoboErikpublic class OnePlayerService extends PlayerService {
24bfa153b64b4e8c2faa39a15e87fc9f0300335f20RoboErik    private static final String TAG = "OnePlayerService";
25bfa153b64b4e8c2faa39a15e87fc9f0300335f20RoboErik
26bfa153b64b4e8c2faa39a15e87fc9f0300335f20RoboErik    public static Intent getServiceIntent(Context context) {
27bfa153b64b4e8c2faa39a15e87fc9f0300335f20RoboErik        return new Intent(context, OnePlayerService.class).setPackage(
28bfa153b64b4e8c2faa39a15e87fc9f0300335f20RoboErik                OnePlayerService.class.getPackage().getName());
29bfa153b64b4e8c2faa39a15e87fc9f0300335f20RoboErik    }
30bfa153b64b4e8c2faa39a15e87fc9f0300335f20RoboErik
31bfa153b64b4e8c2faa39a15e87fc9f0300335f20RoboErik    @Override
32bfa153b64b4e8c2faa39a15e87fc9f0300335f20RoboErik    protected Intent onCreateServiceIntent() {
33bfa153b64b4e8c2faa39a15e87fc9f0300335f20RoboErik        return getServiceIntent(this);
34bfa153b64b4e8c2faa39a15e87fc9f0300335f20RoboErik    }
35bfa153b64b4e8c2faa39a15e87fc9f0300335f20RoboErik
36bfa153b64b4e8c2faa39a15e87fc9f0300335f20RoboErik    @Override
37bfa153b64b4e8c2faa39a15e87fc9f0300335f20RoboErik    protected ArrayList<String> getAllowedPackages() {
38bfa153b64b4e8c2faa39a15e87fc9f0300335f20RoboErik        ArrayList<String> allowedPackages = new ArrayList<String>();
39bfa153b64b4e8c2faa39a15e87fc9f0300335f20RoboErik        allowedPackages.add("com.android.onemedia");
40bfa153b64b4e8c2faa39a15e87fc9f0300335f20RoboErik        return allowedPackages;
41bfa153b64b4e8c2faa39a15e87fc9f0300335f20RoboErik    }
42bfa153b64b4e8c2faa39a15e87fc9f0300335f20RoboErik}
43