1 /* 2 * Copyright (C) 2024 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package android.media.tv; 18 19 import android.annotation.NonNull; 20 import android.annotation.Nullable; 21 import android.annotation.StringDef; 22 import android.os.IBinder; 23 import android.os.RemoteException; 24 import android.util.Log; 25 26 import java.lang.annotation.Retention; 27 import java.lang.annotation.RetentionPolicy; 28 import java.util.ArrayList; 29 import java.util.HashSet; 30 import java.util.List; 31 import java.util.Set; 32 33 34 /** 35 * This class provides a list of available standardized TvInputService extension interface names 36 * and checks if IBinder objects created by SoC/OEMs implement these interfaces. 37 * 38 * @hide 39 */ 40 public final class TvInputServiceExtensionManager { 41 private static final String TAG = "TvInputServiceExtensionManager"; 42 private static final String SCAN_PACKAGE = "android.media.tv.extension.scan."; 43 private static final String OAD_PACKAGE = "android.media.tv.extension.oad."; 44 private static final String CAM_PACKAGE = "android.media.tv.extension.cam."; 45 private static final String RATING_PACKAGE = "android.media.tv.extension.rating."; 46 private static final String TIME_PACKAGE = "android.media.tv.extension.time."; 47 private static final String TELETEXT_PACKAGE = "android.media.tv.extension.teletext."; 48 private static final String SCAN_BSU_PACKAGE = "android.media.tv.extension.scanbsu."; 49 private static final String CLIENT_TOKEN_PACKAGE = "android.media.tv.extension.clienttoken."; 50 private static final String SCREEN_MODE_PACKAGE = "android.media.tv.extension.screenmode."; 51 private static final String SIGNAL_PACKAGE = "android.media.tv.extension.signal."; 52 private static final String SERVICE_DATABASE_PACKAGE = "android.media.tv.extension.servicedb."; 53 private static final String PVR_PACKAGE = "android.media.tv.extension.pvr."; 54 private static final String EVENT_PACKAGE = "android.media.tv.extension.event."; 55 private static final String ANALOG_PACKAGE = "android.media.tv.extension.analog."; 56 private static final String TUNE_PACKAGE = "android.media.tv.extension.tune."; 57 58 @StringDef({ 59 ISCAN_INTERFACE, 60 ISCAN_SESSION, 61 ISCAN_LISTENER, 62 IHDPLUS_INFO, 63 IOPERATOR_DETECTION, 64 IOPERATOR_DETECTION_LISTENER, 65 IREGION_CHANNEL_LIST, 66 IREGION_CHANNEL_LIST_LISTENER, 67 ITARGET_REGION, 68 ITARGET_REGION_LISTENER, 69 ILCN_CONFLICT, 70 ILCN_CONFLICT_LISTENER, 71 ILCNV2_CHANNEL_LIST, 72 ILCNV2_CHANNEL_LIST_LISTENER, 73 IFAVORITE_NETWORK, 74 IFAVORITE_NETWORK_LISTENER, 75 ITKGS_INFO, 76 ITKGS_INFO_LISTENER, 77 ISCAN_SAT_SEARCH, 78 IOAD_UPDATE_INTERFACE, 79 ICAM_APP_INFO_SERVICE, 80 ICAM_APP_INFO_LISTENER, 81 ICAM_MONITORING_SERVICE, 82 ICAM_INFO_LISTENER, 83 ICI_OPERATOR_INTERFACE, 84 ICI_OPERATOR_LISTENER, 85 ICAM_PROFILE_INTERFACE, 86 ICONTENT_CONTROL_SERVICE, 87 ICAM_DRM_INFO_LISTENER, 88 ICAM_PIN_SERVICE, 89 ICAM_PIN_CAPABILITY_LISTENER, 90 ICAM_PIN_STATUS_LISTENER, 91 ICAM_HOST_CONTROL_SERVICE, 92 ICAM_HOST_CONTROL_ASK_RELEASE_REPLY_CALLBACK, 93 ICAM_HOST_CONTROL_INFO_LISTENER, 94 ICAM_HOST_CONTROL_TUNE_QUIETLY_FLAG, 95 ICAM_HOST_CONTROL_TUNE_QUIETLY_FLAG_LISTENER, 96 IMMI_INTERFACE, 97 IMMI_SESSION, 98 IMMI_STATUS_CALLBACK, 99 IENTER_MENU_ERROR_CALLBACK, 100 IDOWNLOADABLE_RATING_TABLE_MONITOR, 101 IRATING_INTERFACE, 102 IPMT_RATING_INTERFACE, 103 IPMT_RATING_LISTENER, 104 IVBI_RATING_INTERFACE, 105 IVBI_RATING_LISTENER, 106 IPROGRAM_INFO, 107 IPROGRAM_INFO_LISTENER, 108 IBROADCAST_TIME, 109 IDATA_SERVICE_SIGNAL_INFO, 110 IDATA_SERVICE_SIGNAL_INFO_LISTENER, 111 ITELETEXT_PAGE_SUB_CODE, 112 ISCAN_BACKGROUND_SERVICE_UPDATE, 113 ISCAN_BACKGROUND_SERVICE_UPDATE_LISTENER, 114 ICLIENT_TOKEN, 115 ISCREEN_MODE_SETTINGS, 116 IHDMI_SIGNAL_INTERFACE, 117 IHDMI_SIGNAL_INFO_LISTENER, 118 IAUDIO_SIGNAL_INFO, 119 IANALOG_AUDIO_INFO, 120 IAUDIO_SIGNAL_INFO_LISTENER, 121 IVIDEO_SIGNAL_INFO, 122 IVIDEO_SIGNAL_INFO_LISTENER, 123 ISERVICE_LIST_EDIT, 124 ISERVICE_LIST_EDIT_LISTENER, 125 ISERVICE_LIST, 126 ISERVICE_LIST_TRANSFER_INTERFACE, 127 ISERVICE_LIST_EXPORT_SESSION, 128 ISERVICE_LIST_EXPORT_LISTENER, 129 ISERVICE_LIST_IMPORT_SESSION, 130 ISERVICE_LIST_IMPORT_LISTENER, 131 ISERVICE_LIST_SET_CHANNEL_LIST_SESSION, 132 ISERVICE_LIST_SET_CHANNEL_LIST_LISTENER, 133 ICHANNEL_LIST_TRANSFER, 134 IRECORDED_CONTENTS, 135 IDELETE_RECORDED_CONTENTS_CALLBACK, 136 IGET_INFO_RECORDED_CONTENTS_CALLBACK, 137 IEVENT_MONITOR, 138 IEVENT_MONITOR_LISTENER, 139 IEVENT_DOWNLOAD, 140 IEVENT_DOWNLOAD_LISTENER, 141 IEVENT_DOWNLOAD_SESSION, 142 IANALOG_ATTRIBUTE_INTERFACE, 143 ICHANNEL_TUNED_INTERFACE, 144 ICHANNEL_TUNED_LISTENER, 145 ITUNER_FRONTEND_SIGNAL_INFO_INTERFACE, 146 ITUNER_FRONTEND_SIGNAL_INFO_LISTENER, 147 IMUX_TUNE_SESSION, 148 IMUX_TUNE 149 }) 150 @Retention(RetentionPolicy.SOURCE) 151 public @interface StandardizedExtensionName {} 152 /** 153 * Interface responsible for creating scan session and obtaining related parameters. 154 */ 155 public static final String ISCAN_INTERFACE = SCAN_PACKAGE + "IScanInterface"; 156 /** 157 * Interface that handles scan session and get/store related information. 158 */ 159 public static final String ISCAN_SESSION = SCAN_PACKAGE + "IScanSession"; 160 /** 161 * Interface that notifies changes related to a scan session. 162 */ 163 public static final String ISCAN_LISTENER = SCAN_PACKAGE + "IScanListener"; 164 /** 165 * Interface for setting HDPlus information. 166 */ 167 public static final String IHDPLUS_INFO = SCAN_PACKAGE + "IHDPlusInfo"; 168 /** 169 * Interface for handling operator detection for scanning. 170 */ 171 public static final String IOPERATOR_DETECTION = SCAN_PACKAGE + "IOperatorDetection"; 172 /** 173 * Interface for notifying changes related to operator detection searches. 174 */ 175 public static final String IOPERATOR_DETECTION_LISTENER = SCAN_PACKAGE 176 + "IOperatorDetectionListener"; 177 /** 178 * Interface for handling region channel list for scanning. 179 */ 180 public static final String IREGION_CHANNEL_LIST = SCAN_PACKAGE + "IRegionChannelList"; 181 /** 182 * Interface for notifying changes related to changes in region channel list search. 183 */ 184 public static final String IREGION_CHANNEL_LIST_LISTENER = SCAN_PACKAGE 185 + "IRegionChannelListListener"; 186 /** 187 * Interface for handling target region information. 188 */ 189 public static final String ITARGET_REGION = SCAN_PACKAGE + "ITargetRegion"; 190 /** 191 * Interface for detecting changes related to target regions. 192 */ 193 public static final String ITARGET_REGION_LISTENER = SCAN_PACKAGE + "ITargetRegionListener"; 194 /** 195 * Interface for handling logical channel number conflict groups. 196 */ 197 public static final String ILCN_CONFLICT = SCAN_PACKAGE + "ILcnConflict"; 198 /** 199 * Interface for notifying changes in handling logical channel number conflicts. 200 */ 201 public static final String ILCN_CONFLICT_LISTENER = SCAN_PACKAGE + "ILcnConflictListener"; 202 /** 203 * Interface for handling the updated standard for assigning logical channel numbers. 204 */ 205 public static final String ILCNV2_CHANNEL_LIST = SCAN_PACKAGE + "ILcnV2ChannelList"; 206 /** 207 * Interface for notifying changes in assigning logical channel numbers with updated standard. 208 */ 209 public static final String ILCNV2_CHANNEL_LIST_LISTENER = SCAN_PACKAGE 210 + "ILcnV2ChannelListListener"; 211 /** 212 * Interface for handling favorite network related information. 213 */ 214 public static final String IFAVORITE_NETWORK = SCAN_PACKAGE + "IFavoriteNetwork"; 215 /** 216 * Interface for notifying changes favorite network during scanning. 217 */ 218 public static final String IFAVORITE_NETWORK_LISTENER = SCAN_PACKAGE 219 + "IFavoriteNetworkListener"; 220 /** 221 * Interface for handling Turksat(TKGS) channel update system service. 222 */ 223 public static final String ITKGS_INFO = SCAN_PACKAGE + "ITkgsInfo"; 224 /** 225 * Interface for notifying changes related to Turksat(TKGS) information. 226 */ 227 public static final String ITKGS_INFO_LISTENER = SCAN_PACKAGE + "ITkgsInfoListener"; 228 /** 229 * Interface for satellite search related to low noise block downconverter. 230 */ 231 public static final String ISCAN_SAT_SEARCH = SCAN_PACKAGE + "IScanSatSearch"; 232 /** 233 * Interface for Over-the-Air Download. 234 */ 235 public static final String IOAD_UPDATE_INTERFACE = OAD_PACKAGE + "IOadUpdateInterface"; 236 /** 237 * Interface for handling conditional access module app related information. 238 */ 239 public static final String ICAM_APP_INFO_SERVICE = CAM_PACKAGE + "ICamAppInfoService"; 240 /** 241 * Interface for notifying changes on conditional access module app related information. 242 */ 243 public static final String ICAM_APP_INFO_LISTENER = CAM_PACKAGE + "ICamAppInfoListener"; 244 /** 245 * Interface for handling conditional access module related information. 246 */ 247 public static final String ICAM_MONITORING_SERVICE = CAM_PACKAGE + "ICamMonitoringService"; 248 /** 249 * Interface for notifying changes on conditional access module related information. 250 */ 251 public static final String ICAM_INFO_LISTENER = CAM_PACKAGE + "ICamInfoListener"; 252 /** 253 * Interface for handling control of common interface plus operations. 254 */ 255 public static final String ICI_OPERATOR_INTERFACE = CAM_PACKAGE + "ICiOperatorInterface"; 256 /** 257 * Interfaces for notifying changes on common interface plus operations. 258 */ 259 public static final String ICI_OPERATOR_LISTENER = CAM_PACKAGE + "ICiOperatorListener"; 260 /** 261 * Interface for handling conditional access module profile related information. 262 */ 263 public static final String ICAM_PROFILE_INTERFACE = CAM_PACKAGE + "ICamProfileInterface"; 264 /** 265 * Interface for handling conditional access module digital rights management (DRM) 266 * related information. 267 */ 268 public static final String ICONTENT_CONTROL_SERVICE = CAM_PACKAGE + "IContentControlService"; 269 /** 270 * Interface for notifying changes on digital rights management (DRM). 271 */ 272 public static final String ICAM_DRM_INFO_LISTENER = CAM_PACKAGE + "ICamDrmInfoListener"; 273 /** 274 * Interface for handling conditional access module pin related information. 275 */ 276 public static final String ICAM_PIN_SERVICE = CAM_PACKAGE + "ICamPinService"; 277 /** 278 * Interface for notifying changes on conditional access module pin capability. 279 */ 280 public static final String ICAM_PIN_CAPABILITY_LISTENER = CAM_PACKAGE 281 + "ICamPinCapabilityListener"; 282 /** 283 * Interface for notifying changes on conditional access module pin status. 284 */ 285 public static final String ICAM_PIN_STATUS_LISTENER = CAM_PACKAGE + "ICamPinStatusListener"; 286 /** 287 * Interface for handling conditional access module host control service. 288 */ 289 public static final String ICAM_HOST_CONTROL_SERVICE = CAM_PACKAGE + "ICamHostControlService"; 290 /** 291 * Interface for handling conditional access module ask release reply. 292 */ 293 public static final String ICAM_HOST_CONTROL_ASK_RELEASE_REPLY_CALLBACK = CAM_PACKAGE 294 + "ICamHostControlAskReleaseReplyCallback"; 295 /** 296 * Interface for notifying changes on conditional access module host control service. 297 */ 298 public static final String ICAM_HOST_CONTROL_INFO_LISTENER = CAM_PACKAGE 299 + "ICamHostControlInfoListener"; 300 /** 301 * Interface for handling conditional access module host control service tune_quietly_flag. 302 */ 303 public static final String ICAM_HOST_CONTROL_TUNE_QUIETLY_FLAG = CAM_PACKAGE 304 + "ICamHostControlTuneQuietlyFlag"; 305 /** 306 * Interface for notifying changes on conditional access module host control service 307 * tune_quietly_flag. 308 */ 309 public static final String ICAM_HOST_CONTROL_TUNE_QUIETLY_FLAG_LISTENER = CAM_PACKAGE 310 + "ICamHostControlTuneQuietlyFlagListener"; 311 /** 312 * Interface for handling conditional access module multi-media interface. 313 */ 314 public static final String IMMI_INTERFACE = CAM_PACKAGE + "IMmiInterface"; 315 /** 316 * Interface for controlling conditional access module multi-media session. 317 */ 318 public static final String IMMI_SESSION = CAM_PACKAGE + "IMmiSession"; 319 /** 320 * Interface for notifying changes on conditional access module multi-media session status. 321 */ 322 public static final String IMMI_STATUS_CALLBACK = CAM_PACKAGE + "IMmiStatusCallback"; 323 /** 324 * Interface for notifying changes on conditional access app info related to entering menu. 325 */ 326 public static final String IENTER_MENU_ERROR_CALLBACK = CAM_PACKAGE + "IEnterMenuErrorCallback"; 327 /** 328 * Interface for handling Region Rating Table downloadable rating data. 329 */ 330 public static final String IDOWNLOADABLE_RATING_TABLE_MONITOR = RATING_PACKAGE 331 + "IDownloadableRatingTableMonitor"; 332 /** 333 * Interface for handling Region Rating Table rating system related information. 334 */ 335 public static final String IRATING_INTERFACE = RATING_PACKAGE + "IRatingInterface"; 336 /** 337 * Interface for handling Program Map Table rating related information. 338 */ 339 public static final String IPMT_RATING_INTERFACE = RATING_PACKAGE + "IPmtRatingInterface"; 340 /** 341 * Interface for notifying changes on Program Map Table rating related information. 342 */ 343 public static final String IPMT_RATING_LISTENER = RATING_PACKAGE + "IPmtRatingListener"; 344 /** 345 * Interface for handling Vertical Blanking Interval rating related information. 346 */ 347 public static final String IVBI_RATING_INTERFACE = RATING_PACKAGE + "IVbiRatingInterface"; 348 /** 349 * Interface for notifying changes on Vertical Blanking Interval rating related information. 350 */ 351 public static final String IVBI_RATING_LISTENER = RATING_PACKAGE + "IVbiRatingListener"; 352 /** 353 * Interface for handling program rating related information. 354 */ 355 public static final String IPROGRAM_INFO = RATING_PACKAGE + "IProgramInfo"; 356 /** 357 * Interface for notifying changes on program rating related information. 358 */ 359 public static final String IPROGRAM_INFO_LISTENER = RATING_PACKAGE + "IProgramInfoListener"; 360 /** 361 * Interface for getting broadcast time related information. 362 */ 363 public static final String IBROADCAST_TIME = TIME_PACKAGE + "IBroadcastTime"; 364 /** 365 * Interface for handling data service signal information on teletext. 366 */ 367 public static final String IDATA_SERVICE_SIGNAL_INFO = TELETEXT_PACKAGE 368 + "IDataServiceSignalInfo"; 369 /** 370 * Interface for notifying changes on data service signal information on teletext. 371 */ 372 public static final String IDATA_SERVICE_SIGNAL_INFO_LISTENER = TELETEXT_PACKAGE 373 + "IDataServiceSignalInfoListener"; 374 /** 375 * Interface for handling teletext page information. 376 */ 377 public static final String ITELETEXT_PAGE_SUB_CODE = TELETEXT_PACKAGE + "ITeletextPageSubCode"; 378 /** 379 * Interface for handling scan background service update. 380 */ 381 public static final String ISCAN_BACKGROUND_SERVICE_UPDATE = SCAN_BSU_PACKAGE 382 + "IScanBackgroundServiceUpdate"; 383 /** 384 * Interface for notifying changes on background service update 385 */ 386 public static final String ISCAN_BACKGROUND_SERVICE_UPDATE_LISTENER = SCAN_BSU_PACKAGE 387 + "IScanBackgroundServiceUpdateListener"; 388 /** 389 * Interface for generating client token. 390 */ 391 public static final String ICLIENT_TOKEN = CLIENT_TOKEN_PACKAGE + "IClientToken"; 392 /** 393 * Interfaces for handling screen mode information. 394 */ 395 public static final String ISCREEN_MODE_SETTINGS = SCREEN_MODE_PACKAGE + "IScreenModeSettings"; 396 /** 397 * Interfaces for handling HDMI signal information update. 398 */ 399 public static final String IHDMI_SIGNAL_INTERFACE = SIGNAL_PACKAGE + "IHdmiSignalInterface"; 400 /** 401 * Interfaces for notifying changes on HDMI signal information update. 402 */ 403 public static final String IHDMI_SIGNAL_INFO_LISTENER = SIGNAL_PACKAGE 404 + "IHdmiSignalInfoListener"; 405 /** 406 * Interfaces for handling audio signal information update. 407 */ 408 public static final String IAUDIO_SIGNAL_INFO = SIGNAL_PACKAGE + "IAudioSignalInfo"; 409 /** 410 * Interfaces for handling analog audio signal information update. 411 */ 412 public static final String IANALOG_AUDIO_INFO = SIGNAL_PACKAGE + "IAnalogAudioInfo"; 413 /** 414 * Interfaces for notifying changes on audio signal information update. 415 */ 416 public static final String IAUDIO_SIGNAL_INFO_LISTENER = SIGNAL_PACKAGE 417 + "IAudioSignalInfoListener"; 418 /** 419 * Interfaces for handling video signal information update. 420 */ 421 public static final String IVIDEO_SIGNAL_INFO = SIGNAL_PACKAGE + "IVideoSignalInfo"; 422 /** 423 * Interfaces for notifying changes on video signal information update. 424 */ 425 public static final String IVIDEO_SIGNAL_INFO_LISTENER = SIGNAL_PACKAGE 426 + "IVideoSignalInfoListener"; 427 /** 428 * Interfaces for handling service database updates. 429 */ 430 public static final String ISERVICE_LIST_EDIT = SERVICE_DATABASE_PACKAGE + "IServiceListEdit"; 431 /** 432 * Interfaces for notifying changes on service database updates. 433 */ 434 public static final String ISERVICE_LIST_EDIT_LISTENER = SERVICE_DATABASE_PACKAGE 435 + "IServiceListEditListener"; 436 /** 437 * Interfaces for getting service database related information. 438 */ 439 public static final String ISERVICE_LIST = SERVICE_DATABASE_PACKAGE + "IServiceList"; 440 /** 441 * Interfaces for transferring service database related information. 442 */ 443 public static final String ISERVICE_LIST_TRANSFER_INTERFACE = SERVICE_DATABASE_PACKAGE 444 + "IServiceListTransferInterface"; 445 /** 446 * Interfaces for exporting service database session. 447 */ 448 public static final String ISERVICE_LIST_EXPORT_SESSION = SERVICE_DATABASE_PACKAGE 449 + "IServiceListExportSession"; 450 /** 451 * Interfaces for notifying changes on exporting service database session. 452 */ 453 public static final String ISERVICE_LIST_EXPORT_LISTENER = SERVICE_DATABASE_PACKAGE 454 + "IServiceListExportListener"; 455 /** 456 * Interfaces for importing service database session. 457 */ 458 public static final String ISERVICE_LIST_IMPORT_SESSION = SERVICE_DATABASE_PACKAGE 459 + "IServiceListImportSession"; 460 /** 461 * Interfaces for notifying changes on importing service database session. 462 */ 463 public static final String ISERVICE_LIST_IMPORT_LISTENER = SERVICE_DATABASE_PACKAGE 464 + "IServiceListImportListener"; 465 /** 466 * Interfaces for setting channel list resources. 467 */ 468 public static final String ISERVICE_LIST_SET_CHANNEL_LIST_SESSION = SERVICE_DATABASE_PACKAGE 469 + "IServiceListSetChannelListSession"; 470 /** 471 * Interfaces for notifying changes on setting channel list resources. 472 */ 473 public static final String ISERVICE_LIST_SET_CHANNEL_LIST_LISTENER = SERVICE_DATABASE_PACKAGE 474 + "IServiceListSetChannelListListener"; 475 /** 476 * Interfaces for transferring channel list resources. 477 */ 478 public static final String ICHANNEL_LIST_TRANSFER = SERVICE_DATABASE_PACKAGE 479 + "IChannelListTransfer"; 480 /** 481 * Interface for operations related to recorded contents. 482 */ 483 public static final String IRECORDED_CONTENTS = PVR_PACKAGE + "IRecordedContents"; 484 /** 485 * Interfaces for notifying changes on deleting record contents. 486 */ 487 public static final String IDELETE_RECORDED_CONTENTS_CALLBACK = PVR_PACKAGE 488 + "IDeleteRecordedContentsCallback"; 489 /** 490 * Interfaces for notifying changes on getting record contents. 491 */ 492 public static final String IGET_INFO_RECORDED_CONTENTS_CALLBACK = PVR_PACKAGE 493 + "IGetInfoRecordedContentsCallback"; 494 /** 495 * Interfaces for monitoring present event information. 496 */ 497 public static final String IEVENT_MONITOR = EVENT_PACKAGE + "IEventMonitor"; 498 /** 499 * Interfaces for notifying changes on present event information. 500 */ 501 public static final String IEVENT_MONITOR_LISTENER = EVENT_PACKAGE + "IEventMonitorListener"; 502 /** 503 * Interfaces for handling download event information. 504 */ 505 public static final String IEVENT_DOWNLOAD = EVENT_PACKAGE + "IEventDownload"; 506 /** 507 * Interfaces for notifying changes on downloading event information. 508 */ 509 public static final String IEVENT_DOWNLOAD_LISTENER = EVENT_PACKAGE + "IEventDownloadListener"; 510 /** 511 * Interfaces for handling download event information for Digital Video Broadcast 512 * and Digital Terrestrial Multimedia Broadcast. 513 */ 514 public static final String IEVENT_DOWNLOAD_SESSION = EVENT_PACKAGE + "IEventDownloadSession"; 515 /** 516 * Interfaces for handling analog color system. 517 */ 518 public static final String IANALOG_ATTRIBUTE_INTERFACE = ANALOG_PACKAGE 519 + "IAnalogAttributeInterface"; 520 /** 521 * Interfaces for monitoring channel tuned information. 522 */ 523 public static final String ICHANNEL_TUNED_INTERFACE = TUNE_PACKAGE + "IChannelTunedInterface"; 524 /** 525 * Interfaces for notifying changes on channel tuned information. 526 */ 527 public static final String ICHANNEL_TUNED_LISTENER = TUNE_PACKAGE + "IChannelTunedListener"; 528 /** 529 * Interfaces for handling tuner frontend signal info. 530 */ 531 public static final String ITUNER_FRONTEND_SIGNAL_INFO_INTERFACE = SIGNAL_PACKAGE 532 + "ITunerFrontendSignalInfoInterface"; 533 /** 534 * Interfaces for notifying changes on tuner frontend signal info. 535 */ 536 public static final String ITUNER_FRONTEND_SIGNAL_INFO_LISTENER = SIGNAL_PACKAGE 537 + "ITunerFrontendSignalInfoListener"; 538 /** 539 * Interfaces for handling mux tune operations. 540 */ 541 public static final String IMUX_TUNE_SESSION = TUNE_PACKAGE + "IMuxTuneSession"; 542 /** 543 * Interfaces for initing mux tune session. 544 */ 545 public static final String IMUX_TUNE = TUNE_PACKAGE + "IMuxTune"; 546 547 // Set of standardized AIDL interface canonical names 548 private static final Set<String> sTisExtensions = new HashSet<>(Set.of( 549 ISCAN_INTERFACE, 550 ISCAN_SESSION, 551 ISCAN_LISTENER, 552 IHDPLUS_INFO, 553 IOPERATOR_DETECTION, 554 IOPERATOR_DETECTION_LISTENER, 555 IREGION_CHANNEL_LIST, 556 IREGION_CHANNEL_LIST_LISTENER, 557 ITARGET_REGION, 558 ITARGET_REGION_LISTENER, 559 ILCN_CONFLICT, 560 ILCN_CONFLICT_LISTENER, 561 ILCNV2_CHANNEL_LIST, 562 ILCNV2_CHANNEL_LIST_LISTENER, 563 IFAVORITE_NETWORK, 564 IFAVORITE_NETWORK_LISTENER, 565 ITKGS_INFO, 566 ITKGS_INFO_LISTENER, 567 ISCAN_SAT_SEARCH, 568 IOAD_UPDATE_INTERFACE, 569 ICAM_APP_INFO_SERVICE, 570 ICAM_APP_INFO_LISTENER, 571 ICAM_MONITORING_SERVICE, 572 ICAM_INFO_LISTENER, 573 ICI_OPERATOR_INTERFACE, 574 ICI_OPERATOR_LISTENER, 575 ICAM_PROFILE_INTERFACE, 576 ICONTENT_CONTROL_SERVICE, 577 ICAM_DRM_INFO_LISTENER, 578 ICAM_PIN_SERVICE, 579 ICAM_PIN_CAPABILITY_LISTENER, 580 ICAM_PIN_STATUS_LISTENER, 581 ICAM_HOST_CONTROL_SERVICE, 582 ICAM_HOST_CONTROL_ASK_RELEASE_REPLY_CALLBACK, 583 ICAM_HOST_CONTROL_INFO_LISTENER, 584 ICAM_HOST_CONTROL_TUNE_QUIETLY_FLAG, 585 ICAM_HOST_CONTROL_TUNE_QUIETLY_FLAG_LISTENER, 586 IMMI_INTERFACE, 587 IMMI_SESSION, 588 IMMI_STATUS_CALLBACK, 589 IENTER_MENU_ERROR_CALLBACK, 590 IDOWNLOADABLE_RATING_TABLE_MONITOR, 591 IRATING_INTERFACE, 592 IPMT_RATING_INTERFACE, 593 IPMT_RATING_LISTENER, 594 IVBI_RATING_INTERFACE, 595 IVBI_RATING_LISTENER, 596 IPROGRAM_INFO, 597 IPROGRAM_INFO_LISTENER, 598 IBROADCAST_TIME, 599 IDATA_SERVICE_SIGNAL_INFO, 600 IDATA_SERVICE_SIGNAL_INFO_LISTENER, 601 ITELETEXT_PAGE_SUB_CODE, 602 ISCAN_BACKGROUND_SERVICE_UPDATE, 603 ISCAN_BACKGROUND_SERVICE_UPDATE_LISTENER, 604 ICLIENT_TOKEN, 605 ISCREEN_MODE_SETTINGS, 606 IHDMI_SIGNAL_INTERFACE, 607 IHDMI_SIGNAL_INFO_LISTENER, 608 IAUDIO_SIGNAL_INFO, 609 IANALOG_AUDIO_INFO, 610 IAUDIO_SIGNAL_INFO_LISTENER, 611 IVIDEO_SIGNAL_INFO, 612 IVIDEO_SIGNAL_INFO_LISTENER, 613 ISERVICE_LIST_EDIT, 614 ISERVICE_LIST_EDIT_LISTENER, 615 ISERVICE_LIST, 616 ISERVICE_LIST_TRANSFER_INTERFACE, 617 ISERVICE_LIST_EXPORT_SESSION, 618 ISERVICE_LIST_EXPORT_LISTENER, 619 ISERVICE_LIST_IMPORT_SESSION, 620 ISERVICE_LIST_IMPORT_LISTENER, 621 ISERVICE_LIST_SET_CHANNEL_LIST_SESSION, 622 ISERVICE_LIST_SET_CHANNEL_LIST_LISTENER, 623 ICHANNEL_LIST_TRANSFER, 624 IRECORDED_CONTENTS, 625 IDELETE_RECORDED_CONTENTS_CALLBACK, 626 IGET_INFO_RECORDED_CONTENTS_CALLBACK, 627 IEVENT_MONITOR, 628 IEVENT_MONITOR_LISTENER, 629 IEVENT_DOWNLOAD, 630 IEVENT_DOWNLOAD_LISTENER, 631 IEVENT_DOWNLOAD_SESSION, 632 IANALOG_ATTRIBUTE_INTERFACE, 633 ICHANNEL_TUNED_INTERFACE, 634 ICHANNEL_TUNED_LISTENER, 635 ITUNER_FRONTEND_SIGNAL_INFO_INTERFACE, 636 ITUNER_FRONTEND_SIGNAL_INFO_LISTENER, 637 IMUX_TUNE_SESSION, 638 IMUX_TUNE 639 )); 640 641 /** 642 * Function to return available extension interface names 643 */ getStandardExtensionInterfaceNames()644 public static @NonNull List<String> getStandardExtensionInterfaceNames() { 645 return new ArrayList<>(sTisExtensions); 646 } 647 648 /** 649 * Function to check if the extension is in the standardization list 650 */ checkIsStandardizedInterfaces(@onNull String extensionName)651 static boolean checkIsStandardizedInterfaces(@NonNull String extensionName) { 652 return sTisExtensions.contains(extensionName); 653 } 654 655 /** 656 * Function check if the IBinder object implements standardized interface 657 */ checkIsStandardizedIBinder(@onNull String extensionName, @Nullable IBinder binder)658 public static boolean checkIsStandardizedIBinder(@NonNull String extensionName, 659 @Nullable IBinder binder) { 660 if (binder != null) { 661 try { 662 return binder.getInterfaceDescriptor().equals(extensionName); 663 } catch (RemoteException e) { 664 Log.e(TAG, "Fetching IBinder object failure due to " + e); 665 } 666 } 667 return false; 668 } 669 670 } 671