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

Commit 2171781a authored by Yipeng Cao's avatar Yipeng Cao
Browse files

Fixed the hasCarrierFrequency flag in GnssStatus (part1)

Bug: 37757180
Fixes: 37757180
Test: 1. built img locally and flash the device
make -j 40 
vendor/google/tools/flashall
2. run cts
cts-tradefed run cts -m CtsLocationTestCases --test
android.location.cts.GnssStatusTest

Change-Id: I5046dbe28518812192de20daca91a8511a1558c0
parent afd8d9e2
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -55,9 +55,9 @@ public final class GnssStatus {
    public static final int GNSS_SV_FLAGS_HAS_CARRIER_FREQUENCY = (1 << 3);

    /** @hide */
    public static final int SVID_SHIFT_WIDTH = 7;
    public static final int SVID_SHIFT_WIDTH = 8;
    /** @hide */
    public static final int CONSTELLATION_TYPE_SHIFT_WIDTH = 3;
    public static final int CONSTELLATION_TYPE_SHIFT_WIDTH = 4;
    /** @hide */
    public static final int CONSTELLATION_TYPE_MASK = 0xf;

+2 −2
Original line number Diff line number Diff line
@@ -1277,8 +1277,8 @@ static void android_location_GnssLocationProvider_delete_aiding_data(JNIEnv* /*
 * constellation and svFlag fields.
 */
enum ShiftWidth: uint8_t {
    SVID_SHIFT_WIDTH = 7,
    CONSTELLATION_TYPE_SHIFT_WIDTH = 3
    SVID_SHIFT_WIDTH = 8,
    CONSTELLATION_TYPE_SHIFT_WIDTH = 4
};

static jint android_location_GnssLocationProvider_read_sv_status(JNIEnv* env, jobject /* obj */,