Merge "Expose some SystemApis and edit framework-cellbroadcast-shared-srcs"
diff --git a/Android.bp b/Android.bp
index c0879f0..ece5098 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1629,8 +1629,10 @@
filegroup {
name: "framework-cellbroadcast-shared-srcs",
srcs: [
+ "core/java/android/os/HandlerExecutor.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/StateMachine.java",
],
diff --git a/api/system-current.txt b/api/system-current.txt
index 90321d7..aeb89b2 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -9172,6 +9172,7 @@
method @NonNull public android.content.ContentValues getContentValues();
method @Nullable public android.telephony.SmsCbEtwsInfo getEtwsWarningInfo();
method public int getGeographicalScope();
+ method @NonNull public java.util.List<android.telephony.CbGeoUtils.Geometry> getGeometries();
method @Nullable public String getLanguageCode();
method @NonNull public android.telephony.SmsCbLocation getLocation();
method public int getMaximumWaitingDuration();
diff --git a/telephony/java/android/telephony/SmsCbMessage.java b/telephony/java/android/telephony/SmsCbMessage.java
index fad70d2..c7f9529 100644
--- a/telephony/java/android/telephony/SmsCbMessage.java
+++ b/telephony/java/android/telephony/SmsCbMessage.java
@@ -29,6 +29,7 @@
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
+import java.util.ArrayList;
import java.util.List;
/**
@@ -407,13 +408,17 @@
}
/**
- * Get the warning area coordinates information represent by polygons and circles.
- * @return a list of geometries, {@link Nullable} means there is no coordinate information
- * associated to this message.
+ * Get the warning area coordinates information represented by polygons and circles.
+ * @return a list of geometries, or an empty list if there is no coordinate information
+ * associated with this message.
* @hide
*/
- @Nullable
+ @SystemApi
+ @NonNull
public List<Geometry> getGeometries() {
+ if (mGeometries == null) {
+ return new ArrayList<>();
+ }
return mGeometries;
}
@@ -720,6 +725,6 @@
* @return {@code True} if this message needs geo-fencing check.
*/
public boolean needGeoFencingCheck() {
- return mMaximumWaitTimeSec > 0 && mGeometries != null;
+ return mMaximumWaitTimeSec > 0 && mGeometries != null && !mGeometries.isEmpty();
}
}