Merge "Move gnss files to server/location/gnss" into rvc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
1caed5cd75
@@ -273,7 +273,7 @@ public abstract class RemoteListenerHelper<TRequest, TListener extends IInterfac
|
||||
}
|
||||
|
||||
@Nullable
|
||||
protected TRequest getRequest() {
|
||||
public TRequest getRequest() {
|
||||
return mRequest;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,20 @@
|
||||
package com.android.server.location;
|
||||
/*
|
||||
* Copyright (C) 2020 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.server.location.gnss;
|
||||
|
||||
/**
|
||||
* A simple implementation of exponential backoff.
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.server.location;
|
||||
package com.android.server.location.gnss;
|
||||
|
||||
import android.content.Context;
|
||||
import android.location.GnssAntennaInfo;
|
||||
@@ -23,6 +23,8 @@ import android.os.Handler;
|
||||
import android.util.Log;
|
||||
|
||||
import com.android.internal.annotations.VisibleForTesting;
|
||||
import com.android.server.location.CallerIdentity;
|
||||
import com.android.server.location.RemoteListenerHelper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,4 +1,20 @@
|
||||
package com.android.server.location;
|
||||
/*
|
||||
* Copyright (C) 2020 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.server.location.gnss;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2019 The Android Open Source Project
|
||||
* Copyright (C) 2020 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.server.location;
|
||||
package com.android.server.location.gnss;
|
||||
|
||||
import android.location.GnssCapabilities;
|
||||
import android.util.Log;
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2019 The Android Open Source Project
|
||||
* Copyright (C) 2020 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.server.location;
|
||||
package com.android.server.location.gnss;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.PersistableBundle;
|
||||
@@ -1,4 +1,20 @@
|
||||
package com.android.server.location;
|
||||
/*
|
||||
* Copyright (C) 2020 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.server.location.gnss;
|
||||
|
||||
import android.location.IGpsGeofenceHardware;
|
||||
import android.util.Log;
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2008 The Android Open Source Project
|
||||
* Copyright (C) 2020 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.server.location;
|
||||
package com.android.server.location.gnss;
|
||||
|
||||
import android.app.AlarmManager;
|
||||
import android.app.AppOpsManager;
|
||||
@@ -78,8 +78,9 @@ import com.android.internal.util.FrameworkStatsLog;
|
||||
import com.android.server.DeviceIdleInternal;
|
||||
import com.android.server.FgThread;
|
||||
import com.android.server.LocalServices;
|
||||
import com.android.server.location.GnssSatelliteBlacklistHelper.GnssSatelliteBlacklistCallback;
|
||||
import com.android.server.location.NtpTimeHelper.InjectNtpTimeCallback;
|
||||
import com.android.server.location.AbstractLocationProvider;
|
||||
import com.android.server.location.gnss.NtpTimeHelper.InjectNtpTimeCallback;
|
||||
import com.android.server.location.gnss.GnssSatelliteBlacklistHelper.GnssSatelliteBlacklistCallback;
|
||||
|
||||
import java.io.FileDescriptor;
|
||||
import java.io.PrintWriter;
|
||||
@@ -55,14 +55,6 @@ import com.android.server.LocationManagerServiceUtils.LinkedListener;
|
||||
import com.android.server.LocationManagerServiceUtils.LinkedListenerBase;
|
||||
import com.android.server.location.AppForegroundHelper;
|
||||
import com.android.server.location.CallerIdentity;
|
||||
import com.android.server.location.GnssAntennaInfoProvider;
|
||||
import com.android.server.location.GnssBatchingProvider;
|
||||
import com.android.server.location.GnssCapabilitiesProvider;
|
||||
import com.android.server.location.GnssLocationProvider;
|
||||
import com.android.server.location.GnssMeasurementCorrectionsProvider;
|
||||
import com.android.server.location.GnssMeasurementsProvider;
|
||||
import com.android.server.location.GnssNavigationMessageProvider;
|
||||
import com.android.server.location.GnssStatusListenerHelper;
|
||||
import com.android.server.location.LocationUsageLogger;
|
||||
import com.android.server.location.RemoteListenerHelper;
|
||||
import com.android.server.location.SettingsHelper;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2019 The Android Open Source Project
|
||||
* Copyright (C) 2020 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.server.location;
|
||||
package com.android.server.location.gnss;
|
||||
|
||||
import android.location.GnssMeasurementCorrections;
|
||||
import android.os.Handler;
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2014 The Android Open Source Project
|
||||
* Copyright (C) 2020 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.server.location;
|
||||
package com.android.server.location.gnss;
|
||||
|
||||
import android.content.Context;
|
||||
import android.location.GnssMeasurementsEvent;
|
||||
@@ -26,6 +26,8 @@ import android.provider.Settings;
|
||||
import android.util.Log;
|
||||
|
||||
import com.android.internal.annotations.VisibleForTesting;
|
||||
import com.android.server.location.CallerIdentity;
|
||||
import com.android.server.location.RemoteListenerHelper;
|
||||
|
||||
/**
|
||||
* An base implementation for GPS measurements provider. It abstracts out the responsibility of
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2014 The Android Open Source Project
|
||||
* Copyright (C) 2020 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.server.location;
|
||||
package com.android.server.location.gnss;
|
||||
|
||||
import android.content.Context;
|
||||
import android.location.GnssNavigationMessage;
|
||||
@@ -24,6 +24,8 @@ import android.os.RemoteException;
|
||||
import android.util.Log;
|
||||
|
||||
import com.android.internal.annotations.VisibleForTesting;
|
||||
import com.android.server.location.CallerIdentity;
|
||||
import com.android.server.location.RemoteListenerHelper;
|
||||
|
||||
/**
|
||||
* An base implementation for GPS navigation messages provider.
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018 The Android Open Source Project
|
||||
* Copyright (C) 2020 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.server.location;
|
||||
package com.android.server.location.gnss;
|
||||
|
||||
import android.content.Context;
|
||||
import android.database.Cursor;
|
||||
@@ -1,4 +1,20 @@
|
||||
package com.android.server.location;
|
||||
/*
|
||||
* Copyright (C) 2020 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.server.location.gnss;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
@@ -1,4 +1,20 @@
|
||||
package com.android.server.location;
|
||||
/*
|
||||
* Copyright (C) 2020 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.server.location.gnss;
|
||||
|
||||
import android.content.ContentResolver;
|
||||
import android.content.Context;
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2014 The Android Open Source Project
|
||||
* Copyright (C) 2020 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -11,16 +11,19 @@
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.server.location;
|
||||
package com.android.server.location.gnss;
|
||||
|
||||
import android.content.Context;
|
||||
import android.location.IGnssStatusListener;
|
||||
import android.os.Handler;
|
||||
import android.util.Log;
|
||||
|
||||
import com.android.server.location.CallerIdentity;
|
||||
import com.android.server.location.RemoteListenerHelper;
|
||||
|
||||
/**
|
||||
* Implementation of a handler for {@link IGnssStatusListener}.
|
||||
*/
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2019 The Android Open Source Project
|
||||
* Copyright (C) 2020 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.server.location;
|
||||
package com.android.server.location.gnss;
|
||||
|
||||
import android.annotation.Nullable;
|
||||
import android.annotation.SuppressLint;
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2008 The Android Open Source Project
|
||||
* Copyright (C) 2020 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.server.location;
|
||||
package com.android.server.location.gnss;
|
||||
|
||||
import android.net.TrafficStats;
|
||||
import android.text.TextUtils;
|
||||
@@ -1,4 +1,20 @@
|
||||
package com.android.server.location;
|
||||
/*
|
||||
* Copyright (C) 2020 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.server.location.gnss;
|
||||
|
||||
import android.content.Context;
|
||||
import android.net.ConnectivityManager;
|
||||
@@ -12,6 +28,7 @@ import android.util.NtpTrustedTime;
|
||||
|
||||
import com.android.internal.annotations.GuardedBy;
|
||||
import com.android.internal.annotations.VisibleForTesting;
|
||||
import com.android.server.location.gnss.ExponentialBackOff;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@@ -2068,8 +2068,8 @@ static void android_location_GnssLocationProvider_class_init_native(JNIEnv* env,
|
||||
class_gnssClock = (jclass) env->NewGlobalRef(gnssClockClass);
|
||||
method_gnssClockCtor = env->GetMethodID(class_gnssClock, "<init>", "()V");
|
||||
|
||||
jclass gnssConfiguration_halInterfaceVersionClass =
|
||||
env->FindClass("com/android/server/location/GnssConfiguration$HalInterfaceVersion");
|
||||
jclass gnssConfiguration_halInterfaceVersionClass = env->FindClass(
|
||||
"com/android/server/location/gnss/GnssConfiguration$HalInterfaceVersion");
|
||||
class_gnssConfiguration_halInterfaceVersion =
|
||||
(jclass) env->NewGlobalRef(gnssConfiguration_halInterfaceVersionClass);
|
||||
method_halInterfaceVersionCtor =
|
||||
@@ -3738,39 +3738,29 @@ static const JNINativeMethod sNetworkConnectivityMethods[] = {
|
||||
};
|
||||
|
||||
static const JNINativeMethod sConfigurationMethods[] = {
|
||||
/* name, signature, funcPtr */
|
||||
{"native_get_gnss_configuration_version",
|
||||
"()Lcom/android/server/location/GnssConfiguration$HalInterfaceVersion;",
|
||||
reinterpret_cast<void *>(
|
||||
android_location_GnssConfiguration_get_gnss_configuration_version)},
|
||||
{"native_set_supl_es",
|
||||
"(I)Z",
|
||||
reinterpret_cast<void *>(android_location_GnssConfiguration_set_supl_es)},
|
||||
{"native_set_supl_version",
|
||||
"(I)Z",
|
||||
reinterpret_cast<void *>(android_location_GnssConfiguration_set_supl_version)},
|
||||
{"native_set_supl_mode",
|
||||
"(I)Z",
|
||||
reinterpret_cast<void *>(android_location_GnssConfiguration_set_supl_mode)},
|
||||
{"native_set_lpp_profile",
|
||||
"(I)Z",
|
||||
reinterpret_cast<void *>(android_location_GnssConfiguration_set_lpp_profile)},
|
||||
{"native_set_gnss_pos_protocol_select",
|
||||
"(I)Z",
|
||||
reinterpret_cast<void *>(
|
||||
android_location_GnssConfiguration_set_gnss_pos_protocol_select)},
|
||||
{"native_set_gps_lock",
|
||||
"(I)Z",
|
||||
reinterpret_cast<void *>(android_location_GnssConfiguration_set_gps_lock)},
|
||||
{"native_set_emergency_supl_pdn",
|
||||
"(I)Z",
|
||||
reinterpret_cast<void *>(android_location_GnssConfiguration_set_emergency_supl_pdn)},
|
||||
{"native_set_satellite_blacklist",
|
||||
"([I[I)Z",
|
||||
reinterpret_cast<void *>(android_location_GnssConfiguration_set_satellite_blacklist)},
|
||||
{"native_set_es_extension_sec",
|
||||
"(I)Z",
|
||||
reinterpret_cast<void *>(android_location_GnssConfiguration_set_es_extension_sec)},
|
||||
/* name, signature, funcPtr */
|
||||
{"native_get_gnss_configuration_version",
|
||||
"()Lcom/android/server/location/gnss/GnssConfiguration$HalInterfaceVersion;",
|
||||
reinterpret_cast<void*>(
|
||||
android_location_GnssConfiguration_get_gnss_configuration_version)},
|
||||
{"native_set_supl_es", "(I)Z",
|
||||
reinterpret_cast<void*>(android_location_GnssConfiguration_set_supl_es)},
|
||||
{"native_set_supl_version", "(I)Z",
|
||||
reinterpret_cast<void*>(android_location_GnssConfiguration_set_supl_version)},
|
||||
{"native_set_supl_mode", "(I)Z",
|
||||
reinterpret_cast<void*>(android_location_GnssConfiguration_set_supl_mode)},
|
||||
{"native_set_lpp_profile", "(I)Z",
|
||||
reinterpret_cast<void*>(android_location_GnssConfiguration_set_lpp_profile)},
|
||||
{"native_set_gnss_pos_protocol_select", "(I)Z",
|
||||
reinterpret_cast<void*>(android_location_GnssConfiguration_set_gnss_pos_protocol_select)},
|
||||
{"native_set_gps_lock", "(I)Z",
|
||||
reinterpret_cast<void*>(android_location_GnssConfiguration_set_gps_lock)},
|
||||
{"native_set_emergency_supl_pdn", "(I)Z",
|
||||
reinterpret_cast<void*>(android_location_GnssConfiguration_set_emergency_supl_pdn)},
|
||||
{"native_set_satellite_blacklist", "([I[I)Z",
|
||||
reinterpret_cast<void*>(android_location_GnssConfiguration_set_satellite_blacklist)},
|
||||
{"native_set_es_extension_sec", "(I)Z",
|
||||
reinterpret_cast<void*>(android_location_GnssConfiguration_set_es_extension_sec)},
|
||||
};
|
||||
|
||||
static const JNINativeMethod sVisibilityControlMethods[] = {
|
||||
@@ -3782,53 +3772,27 @@ static const JNINativeMethod sVisibilityControlMethods[] = {
|
||||
};
|
||||
|
||||
int register_android_server_location_GnssLocationProvider(JNIEnv* env) {
|
||||
jniRegisterNativeMethods(env, "com/android/server/location/GnssAntennaInfoProvider",
|
||||
jniRegisterNativeMethods(env, "com/android/server/location/gnss/GnssAntennaInfoProvider",
|
||||
sAntennaInfoMethods, NELEM(sAntennaInfoMethods));
|
||||
jniRegisterNativeMethods(
|
||||
env,
|
||||
"com/android/server/location/GnssBatchingProvider",
|
||||
sMethodsBatching,
|
||||
NELEM(sMethodsBatching));
|
||||
jniRegisterNativeMethods(
|
||||
env,
|
||||
"com/android/server/location/GnssGeofenceProvider",
|
||||
sGeofenceMethods,
|
||||
NELEM(sGeofenceMethods));
|
||||
jniRegisterNativeMethods(
|
||||
env,
|
||||
"com/android/server/location/GnssMeasurementsProvider",
|
||||
sMeasurementMethods,
|
||||
NELEM(sMeasurementMethods));
|
||||
jniRegisterNativeMethods(
|
||||
env,
|
||||
"com/android/server/location/GnssMeasurementCorrectionsProvider",
|
||||
sMeasurementCorrectionsMethods,
|
||||
NELEM(sMeasurementCorrectionsMethods));
|
||||
jniRegisterNativeMethods(
|
||||
env,
|
||||
"com/android/server/location/GnssNavigationMessageProvider",
|
||||
sNavigationMessageMethods,
|
||||
NELEM(sNavigationMessageMethods));
|
||||
jniRegisterNativeMethods(
|
||||
env,
|
||||
"com/android/server/location/GnssNetworkConnectivityHandler",
|
||||
sNetworkConnectivityMethods,
|
||||
NELEM(sNetworkConnectivityMethods));
|
||||
jniRegisterNativeMethods(
|
||||
env,
|
||||
"com/android/server/location/GnssConfiguration",
|
||||
sConfigurationMethods,
|
||||
NELEM(sConfigurationMethods));
|
||||
jniRegisterNativeMethods(
|
||||
env,
|
||||
"com/android/server/location/GnssVisibilityControl",
|
||||
sVisibilityControlMethods,
|
||||
NELEM(sVisibilityControlMethods));
|
||||
return jniRegisterNativeMethods(
|
||||
env,
|
||||
"com/android/server/location/GnssLocationProvider",
|
||||
sMethods,
|
||||
NELEM(sMethods));
|
||||
jniRegisterNativeMethods(env, "com/android/server/location/gnss/GnssBatchingProvider",
|
||||
sMethodsBatching, NELEM(sMethodsBatching));
|
||||
jniRegisterNativeMethods(env, "com/android/server/location/gnss/GnssGeofenceProvider",
|
||||
sGeofenceMethods, NELEM(sGeofenceMethods));
|
||||
jniRegisterNativeMethods(env, "com/android/server/location/gnss/GnssMeasurementsProvider",
|
||||
sMeasurementMethods, NELEM(sMeasurementMethods));
|
||||
jniRegisterNativeMethods(env,
|
||||
"com/android/server/location/gnss/GnssMeasurementCorrectionsProvider",
|
||||
sMeasurementCorrectionsMethods, NELEM(sMeasurementCorrectionsMethods));
|
||||
jniRegisterNativeMethods(env, "com/android/server/location/gnss/GnssNavigationMessageProvider",
|
||||
sNavigationMessageMethods, NELEM(sNavigationMessageMethods));
|
||||
jniRegisterNativeMethods(env, "com/android/server/location/gnss/GnssNetworkConnectivityHandler",
|
||||
sNetworkConnectivityMethods, NELEM(sNetworkConnectivityMethods));
|
||||
jniRegisterNativeMethods(env, "com/android/server/location/gnss/GnssConfiguration",
|
||||
sConfigurationMethods, NELEM(sConfigurationMethods));
|
||||
jniRegisterNativeMethods(env, "com/android/server/location/gnss/GnssVisibilityControl",
|
||||
sVisibilityControlMethods, NELEM(sVisibilityControlMethods));
|
||||
return jniRegisterNativeMethods(env, "com/android/server/location/gnss/GnssLocationProvider",
|
||||
sMethods, NELEM(sMethods));
|
||||
}
|
||||
|
||||
} /* namespace android */
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.server.location;
|
||||
package com.android.server.location.gnss;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
|
||||
@@ -41,7 +41,8 @@ import org.robolectric.RuntimeEnvironment;
|
||||
@Presubmit
|
||||
public class GnssAntennaInfoProviderTest {
|
||||
@Mock
|
||||
private GnssAntennaInfoProvider.GnssAntennaInfoProviderNative mMockNative;
|
||||
private GnssAntennaInfoProvider.GnssAntennaInfoProviderNative
|
||||
mMockNative;
|
||||
private GnssAntennaInfoProvider mTestProvider;
|
||||
|
||||
/** Setup. */
|
||||
@@ -1,4 +1,20 @@
|
||||
package com.android.server.location;
|
||||
/*
|
||||
* Copyright (C) 2020 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.server.location.gnss;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
|
||||
@@ -11,7 +27,7 @@ import static org.mockito.Mockito.when;
|
||||
|
||||
import android.platform.test.annotations.Presubmit;
|
||||
|
||||
import com.android.server.location.GnssBatchingProvider.GnssBatchingProviderNative;
|
||||
import com.android.server.location.gnss.GnssBatchingProvider.GnssBatchingProviderNative;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
@@ -1,4 +1,20 @@
|
||||
package com.android.server.location;
|
||||
/*
|
||||
* Copyright (C) 2020 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.server.location.gnss;
|
||||
|
||||
import static org.mockito.ArgumentMatchers.anyDouble;
|
||||
import static org.mockito.ArgumentMatchers.anyInt;
|
||||
@@ -1,4 +1,20 @@
|
||||
package com.android.server.location;
|
||||
/*
|
||||
* Copyright (C) 2020 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.server.location.gnss;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
|
||||
@@ -26,7 +42,8 @@ import org.robolectric.RuntimeEnvironment;
|
||||
@Presubmit
|
||||
public class GnssMeasurementsProviderTest {
|
||||
@Mock
|
||||
private GnssMeasurementsProvider.GnssMeasurementProviderNative mMockNative;
|
||||
private GnssMeasurementsProvider.GnssMeasurementProviderNative
|
||||
mMockNative;
|
||||
private GnssMeasurementsProvider mTestProvider;
|
||||
|
||||
@Before
|
||||
@@ -1,4 +1,20 @@
|
||||
package com.android.server.location;
|
||||
/*
|
||||
* Copyright (C) 2020 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.server.location.gnss;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
|
||||
@@ -25,7 +41,8 @@ import org.robolectric.RuntimeEnvironment;
|
||||
@Presubmit
|
||||
public class GnssNavigationMessageProviderTest {
|
||||
@Mock
|
||||
private GnssNavigationMessageProvider.GnssNavigationMessageProviderNative mMockNative;
|
||||
private GnssNavigationMessageProvider.GnssNavigationMessageProviderNative
|
||||
mMockNative;
|
||||
private GnssNavigationMessageProvider mTestProvider;
|
||||
|
||||
@Before
|
||||
@@ -1,4 +1,20 @@
|
||||
package com.android.server.location;
|
||||
/*
|
||||
* Copyright (C) 2020 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.server.location.gnss;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
|
||||
@@ -1,4 +1,20 @@
|
||||
package com.android.server.location;
|
||||
/*
|
||||
* Copyright (C) 2020 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.server.location.gnss;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
|
||||
@@ -35,7 +51,8 @@ public class GnssSatelliteBlacklistHelperTest {
|
||||
|
||||
private ContentResolver mContentResolver;
|
||||
@Mock
|
||||
private GnssSatelliteBlacklistHelper.GnssSatelliteBlacklistCallback mCallback;
|
||||
private GnssSatelliteBlacklistHelper.GnssSatelliteBlacklistCallback
|
||||
mCallback;
|
||||
|
||||
@Before
|
||||
public void setUp() {
|
||||
@@ -1,4 +1,20 @@
|
||||
package com.android.server.location;
|
||||
/*
|
||||
* Copyright (C) 2020 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.server.location.gnss;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
|
||||
@@ -10,7 +26,7 @@ import android.os.SystemClock;
|
||||
import android.platform.test.annotations.Presubmit;
|
||||
import android.util.NtpTrustedTime;
|
||||
|
||||
import com.android.server.location.NtpTimeHelper.InjectNtpTimeCallback;
|
||||
import com.android.server.location.gnss.NtpTimeHelper.InjectNtpTimeCallback;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
@@ -61,17 +61,9 @@ import android.os.RemoteException;
|
||||
|
||||
import com.android.server.LocalServices;
|
||||
import com.android.server.location.AppForegroundHelper;
|
||||
import com.android.server.location.GnssAntennaInfoProvider;
|
||||
import com.android.server.location.GnssAntennaInfoProvider.GnssAntennaInfoProviderNative;
|
||||
import com.android.server.location.GnssBatchingProvider;
|
||||
import com.android.server.location.GnssCapabilitiesProvider;
|
||||
import com.android.server.location.GnssLocationProvider;
|
||||
import com.android.server.location.GnssMeasurementCorrectionsProvider;
|
||||
import com.android.server.location.GnssMeasurementsProvider;
|
||||
import com.android.server.location.GnssMeasurementsProvider.GnssMeasurementProviderNative;
|
||||
import com.android.server.location.GnssNavigationMessageProvider;
|
||||
import com.android.server.location.GnssNavigationMessageProvider.GnssNavigationMessageProviderNative;
|
||||
import com.android.server.location.GnssStatusListenerHelper;
|
||||
import com.android.server.location.gnss.GnssAntennaInfoProvider.GnssAntennaInfoProviderNative;
|
||||
import com.android.server.location.gnss.GnssMeasurementsProvider.GnssMeasurementProviderNative;
|
||||
import com.android.server.location.gnss.GnssNavigationMessageProvider.GnssNavigationMessageProviderNative;
|
||||
import com.android.server.location.LocationUsageLogger;
|
||||
import com.android.server.location.SettingsHelper;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user