| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
package android.hardware.radio; |
| 18 |
|
| 19 |
import android.annotation.IntDef; |
| 20 |
import android.annotation.IntRange; |
| 21 |
import android.annotation.NonNull; |
| 22 |
import android.annotation.Nullable; |
| 23 |
import android.annotation.SystemApi; |
| 24 |
import android.os.Parcel; |
| 25 |
import android.os.Parcelable; |
| 26 |
|
| 27 |
import java.lang.annotation.Retention; |
| 28 |
import java.lang.annotation.RetentionPolicy; |
| 29 |
import java.util.ArrayList; |
| 30 |
import java.util.Arrays; |
| 31 |
import java.util.List; |
| 32 |
import java.util.Objects; |
| 33 |
import java.util.stream.Stream; |
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
@SystemApi |
| 62 |
public final class ProgramSelector implements Parcelable { |
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
@Deprecated |
| 67 |
public static final int PROGRAM_TYPE_INVALID = 0; |
| 68 |
|
| 69 |
|
| 70 |
|
| 71 |
@Deprecated |
| 72 |
public static final int PROGRAM_TYPE_AM = 1; |
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
@Deprecated |
| 77 |
public static final int PROGRAM_TYPE_FM = 2; |
| 78 |
|
| 79 |
|
| 80 |
|
| 81 |
@Deprecated |
| 82 |
public static final int PROGRAM_TYPE_AM_HD = 3; |
| 83 |
|
| 84 |
|
| 85 |
|
| 86 |
@Deprecated |
| 87 |
public static final int PROGRAM_TYPE_FM_HD = 4; |
| 88 |
|
| 89 |
|
| 90 |
|
| 91 |
@Deprecated |
| 92 |
public static final int PROGRAM_TYPE_DAB = 5; |
| 93 |
|
| 94 |
|
| 95 |
|
| 96 |
@Deprecated |
| 97 |
public static final int PROGRAM_TYPE_DRMO = 6; |
| 98 |
|
| 99 |
|
| 100 |
|
| 101 |
@Deprecated |
| 102 |
public static final int PROGRAM_TYPE_SXM = 7; |
| 103 |
|
| 104 |
|
| 105 |
|
| 106 |
@Deprecated |
| 107 |
public static final int PROGRAM_TYPE_VENDOR_START = 1000; |
| 108 |
|
| 109 |
@Deprecated |
| 110 |
public static final int PROGRAM_TYPE_VENDOR_END = 1999; |
| 111 |
|
| 112 |
@Deprecated |
| 113 |
@IntDef(prefix = { "PROGRAM_TYPE_" }, value = { |
| 114 |
PROGRAM_TYPE_INVALID, |
| 115 |
PROGRAM_TYPE_AM, |
| 116 |
PROGRAM_TYPE_FM, |
| 117 |
PROGRAM_TYPE_AM_HD, |
| 118 |
PROGRAM_TYPE_FM_HD, |
| 119 |
PROGRAM_TYPE_DAB, |
| 120 |
PROGRAM_TYPE_DRMO, |
| 121 |
PROGRAM_TYPE_SXM, |
| 122 |
}) |
| 123 |
@IntRange(from = PROGRAM_TYPE_VENDOR_START, to = PROGRAM_TYPE_VENDOR_END) |
| 124 |
@Retention(RetentionPolicy.SOURCE) |
| 125 |
public @interface ProgramType {} |
| 126 |
|
| 127 |
public static final int IDENTIFIER_TYPE_INVALID = 0; |
| 128 |
|
| 129 |
public static final int IDENTIFIER_TYPE_AMFM_FREQUENCY = 1; |
| 130 |
|
| 131 |
public static final int IDENTIFIER_TYPE_RDS_PI = 2; |
| 132 |
|
| 133 |
|
| 134 |
|
| 135 |
|
| 136 |
|
| 137 |
|
| 138 |
|
| 139 |
|
| 140 |
|
| 141 |
|
| 142 |
public static final int IDENTIFIER_TYPE_HD_STATION_ID_EXT = 3; |
| 143 |
|
| 144 |
|
| 145 |
|
| 146 |
|
| 147 |
|
| 148 |
|
| 149 |
|
| 150 |
|
| 151 |
@Deprecated |
| 152 |
public static final int IDENTIFIER_TYPE_HD_SUBCHANNEL = 4; |
| 153 |
|
| 154 |
|
| 155 |
|
| 156 |
|
| 157 |
|
| 158 |
|
| 159 |
|
| 160 |
|
| 161 |
|
| 162 |
|
| 163 |
|
| 164 |
|
| 165 |
|
| 166 |
|
| 167 |
public static final int IDENTIFIER_TYPE_HD_STATION_NAME = 10004; |
| 168 |
|
| 169 |
|
| 170 |
|
| 171 |
public static final int IDENTIFIER_TYPE_DAB_SIDECC = 5; |
| 172 |
|
| 173 |
|
| 174 |
|
| 175 |
|
| 176 |
|
| 177 |
|
| 178 |
|
| 179 |
|
| 180 |
|
| 181 |
|
| 182 |
|
| 183 |
|
| 184 |
|
| 185 |
|
| 186 |
|
| 187 |
public static final int IDENTIFIER_TYPE_DAB_SID_EXT = IDENTIFIER_TYPE_DAB_SIDECC; |
| 188 |
|
| 189 |
public static final int IDENTIFIER_TYPE_DAB_ENSEMBLE = 6; |
| 190 |
|
| 191 |
public static final int IDENTIFIER_TYPE_DAB_SCID = 7; |
| 192 |
|
| 193 |
public static final int IDENTIFIER_TYPE_DAB_FREQUENCY = 8; |
| 194 |
|
| 195 |
public static final int IDENTIFIER_TYPE_DRMO_SERVICE_ID = 9; |
| 196 |
|
| 197 |
public static final int IDENTIFIER_TYPE_DRMO_FREQUENCY = 10; |
| 198 |
|
| 199 |
|
| 200 |
|
| 201 |
|
| 202 |
@Deprecated |
| 203 |
public static final int IDENTIFIER_TYPE_DRMO_MODULATION = 11; |
| 204 |
|
| 205 |
public static final int IDENTIFIER_TYPE_SXM_SERVICE_ID = 12; |
| 206 |
|
| 207 |
public static final int IDENTIFIER_TYPE_SXM_CHANNEL = 13; |
| 208 |
|
| 209 |
|
| 210 |
|
| 211 |
|
| 212 |
|
| 213 |
|
| 214 |
|
| 215 |
|
| 216 |
public static final int IDENTIFIER_TYPE_VENDOR_START = PROGRAM_TYPE_VENDOR_START; |
| 217 |
|
| 218 |
|
| 219 |
|
| 220 |
public static final int IDENTIFIER_TYPE_VENDOR_END = PROGRAM_TYPE_VENDOR_END; |
| 221 |
|
| 222 |
|
| 223 |
|
| 224 |
@Deprecated |
| 225 |
public static final int IDENTIFIER_TYPE_VENDOR_PRIMARY_START = IDENTIFIER_TYPE_VENDOR_START; |
| 226 |
|
| 227 |
|
| 228 |
|
| 229 |
@Deprecated |
| 230 |
public static final int IDENTIFIER_TYPE_VENDOR_PRIMARY_END = IDENTIFIER_TYPE_VENDOR_END; |
| 231 |
@IntDef(prefix = { "IDENTIFIER_TYPE_" }, value = { |
| 232 |
IDENTIFIER_TYPE_INVALID, |
| 233 |
IDENTIFIER_TYPE_AMFM_FREQUENCY, |
| 234 |
IDENTIFIER_TYPE_RDS_PI, |
| 235 |
IDENTIFIER_TYPE_HD_STATION_ID_EXT, |
| 236 |
IDENTIFIER_TYPE_HD_SUBCHANNEL, |
| 237 |
IDENTIFIER_TYPE_HD_STATION_NAME, |
| 238 |
IDENTIFIER_TYPE_DAB_SID_EXT, |
| 239 |
IDENTIFIER_TYPE_DAB_SIDECC, |
| 240 |
IDENTIFIER_TYPE_DAB_ENSEMBLE, |
| 241 |
IDENTIFIER_TYPE_DAB_SCID, |
| 242 |
IDENTIFIER_TYPE_DAB_FREQUENCY, |
| 243 |
IDENTIFIER_TYPE_DRMO_SERVICE_ID, |
| 244 |
IDENTIFIER_TYPE_DRMO_FREQUENCY, |
| 245 |
IDENTIFIER_TYPE_DRMO_MODULATION, |
| 246 |
IDENTIFIER_TYPE_SXM_SERVICE_ID, |
| 247 |
IDENTIFIER_TYPE_SXM_CHANNEL, |
| 248 |
}) |
| 249 |
@IntRange(from = IDENTIFIER_TYPE_VENDOR_START, to = IDENTIFIER_TYPE_VENDOR_END) |
| 250 |
@Retention(RetentionPolicy.SOURCE) |
| 251 |
public @interface IdentifierType {} |
| 252 |
|
| 253 |
private final @ProgramType int mProgramType; |
| 254 |
private final @NonNull Identifier mPrimaryId; |
| 255 |
private final @NonNull Identifier[] mSecondaryIds; |
| 256 |
private final @NonNull long[] mVendorIds; |
| 257 |
|
| 258 |
|
| 259 |
|
| 260 |
|
| 261 |
|
| 262 |
|
| 263 |
|
| 264 |
|
| 265 |
|
| 266 |
|
| 267 |
|
| 268 |
|
| 269 |
|
| 270 |
|
| 271 |
public ProgramSelector(@ProgramType int programType, @NonNull Identifier primaryId, |
| 272 |
@Nullable Identifier[] secondaryIds, @Nullable long[] vendorIds) { |
| 273 |
if (secondaryIds == null) secondaryIds = new Identifier[0]; |
| 274 |
if (vendorIds == null) vendorIds = new long[0]; |
| 275 |
if (Stream.of(secondaryIds).anyMatch(id -> id == null)) { |
| 276 |
throw new IllegalArgumentException("secondaryIds list must not contain nulls"); |
| 277 |
} |
| 278 |
mProgramType = programType; |
| 279 |
mPrimaryId = Objects.requireNonNull(primaryId); |
| 280 |
mSecondaryIds = secondaryIds; |
| 281 |
mVendorIds = vendorIds; |
| 282 |
} |
| 283 |
|
| 284 |
|
| 285 |
|
| 286 |
|
| 287 |
|
| 288 |
|
| 289 |
|
| 290 |
@Deprecated |
| 291 |
public @ProgramType int getProgramType() { |
| 292 |
return mProgramType; |
| 293 |
} |
| 294 |
|
| 295 |
|
| 296 |
|
| 297 |
|
| 298 |
|
| 299 |
|
| 300 |
|
| 301 |
public @NonNull Identifier getPrimaryId() { |
| 302 |
return mPrimaryId; |
| 303 |
} |
| 304 |
|
| 305 |
|
| 306 |
|
| 307 |
|
| 308 |
|
| 309 |
|
| 310 |
|
| 311 |
public @NonNull Identifier[] getSecondaryIds() { |
| 312 |
return mSecondaryIds; |
| 313 |
} |
| 314 |
|
| 315 |
|
| 316 |
|
| 317 |
|
| 318 |
|
| 319 |
|
| 320 |
|
| 321 |
|
| 322 |
|
| 323 |
|
| 324 |
|
| 325 |
public long getFirstId(@IdentifierType int type) { |
| 326 |
if (mPrimaryId.getType() == type) return mPrimaryId.getValue(); |
| 327 |
for (Identifier id : mSecondaryIds) { |
| 328 |
if (id.getType() == type) return id.getValue(); |
| 329 |
} |
| 330 |
throw new IllegalArgumentException("Identifier " + type + " not found"); |
| 331 |
} |
| 332 |
|
| 333 |
|
| 334 |
|
| 335 |
|
| 336 |
|
| 337 |
|
| 338 |
|
| 339 |
|
| 340 |
|
| 341 |
|
| 342 |
public @NonNull Identifier[] getAllIds(@IdentifierType int type) { |
| 343 |
List<Identifier> out = new ArrayList<>(); |
| 344 |
|
| 345 |
if (mPrimaryId.getType() == type) out.add(mPrimaryId); |
| 346 |
for (Identifier id : mSecondaryIds) { |
| 347 |
if (id.getType() == type) out.add(id); |
| 348 |
} |
| 349 |
|
| 350 |
return out.toArray(new Identifier[out.size()]); |
| 351 |
} |
| 352 |
|
| 353 |
|
| 354 |
|
| 355 |
|
| 356 |
|
| 357 |
|
| 358 |
|
| 359 |
|
| 360 |
|
| 361 |
@Deprecated |
| 362 |
public @NonNull long[] getVendorIds() { |
| 363 |
return mVendorIds; |
| 364 |
} |
| 365 |
|
| 366 |
|
| 367 |
|
| 368 |
|
| 369 |
|
| 370 |
|
| 371 |
|
| 372 |
|
| 373 |
|
| 374 |
|
| 375 |
|
| 376 |
|
| 377 |
|
| 378 |
|
| 379 |
|
| 380 |
|
| 381 |
|
| 382 |
public @NonNull ProgramSelector withSecondaryPreferred(@NonNull Identifier preferred) { |
| 383 |
int preferredType = preferred.getType(); |
| 384 |
Identifier[] secondaryIds = Stream.concat( |
| 385 |
|
| 386 |
Arrays.stream(mSecondaryIds).filter(id -> id.getType() != preferredType), |
| 387 |
|
| 388 |
Stream.of(preferred)).toArray(Identifier[]::new); |
| 389 |
|
| 390 |
return new ProgramSelector( |
| 391 |
mProgramType, |
| 392 |
mPrimaryId, |
| 393 |
secondaryIds, |
| 394 |
mVendorIds |
| 395 |
); |
| 396 |
} |
| 397 |
|
| 398 |
|
| 399 |
|
| 400 |
|
| 401 |
|
| 402 |
|
| 403 |
|
| 404 |
|
| 405 |
|
| 406 |
public static @NonNull ProgramSelector createAmFmSelector( |
| 407 |
@RadioManager.Band int band, int frequencyKhz) { |
| 408 |
return createAmFmSelector(band, frequencyKhz, 0); |
| 409 |
} |
| 410 |
|
| 411 |
|
| 412 |
|
| 413 |
|
| 414 |
|
| 415 |
|
| 416 |
|
| 417 |
|
| 418 |
|
| 419 |
|
| 420 |
|
| 421 |
|
| 422 |
private static boolean isValidAmFmFrequency(boolean isAm, int frequencyKhz) { |
| 423 |
if (isAm) { |
| 424 |
return frequencyKhz > 150 && frequencyKhz <= 30000; |
| 425 |
} else { |
| 426 |
return frequencyKhz > 60000 && frequencyKhz < 110000; |
| 427 |
} |
| 428 |
} |
| 429 |
|
| 430 |
|
| 431 |
|
| 432 |
|
| 433 |
|
| 434 |
|
| 435 |
|
| 436 |
|
| 437 |
|
| 438 |
|
| 439 |
|
| 440 |
|
| 441 |
|
| 442 |
|
| 443 |
public static @NonNull ProgramSelector createAmFmSelector( |
| 444 |
@RadioManager.Band int band, int frequencyKhz, int subChannel) { |
| 445 |
if (band == RadioManager.BAND_INVALID) { |
| 446 |
|
| 447 |
if (frequencyKhz < 50000) { |
| 448 |
band = (subChannel <= 0) ? RadioManager.BAND_AM : RadioManager.BAND_AM_HD; |
| 449 |
} else { |
| 450 |
band = (subChannel <= 0) ? RadioManager.BAND_FM : RadioManager.BAND_FM_HD; |
| 451 |
} |
| 452 |
} |
| 453 |
|
| 454 |
boolean isAm = (band == RadioManager.BAND_AM || band == RadioManager.BAND_AM_HD); |
| 455 |
boolean isDigital = (band == RadioManager.BAND_AM_HD || band == RadioManager.BAND_FM_HD); |
| 456 |
if (!isAm && !isDigital && band != RadioManager.BAND_FM) { |
| 457 |
throw new IllegalArgumentException("Unknown band: " + band); |
| 458 |
} |
| 459 |
if (subChannel < 0 || subChannel > 8) { |
| 460 |
throw new IllegalArgumentException("Invalid subchannel: " + subChannel); |
| 461 |
} |
| 462 |
if (subChannel > 0 && !isDigital) { |
| 463 |
throw new IllegalArgumentException("Subchannels are not supported for non-HD radio"); |
| 464 |
} |
| 465 |
if (!isValidAmFmFrequency(isAm, frequencyKhz)) { |
| 466 |
throw new IllegalArgumentException("Provided value is not a valid AM/FM frequency: " |
| 467 |
+ frequencyKhz); |
| 468 |
} |
| 469 |
|
| 470 |
|
| 471 |
@ProgramType int programType = isAm ? PROGRAM_TYPE_AM : PROGRAM_TYPE_FM; |
| 472 |
Identifier primary = new Identifier(IDENTIFIER_TYPE_AMFM_FREQUENCY, frequencyKhz); |
| 473 |
|
| 474 |
Identifier[] secondary = null; |
| 475 |
if (subChannel > 0) { |
| 476 |
|
| 477 |
|
| 478 |
|
| 479 |
|
| 480 |
|
| 481 |
secondary = new Identifier[]{ |
| 482 |
new Identifier(IDENTIFIER_TYPE_HD_SUBCHANNEL, subChannel - 1)}; |
| 483 |
} |
| 484 |
|
| 485 |
return new ProgramSelector(programType, primary, secondary, null); |
| 486 |
} |
| 487 |
|
| 488 |
@NonNull |
| 489 |
@Override |
| 490 |
public String toString() { |
| 491 |
StringBuilder sb = new StringBuilder("ProgramSelector(type=").append(mProgramType) |
| 492 |
.append(", primary=").append(mPrimaryId); |
| 493 |
if (mSecondaryIds.length > 0) { |
| 494 |
sb.append(", secondary=").append(Arrays.toString(mSecondaryIds)); |
| 495 |
} |
| 496 |
if (mVendorIds.length > 0) { |
| 497 |
sb.append(", vendor=").append(Arrays.toString(mVendorIds)); |
| 498 |
} |
| 499 |
sb.append(")"); |
| 500 |
return sb.toString(); |
| 501 |
} |
| 502 |
|
| 503 |
@Override |
| 504 |
public int hashCode() { |
| 505 |
|
| 506 |
return mPrimaryId.hashCode(); |
| 507 |
} |
| 508 |
|
| 509 |
@Override |
| 510 |
public boolean equals(@Nullable Object obj) { |
| 511 |
if (this == obj) return true; |
| 512 |
if (!(obj instanceof ProgramSelector)) return false; |
| 513 |
ProgramSelector other = (ProgramSelector) obj; |
| 514 |
|
| 515 |
|
| 516 |
return mPrimaryId.equals(other.getPrimaryId()); |
| 517 |
} |
| 518 |
|
| 519 |
private ProgramSelector(Parcel in) { |
| 520 |
mProgramType = in.readInt(); |
| 521 |
mPrimaryId = in.readTypedObject(Identifier.CREATOR); |
| 522 |
mSecondaryIds = in.createTypedArray(Identifier.CREATOR); |
| 523 |
if (Stream.of(mSecondaryIds).anyMatch(id -> id == null)) { |
| 524 |
throw new IllegalArgumentException("secondaryIds list must not contain nulls"); |
| 525 |
} |
| 526 |
mVendorIds = in.createLongArray(); |
| 527 |
} |
| 528 |
|
| 529 |
@Override |
| 530 |
public void writeToParcel(Parcel dest, int flags) { |
| 531 |
dest.writeInt(mProgramType); |
| 532 |
dest.writeTypedObject(mPrimaryId, 0); |
| 533 |
dest.writeTypedArray(mSecondaryIds, 0); |
| 534 |
dest.writeLongArray(mVendorIds); |
| 535 |
} |
| 536 |
|
| 537 |
@Override |
| 538 |
public int describeContents() { |
| 539 |
return 0; |
| 540 |
} |
| 541 |
|
| 542 |
public static final @android.annotation.NonNull Parcelable.Creator<ProgramSelector> CREATOR = |
| 543 |
new Parcelable.Creator<ProgramSelector>() { |
| 544 |
public ProgramSelector createFromParcel(Parcel in) { |
| 545 |
return new ProgramSelector(in); |
| 546 |
} |
| 547 |
|
| 548 |
public ProgramSelector[] newArray(int size) { |
| 549 |
return new ProgramSelector[size]; |
| 550 |
} |
| 551 |
}; |
| 552 |
|
| 553 |
|
| 554 |
|
| 555 |
|
| 556 |
|
| 557 |
|
| 558 |
|
| 559 |
public static final class Identifier implements Parcelable { |
| 560 |
private final @IdentifierType int mType; |
| 561 |
private final long mValue; |
| 562 |
|
| 563 |
public Identifier(@IdentifierType int type, long value) { |
| 564 |
if (type == IDENTIFIER_TYPE_HD_STATION_NAME) { |
| 565 |
|
| 566 |
type = IDENTIFIER_TYPE_HD_SUBCHANNEL; |
| 567 |
} |
| 568 |
mType = type; |
| 569 |
mValue = value; |
| 570 |
} |
| 571 |
|
| 572 |
|
| 573 |
|
| 574 |
|
| 575 |
|
| 576 |
|
| 577 |
public @IdentifierType int getType() { |
| 578 |
if (mType == IDENTIFIER_TYPE_HD_SUBCHANNEL && mValue > 10) { |
| 579 |
|
| 580 |
|
| 581 |
|
| 582 |
|
| 583 |
return IDENTIFIER_TYPE_HD_STATION_NAME; |
| 584 |
} |
| 585 |
return mType; |
| 586 |
} |
| 587 |
|
| 588 |
|
| 589 |
|
| 590 |
|
| 591 |
|
| 592 |
|
| 593 |
|
| 594 |
|
| 595 |
|
| 596 |
public boolean isCategoryType() { |
| 597 |
return (mType >= IDENTIFIER_TYPE_VENDOR_START && mType <= IDENTIFIER_TYPE_VENDOR_END) |
| 598 |
|| mType == IDENTIFIER_TYPE_DAB_ENSEMBLE; |
| 599 |
} |
| 600 |
|
| 601 |
|
| 602 |
|
| 603 |
|
| 604 |
|
| 605 |
|
| 606 |
|
| 607 |
|
| 608 |
|
| 609 |
|
| 610 |
|
| 611 |
|
| 612 |
|
| 613 |
|
| 614 |
|
| 615 |
public long getValue() { |
| 616 |
return mValue; |
| 617 |
} |
| 618 |
|
| 619 |
@NonNull |
| 620 |
@Override |
| 621 |
public String toString() { |
| 622 |
return "Identifier(" + mType + ", " + mValue + ")"; |
| 623 |
} |
| 624 |
|
| 625 |
@Override |
| 626 |
public int hashCode() { |
| 627 |
return Objects.hash(mType, mValue); |
| 628 |
} |
| 629 |
|
| 630 |
@Override |
| 631 |
public boolean equals(@Nullable Object obj) { |
| 632 |
if (this == obj) return true; |
| 633 |
if (!(obj instanceof Identifier)) return false; |
| 634 |
Identifier other = (Identifier) obj; |
| 635 |
return other.getType() == mType && other.getValue() == mValue; |
| 636 |
} |
| 637 |
|
| 638 |
private Identifier(Parcel in) { |
| 639 |
mType = in.readInt(); |
| 640 |
mValue = in.readLong(); |
| 641 |
} |
| 642 |
|
| 643 |
@Override |
| 644 |
public void writeToParcel(Parcel dest, int flags) { |
| 645 |
dest.writeInt(mType); |
| 646 |
dest.writeLong(mValue); |
| 647 |
} |
| 648 |
|
| 649 |
@Override |
| 650 |
public int describeContents() { |
| 651 |
return 0; |
| 652 |
} |
| 653 |
|
| 654 |
public static final @android.annotation.NonNull Parcelable.Creator<Identifier> CREATOR = |
| 655 |
new Parcelable.Creator<Identifier>() { |
| 656 |
public Identifier createFromParcel(Parcel in) { |
| 657 |
return new Identifier(in); |
| 658 |
} |
| 659 |
|
| 660 |
public Identifier[] newArray(int size) { |
| 661 |
return new Identifier[size]; |
| 662 |
} |
| 663 |
}; |
| 664 |
} |
| 665 |
} |