Loading unifiednlp-api/build.gradle +6 −3 Original line number Diff line number Diff line Loading @@ -13,7 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ buildscript { repositories { mavenCentral() Loading @@ -22,11 +21,15 @@ buildscript { classpath 'com.android.tools.build:gradle:1.0.0' } } apply plugin: 'com.android.library' apply from: 'gradle-mvn-push.gradle' android { compileSdkVersion 22 buildToolsVersion "22.0.0" compileOptions { sourceCompatibility JavaVersion.VERSION_1_6 } } dependencies { } No newline at end of file unifiednlp-api/src/main/java/org/microg/nlp/api/CellBackendHelper.java +4 −4 Original line number Diff line number Diff line Loading @@ -53,7 +53,7 @@ import java.util.Set; public class CellBackendHelper extends AbstractBackendHelper { private final Listener listener; private final TelephonyManager telephonyManager; private final Set<Cell> cells = new HashSet<>(); private final Set<Cell> cells = new HashSet<Cell>(); private PhoneStateListener phoneStateListener; private boolean supportsCellInfoChanged = true; Loading Loading @@ -238,12 +238,12 @@ public class CellBackendHelper extends AbstractBackendHelper { try { Field mncField = identity.getClass().getDeclaredField("mMnc"); mncField.setAccessible(true); int mnc = (int) mncField.get(identity); int mnc = (Integer) mncField.get(identity); if (mnc >= 25 && mnc <= 1005) { mnc = (mnc - 15) / 10; mncField.setInt(identity, mnc); } } catch (NoSuchFieldException | IllegalAccessException ignored) { } catch (Exception ignored) { } } } Loading Loading @@ -294,7 +294,7 @@ public class CellBackendHelper extends AbstractBackendHelper { public synchronized Set<Cell> getCells() { currentDataUsed = true; return new HashSet<>(cells); return new HashSet<Cell>(cells); } /** Loading unifiednlp-api/src/main/java/org/microg/nlp/api/HelperLocationBackendService.java +1 −1 Original line number Diff line number Diff line Loading @@ -24,7 +24,7 @@ import java.util.Set; public abstract class HelperLocationBackendService extends LocationBackendService { private boolean opened; private Set<AbstractBackendHelper> helpers = new HashSet<>(); private Set<AbstractBackendHelper> helpers = new HashSet<AbstractBackendHelper>(); public synchronized void addHelper(AbstractBackendHelper helper) { helpers.add(helper); Loading unifiednlp-api/src/main/java/org/microg/nlp/api/WiFiBackendHelper.java +2 −2 Original line number Diff line number Diff line Loading @@ -39,7 +39,7 @@ public class WiFiBackendHelper extends AbstractBackendHelper { private final Listener listener; private final WifiManager wifiManager; private final Set<WiFi> wiFis = new HashSet<>(); private final Set<WiFi> wiFis = new HashSet<WiFi>(); private final BroadcastReceiver wifiBroadcastReceiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { Loading Loading @@ -150,7 +150,7 @@ public class WiFiBackendHelper extends AbstractBackendHelper { */ public synchronized Set<WiFi> getWiFis() { currentDataUsed = true; return new HashSet<>(wiFis); return new HashSet<WiFi>(wiFis); } /** Loading Loading
unifiednlp-api/build.gradle +6 −3 Original line number Diff line number Diff line Loading @@ -13,7 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ buildscript { repositories { mavenCentral() Loading @@ -22,11 +21,15 @@ buildscript { classpath 'com.android.tools.build:gradle:1.0.0' } } apply plugin: 'com.android.library' apply from: 'gradle-mvn-push.gradle' android { compileSdkVersion 22 buildToolsVersion "22.0.0" compileOptions { sourceCompatibility JavaVersion.VERSION_1_6 } } dependencies { } No newline at end of file
unifiednlp-api/src/main/java/org/microg/nlp/api/CellBackendHelper.java +4 −4 Original line number Diff line number Diff line Loading @@ -53,7 +53,7 @@ import java.util.Set; public class CellBackendHelper extends AbstractBackendHelper { private final Listener listener; private final TelephonyManager telephonyManager; private final Set<Cell> cells = new HashSet<>(); private final Set<Cell> cells = new HashSet<Cell>(); private PhoneStateListener phoneStateListener; private boolean supportsCellInfoChanged = true; Loading Loading @@ -238,12 +238,12 @@ public class CellBackendHelper extends AbstractBackendHelper { try { Field mncField = identity.getClass().getDeclaredField("mMnc"); mncField.setAccessible(true); int mnc = (int) mncField.get(identity); int mnc = (Integer) mncField.get(identity); if (mnc >= 25 && mnc <= 1005) { mnc = (mnc - 15) / 10; mncField.setInt(identity, mnc); } } catch (NoSuchFieldException | IllegalAccessException ignored) { } catch (Exception ignored) { } } } Loading Loading @@ -294,7 +294,7 @@ public class CellBackendHelper extends AbstractBackendHelper { public synchronized Set<Cell> getCells() { currentDataUsed = true; return new HashSet<>(cells); return new HashSet<Cell>(cells); } /** Loading
unifiednlp-api/src/main/java/org/microg/nlp/api/HelperLocationBackendService.java +1 −1 Original line number Diff line number Diff line Loading @@ -24,7 +24,7 @@ import java.util.Set; public abstract class HelperLocationBackendService extends LocationBackendService { private boolean opened; private Set<AbstractBackendHelper> helpers = new HashSet<>(); private Set<AbstractBackendHelper> helpers = new HashSet<AbstractBackendHelper>(); public synchronized void addHelper(AbstractBackendHelper helper) { helpers.add(helper); Loading
unifiednlp-api/src/main/java/org/microg/nlp/api/WiFiBackendHelper.java +2 −2 Original line number Diff line number Diff line Loading @@ -39,7 +39,7 @@ public class WiFiBackendHelper extends AbstractBackendHelper { private final Listener listener; private final WifiManager wifiManager; private final Set<WiFi> wiFis = new HashSet<>(); private final Set<WiFi> wiFis = new HashSet<WiFi>(); private final BroadcastReceiver wifiBroadcastReceiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { Loading Loading @@ -150,7 +150,7 @@ public class WiFiBackendHelper extends AbstractBackendHelper { */ public synchronized Set<WiFi> getWiFis() { currentDataUsed = true; return new HashSet<>(wiFis); return new HashSet<WiFi>(wiFis); } /** Loading