From a5c5c525dba29230a6c2cce88bd9d393e765b058 Mon Sep 17 00:00:00 2001 From: Pierre Date: Sun, 5 Nov 2017 18:27:19 +0100 Subject: [PATCH] Created account package --- .../communiquons/android/comunic/client/LoginActivity.java | 2 +- .../org/communiquons/android/comunic/client/MainActivity.java | 2 +- .../android/comunic/client/api/APIRequestTask.java | 3 +-- .../android/comunic/client/data/{ => Account}/Account.java | 3 ++- .../communiquons/android/comunic/client/data/Utilities.java | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) rename app/src/main/java/org/communiquons/android/comunic/client/data/{ => Account}/Account.java (96%) diff --git a/app/src/main/java/org/communiquons/android/comunic/client/LoginActivity.java b/app/src/main/java/org/communiquons/android/comunic/client/LoginActivity.java index 6debca9..4760a80 100644 --- a/app/src/main/java/org/communiquons/android/comunic/client/LoginActivity.java +++ b/app/src/main/java/org/communiquons/android/comunic/client/LoginActivity.java @@ -10,7 +10,7 @@ import android.widget.ScrollView; import android.widget.TextView; import android.widget.Toast; -import org.communiquons.android.comunic.client.data.Account; +import org.communiquons.android.comunic.client.data.Account.Account; import org.communiquons.android.comunic.client.data.Utilities; import org.json.JSONException; import org.json.JSONObject; diff --git a/app/src/main/java/org/communiquons/android/comunic/client/MainActivity.java b/app/src/main/java/org/communiquons/android/comunic/client/MainActivity.java index 0d2d3b3..6e558cc 100644 --- a/app/src/main/java/org/communiquons/android/comunic/client/MainActivity.java +++ b/app/src/main/java/org/communiquons/android/comunic/client/MainActivity.java @@ -10,7 +10,7 @@ import android.view.MenuItem; import android.widget.Toast; import org.communiquons.android.comunic.client.api.APIRequestTask; -import org.communiquons.android.comunic.client.data.Account; +import org.communiquons.android.comunic.client.data.Account.Account; import org.communiquons.android.comunic.client.data.DatabaseHelper; import org.communiquons.android.comunic.client.data.UsersInfo.GetUsersInfos; import org.communiquons.android.comunic.client.data.UsersInfo.UserInfo; diff --git a/app/src/main/java/org/communiquons/android/comunic/client/api/APIRequestTask.java b/app/src/main/java/org/communiquons/android/comunic/client/api/APIRequestTask.java index 84f86a6..766e91d 100644 --- a/app/src/main/java/org/communiquons/android/comunic/client/api/APIRequestTask.java +++ b/app/src/main/java/org/communiquons/android/comunic/client/api/APIRequestTask.java @@ -4,9 +4,8 @@ import android.content.Context; import android.net.ConnectivityManager; import android.net.NetworkInfo; import android.os.AsyncTask; -import android.util.Log; -import org.communiquons.android.comunic.client.data.Account; +import org.communiquons.android.comunic.client.data.Account.Account; import org.communiquons.android.comunic.client.BuildConfig; import java.io.BufferedOutputStream; diff --git a/app/src/main/java/org/communiquons/android/comunic/client/data/Account.java b/app/src/main/java/org/communiquons/android/comunic/client/data/Account/Account.java similarity index 96% rename from app/src/main/java/org/communiquons/android/comunic/client/data/Account.java rename to app/src/main/java/org/communiquons/android/comunic/client/data/Account/Account.java index ce677e5..c9c559d 100644 --- a/app/src/main/java/org/communiquons/android/comunic/client/data/Account.java +++ b/app/src/main/java/org/communiquons/android/comunic/client/data/Account/Account.java @@ -1,8 +1,9 @@ -package org.communiquons.android.comunic.client.data; +package org.communiquons.android.comunic.client.data.Account; import android.content.Context; import android.util.Log; +import org.communiquons.android.comunic.client.data.Utilities; import org.json.JSONArray; import org.json.JSONException; diff --git a/app/src/main/java/org/communiquons/android/comunic/client/data/Utilities.java b/app/src/main/java/org/communiquons/android/comunic/client/data/Utilities.java index 9102950..0c22251 100644 --- a/app/src/main/java/org/communiquons/android/comunic/client/data/Utilities.java +++ b/app/src/main/java/org/communiquons/android/comunic/client/data/Utilities.java @@ -37,7 +37,7 @@ public class Utilities { * @param filename the name of the file to get * @return The content of the file */ - String file_get_content(String filename){ + public String file_get_content(String filename){ FileInputStream fileInputStream; @@ -77,7 +77,7 @@ public class Utilities { * @param content The new content of the file * @return FALSE in case of failure */ - boolean file_put_contents(String filename, String content){ + public boolean file_put_contents(String filename, String content){ FileOutputStream fileOutputStream;