OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 package org.chromium.tools.spnegoauthenticator; | 5 package org.chromium.tools.spnegoauthenticator; |
6 | 6 |
| 7 import android.annotation.SuppressLint; |
7 import android.app.Service; | 8 import android.app.Service; |
8 import android.content.Intent; | 9 import android.content.Intent; |
9 import android.os.IBinder; | 10 import android.os.IBinder; |
10 | 11 |
11 import org.chromium.base.Log; | 12 import org.chromium.base.Log; |
12 | 13 |
13 /** Service exposing the dummy {@link SpnegoAuthenticator}. */ | 14 /** Service exposing the dummy {@link SpnegoAuthenticator}. */ |
14 public class SpnegoAuthenticatorService extends Service { | 15 public class SpnegoAuthenticatorService extends Service { |
15 private static final String TAG = "tools_SpnegoAuth"; | 16 private static final String TAG = "tools_SpnegoAuth"; |
| 17 @SuppressLint("StaticFieldLeak") |
16 private static SpnegoAuthenticator sAuthenticator; | 18 private static SpnegoAuthenticator sAuthenticator; |
17 | 19 |
18 @Override | 20 @Override |
19 public IBinder onBind(Intent intent) { | 21 public IBinder onBind(Intent intent) { |
20 Log.d(TAG, "Binding SpnegoAuthenticatorService"); | 22 Log.d(TAG, "Binding SpnegoAuthenticatorService"); |
21 if (sAuthenticator == null) sAuthenticator = new SpnegoAuthenticator(thi
s); | 23 if (sAuthenticator == null) sAuthenticator = new SpnegoAuthenticator(thi
s); |
22 return sAuthenticator.getIBinder(); | 24 return sAuthenticator.getIBinder(); |
23 } | 25 } |
24 } | 26 } |
OLD | NEW |