From 02cfb3bdc82b08819e742adf060d7911f2720835 Mon Sep 17 00:00:00 2001 From: Pengquan Meng Date: Thu, 18 Jul 2019 17:30:04 -0700 Subject: Add fields to Cellbroadcast This add some fields to CellBroadcasts in order to support the WEA 3.0 geo-fencing. Bug: 123096618 Test: atest TelephonyProviderTests Merged-In: Ied0780cb1b9993e6d8cdb80131ba2f8b8affcb54 Change-Id: Ied0780cb1b9993e6d8cdb80131ba2f8b8affcb54 (cherry picked from commit 5c6e975ce4a973619f20167644475b04e663ee4e) --- telephony/java/android/provider/Telephony.java | 47 ++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/telephony/java/android/provider/Telephony.java b/telephony/java/android/provider/Telephony.java index 8e56fe72e152..38c81d394e11 100644 --- a/telephony/java/android/provider/Telephony.java +++ b/telephony/java/android/provider/Telephony.java @@ -4048,6 +4048,53 @@ public final class Telephony { /** The default sort order for this table. */ public static final String DEFAULT_SORT_ORDER = DELIVERY_TIME + " DESC"; + /** + * The Epoch Unix timestamp when the device received the message. + *

Type: INTEGER

+ */ + public static final String RECEIVED_TIME = "received_time"; + + /** + * Indicates that whether the message has been broadcasted to the application. + *

Type: BOOLEAN

+ */ + public static final String MESSAGE_BROADCASTED = "message_broadcasted"; + + /** + * The Warning Area Coordinates Elements. This element is used for geo-fencing purpose. + * + * The geometry and its coordinates are separated vertical bar, the first item is the + * geometry type and the remaining items are the parameter of this geometry. + * + * Only circle and polygon are supported. The coordinates are represented in Horizontal + * coordinates format. + * + * Coordinate encoding: + * "latitude, longitude" + * where -90.00000 <= latitude <= 90.00000 and -180.00000 <= longitude <= 180.00000 + * + * Polygon encoding: + * "polygon|lat1,lng1|lat2,lng2|...|latn,lngn" + * lat1,lng1 ... latn,lngn are the vertices coordinate of the polygon. + * + * Circle encoding: + * "circle|lat,lng|radius". + * lat,lng is the center of the circle. The unit of circle's radius is meter. + * + * Example: + * "circle|0,0|100" mean a circle which center located at (0,0) and its radius is 100 meter. + * "polygon|0,1.5|0,1|1,1|1,0" mean a polygon has vertices (0,1.5),(0,1),(1,1),(1,0). + * + * There could be more than one geometry store in this field, they are separated by a + * semicolon. + * + * Example: + * "circle|0,0|100;polygon|0,0|0,1.5|1,1|1,0;circle|100.123,100|200.123" + * + *

Type: TEXT

+ */ + public static final String GEOMETRIES = "geometries"; + /** * Query columns for instantiating {@link android.telephony.CellBroadcastMessage} objects. */ -- cgit v1.2.3-59-g8ed1b