diff --git a/compat/build.gradle b/compat/build.gradle new file mode 100644 index 0000000..2bd3d91 --- /dev/null +++ b/compat/build.gradle @@ -0,0 +1,18 @@ +/* + * SPDX-FileCopyrightText: 2013, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +apply plugin: 'java' + +def sdkDir = System.env.ANDROID_HOME +if (!sdkDir) { + Properties properties = new Properties() + properties.load(project.rootProject.file('local.properties').newDataInputStream()) + sdkDir = properties.getProperty('sdk.dir') +} + +sourceSets.main { + java.srcDirs = ['src/current/java', 'src/v9/java'] + compileClasspath += project.rootProject.files("$sdkDir/platforms/android-$androidCompileSdk/android.jar") +} diff --git a/unifiednlp-compat/src/current/java/android/location/GeocoderParams.java b/compat/src/current/java/android/location/GeocoderParams.java similarity index 71% rename from unifiednlp-compat/src/current/java/android/location/GeocoderParams.java rename to compat/src/current/java/android/location/GeocoderParams.java index a3d38e0..9b2c6f1 100644 --- a/unifiednlp-compat/src/current/java/android/location/GeocoderParams.java +++ b/compat/src/current/java/android/location/GeocoderParams.java @@ -1,17 +1,7 @@ /* - * Copyright (C) 2010 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. + * SPDX-FileCopyrightText: 2010, The Android Open Source Project + * SPDX-FileCopyrightText: 2014, microG Project Team + * SPDX-License-Identifier: Apache-2.0 */ package android.location; diff --git a/unifiednlp-compat/src/current/java/android/location/Geofence.java b/compat/src/current/java/android/location/Geofence.java similarity index 88% rename from unifiednlp-compat/src/current/java/android/location/Geofence.java rename to compat/src/current/java/android/location/Geofence.java index 5de779a..68f1b2d 100644 --- a/unifiednlp-compat/src/current/java/android/location/Geofence.java +++ b/compat/src/current/java/android/location/Geofence.java @@ -1,17 +1,7 @@ /* - * Copyright (C) 2012 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. + * SPDX-FileCopyrightText: 2012, The Android Open Source Project + * SPDX-FileCopyrightText: 2014, microG Project Team + * SPDX-License-Identifier: Apache-2.0 */ package android.location; diff --git a/unifiednlp-compat/src/current/java/android/location/Location.java b/compat/src/current/java/android/location/Location.java similarity index 96% rename from unifiednlp-compat/src/current/java/android/location/Location.java rename to compat/src/current/java/android/location/Location.java index 194d8c7..facb1c8 100644 --- a/unifiednlp-compat/src/current/java/android/location/Location.java +++ b/compat/src/current/java/android/location/Location.java @@ -1,17 +1,7 @@ /* - * Copyright (C) 2007 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. + * SPDX-FileCopyrightText: 2007, The Android Open Source Project + * SPDX-FileCopyrightText: 2014, microG Project Team + * SPDX-License-Identifier: Apache-2.0 */ package android.location; diff --git a/unifiednlp-compat/src/current/java/android/location/LocationManager.java b/compat/src/current/java/android/location/LocationManager.java similarity index 98% rename from unifiednlp-compat/src/current/java/android/location/LocationManager.java rename to compat/src/current/java/android/location/LocationManager.java index b8e1599..cfe61d5 100644 --- a/unifiednlp-compat/src/current/java/android/location/LocationManager.java +++ b/compat/src/current/java/android/location/LocationManager.java @@ -1,17 +1,7 @@ /* - * Copyright (C) 2007 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. + * SPDX-FileCopyrightText: 2007, The Android Open Source Project + * SPDX-FileCopyrightText: 2014, microG Project Team + * SPDX-License-Identifier: Apache-2.0 */ package android.location; diff --git a/unifiednlp-compat/src/current/java/android/location/LocationRequest.java b/compat/src/current/java/android/location/LocationRequest.java similarity index 96% rename from unifiednlp-compat/src/current/java/android/location/LocationRequest.java rename to compat/src/current/java/android/location/LocationRequest.java index 1085ad5..04530a9 100644 --- a/unifiednlp-compat/src/current/java/android/location/LocationRequest.java +++ b/compat/src/current/java/android/location/LocationRequest.java @@ -1,17 +1,7 @@ /* - * Copyright (C) 2012 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. + * SPDX-FileCopyrightText: 2012, The Android Open Source Project + * SPDX-FileCopyrightText: 2014, microG Project Team + * SPDX-License-Identifier: Apache-2.0 */ package android.location; diff --git a/unifiednlp-compat/src/current/java/com/android/internal/location/ProviderProperties.java b/compat/src/current/java/com/android/internal/location/ProviderProperties.java similarity index 86% rename from unifiednlp-compat/src/current/java/com/android/internal/location/ProviderProperties.java rename to compat/src/current/java/com/android/internal/location/ProviderProperties.java index d66a219..e36845c 100644 --- a/unifiednlp-compat/src/current/java/com/android/internal/location/ProviderProperties.java +++ b/compat/src/current/java/com/android/internal/location/ProviderProperties.java @@ -1,17 +1,7 @@ /* - * Copyright (C) 2012 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. + * SPDX-FileCopyrightText: 2012, The Android Open Source Project + * SPDX-FileCopyrightText: 2014, microG Project Team + * SPDX-License-Identifier: Apache-2.0 */ package com.android.internal.location; diff --git a/unifiednlp-compat/src/current/java/com/android/internal/location/ProviderRequest.java b/compat/src/current/java/com/android/internal/location/ProviderRequest.java similarity index 69% rename from unifiednlp-compat/src/current/java/com/android/internal/location/ProviderRequest.java rename to compat/src/current/java/com/android/internal/location/ProviderRequest.java index bd4d515..1507497 100644 --- a/unifiednlp-compat/src/current/java/com/android/internal/location/ProviderRequest.java +++ b/compat/src/current/java/com/android/internal/location/ProviderRequest.java @@ -1,17 +1,7 @@ /* - * Copyright (C) 2012 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. + * SPDX-FileCopyrightText: 2012, The Android Open Source Project + * SPDX-FileCopyrightText: 2014, microG Project Team + * SPDX-License-Identifier: Apache-2.0 */ package com.android.internal.location; diff --git a/unifiednlp-compat/src/current/java/com/android/location/provider/GeocodeProvider.java b/compat/src/current/java/com/android/location/provider/GeocodeProvider.java similarity index 75% rename from unifiednlp-compat/src/current/java/com/android/location/provider/GeocodeProvider.java rename to compat/src/current/java/com/android/location/provider/GeocodeProvider.java index c35d7e9..e5100b8 100644 --- a/unifiednlp-compat/src/current/java/com/android/location/provider/GeocodeProvider.java +++ b/compat/src/current/java/com/android/location/provider/GeocodeProvider.java @@ -1,17 +1,7 @@ /* - * Copyright (C) 2010 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. + * SPDX-FileCopyrightText: 2010, The Android Open Source Project + * SPDX-FileCopyrightText: 2014, microG Project Team + * SPDX-License-Identifier: Apache-2.0 */ package com.android.location.provider; diff --git a/unifiednlp-compat/src/current/java/com/android/location/provider/LocationProviderBase.java b/compat/src/current/java/com/android/location/provider/LocationProviderBase.java similarity index 88% rename from unifiednlp-compat/src/current/java/com/android/location/provider/LocationProviderBase.java rename to compat/src/current/java/com/android/location/provider/LocationProviderBase.java index 30d5170..e34d6b7 100644 --- a/unifiednlp-compat/src/current/java/com/android/location/provider/LocationProviderBase.java +++ b/compat/src/current/java/com/android/location/provider/LocationProviderBase.java @@ -1,17 +1,7 @@ /* - * Copyright (C) 2010 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. + * SPDX-FileCopyrightText: 2010, The Android Open Source Project + * SPDX-FileCopyrightText: 2014, microG Project Team + * SPDX-License-Identifier: Apache-2.0 */ package com.android.location.provider; diff --git a/unifiednlp-compat/src/current/java/com/android/location/provider/LocationRequestUnbundled.java b/compat/src/current/java/com/android/location/provider/LocationRequestUnbundled.java similarity index 84% rename from unifiednlp-compat/src/current/java/com/android/location/provider/LocationRequestUnbundled.java rename to compat/src/current/java/com/android/location/provider/LocationRequestUnbundled.java index 71b5ca4..aaf64aa 100644 --- a/unifiednlp-compat/src/current/java/com/android/location/provider/LocationRequestUnbundled.java +++ b/compat/src/current/java/com/android/location/provider/LocationRequestUnbundled.java @@ -1,17 +1,7 @@ /* - * Copyright (C) 2012 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. + * SPDX-FileCopyrightText: 2012, The Android Open Source Project + * SPDX-FileCopyrightText: 2014, microG Project Team + * SPDX-License-Identifier: Apache-2.0 */ package com.android.location.provider; diff --git a/unifiednlp-compat/src/current/java/com/android/location/provider/ProviderPropertiesUnbundled.java b/compat/src/current/java/com/android/location/provider/ProviderPropertiesUnbundled.java similarity index 58% rename from unifiednlp-compat/src/current/java/com/android/location/provider/ProviderPropertiesUnbundled.java rename to compat/src/current/java/com/android/location/provider/ProviderPropertiesUnbundled.java index 0c3893d..2742fe4 100644 --- a/unifiednlp-compat/src/current/java/com/android/location/provider/ProviderPropertiesUnbundled.java +++ b/compat/src/current/java/com/android/location/provider/ProviderPropertiesUnbundled.java @@ -1,17 +1,7 @@ /* - * Copyright (C) 2012 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. + * SPDX-FileCopyrightText: 2012, The Android Open Source Project + * SPDX-FileCopyrightText: 2014, microG Project Team + * SPDX-License-Identifier: Apache-2.0 */ package com.android.location.provider; diff --git a/unifiednlp-compat/src/current/java/com/android/location/provider/ProviderRequestUnbundled.java b/compat/src/current/java/com/android/location/provider/ProviderRequestUnbundled.java similarity index 55% rename from unifiednlp-compat/src/current/java/com/android/location/provider/ProviderRequestUnbundled.java rename to compat/src/current/java/com/android/location/provider/ProviderRequestUnbundled.java index fca34db..bb31334 100644 --- a/unifiednlp-compat/src/current/java/com/android/location/provider/ProviderRequestUnbundled.java +++ b/compat/src/current/java/com/android/location/provider/ProviderRequestUnbundled.java @@ -1,17 +1,7 @@ /* - * Copyright (C) 2012 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. + * SPDX-FileCopyrightText: 2012, The Android Open Source Project + * SPDX-FileCopyrightText: 2014, microG Project Team + * SPDX-License-Identifier: Apache-2.0 */ package com.android.location.provider; diff --git a/unifiednlp-compat/src/v9/java/com/android/location/provider/LocationProvider.java b/compat/src/v9/java/com/android/location/provider/LocationProvider.java similarity index 91% rename from unifiednlp-compat/src/v9/java/com/android/location/provider/LocationProvider.java rename to compat/src/v9/java/com/android/location/provider/LocationProvider.java index 0e71404..c97ad80 100644 --- a/unifiednlp-compat/src/v9/java/com/android/location/provider/LocationProvider.java +++ b/compat/src/v9/java/com/android/location/provider/LocationProvider.java @@ -1,24 +1,13 @@ /* - * Copyright (C) 2010 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. + * SPDX-FileCopyrightText: 2010, The Android Open Source Project + * SPDX-FileCopyrightText: 2014, microG Project Team + * SPDX-License-Identifier: Apache-2.0 */ package com.android.location.provider; import android.location.Criteria; import android.location.Location; -import android.net.NetworkInfo; import android.os.Bundle; import android.os.IBinder; import android.os.WorkSource; @@ -203,7 +192,8 @@ public abstract class LocationProvider { * * @param state data state */ - public abstract void onUpdateNetworkState(int state, NetworkInfo info); + @SuppressWarnings("deprecation") + public abstract void onUpdateNetworkState(int state, android.net.NetworkInfo info); /** * Informs the provider when a new location has been computed by a different diff --git a/unifiednlp-compat/build.gradle b/unifiednlp-compat/build.gradle deleted file mode 100644 index 97cd7e6..0000000 --- a/unifiednlp-compat/build.gradle +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2013-2016 microG Project Team - * - * 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. - */ - -apply plugin: 'java' - -def sdkDir = System.env.ANDROID_HOME -if (!sdkDir) { - Properties properties = new Properties() - properties.load(project.rootProject.file('local.properties').newDataInputStream()) - sdkDir = properties.getProperty('sdk.dir') -} - -sourceSets.main { - java.srcDirs = ['src/current/java', 'src/v9/java'] - compileClasspath += project.rootProject.files("$sdkDir/platforms/android-27/android.jar") -}