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

Commit 15a72743 authored by Jordan Liu's avatar Jordan Liu
Browse files

Expose some SystemApis and edit framework-cellbroadcast-shared-srcs

The APIs are used in the CellBroadcastService, and the
framework-cellbroadcast-shared-srcs library is also linked there.

Bug: 135956699
Test: manual
Change-Id: I5e71ea1ee1a858c0520c241dc7365733441e0f50
parent c9e53d5c
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -1631,8 +1631,10 @@ filegroup {
filegroup {
filegroup {
    name: "framework-cellbroadcast-shared-srcs",
    name: "framework-cellbroadcast-shared-srcs",
    srcs: [
    srcs: [
        "core/java/android/os/HandlerExecutor.java",
        "core/java/android/util/LocalLog.java",
        "core/java/android/util/LocalLog.java",
        "core/java/android/util/Slog.java",
        "core/java/com/android/internal/util/IState.java",
        "core/java/com/android/internal/util/Preconditions.java",
        "core/java/com/android/internal/util/State.java",
        "core/java/com/android/internal/util/State.java",
        "core/java/com/android/internal/util/StateMachine.java",
        "core/java/com/android/internal/util/StateMachine.java",
    ],
    ],
+1 −0
Original line number Original line Diff line number Diff line
@@ -9172,6 +9172,7 @@ package android.telephony {
    method @NonNull public android.content.ContentValues getContentValues();
    method @NonNull public android.content.ContentValues getContentValues();
    method @Nullable public android.telephony.SmsCbEtwsInfo getEtwsWarningInfo();
    method @Nullable public android.telephony.SmsCbEtwsInfo getEtwsWarningInfo();
    method public int getGeographicalScope();
    method public int getGeographicalScope();
    method @NonNull public java.util.List<android.telephony.CbGeoUtils.Geometry> getGeometries();
    method @Nullable public String getLanguageCode();
    method @Nullable public String getLanguageCode();
    method @NonNull public android.telephony.SmsCbLocation getLocation();
    method @NonNull public android.telephony.SmsCbLocation getLocation();
    method public int getMaximumWaitingDuration();
    method public int getMaximumWaitingDuration();
+10 −5
Original line number Original line Diff line number Diff line
@@ -29,6 +29,7 @@ import android.telephony.CbGeoUtils.Geometry;


import java.lang.annotation.Retention;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.RetentionPolicy;
import java.util.ArrayList;
import java.util.List;
import java.util.List;


/**
/**
@@ -407,13 +408,17 @@ public final class SmsCbMessage implements Parcelable {
    }
    }


    /**
    /**
     * Get the warning area coordinates information represent by polygons and circles.
     * Get the warning area coordinates information represented by polygons and circles.
     * @return a list of geometries, {@link Nullable} means there is no coordinate information
     * @return a list of geometries, or an empty list if there is no coordinate information
     * associated to this message.
     * associated with this message.
     * @hide
     * @hide
     */
     */
    @Nullable
    @SystemApi
    @NonNull
    public List<Geometry> getGeometries() {
    public List<Geometry> getGeometries() {
        if (mGeometries == null) {
            return new ArrayList<>();
        }
        return mGeometries;
        return mGeometries;
    }
    }


@@ -720,6 +725,6 @@ public final class SmsCbMessage implements Parcelable {
     * @return {@code True} if this message needs geo-fencing check.
     * @return {@code True} if this message needs geo-fencing check.
     */
     */
    public boolean needGeoFencingCheck() {
    public boolean needGeoFencingCheck() {
        return mMaximumWaitTimeSec > 0 && mGeometries != null;
        return mMaximumWaitTimeSec > 0 && mGeometries != null && !mGeometries.isEmpty();
    }
    }
}
}