Merge "Fixup lint errors in ServiceWatcher" into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
3878ef82a2
@@ -176,7 +176,7 @@ public interface ServiceWatcher {
|
|||||||
if (this == o) {
|
if (this == o) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (o == null || getClass() != o.getClass()) {
|
if (!(o instanceof BoundServiceInfo)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -147,13 +147,23 @@ class ServiceWatcherImpl<TBoundServiceInfo extends BoundServiceInfo> implements
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return mServiceConnection.getBoundServiceInfo().toString();
|
MyServiceConnection serviceConnection;
|
||||||
|
synchronized (this) {
|
||||||
|
serviceConnection = mServiceConnection;
|
||||||
|
}
|
||||||
|
|
||||||
|
return serviceConnection.getBoundServiceInfo().toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void dump(PrintWriter pw) {
|
public void dump(PrintWriter pw) {
|
||||||
pw.println("target service=" + mServiceConnection.getBoundServiceInfo());
|
MyServiceConnection serviceConnection;
|
||||||
pw.println("connected=" + mServiceConnection.isConnected());
|
synchronized (this) {
|
||||||
|
serviceConnection = mServiceConnection;
|
||||||
|
}
|
||||||
|
|
||||||
|
pw.println("target service=" + serviceConnection.getBoundServiceInfo());
|
||||||
|
pw.println("connected=" + serviceConnection.isConnected());
|
||||||
}
|
}
|
||||||
|
|
||||||
// runs on the handler thread, and expects most of it's methods to be called from that thread
|
// runs on the handler thread, and expects most of it's methods to be called from that thread
|
||||||
|
|||||||
Reference in New Issue
Block a user