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

Commit 19543294 authored by Jordan Liu's avatar Jordan Liu
Browse files

Update imports for CbGeoUtils

CbGeoUtils is moved to an external package so it can be made a
@SystemApi.

Also update usage of getMaxWaitingDuration

Test: make and run appcompat tool
Bug: 135956699
Change-Id: I090d3980de3c770dc77d6f70dcbc3562adfa763e
parent c179300c
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -41,14 +41,15 @@ import android.os.UserHandle;
import android.provider.Settings;
import android.provider.Telephony;
import android.provider.Telephony.CellBroadcasts;
import android.telephony.CbGeoUtils;
import android.telephony.CbGeoUtils.Geometry;
import android.telephony.CbGeoUtils.LatLng;
import android.telephony.SmsCbMessage;
import android.telephony.SubscriptionManager;
import android.text.format.DateUtils;
import android.util.LocalLog;
import android.util.Log;

import com.android.internal.telephony.CbGeoUtils.Geometry;
import com.android.internal.telephony.CbGeoUtils.LatLng;
import com.android.internal.telephony.metrics.TelephonyMetrics;

import java.io.FileDescriptor;
@@ -142,7 +143,7 @@ public class CellBroadcastHandler extends WakeLockStateMachine {
                } else {
                    performGeoFencing(message, uri, message.getGeometries(), location);
                }
            }, message.getMaximumWaitingTime());
            }, message.getMaximumWaitingDuration());
        } else {
            if (DBG) {
                log("Broadcast the message directly because no geo-fencing required, "
+2 −2
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ import android.net.Uri;
import android.os.AsyncResult;
import android.os.Message;
import android.provider.Telephony.CellBroadcasts;
import android.telephony.CbGeoUtils.Geometry;
import android.telephony.CellLocation;
import android.telephony.SmsCbLocation;
import android.telephony.SmsCbMessage;
@@ -33,7 +34,6 @@ import android.telephony.TelephonyManager;
import android.telephony.gsm.GsmCellLocation;
import android.text.format.DateUtils;

import com.android.internal.telephony.CbGeoUtils.Geometry;
import com.android.internal.telephony.CellBroadcastHandler;
import com.android.internal.telephony.Phone;
import com.android.internal.telephony.gsm.GsmSmsCbMessage.GeoFencingTriggerMessage;
@@ -138,7 +138,7 @@ public class GsmCellBroadcastHandler extends CellBroadcastHandler {
        // cell broadcasts.
        int maximumWaitTimeSec = 0;
        for (SmsCbMessage msg : cbMessages) {
            maximumWaitTimeSec = Math.max(maximumWaitTimeSec, msg.getMaximumWaitingTime());
            maximumWaitTimeSec = Math.max(maximumWaitTimeSec, msg.getMaximumWaitingDuration());
        }

        if (DBG) {
+5 −4
Original line number Diff line number Diff line
@@ -18,10 +18,11 @@ package com.android.internal.telephony;

import static com.google.common.truth.Truth.assertThat;

import com.android.internal.telephony.CbGeoUtils.Circle;
import com.android.internal.telephony.CbGeoUtils.Geometry;
import com.android.internal.telephony.CbGeoUtils.LatLng;
import com.android.internal.telephony.CbGeoUtils.Polygon;
import android.telephony.CbGeoUtils;
import android.telephony.CbGeoUtils.Circle;
import android.telephony.CbGeoUtils.Geometry;
import android.telephony.CbGeoUtils.LatLng;
import android.telephony.CbGeoUtils.Polygon;

import org.junit.Test;