Skip to content

Commit

Permalink
feat: rebrand package
Browse files Browse the repository at this point in the history
  • Loading branch information
joelkoen committed May 27, 2024
1 parent 72df2b4 commit c03a9e7
Show file tree
Hide file tree
Showing 33 changed files with 34 additions and 17 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,7 @@ jobs:
env:
TERM: dumb
JAVA_OPTS: -Xmx2048m
- uses: actions/upload-artifact@v3
with:
name: build
path: build
4 changes: 2 additions & 2 deletions src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="org.microg.nlp.backend.ichnaea">
package="net.beacondb.unifiednlp">

<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
Expand Down Expand Up @@ -35,7 +35,7 @@
android:value="@string/summary" />
<meta-data
android:name="org.microg.nlp.BACKEND_SETTINGS_ACTIVITY"
android:value="org.microg.nlp.backend.ichnaea.SettingsActivity" />
android:value="net.beacondb.unifiednlp.SettingsActivity" />
</service>

<activity
Expand Down
Binary file added src/main/ic_launcher-playstore.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

package org.microg.nlp.backend.ichnaea;
package net.beacondb.unifiednlp;

import android.content.SharedPreferences;
import android.location.Location;
Expand Down Expand Up @@ -34,7 +34,6 @@ public class BackendService extends HelperLocationBackendService
private static final long MAX_CELLS_AGE = 120000;
private static final long RATE_LIMIT_MS_FLOOR = 60000;
private static final long RATE_LIMIT_MS_PADDING = 10000;
private static final String PROVIDER = "ichnaea";

private long expBackoffFactor = 0;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

package org.microg.nlp.backend.ichnaea;
package net.beacondb.unifiednlp;

import android.content.ContentValues;
import android.content.Context;
Expand Down Expand Up @@ -32,7 +32,7 @@ public Location getLocation(CellBackendHelper.Cell cell) {
try (Cursor cursor = getReadableDatabase().query("cells", new String[]{"lat", "lon", "acc", "time"}, SELECTION, getSelectionArgs(cell), null, null, null)) {
if (cursor.moveToNext()) {
if (cursor.getLong(3) > System.currentTimeMillis() - MAX_AGE) {
return LocationHelper.create("ichnaea", cursor.getDouble(0), cursor.getDouble(1), (float) cursor.getDouble(2));
return LocationHelper.create("beacondb", cursor.getDouble(0), cursor.getDouble(1), (float) cursor.getDouble(2));
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

package org.microg.nlp.backend.ichnaea;
package net.beacondb.unifiednlp;

import android.location.Location;
import android.util.Log;
Expand All @@ -27,9 +27,8 @@
public class IchnaeaRequester implements Runnable {

private static final String TAG = "IchnaeaBackendService";
private static final String SERVICE_URL = "https://location.services.mozilla.com/v1/geolocate?key=%s";
private static final String API_KEY = "068ab754-c06b-473d-a1e5-60e7b1a2eb77";
private static final String PROVIDER = "ichnaea";
private static final String SERVICE_URL = "https://dev.joel.net.au/v1/geolocate";
private static final String PROVIDER = "beacondb";

private final LocationCallback callback;
private final CellDatabase cellDatabase;
Expand Down Expand Up @@ -86,7 +85,8 @@ public void run() {
private Location request(String request) {
HttpURLConnection conn = null;
try {
conn = (HttpURLConnection) new URL(String.format(SERVICE_URL, API_KEY)).openConnection();
conn = (HttpURLConnection) new URL(SERVICE_URL).openConnection();
conn.setRequestProperty("content-type", "application/json");
conn.setDoOutput(true);
conn.setDoInput(true);
Log.d(TAG, "request: " + request);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

package org.microg.nlp.backend.ichnaea;
package net.beacondb.unifiednlp;

import android.location.Location;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

package org.microg.nlp.backend.ichnaea;
package net.beacondb.unifiednlp;

import android.os.Bundle;
import android.preference.PreferenceActivity;
Expand Down
5 changes: 5 additions & 0 deletions src/main/res/mipmap-anydpi-v26/ic_launcher.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>
5 changes: 5 additions & 0 deletions src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>
Binary file removed src/main/res/mipmap-hdpi/ic_launcher.png
Binary file not shown.
Binary file added src/main/res/mipmap-hdpi/ic_launcher.webp
Binary file not shown.
Binary file not shown.
Binary file added src/main/res/mipmap-hdpi/ic_launcher_round.webp
Binary file not shown.
Binary file removed src/main/res/mipmap-mdpi/ic_launcher.png
Binary file not shown.
Binary file added src/main/res/mipmap-mdpi/ic_launcher.webp
Binary file not shown.
Binary file added src/main/res/mipmap-mdpi/ic_launcher_foreground.webp
Binary file not shown.
Binary file added src/main/res/mipmap-mdpi/ic_launcher_round.webp
Binary file not shown.
Binary file removed src/main/res/mipmap-xhdpi/ic_launcher.png
Binary file not shown.
Binary file added src/main/res/mipmap-xhdpi/ic_launcher.webp
Binary file not shown.
Binary file not shown.
Binary file added src/main/res/mipmap-xhdpi/ic_launcher_round.webp
Binary file not shown.
Binary file removed src/main/res/mipmap-xxhdpi/ic_launcher.png
Binary file not shown.
Binary file added src/main/res/mipmap-xxhdpi/ic_launcher.webp
Binary file not shown.
Binary file not shown.
Binary file added src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
Binary file not shown.
Binary file removed src/main/res/mipmap-xxxhdpi/ic_launcher.png
Binary file not shown.
Binary file added src/main/res/mipmap-xxxhdpi/ic_launcher.webp
Binary file not shown.
Binary file not shown.
Binary file not shown.
4 changes: 4 additions & 0 deletions src/main/res/values/ic_launcher_background.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#0A0A0A</color>
</resources>
4 changes: 2 additions & 2 deletions src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
~ SPDX-License-Identifier: Apache-2.0
-->
<resources>
<string name="app_name">Mozilla UnifiedNlp Backend</string>
<string name="backend_name">Mozilla Location Service</string>
<string name="app_name">beaconDB UnifiedNlp Backend</string>
<string name="backend_name">beaconDB</string>
<string name="summary">Locate using Mozilla\'s online database</string>

<string name="pref_category_submit">Data contribution</string>
Expand Down
4 changes: 2 additions & 2 deletions src/main/res/xml/preferences.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
android:defaultValue="true"
android:key="use_wifis"
android:summary="@string/pref_description_use_wifis"
android:title="@string/pref_title_use_wifis"/>
android:title="@string/pref_title_use_wifis" />
<CheckBoxPreference
android:defaultValue="true"
android:key="use_cells"
android:summary="@string/pref_description_use_cells"
android:title="@string/pref_title_use_cells"/>
android:title="@string/pref_title_use_cells" />

</PreferenceCategory>

Expand Down

0 comments on commit c03a9e7

Please sign in to comment.