Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(190)

Side by Side Diff: dart/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/mobile/AndroidDevice.java

Issue 328663002: Version 1.5.0-dev.4.5 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 package com.google.dart.tools.core.mobile;
2
3 /**
4 * Class representing a connected android device as returned by
5 * {@link AndroidDebugBridge#getConnectedDevice()}.
6 */
7 public class AndroidDevice {
8
9 public static boolean isEqual(AndroidDevice d1, AndroidDevice d2) {
10 return d1 == null ? d2 == null : d1.equals(d2);
11 }
12
13 private String deviceId;
14
15 private boolean authorized;
16
17 public AndroidDevice(String deviceId, boolean authorized) {
18 if (deviceId == null) {
19 throw new IllegalArgumentException();
20 }
21 this.deviceId = deviceId;
22 this.authorized = authorized;
23 }
24
25 @Override
26 public boolean equals(Object other) {
27 if (other instanceof AndroidDevice) {
28 AndroidDevice d = (AndroidDevice) other;
29 return deviceId.equals(d.getDeviceId()) && authorized == d.isAuthorized();
30 }
31 return false;
32 }
33
34 public String getDeviceId() {
35 return deviceId;
36 }
37
38 @Override
39 public int hashCode() {
40 return deviceId.hashCode() + (authorized ? 1 : 0);
41 }
42
43 public boolean isAuthorized() {
44 return authorized;
45 }
46 }
OLDNEW
« no previous file with comments | « no previous file | dart/editor/tools/plugins/com.google.dart.tools.debug.core/src/com/google/dart/tools/debug/core/dartium/DartiumDebugIndexedValue.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698