• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 package com.android.testing.uiautomation;
2 
3 import android.app.Service;
4 import android.content.Intent;
5 import android.os.IBinder;
6 import android.os.RemoteException;
7 import android.util.Log;
8 
9 public class ProviderService extends Service {
10 
11     private static final String LOGTAG = "ProviderService";
12     private ProviderImpl mProviderImpl;
13 
14     @Override
onBind(Intent intent)15     public IBinder onBind(Intent intent) {
16         if (mProviderImpl == null) {
17             try {
18                 mProviderImpl = new ProviderImpl(this);
19             } catch (RemoteException e) {
20                 Log.e(LOGTAG, "Failed to initialize implementation.");
21                 return null;
22             }
23         }
24         return mProviderImpl;
25     }
26 }
27