Skip to content

Commit

Permalink
package name change (#94)
Browse files Browse the repository at this point in the history
* Remove raw input data for testing - comment testing methods.

* Uncomment used method

* package name change.
write only contacts to db.
remove fastcsv dependency
  • Loading branch information
edwardigates authored Aug 3, 2020
1 parent a581392 commit 8a3f96e
Show file tree
Hide file tree
Showing 55 changed files with 221 additions and 262 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import android.content.Intent;

import com.facebook.react.ReactActivity;
import com.wix.specialble.bt.BLEManager;
import com.wix.specialble.util.DeviceUtil;
import moh.gov.il.specialble.bt.BLEManager;
import moh.gov.il.specialble.util.DeviceUtil;

public class MainActivity extends ReactActivity {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.soloader.SoLoader;
import com.wix.specialble.SpecialBlePackage;
import moh.gov.il.specialble.SpecialBlePackage;

import java.lang.reflect.InvocationTargetException;
import java.util.List;
Expand Down
3 changes: 1 addition & 2 deletions lib/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ dependencies {
implementation "androidx.room:room-runtime:$room_version"
annotationProcessor "androidx.room:room-compiler:$room_version"
implementation 'com.google.code.gson:gson:2.8.6'
implementation 'de.siegmar:fastcsv:1.0.3'
}

def configureReactNativePom(def pom) {
Expand All @@ -95,7 +94,7 @@ def configureReactNativePom(def pom) {
name packageJson.title
artifactId packageJson.name
version = packageJson.version
group = "com.wix.specialble"
group = "moh.gov.il.specialble"
description packageJson.description
url packageJson.repository.baseUrl

Expand Down
10 changes: 5 additions & 5 deletions lib/android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.wix.specialble">
package="moh.gov.il.specialble">

<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
Expand All @@ -13,7 +13,7 @@
<uses-feature android:name="android.hardware.bluetooth_le" android:required="false"/>

<application>
<activity android:name=".activities.BatteryOptimizationHolderActivity" android:theme="@style/Theme.AppCompat.Translucent"></activity>
<activity android:name="moh.gov.il.specialble.activities.BatteryOptimizationHolderActivity" android:theme="@style/Theme.AppCompat.Translucent"></activity>
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.provider"
Expand All @@ -23,9 +23,9 @@
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/provider_paths" />
</provider>
<service android:name="com.wix.specialble.BLEForegroundService" />
<receiver android:name="com.wix.specialble.receivers.AlarmReceiver"/>
<receiver android:name=".BLEReceiver">
<service android:name="moh.gov.il.specialble.BLEForegroundService" />
<receiver android:name="moh.gov.il.specialble.receivers.AlarmReceiver"/>
<receiver android:name="moh.gov.il.specialble.BLEReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.MY_PACKAGE_REPLACED" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.wix.crypto;
package moh.gov.il.crypto;

import java.nio.charset.StandardCharsets;
import java.util.HashMap;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
package com.wix.crypto;
package moh.gov.il.crypto;

import androidx.annotation.NonNull;
import androidx.room.ColumnInfo;
import androidx.room.Entity;
import androidx.room.Index;
import androidx.room.PrimaryKey;

import com.wix.crypto.utilities.Hex;
import moh.gov.il.crypto.utilities.Hex;

import org.json.JSONException;
import org.json.JSONObject;

import java.nio.ByteBuffer;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.wix.crypto;
package moh.gov.il.crypto;

import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.wix.crypto;
package moh.gov.il.crypto;

import android.content.Context;
import android.util.Log;

import java.security.SecureRandom;
import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.wix.crypto;
package moh.gov.il.crypto;

import org.json.JSONObject;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
package com.wix.crypto;

import com.wix.crypto.utilities.Hex;
package moh.gov.il.crypto;

import org.json.JSONObject;

import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.util.List;

public class MatchResponse {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.wix.crypto;
package moh.gov.il.crypto;

import com.wix.crypto.custom.Pair;
import com.wix.crypto.custom.Triplet;
import com.wix.crypto.key.UserKey;
import com.wix.crypto.utilities.BytesUtils;
import com.wix.crypto.utilities.DerivationUtils;
import moh.gov.il.crypto.custom.Pair;
import moh.gov.il.crypto.custom.Triplet;
import moh.gov.il.crypto.key.UserKey;
import moh.gov.il.crypto.utilities.BytesUtils;
import moh.gov.il.crypto.utilities.DerivationUtils;

import java.util.ArrayList;
import java.util.Arrays;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.wix.crypto;
package moh.gov.il.crypto;

import androidx.annotation.Nullable;
import com.google.gson.annotations.SerializedName;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.wix.crypto;
package moh.gov.il.crypto;

import android.content.Context;
import android.content.SharedPreferences;
Expand All @@ -7,15 +7,15 @@
import android.util.Log;

import com.google.gson.annotations.SerializedName;
import com.wix.crypto.custom.Pair;
import com.wix.crypto.custom.Triplet;
import com.wix.crypto.key.DayKey;
import com.wix.crypto.key.EpochKey;
import com.wix.crypto.key.UserKey;
import com.wix.crypto.utilities.BytesUtils;
import com.wix.crypto.utilities.DerivationUtils;
import com.wix.crypto.utilities.Hex;
import com.wix.specialble.db.DBClient;
import moh.gov.il.crypto.custom.Pair;
import moh.gov.il.crypto.custom.Triplet;
import moh.gov.il.crypto.key.EpochKey;
import moh.gov.il.crypto.utilities.BytesUtils;
import moh.gov.il.crypto.utilities.DerivationUtils;
import moh.gov.il.crypto.utilities.Hex;
import moh.gov.il.specialble.db.DBClient;
import moh.gov.il.crypto.key.DayKey;
import moh.gov.il.crypto.key.UserKey;

import org.json.JSONArray;
import org.json.JSONException;
Expand All @@ -30,8 +30,6 @@
import java.util.Map;

import static android.content.Context.MODE_PRIVATE;
import static com.wix.crypto.Constants.NUM_OF_DAYS;
import static com.wix.crypto.Constants.SECONDS_IN_DAY;

/**
* Created by hagai on 11/05/2020.
Expand Down Expand Up @@ -222,7 +220,7 @@ public byte[] generateEphemeralId(int time, byte[] geoHash)
EpochKey epochKey = null;
if(!mEpochKeys.containsKey(t) && mEpochKeys.get(t) == null)// "Epoch key is not present";
{
this.updateKeyDatabase(time - NUM_OF_DAYS * SECONDS_IN_DAY, time);
this.updateKeyDatabase(time - Constants.NUM_OF_DAYS * Constants.SECONDS_IN_DAY, time);
}

epochKey = mEpochKeys.get(t);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.wix.crypto.custom;
package moh.gov.il.crypto.custom;

/**
* Created by hagai on 11/05/2020.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.wix.crypto.custom;
package moh.gov.il.crypto.custom;

/**
* Created by hagai on 11/05/2020.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.wix.crypto.key;
package moh.gov.il.crypto.key;

import com.wix.crypto.utilities.BytesUtils;
import com.wix.crypto.utilities.DerivationUtils;
import moh.gov.il.crypto.utilities.BytesUtils;
import moh.gov.il.crypto.utilities.DerivationUtils;

/**
* Created by hagai on 11/05/2020.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.wix.crypto.key;
package moh.gov.il.crypto.key;

import com.google.gson.annotations.SerializedName;
import com.wix.crypto.Crypto;
import com.wix.crypto.utilities.Hex;
import com.wix.crypto.utilities.BytesUtils;
import com.wix.crypto.utilities.DerivationUtils;
import moh.gov.il.crypto.utilities.BytesUtils;
import moh.gov.il.crypto.utilities.DerivationUtils;
import moh.gov.il.crypto.Crypto;
import moh.gov.il.crypto.utilities.Hex;

import org.json.JSONException;
import org.json.JSONObject;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.wix.crypto.key;
package moh.gov.il.crypto.key;

import com.wix.crypto.custom.Triplet;
import moh.gov.il.crypto.custom.Triplet;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.wix.crypto.utilities;
package moh.gov.il.crypto.utilities;

/**
* Created by hagai on 11/05/2020.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.wix.crypto.utilities;
package moh.gov.il.crypto.utilities;

import com.wix.crypto.Constants;
import com.wix.crypto.Crypto;
import com.wix.crypto.custom.Pair;
import moh.gov.il.crypto.Constants;
import moh.gov.il.crypto.Crypto;
import moh.gov.il.crypto.custom.Pair;

import java.util.Arrays;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.wix.crypto.utilities;
package moh.gov.il.crypto.utilities;


/*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.wix.specialble;
package moh.gov.il.specialble;

import android.app.ActivityManager;
import android.app.AlarmManager;
Expand All @@ -12,33 +12,30 @@
import android.content.pm.PackageManager;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.net.Uri;
import android.os.Build;
import android.os.Handler;
import android.os.IBinder;
import android.os.PowerManager;
import android.os.SystemClock;
import android.provider.Settings;
import android.util.Log;
import android.widget.Toast;

import androidx.annotation.Nullable;
import androidx.core.app.NotificationCompat;

import com.wix.crypto.User;
import com.wix.specialble.bt.BLEManager;
import com.wix.specialble.config.Config;
import com.wix.specialble.receivers.AlarmReceiver;
import com.wix.specialble.util.PrefUtils;
import moh.gov.il.specialble.bt.BLEManager;
import moh.gov.il.specialble.util.PrefUtils;
import moh.gov.il.specialble.config.Config;
import moh.gov.il.specialble.receivers.AlarmReceiver;

import java.io.IOException;
import java.io.InputStream;
import static com.wix.specialble.receivers.AlarmReceiver.WAKE_ME_UP;
import static com.wix.specialble.receivers.AlarmReceiver.WAKE_ME_UP_AFTER_10;
import static com.wix.specialble.receivers.AlarmReceiver.WAKE_ME_UP_AFTER_5;
import static com.wix.specialble.receivers.AlarmReceiver.alarmInterval;
import static com.wix.specialble.receivers.AlarmReceiver.alarmInterval_after_10;
import static com.wix.specialble.receivers.AlarmReceiver.alarmInterval_after_5;

import static moh.gov.il.specialble.receivers.AlarmReceiver.WAKE_ME_UP;
import static moh.gov.il.specialble.receivers.AlarmReceiver.WAKE_ME_UP_AFTER_10;
import static moh.gov.il.specialble.receivers.AlarmReceiver.WAKE_ME_UP_AFTER_5;
import static moh.gov.il.specialble.receivers.AlarmReceiver.alarmInterval;
import static moh.gov.il.specialble.receivers.AlarmReceiver.alarmInterval_after_10;
import static moh.gov.il.specialble.receivers.AlarmReceiver.alarmInterval_after_5;

public class BLEForegroundService extends Service {
public static final String CHANNEL_ID = "BLEForegroundServiceChannel";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
package com.wix.specialble;
package moh.gov.il.specialble;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;

import com.wix.specialble.config.Config;
import com.wix.specialble.util.PrefUtils;
import moh.gov.il.specialble.util.PrefUtils;

/**
* Currently filtering in only BOOT_COMPLETE and MY_PACKEGE_REPLACED.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.wix.specialble;
package moh.gov.il.specialble;

import android.util.Log;

Expand All @@ -8,9 +8,9 @@
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.WritableMap;
import com.facebook.react.modules.core.DeviceEventManagerModule;
import com.wix.specialble.bt.Device;
import com.wix.specialble.bt.Scan;
import com.wix.specialble.listeners.IEventListener;
import moh.gov.il.specialble.bt.Device;
import moh.gov.il.specialble.bt.Scan;
import moh.gov.il.specialble.listeners.IEventListener;

public class EventToJSDispatcher implements IEventListener {
ReactApplicationContext context;
Expand Down
Loading

0 comments on commit 8a3f96e

Please sign in to comment.