-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from omnt/rel/0.4
Create Release 0.4
- Loading branch information
Showing
90 changed files
with
6,026 additions
and
2,603 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
app/src/main/java/de/fraunhofer/fokus/OpenMobileNetworkToolkit/ClearPreferencesFragment.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package de.fraunhofer.fokus.OpenMobileNetworkToolkit; | ||
|
||
import android.app.Dialog; | ||
import android.content.DialogInterface; | ||
import android.os.Bundle; | ||
import android.widget.Toast; | ||
|
||
import androidx.appcompat.app.AlertDialog; | ||
import androidx.fragment.app.DialogFragment; | ||
|
||
import de.fraunhofer.fokus.OpenMobileNetworkToolkit.Preferences.SharedPreferencesGrouper; | ||
import de.fraunhofer.fokus.OpenMobileNetworkToolkit.SettingPreferences.ClearPreferencesListener; | ||
|
||
public class ClearPreferencesFragment extends DialogFragment { | ||
private ClearPreferencesListener listener; | ||
|
||
public void setClearPreferencesListener(ClearPreferencesListener listener) { | ||
this.listener = listener; | ||
} | ||
public Dialog onCreateDialog(Bundle savedInstanceState) { | ||
// Use the Builder class for convenient dialog construction. | ||
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); | ||
builder.setMessage(R.string.clear_preferences_message) | ||
.setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() { | ||
public void onClick(DialogInterface dialog, int id) { | ||
SharedPreferencesGrouper.getInstance(getContext()).clearConfig(); | ||
listener.onPreferenceChanged(); | ||
Toast.makeText(getContext(), "All Config Cleared!", Toast.LENGTH_SHORT).show(); | ||
} | ||
}) | ||
.setNegativeButton(R.string.no, new DialogInterface.OnClickListener() { | ||
public void onClick(DialogInterface dialog, int id) { | ||
Toast.makeText(getContext(), "Canceled", Toast.LENGTH_SHORT).show(); | ||
} | ||
}); | ||
// Create the AlertDialog object and return it. | ||
return builder.create(); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
...main/java/de/fraunhofer/fokus/OpenMobileNetworkToolkit/DataProvider/BuildInformation.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
package de.fraunhofer.fokus.OpenMobileNetworkToolkit.DataProvider; | ||
|
||
import android.content.Context; | ||
import android.util.Log; | ||
import android.widget.TableLayout; | ||
|
||
import org.json.JSONObject; | ||
|
||
import de.fraunhofer.fokus.OpenMobileNetworkToolkit.BuildConfig; | ||
|
||
public class BuildInformation extends Information { | ||
private final String TAG = "BuildInformation"; | ||
|
||
public BuildInformation() { | ||
super(); | ||
} | ||
|
||
public BuildInformation(long timeStamp) { | ||
super(timeStamp); | ||
} | ||
|
||
public String getBuildType() { | ||
return BuildConfig.BUILD_TYPE; | ||
} | ||
|
||
public int getVersionCode() { | ||
return BuildConfig.VERSION_CODE; | ||
} | ||
|
||
public String getVersionName() { | ||
return BuildConfig.VERSION_NAME; | ||
} | ||
|
||
public String getApplicationId() { | ||
return BuildConfig.APPLICATION_ID; | ||
} | ||
|
||
public boolean isDebug() { | ||
return BuildConfig.DEBUG; | ||
} | ||
|
||
public JSONObject toJSON(){ | ||
|
||
JSONObject json = new JSONObject(); | ||
try { | ||
json.put("BuildType", getBuildType()); | ||
json.put("VersionCode", getVersionCode()); | ||
json.put("VersionName", getVersionName()); | ||
json.put("ApplicationId", getApplicationId()); | ||
json.put("Debug", isDebug()); | ||
} catch (Exception e) { | ||
Log.d(TAG,e.toString()); | ||
} | ||
return json; | ||
} | ||
|
||
} |
Oops, something went wrong.