| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
package android.hardware.usb; |
| 18 |
|
| 19 |
import android.annotation.IntDef; |
| 20 |
import android.annotation.NonNull; |
| 21 |
import android.annotation.Nullable; |
| 22 |
import android.annotation.SystemApi; |
| 23 |
import android.os.Parcel; |
| 24 |
import android.os.Parcelable; |
| 25 |
|
| 26 |
import com.android.internal.annotations.Immutable; |
| 27 |
|
| 28 |
import java.lang.annotation.Retention; |
| 29 |
import java.lang.annotation.RetentionPolicy; |
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
@Immutable |
| 37 |
@SystemApi |
| 38 |
public final class UsbPortStatus implements Parcelable { |
| 39 |
private static final String TAG = "UsbPortStatus"; |
| 40 |
private final int mCurrentMode; |
| 41 |
private final @UsbPowerRole int mCurrentPowerRole; |
| 42 |
private final @UsbDataRole int mCurrentDataRole; |
| 43 |
private final int mSupportedRoleCombinations; |
| 44 |
private final @ContaminantProtectionStatus int mContaminantProtectionStatus; |
| 45 |
private final @ContaminantDetectionStatus int mContaminantDetectionStatus; |
| 46 |
private final boolean mPowerTransferLimited; |
| 47 |
private final @UsbDataStatus int mUsbDataStatus; |
| 48 |
private final @PowerBrickConnectionStatus int mPowerBrickConnectionStatus; |
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
public static final int POWER_ROLE_NONE = 0; |
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
public static final int POWER_ROLE_SOURCE = 1; |
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
|
| 63 |
public static final int POWER_ROLE_SINK = 2; |
| 64 |
|
| 65 |
@IntDef(prefix = { "POWER_ROLE_" }, value = { |
| 66 |
POWER_ROLE_NONE, |
| 67 |
POWER_ROLE_SOURCE, |
| 68 |
POWER_ROLE_SINK |
| 69 |
}) |
| 70 |
@Retention(RetentionPolicy.SOURCE) |
| 71 |
@interface UsbPowerRole{} |
| 72 |
|
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
public static final int DATA_ROLE_NONE = 0; |
| 77 |
|
| 78 |
|
| 79 |
|
| 80 |
|
| 81 |
public static final int DATA_ROLE_HOST = 1; |
| 82 |
|
| 83 |
|
| 84 |
|
| 85 |
|
| 86 |
public static final int DATA_ROLE_DEVICE = 2; |
| 87 |
|
| 88 |
@IntDef(prefix = { "DATA_ROLE_" }, value = { |
| 89 |
DATA_ROLE_NONE, |
| 90 |
DATA_ROLE_HOST, |
| 91 |
DATA_ROLE_DEVICE |
| 92 |
}) |
| 93 |
@Retention(RetentionPolicy.SOURCE) |
| 94 |
@interface UsbDataRole{} |
| 95 |
|
| 96 |
|
| 97 |
|
| 98 |
|
| 99 |
public static final int MODE_NONE = 0; |
| 100 |
|
| 101 |
|
| 102 |
|
| 103 |
|
| 104 |
|
| 105 |
|
| 106 |
|
| 107 |
public static final int MODE_UFP = 1 << 0; |
| 108 |
|
| 109 |
|
| 110 |
|
| 111 |
|
| 112 |
|
| 113 |
|
| 114 |
|
| 115 |
public static final int MODE_DFP = 1 << 1; |
| 116 |
|
| 117 |
|
| 118 |
|
| 119 |
|
| 120 |
|
| 121 |
|
| 122 |
|
| 123 |
|
| 124 |
|
| 125 |
|
| 126 |
|
| 127 |
public static final int MODE_DUAL = MODE_UFP | MODE_DFP; |
| 128 |
|
| 129 |
|
| 130 |
|
| 131 |
|
| 132 |
public static final int MODE_AUDIO_ACCESSORY = 1 << 2; |
| 133 |
|
| 134 |
|
| 135 |
|
| 136 |
|
| 137 |
public static final int MODE_DEBUG_ACCESSORY = 1 << 3; |
| 138 |
|
| 139 |
|
| 140 |
|
| 141 |
|
| 142 |
|
| 143 |
public static final int CONTAMINANT_DETECTION_NOT_SUPPORTED = 0; |
| 144 |
|
| 145 |
|
| 146 |
|
| 147 |
|
| 148 |
|
| 149 |
public static final int CONTAMINANT_DETECTION_DISABLED = 1; |
| 150 |
|
| 151 |
|
| 152 |
|
| 153 |
|
| 154 |
|
| 155 |
public static final int CONTAMINANT_DETECTION_NOT_DETECTED = 2; |
| 156 |
|
| 157 |
|
| 158 |
|
| 159 |
|
| 160 |
|
| 161 |
public static final int CONTAMINANT_DETECTION_DETECTED = 3; |
| 162 |
|
| 163 |
|
| 164 |
|
| 165 |
|
| 166 |
|
| 167 |
|
| 168 |
public static final int CONTAMINANT_PROTECTION_NONE = 0; |
| 169 |
|
| 170 |
|
| 171 |
|
| 172 |
|
| 173 |
|
| 174 |
|
| 175 |
public static final int CONTAMINANT_PROTECTION_SINK = 1 << 0; |
| 176 |
|
| 177 |
|
| 178 |
|
| 179 |
|
| 180 |
|
| 181 |
|
| 182 |
public static final int CONTAMINANT_PROTECTION_SOURCE = 1 << 1; |
| 183 |
|
| 184 |
|
| 185 |
|
| 186 |
|
| 187 |
|
| 188 |
|
| 189 |
public static final int CONTAMINANT_PROTECTION_FORCE_DISABLE = 1 << 2; |
| 190 |
|
| 191 |
|
| 192 |
|
| 193 |
|
| 194 |
|
| 195 |
|
| 196 |
public static final int CONTAMINANT_PROTECTION_DISABLED = 1 << 3; |
| 197 |
|
| 198 |
|
| 199 |
|
| 200 |
|
| 201 |
public static final int DATA_STATUS_UNKNOWN = 0; |
| 202 |
|
| 203 |
|
| 204 |
|
| 205 |
|
| 206 |
public static final int DATA_STATUS_ENABLED = 1 << 0; |
| 207 |
|
| 208 |
|
| 209 |
|
| 210 |
|
| 211 |
public static final int DATA_STATUS_DISABLED_OVERHEAT = 1 << 1; |
| 212 |
|
| 213 |
|
| 214 |
|
| 215 |
|
| 216 |
public static final int DATA_STATUS_DISABLED_CONTAMINANT = 1 << 2; |
| 217 |
|
| 218 |
|
| 219 |
|
| 220 |
|
| 221 |
public static final int DATA_STATUS_DISABLED_DOCK = 1 << 3; |
| 222 |
|
| 223 |
|
| 224 |
|
| 225 |
|
| 226 |
|
| 227 |
public static final int DATA_STATUS_DISABLED_FORCE = 1 << 4; |
| 228 |
|
| 229 |
|
| 230 |
|
| 231 |
|
| 232 |
public static final int DATA_STATUS_DISABLED_DEBUG = 1 << 5; |
| 233 |
|
| 234 |
|
| 235 |
|
| 236 |
|
| 237 |
public static final int POWER_BRICK_STATUS_UNKNOWN = 0; |
| 238 |
|
| 239 |
|
| 240 |
|
| 241 |
|
| 242 |
public static final int POWER_BRICK_STATUS_CONNECTED = 1; |
| 243 |
|
| 244 |
|
| 245 |
|
| 246 |
|
| 247 |
public static final int POWER_BRICK_STATUS_DISCONNECTED = 2; |
| 248 |
|
| 249 |
@IntDef(prefix = { "CONTAMINANT_DETECTION_" }, value = { |
| 250 |
CONTAMINANT_DETECTION_NOT_SUPPORTED, |
| 251 |
CONTAMINANT_DETECTION_DISABLED, |
| 252 |
CONTAMINANT_DETECTION_NOT_DETECTED, |
| 253 |
CONTAMINANT_DETECTION_DETECTED, |
| 254 |
}) |
| 255 |
@Retention(RetentionPolicy.SOURCE) |
| 256 |
@interface ContaminantDetectionStatus{} |
| 257 |
|
| 258 |
@IntDef(prefix = { "CONTAMINANT_PROTECTION_" }, flag = true, value = { |
| 259 |
CONTAMINANT_PROTECTION_NONE, |
| 260 |
CONTAMINANT_PROTECTION_SINK, |
| 261 |
CONTAMINANT_PROTECTION_SOURCE, |
| 262 |
CONTAMINANT_PROTECTION_FORCE_DISABLE, |
| 263 |
CONTAMINANT_PROTECTION_DISABLED, |
| 264 |
}) |
| 265 |
@Retention(RetentionPolicy.SOURCE) |
| 266 |
@interface ContaminantProtectionStatus{} |
| 267 |
|
| 268 |
@IntDef(prefix = { "MODE_" }, value = { |
| 269 |
MODE_NONE, |
| 270 |
MODE_DFP, |
| 271 |
MODE_UFP, |
| 272 |
MODE_AUDIO_ACCESSORY, |
| 273 |
MODE_DEBUG_ACCESSORY, |
| 274 |
}) |
| 275 |
@Retention(RetentionPolicy.SOURCE) |
| 276 |
@interface UsbPortMode{} |
| 277 |
|
| 278 |
|
| 279 |
@IntDef(prefix = { "DATA_STATUS_" }, flag = true, value = { |
| 280 |
DATA_STATUS_UNKNOWN, |
| 281 |
DATA_STATUS_ENABLED, |
| 282 |
DATA_STATUS_DISABLED_OVERHEAT, |
| 283 |
DATA_STATUS_DISABLED_CONTAMINANT, |
| 284 |
DATA_STATUS_DISABLED_DOCK, |
| 285 |
DATA_STATUS_DISABLED_FORCE, |
| 286 |
DATA_STATUS_DISABLED_DEBUG |
| 287 |
}) |
| 288 |
@Retention(RetentionPolicy.SOURCE) |
| 289 |
@interface UsbDataStatus{} |
| 290 |
|
| 291 |
|
| 292 |
@IntDef(prefix = { "POWER_BRICK_STATUS_" }, value = { |
| 293 |
POWER_BRICK_STATUS_UNKNOWN, |
| 294 |
POWER_BRICK_STATUS_DISCONNECTED, |
| 295 |
POWER_BRICK_STATUS_CONNECTED, |
| 296 |
}) |
| 297 |
@Retention(RetentionPolicy.SOURCE) |
| 298 |
@interface PowerBrickConnectionStatus{} |
| 299 |
|
| 300 |
|
| 301 |
public UsbPortStatus(int currentMode, int currentPowerRole, int currentDataRole, |
| 302 |
int supportedRoleCombinations, int contaminantProtectionStatus, |
| 303 |
int contaminantDetectionStatus, @UsbDataStatus int usbDataStatus, |
| 304 |
boolean powerTransferLimited, |
| 305 |
@PowerBrickConnectionStatus int powerBrickConnectionStatus) { |
| 306 |
mCurrentMode = currentMode; |
| 307 |
mCurrentPowerRole = currentPowerRole; |
| 308 |
mCurrentDataRole = currentDataRole; |
| 309 |
mSupportedRoleCombinations = supportedRoleCombinations; |
| 310 |
mContaminantProtectionStatus = contaminantProtectionStatus; |
| 311 |
mContaminantDetectionStatus = contaminantDetectionStatus; |
| 312 |
mUsbDataStatus = usbDataStatus; |
| 313 |
mPowerTransferLimited = powerTransferLimited; |
| 314 |
mPowerBrickConnectionStatus = powerBrickConnectionStatus; |
| 315 |
} |
| 316 |
|
| 317 |
|
| 318 |
public UsbPortStatus(int currentMode, int currentPowerRole, int currentDataRole, |
| 319 |
int supportedRoleCombinations, int contaminantProtectionStatus, |
| 320 |
int contaminantDetectionStatus) { |
| 321 |
mCurrentMode = currentMode; |
| 322 |
mCurrentPowerRole = currentPowerRole; |
| 323 |
mCurrentDataRole = currentDataRole; |
| 324 |
mSupportedRoleCombinations = supportedRoleCombinations; |
| 325 |
mContaminantProtectionStatus = contaminantProtectionStatus; |
| 326 |
mContaminantDetectionStatus = contaminantDetectionStatus; |
| 327 |
mUsbDataStatus = DATA_STATUS_UNKNOWN; |
| 328 |
mPowerBrickConnectionStatus = POWER_BRICK_STATUS_UNKNOWN; |
| 329 |
mPowerTransferLimited = false; |
| 330 |
} |
| 331 |
|
| 332 |
|
| 333 |
|
| 334 |
|
| 335 |
|
| 336 |
|
| 337 |
public boolean isConnected() { |
| 338 |
return mCurrentMode != 0; |
| 339 |
} |
| 340 |
|
| 341 |
|
| 342 |
|
| 343 |
|
| 344 |
|
| 345 |
|
| 346 |
|
| 347 |
|
| 348 |
public @UsbPortMode int getCurrentMode() { |
| 349 |
return mCurrentMode; |
| 350 |
} |
| 351 |
|
| 352 |
|
| 353 |
|
| 354 |
|
| 355 |
|
| 356 |
|
| 357 |
|
| 358 |
public @UsbPowerRole int getCurrentPowerRole() { |
| 359 |
return mCurrentPowerRole; |
| 360 |
} |
| 361 |
|
| 362 |
|
| 363 |
|
| 364 |
|
| 365 |
|
| 366 |
|
| 367 |
|
| 368 |
public @UsbDataRole int getCurrentDataRole() { |
| 369 |
return mCurrentDataRole; |
| 370 |
} |
| 371 |
|
| 372 |
|
| 373 |
|
| 374 |
|
| 375 |
|
| 376 |
|
| 377 |
|
| 378 |
|
| 379 |
|
| 380 |
|
| 381 |
public boolean isRoleCombinationSupported(@UsbPowerRole int powerRole, |
| 382 |
@UsbDataRole int dataRole) { |
| 383 |
return (mSupportedRoleCombinations & |
| 384 |
UsbPort.combineRolesAsBit(powerRole, dataRole)) != 0; |
| 385 |
} |
| 386 |
|
| 387 |
|
| 388 |
|
| 389 |
|
| 390 |
public int getSupportedRoleCombinations() { |
| 391 |
return mSupportedRoleCombinations; |
| 392 |
} |
| 393 |
|
| 394 |
|
| 395 |
|
| 396 |
|
| 397 |
|
| 398 |
|
| 399 |
public @ContaminantDetectionStatus int getContaminantDetectionStatus() { |
| 400 |
return mContaminantDetectionStatus; |
| 401 |
} |
| 402 |
|
| 403 |
|
| 404 |
|
| 405 |
|
| 406 |
|
| 407 |
|
| 408 |
public @ContaminantProtectionStatus int getContaminantProtectionStatus() { |
| 409 |
return mContaminantProtectionStatus; |
| 410 |
} |
| 411 |
|
| 412 |
|
| 413 |
|
| 414 |
|
| 415 |
|
| 416 |
|
| 417 |
|
| 418 |
|
| 419 |
|
| 420 |
|
| 421 |
public @UsbDataStatus int getUsbDataStatus() { |
| 422 |
return mUsbDataStatus; |
| 423 |
} |
| 424 |
|
| 425 |
|
| 426 |
|
| 427 |
|
| 428 |
|
| 429 |
|
| 430 |
|
| 431 |
public boolean isPowerTransferLimited() { |
| 432 |
return mPowerTransferLimited; |
| 433 |
} |
| 434 |
|
| 435 |
|
| 436 |
|
| 437 |
|
| 438 |
|
| 439 |
|
| 440 |
|
| 441 |
|
| 442 |
public @PowerBrickConnectionStatus int getPowerBrickConnectionStatus() { |
| 443 |
return mPowerBrickConnectionStatus; |
| 444 |
} |
| 445 |
|
| 446 |
@NonNull |
| 447 |
@Override |
| 448 |
public String toString() { |
| 449 |
return "UsbPortStatus{connected=" + isConnected() |
| 450 |
+ ", currentMode=" + UsbPort.modeToString(mCurrentMode) |
| 451 |
+ ", currentPowerRole=" + UsbPort.powerRoleToString(mCurrentPowerRole) |
| 452 |
+ ", currentDataRole=" + UsbPort.dataRoleToString(mCurrentDataRole) |
| 453 |
+ ", supportedRoleCombinations=" |
| 454 |
+ UsbPort.roleCombinationsToString(mSupportedRoleCombinations) |
| 455 |
+ ", contaminantDetectionStatus=" |
| 456 |
+ getContaminantDetectionStatus() |
| 457 |
+ ", contaminantProtectionStatus=" |
| 458 |
+ getContaminantProtectionStatus() |
| 459 |
+ ", usbDataStatus=" |
| 460 |
+ UsbPort.usbDataStatusToString(getUsbDataStatus()) |
| 461 |
+ ", isPowerTransferLimited=" |
| 462 |
+ isPowerTransferLimited() |
| 463 |
+", powerBrickConnectionStatus=" |
| 464 |
+ UsbPort |
| 465 |
.powerBrickConnectionStatusToString(getPowerBrickConnectionStatus()) |
| 466 |
+ "}"; |
| 467 |
} |
| 468 |
|
| 469 |
@Override |
| 470 |
public int describeContents() { |
| 471 |
return 0; |
| 472 |
} |
| 473 |
|
| 474 |
@Override |
| 475 |
public void writeToParcel(Parcel dest, int flags) { |
| 476 |
dest.writeInt(mCurrentMode); |
| 477 |
dest.writeInt(mCurrentPowerRole); |
| 478 |
dest.writeInt(mCurrentDataRole); |
| 479 |
dest.writeInt(mSupportedRoleCombinations); |
| 480 |
dest.writeInt(mContaminantProtectionStatus); |
| 481 |
dest.writeInt(mContaminantDetectionStatus); |
| 482 |
dest.writeInt(mUsbDataStatus); |
| 483 |
dest.writeBoolean(mPowerTransferLimited); |
| 484 |
dest.writeInt(mPowerBrickConnectionStatus); |
| 485 |
} |
| 486 |
|
| 487 |
public static final @NonNull Parcelable.Creator<UsbPortStatus> CREATOR = |
| 488 |
new Parcelable.Creator<UsbPortStatus>() { |
| 489 |
@Override |
| 490 |
public UsbPortStatus createFromParcel(Parcel in) { |
| 491 |
int currentMode = in.readInt(); |
| 492 |
int currentPowerRole = in.readInt(); |
| 493 |
int currentDataRole = in.readInt(); |
| 494 |
int supportedRoleCombinations = in.readInt(); |
| 495 |
int contaminantProtectionStatus = in.readInt(); |
| 496 |
int contaminantDetectionStatus = in.readInt(); |
| 497 |
int usbDataStatus = in.readInt(); |
| 498 |
boolean powerTransferLimited = in.readBoolean(); |
| 499 |
int powerBrickConnectionStatus = in.readInt(); |
| 500 |
return new UsbPortStatus(currentMode, currentPowerRole, currentDataRole, |
| 501 |
supportedRoleCombinations, contaminantProtectionStatus, |
| 502 |
contaminantDetectionStatus, usbDataStatus, powerTransferLimited, |
| 503 |
powerBrickConnectionStatus); |
| 504 |
} |
| 505 |
|
| 506 |
@Override |
| 507 |
public UsbPortStatus[] newArray(int size) { |
| 508 |
return new UsbPortStatus[size]; |
| 509 |
} |
| 510 |
}; |
| 511 |
|
| 512 |
|
| 513 |
|
| 514 |
|
| 515 |
|
| 516 |
|
| 517 |
public static final class Builder { |
| 518 |
private @UsbPortMode int mCurrentMode; |
| 519 |
private @UsbPowerRole int mCurrentPowerRole; |
| 520 |
private @UsbDataRole int mCurrentDataRole; |
| 521 |
private int mSupportedRoleCombinations; |
| 522 |
private @ContaminantProtectionStatus int mContaminantProtectionStatus; |
| 523 |
private @ContaminantDetectionStatus int mContaminantDetectionStatus; |
| 524 |
private boolean mPowerTransferLimited; |
| 525 |
private @UsbDataStatus int mUsbDataStatus; |
| 526 |
private @PowerBrickConnectionStatus int mPowerBrickConnectionStatus; |
| 527 |
|
| 528 |
public Builder() { |
| 529 |
mCurrentMode = MODE_NONE; |
| 530 |
mCurrentPowerRole = POWER_ROLE_NONE; |
| 531 |
mCurrentDataRole = DATA_ROLE_NONE; |
| 532 |
mContaminantProtectionStatus = CONTAMINANT_PROTECTION_NONE; |
| 533 |
mContaminantDetectionStatus = CONTAMINANT_DETECTION_NOT_SUPPORTED; |
| 534 |
mUsbDataStatus = DATA_STATUS_UNKNOWN; |
| 535 |
mPowerBrickConnectionStatus = POWER_BRICK_STATUS_UNKNOWN; |
| 536 |
} |
| 537 |
|
| 538 |
|
| 539 |
|
| 540 |
|
| 541 |
|
| 542 |
|
| 543 |
@NonNull |
| 544 |
public Builder setCurrentMode(@UsbPortMode int currentMode) { |
| 545 |
mCurrentMode = currentMode; |
| 546 |
return this; |
| 547 |
} |
| 548 |
|
| 549 |
|
| 550 |
|
| 551 |
|
| 552 |
|
| 553 |
|
| 554 |
@NonNull |
| 555 |
public Builder setCurrentRoles(@UsbPowerRole int currentPowerRole, |
| 556 |
@UsbDataRole int currentDataRole) { |
| 557 |
mCurrentPowerRole = currentPowerRole; |
| 558 |
mCurrentDataRole = currentDataRole; |
| 559 |
return this; |
| 560 |
} |
| 561 |
|
| 562 |
|
| 563 |
|
| 564 |
|
| 565 |
|
| 566 |
|
| 567 |
@NonNull |
| 568 |
public Builder setSupportedRoleCombinations(int supportedRoleCombinations) { |
| 569 |
mSupportedRoleCombinations = supportedRoleCombinations; |
| 570 |
return this; |
| 571 |
} |
| 572 |
|
| 573 |
|
| 574 |
|
| 575 |
|
| 576 |
|
| 577 |
|
| 578 |
@NonNull |
| 579 |
public Builder setContaminantStatus( |
| 580 |
@ContaminantProtectionStatus int contaminantProtectionStatus, |
| 581 |
@ContaminantDetectionStatus int contaminantDetectionStatus) { |
| 582 |
mContaminantProtectionStatus = contaminantProtectionStatus; |
| 583 |
mContaminantDetectionStatus = contaminantDetectionStatus; |
| 584 |
return this; |
| 585 |
} |
| 586 |
|
| 587 |
|
| 588 |
|
| 589 |
|
| 590 |
|
| 591 |
|
| 592 |
@NonNull |
| 593 |
public Builder setPowerTransferLimited(boolean powerTransferLimited) { |
| 594 |
mPowerTransferLimited = powerTransferLimited; |
| 595 |
return this; |
| 596 |
} |
| 597 |
|
| 598 |
|
| 599 |
|
| 600 |
|
| 601 |
|
| 602 |
|
| 603 |
@NonNull |
| 604 |
public Builder setUsbDataStatus(@UsbDataStatus int usbDataStatus) { |
| 605 |
mUsbDataStatus = usbDataStatus; |
| 606 |
return this; |
| 607 |
} |
| 608 |
|
| 609 |
|
| 610 |
|
| 611 |
|
| 612 |
|
| 613 |
|
| 614 |
@NonNull |
| 615 |
public Builder setPowerBrickConnectionStatus( |
| 616 |
@PowerBrickConnectionStatus int powerBrickConnectionStatus) { |
| 617 |
mPowerBrickConnectionStatus = powerBrickConnectionStatus; |
| 618 |
return this; |
| 619 |
} |
| 620 |
|
| 621 |
|
| 622 |
|
| 623 |
|
| 624 |
@NonNull |
| 625 |
public UsbPortStatus build() { |
| 626 |
UsbPortStatus status = new UsbPortStatus(mCurrentMode, mCurrentPowerRole, |
| 627 |
mCurrentDataRole, mSupportedRoleCombinations, mContaminantProtectionStatus, |
| 628 |
mContaminantDetectionStatus, mUsbDataStatus, mPowerTransferLimited, |
| 629 |
mPowerBrickConnectionStatus); |
| 630 |
return status; |
| 631 |
} |
| 632 |
}; |
| 633 |
} |