Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronjwood committed Sep 5, 2016
2 parents e500412 + a85ebdb commit f940b64
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 27 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Port Authority

[<img src="https://f-droid.org/badge/get-it-on.png" alt="Get it on F-Droid" height="60">](https://f-droid.org/app/com.aaronjwood.portauthority)
<a href="https://play.google.com/store/apps/details?id=com.aaronjwood.portauthority.free"><img src="https://play.google.com/intl/en_us/badges/images/generic/en_badge_web_generic.png" height="60"></a>

[![Codacy Badge](https://api.codacy.com/project/badge/grade/74a6e90f803d46a1a39b34daabeb8af1)](https://www.codacy.com/app/aaronjwood/PortAuthority)
[![Build Status](https://travis-ci.org/aaronjwood/PortAuthority.svg?branch=master)](https://travis-ci.org/aaronjwood/PortAuthority)
[![Coverity Scan Build Status](https://scan.coverity.com/projects/8687/badge.svg)](https://scan.coverity.com/projects/aaronjwood-portauthority)
Expand All @@ -15,8 +19,8 @@ Port Authority has no ads and will *never* have ads.
It requires extremely limited permissions since it only needs to interact with your network.
The internals are designed to take advantage of today's modern phones with multiple cores to ensure you can scan your network as fast as possible.

Like the application and the work I put into it?
Consider purchasing the donate version https://play.google.com/store/apps/details?id=com.aaronjwood.portauthority.donate
Like the application and the work I put into it? Consider purchasing the donate version:
<a href="https://play.google.com/store/apps/details?id=com.aaronjwood.portauthority.donate"><img src="https://play.google.com/intl/en_us/badges/images/generic/en_badge_web_generic.png" height="60"></a>

# Contributing

Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ android {
defaultConfig {
minSdkVersion 11
targetSdkVersion 24
versionCode 35
versionName "1.7.6"
versionCode 36
versionName "1.7.8"
}

compileOptions {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public String getInternalWifiIpAddress() {
*/
public String getInternalMobileIpAddress() {
try {
for (Enumeration<NetworkInterface> en = NetworkInterface.getNetworkInterfaces(); en.hasMoreElements(); ) {
for (Enumeration<NetworkInterface> en = NetworkInterface.getNetworkInterfaces(); en != null && en.hasMoreElements(); ) {
NetworkInterface intf = en.nextElement();
for (Enumeration<InetAddress> enumIpAddr = intf.getInetAddresses(); enumIpAddr.hasMoreElements(); ) {
InetAddress inetAddress = enumIpAddr.nextElement();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,13 @@ public void run() {
}

portData.put(i, data);
socket.close();

this.delegate.processFinish(portData);
} catch (IOException ignored) {
} finally {
try {
socket.close();
} catch (IOException ignored) {
}
}
}
}
Expand Down
24 changes: 8 additions & 16 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,14 @@
android:id="@+id/deviceInfo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/programTitle"
android:stretchColumns="*">
android:layout_below="@id/programTitle">

<TableRow android:layout_width="0dp">
<TableRow>

<TextView
android:id="@+id/deviceMacAddressLabel"
style="@style/DeviceInfoItem"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="@string/macAddress"
android:textColor="@color/white" />

Expand All @@ -51,13 +49,12 @@
android:textColor="@color/icsblue" />
</TableRow>

<TableRow android:layout_width="0dp">
<TableRow>

<TextView
android:id="@+id/deviceMacVendorLabel"
style="@style/DeviceInfoItem"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="@string/macVendor"
android:textColor="@color/white" />

Expand All @@ -70,13 +67,12 @@
android:textColor="@color/icsblue" />
</TableRow>

<TableRow android:layout_width="0dp">
<TableRow>

<TextView
android:id="@+id/internalIpAddressLabel"
style="@style/DeviceInfoItem"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="@string/internalIpLabel"
android:textColor="@color/white" />

Expand All @@ -89,13 +85,12 @@
android:textColor="@color/icsblue" />
</TableRow>

<TableRow android:layout_width="0dp">
<TableRow>

<TextView
android:id="@+id/externalIpAddressLabel"
style="@style/DeviceInfoItem"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="@string/externalIpLabel"
android:textColor="@color/white" />

Expand All @@ -109,13 +104,12 @@
android:textColor="@color/icsblue" />
</TableRow>

<TableRow android:layout_width="0dp">
<TableRow>

<TextView
android:id="@+id/signalStrengthLabel"
style="@style/DeviceInfoItem"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="@string/signalLabel"
android:textColor="@color/white" />

Expand All @@ -128,13 +122,12 @@
android:textColor="@color/icsblue" />
</TableRow>

<TableRow android:layout_width="0dp">
<TableRow>

<TextView
android:id="@+id/ssidLabel"
style="@style/DeviceInfoItem"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="@string/ssid"
android:textColor="@color/white" />

Expand All @@ -147,13 +140,12 @@
android:textColor="@color/icsblue" />
</TableRow>

<TableRow android:layout_width="0dp">
<TableRow>

<TextView
android:id="@+id/bssidLabel"
style="@style/DeviceInfoItem"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="@string/bssid"
android:textColor="@color/white" />

Expand Down
13 changes: 13 additions & 0 deletions app/src/main/res/layout/checkbox.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- It's important that the ID be named exactly as is, otherwise you won't see updates when tapping other areas of the element! -->
<android.support.v7.widget.AppCompatCheckBox xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@android:id/checkbox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@null"
android:clickable="false"
android:focusable="false"
android:focusableInTouchMode="false"
app:buttonTint="@color/white"
app:colorAccent="@color/white" />
3 changes: 2 additions & 1 deletion app/src/main/res/xml/preferences.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
android:defaultValue="true"
android:key="externalIp"
android:summary="Determines whether or not the application should get your external IP using a third party service"
android:title="Fetch device's external IP" />
android:title="Fetch device's external IP"
android:widgetLayout="@layout/checkbox" />
</PreferenceCategory>
</PreferenceScreen>
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.2'
classpath 'com.android.tools.build:gradle:2.1.3'
}
}

Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Sun Aug 23 14:56:36 PDT 2015
#Wed Aug 31 00:53:30 EDT 2016
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.11-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip

0 comments on commit f940b64

Please sign in to comment.