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

Commit ca9839bd authored by yongnamcha's avatar yongnamcha Committed by Yongnam Cha
Browse files

Expose BarringInfo#getCellIdentity as a SystemApi

This CL makes the BarringInfo#getCellIdentity() feature available to clients. By enabling clients to identify the specific network type for a given BarringInfo, they can more accurately apply access control rules (e.g., SSAC), leading to more robust and precise network behavior.

Changes:
Exposes the getCellIdentity() method as a flagged @SystemApi.

This change only handles the API visibility.
The corresponding feature flag and unit tests are introduced in a companion CL.

Bug: 431881770
Bug: 412452528
Test: atest BarringInfoTest
Test: atest TelephonyCallbackTest, atest PhoneStateListenerTest
Flag: com.android.internal.telephony.flags.cell_identity_for_barring_info

Change-Id: Idc3e7830d084f885201bcc47664d2d18d07300f7
parent 9ed7d748
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -15241,6 +15241,7 @@ package android.telephony {
  public final class BarringInfo implements android.os.Parcelable {
    ctor public BarringInfo();
    method @NonNull public android.telephony.BarringInfo createLocationInfoSanitizedCopy();
    method @FlaggedApi("com.android.internal.telephony.flags.cell_identity_for_barring_info") @Nullable public android.telephony.CellIdentity getCellIdentity();
  }
  @Deprecated public final class CallAttributes implements android.os.Parcelable {
+6 −1
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package android.telephony;

import android.annotation.FlaggedApi;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
@@ -26,6 +27,8 @@ import android.os.Parcel;
import android.os.Parcelable;
import android.util.SparseArray;

import com.android.internal.telephony.flags.Flags;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.Objects;
@@ -308,7 +311,9 @@ public final class BarringInfo implements Parcelable {
     *
     * @hide
     */
    public CellIdentity getCellIdentity() {
    @SystemApi
    @FlaggedApi(Flags.FLAG_CELL_IDENTITY_FOR_BARRING_INFO)
    public @Nullable CellIdentity getCellIdentity() {
        return mCellIdentity;
    }