Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d9bbd44b authored by arunvoddu's avatar arunvoddu Committed by Arun kumar Voddu
Browse files

HAL changes to PrimaryImei feature

Bug: 184001777
Test: Build successfully
Change-Id: I54c35d9bebd32180583241bfba4d2fd93f85381d
parent 00ed65d7
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -36,6 +36,9 @@ package android.hardware.radio.modem;
interface IRadioModem {
  oneway void enableModem(in int serial, in boolean on);
  oneway void getBasebandVersion(in int serial);
  /**
   * @deprecated use getImei(int serial)
   */
  oneway void getDeviceIdentity(in int serial);
  oneway void getHardwareConfig(in int serial);
  oneway void getModemActivityInfo(in int serial);
@@ -60,4 +63,5 @@ interface IRadioModem {
  oneway void setRadioCapability(in int serial, in android.hardware.radio.modem.RadioCapability rc);
  oneway void setRadioPower(in int serial, in boolean powerOn, in boolean forEmergencyCall, in boolean preferredForEmergencyCall);
  oneway void setResponseFunctions(in android.hardware.radio.modem.IRadioModemResponse radioModemResponse, in android.hardware.radio.modem.IRadioModemIndication radioModemIndication);
  oneway void getImei(in int serial);
}
+4 −0
Original line number Diff line number Diff line
@@ -37,6 +37,9 @@ interface IRadioModemResponse {
  oneway void acknowledgeRequest(in int serial);
  oneway void enableModemResponse(in android.hardware.radio.RadioResponseInfo info);
  oneway void getBasebandVersionResponse(in android.hardware.radio.RadioResponseInfo info, in String version);
  /**
   * @deprecated use getImeiResponse(RadioResponseInfo responseInfo, ImeiInfo imeiInfo)
   */
  oneway void getDeviceIdentityResponse(in android.hardware.radio.RadioResponseInfo info, in String imei, in String imeisv, in String esn, in String meid);
  oneway void getHardwareConfigResponse(in android.hardware.radio.RadioResponseInfo info, in android.hardware.radio.modem.HardwareConfig[] config);
  oneway void getModemActivityInfoResponse(in android.hardware.radio.RadioResponseInfo info, in android.hardware.radio.modem.ActivityStatsInfo activityInfo);
@@ -59,4 +62,5 @@ interface IRadioModemResponse {
  oneway void sendDeviceStateResponse(in android.hardware.radio.RadioResponseInfo info);
  oneway void setRadioCapabilityResponse(in android.hardware.radio.RadioResponseInfo info, in android.hardware.radio.modem.RadioCapability rc);
  oneway void setRadioPowerResponse(in android.hardware.radio.RadioResponseInfo info);
  oneway void getImeiResponse(in android.hardware.radio.RadioResponseInfo responseInfo, in @nullable android.hardware.radio.modem.ImeiInfo imeiInfo);
}
+45 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2022 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
///////////////////////////////////////////////////////////////////////////////
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
///////////////////////////////////////////////////////////////////////////////

// This file is a snapshot of an AIDL file. Do not edit it manually. There are
// two cases:
// 1). this is a frozen version file - do not edit this in any case.
// 2). this is a 'current' file. If you make a backwards compatible change to
//     the interface (from the latest frozen version), the build system will
//     prompt you to update this file with `m <name>-update-api`.
//
// You must not make a backward incompatible change to any AIDL file built
// with the aidl_interface module type with versions property set. The module
// type is used to build AIDL files in a way that they can be used across
// independently updatable components of the system. If a device is shipped
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.

package android.hardware.radio.modem;
@JavaDerive(toString=true) @VintfStability
parcelable ImeiInfo {
  @Backing(type="int") @VintfStability
  enum ImeiType {
    PRIMARY = 1,
    SECONDARY = 2,
  }
  ImeiType type;
  String imei;
  String svn;
}
 No newline at end of file
+10 −0
Original line number Diff line number Diff line
@@ -67,6 +67,7 @@ oneway interface IRadioModem {
     * @param serial Serial number of request.
     *
     * Response function is IRadioModemResponse.getDeviceIdentityResponse()
     * @deprecated use getImei(int serial)
     */
    void getDeviceIdentity(in int serial);

@@ -235,4 +236,13 @@ oneway interface IRadioModem {
     */
    void setResponseFunctions(in IRadioModemResponse radioModemResponse,
            in IRadioModemIndication radioModemIndication);

    /**
     * Request the IMEI associated with the radio.
     *
     * @param serial : Serial number of request.
     *
     * Response function is IRadioModemResponse.getImeiResponse()
     */
     void getImei(in int serial);
}
+19 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import android.hardware.radio.RadioResponseInfo;
import android.hardware.radio.modem.ActivityStatsInfo;
import android.hardware.radio.modem.HardwareConfig;
import android.hardware.radio.modem.RadioCapability;
import android.hardware.radio.modem.ImeiInfo;

/**
 * Interface declaring response functions to solicited radio requests for modem APIs.
@@ -87,6 +88,8 @@ oneway interface IRadioModemResponse {
     *   RadioError:NOT_PROVISIONED
     *   RadioError:NO_RESOURCES
     *   RadioError:CANCELLED
     *   RadioError:REQUEST_NOT_SUPPORTED
     * @deprecated use getImeiResponse(RadioResponseInfo responseInfo, ImeiInfo imeiInfo)
     */
    void getDeviceIdentityResponse(in RadioResponseInfo info, in String imei, in String imeisv,
            in String esn, in String meid);
@@ -250,4 +253,20 @@ oneway interface IRadioModemResponse {
     *   RadioError:NO_RF_CALIBRATION_INFO
     */
    void setRadioPowerResponse(in RadioResponseInfo info);

    /**
     * ImeiInfo to encapsulate the IMEI information from modem. When the return error code
     * is {@code RadioError:NONE}, {@code imeiInfo} must be non-null, and a valid IMEITYPE,
     * IMEI and SVN must be filled in {@code imeiInfo}. When the error code is not
     * {@code RadioError:NONE}, {@code imeiInfo} must be {@code null}.
     *
     * @param responseInfo Response info struct containing response type, serial no. and error
     * @param imeiInfo IMEI information
     *
     * Valid errors returned:
     *   RadioError:NONE
     *   RadioError:RADIO_NOT_AVAILABLE
     *   RadioError:MODEM_ERR
     */
    void getImeiResponse(in RadioResponseInfo responseInfo, in @nullable ImeiInfo imeiInfo);
}
Loading