Commit 0ee62465 authored by rahadi's avatar rahadi

Package Refactoring

parent 03291f77
......@@ -225,6 +225,8 @@ dependencies {
compile 'com.mapbox.mapboxsdk:mapbox-android-services:2.1.2'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.google.firebase:firebase-messaging:10.0.1'
implementation 'me.texy.treeview:treeview_lib:1.0.3'
}
// Must be at bottom to prevent dependency collisions
......
......@@ -10,8 +10,8 @@ import org.junit.After;
import org.junit.Before;
import id.ac.stis.capi.TestUtils;
import id.ac.stis.capi.application.Collect;
import id.ac.stis.capi.preferences.PreferenceKeys;
import id.ac.stis.capi.odk.application.Collect;
import id.ac.stis.capi.odk.preferences.PreferenceKeys;
import okhttp3.mockwebserver.MockResponse;
import okhttp3.mockwebserver.MockWebServer;
import okhttp3.mockwebserver.RecordedRequest;
......
......@@ -12,8 +12,8 @@ import java.util.Collections;
import java.util.Map;
import java.util.Set;
import id.ac.stis.capi.application.Collect;
import id.ac.stis.capi.provider.InstanceProviderAPI;
import id.ac.stis.capi.odk.application.Collect;
import id.ac.stis.capi.odk.provider.InstanceProviderAPI;
public final class TestUtils {
private TestUtils() {}
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package id.ac.stis.capi.dao;
package id.ac.stis.capi.odk.dao;
import android.database.Cursor;
import android.support.test.runner.AndroidJUnit4;
......@@ -23,10 +23,10 @@ import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import id.ac.stis.capi.application.Collect;
import id.ac.stis.capi.dto.Form;
import id.ac.stis.capi.provider.FormsProviderAPI;
import id.ac.stis.capi.utilities.ResetUtility;
import id.ac.stis.capi.odk.application.Collect;
import id.ac.stis.capi.odk.dto.Form;
import id.ac.stis.capi.odk.provider.FormsProviderAPI;
import id.ac.stis.capi.odk.utilities.ResetUtility;
import java.io.File;
import java.io.IOException;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package id.ac.stis.capi.dao;
package id.ac.stis.capi.odk.dao;
import android.database.Cursor;
import android.support.test.runner.AndroidJUnit4;
......@@ -23,9 +23,9 @@ import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import id.ac.stis.capi.application.Collect;
import id.ac.stis.capi.dto.Instance;
import id.ac.stis.capi.provider.InstanceProviderAPI;
import id.ac.stis.capi.odk.application.Collect;
import id.ac.stis.capi.odk.dto.Instance;
import id.ac.stis.capi.odk.provider.InstanceProviderAPI;
import java.util.List;
......
package id.ac.stis.capi.tasks;
package id.ac.stis.capi.odk.tasks;
import org.junit.Test;
import id.ac.stis.capi.MockedServerTest;
import id.ac.stis.capi.logic.FormDetails;
import id.ac.stis.capi.odk.logic.FormDetails;
import java.util.Map;
......
package id.ac.stis.capi.tasks;
package id.ac.stis.capi.odk.tasks;
import android.net.Uri;
......@@ -9,10 +9,10 @@ import org.junit.Before;
import org.junit.Test;
import id.ac.stis.capi.MockedServerTest;
import id.ac.stis.capi.dao.InstancesDao;
import id.ac.stis.capi.dto.Instance;
import id.ac.stis.capi.provider.InstanceProviderAPI;
import id.ac.stis.capi.tasks.InstanceUploaderTask.Outcome;
import id.ac.stis.capi.odk.dao.InstancesDao;
import id.ac.stis.capi.odk.dto.Instance;
import id.ac.stis.capi.odk.provider.InstanceProviderAPI;
import id.ac.stis.capi.odk.tasks.InstanceUploaderTask.Outcome;
import okhttp3.mockwebserver.RecordedRequest;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package id.ac.stis.capi.utilities;
package id.ac.stis.capi.odk.utilities;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
......@@ -23,7 +23,7 @@ import android.support.test.runner.AndroidJUnit4;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import id.ac.stis.capi.application.Collect;
import id.ac.stis.capi.odk.application.Collect;
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertFalse;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package id.ac.stis.capi.utilities;
package id.ac.stis.capi.odk.utilities;
import android.content.Context;
import android.support.test.filters.Suppress;
......@@ -23,8 +23,8 @@ import android.support.test.runner.AndroidJUnit4;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import id.ac.stis.capi.application.Collect;
import id.ac.stis.capi.logic.DatePickerDetails;
import id.ac.stis.capi.odk.application.Collect;
import id.ac.stis.capi.odk.logic.DatePickerDetails;
import java.util.Date;
import java.util.Locale;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package id.ac.stis.capi.utilities;
package id.ac.stis.capi.odk.utilities;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
......@@ -26,9 +26,9 @@ import org.javarosa.form.api.FormEntryPrompt;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import id.ac.stis.capi.application.Collect;
import id.ac.stis.capi.preferences.GeneralSharedPreferences;
import id.ac.stis.capi.widgets.ImageWidget;
import id.ac.stis.capi.odk.application.Collect;
import id.ac.stis.capi.odk.preferences.GeneralSharedPreferences;
import id.ac.stis.capi.odk.widgets.ImageWidget;
import java.io.File;
import java.io.IOException;
......@@ -40,7 +40,7 @@ import timber.log.Timber;
import static junit.framework.Assert.assertEquals;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import static id.ac.stis.capi.utilities.ApplicationConstants.XML_OPENROSA_NAMESPACE;
import static id.ac.stis.capi.odk.utilities.ApplicationConstants.XML_OPENROSA_NAMESPACE;
@RunWith(AndroidJUnit4.class)
public class ImageConverterTest {
......
package id.ac.stis.capi.utilities;
package id.ac.stis.capi.odk.utilities;
import org.junit.Before;
import org.junit.Test;
import id.ac.stis.capi.MockedServerTest;
import id.ac.stis.capi.application.Collect;
import id.ac.stis.capi.odk.application.Collect;
import org.opendatakit.httpclientandroidlib.client.HttpClient;
import org.opendatakit.httpclientandroidlib.client.methods.HttpGet;
import org.opendatakit.httpclientandroidlib.protocol.HttpContext;
......
......@@ -86,25 +86,25 @@ the specific language governing permissions and limitations under the License.
android:supportsRtl="true"
android:theme="@style/AppTheme.NoActionBar">
<provider
android:name="id.ac.stis.capi.provider.FormsProvider"
android:authorities="id.ac.stis.capi.provider.odk.forms"
android:name="id.ac.stis.capi.odk.provider.FormsProvider"
android:authorities="id.ac.stis.capi.odk.provider.odk.forms"
android:exported="true" />
<provider
android:name="id.ac.stis.capi.provider.InstanceProvider"
android:authorities="id.ac.stis.capi.provider.odk.instances"
android:name="id.ac.stis.capi.odk.provider.InstanceProvider"
android:authorities="id.ac.stis.capi.odk.provider.odk.instances"
android:exported="true" />
<activity
android:name="id.ac.stis.capi.activities.MainMenuActivity"
android:name="id.ac.stis.capi.odk.activities.MainMenuActivity"
android:configChanges="locale|orientation|screenSize"
android:label="@string/app_name" />
<activity
android:name="id.ac.stis.capi.activities.ScannerWithFlashlightActivity"
android:name="id.ac.stis.capi.odk.activities.ScannerWithFlashlightActivity"
android:screenOrientation="portrait"
android:stateNotNeeded="true"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="id.ac.stis.capi.activities.FormEntryActivity"
android:name="id.ac.stis.capi.odk.activities.FormEntryActivity"
android:configChanges="orientation|screenSize|keyboardHidden"
android:label="@string/app_name"
android:windowSoftInputMode="adjustResize">
......@@ -119,25 +119,25 @@ the specific language governing permissions and limitations under the License.
</intent-filter>
</activity>
<activity
android:name="id.ac.stis.capi.activities.NotificationActivity"
android:name="id.ac.stis.capi.odk.activities.NotificationActivity"
android:excludeFromRecents="true"
android:label="@string/app_name"
android:launchMode="singleTask"
android:taskAffinity="" />
<activity
android:name="id.ac.stis.capi.activities.DrawActivity"
android:name="id.ac.stis.capi.odk.activities.DrawActivity"
android:label="@string/app_name"
android:screenOrientation="landscape" />
<activity
android:name="id.ac.stis.capi.activities.OpenSourceLicensesActivity"
android:name="id.ac.stis.capi.odk.activities.OpenSourceLicensesActivity"
android:label="@string/all_open_source_licenses" />
<activity
android:name="id.ac.stis.capi.activities.GoogleDriveActivity"
android:name="id.ac.stis.capi.odk.activities.GoogleDriveActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:windowSoftInputMode="stateHidden" />
<activity
android:name="id.ac.stis.capi.activities.InstanceChooserList"
android:name="id.ac.stis.capi.odk.activities.InstanceChooserList"
android:label="@string/app_name"
android:theme="@style/AppTheme.WithActionBar">
<intent-filter android:scheme="http">
......@@ -150,7 +150,7 @@ the specific language governing permissions and limitations under the License.
</intent-filter>
</activity>
<activity
android:name="id.ac.stis.capi.activities.FormChooserList"
android:name="id.ac.stis.capi.odk.activities.FormChooserList"
android:label="@string/app_name"
android:theme="@style/AppTheme.WithActionBar">
<intent-filter android:scheme="http">
......@@ -164,19 +164,19 @@ the specific language governing permissions and limitations under the License.
</intent-filter>
</activity>
<activity
android:name="id.ac.stis.capi.activities.FormDownloadList"
android:name="id.ac.stis.capi.odk.activities.FormDownloadList"
android:label="@string/app_name"
android:theme="@style/AppTheme.WithActionBar" />
<activity
android:name="id.ac.stis.capi.activities.FileManagerTabs"
android:name="id.ac.stis.capi.odk.activities.FileManagerTabs"
android:configChanges="orientation|screenSize"
android:label="@string/app_name" />
<activity
android:name="id.ac.stis.capi.activities.GoogleSheetsUploaderActivity"
android:name="id.ac.stis.capi.odk.activities.GoogleSheetsUploaderActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name" />
<activity
android:name="id.ac.stis.capi.activities.InstanceUploaderList"
android:name="id.ac.stis.capi.odk.activities.InstanceUploaderList"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:theme="@style/AppTheme.WithActionBar">
......@@ -188,52 +188,52 @@ the specific language governing permissions and limitations under the License.
</intent-filter>
</activity>
<activity
android:name="id.ac.stis.capi.activities.InstanceUploaderActivity"
android:name="id.ac.stis.capi.odk.activities.InstanceUploaderActivity"
android:label="@string/app_name" />
<activity
android:name="id.ac.stis.capi.preferences.AboutPreferencesActivity"
android:name="id.ac.stis.capi.odk.preferences.AboutPreferencesActivity"
android:label="@string/app_name" />
<activity
android:name="id.ac.stis.capi.preferences.PreferencesActivity"
android:name="id.ac.stis.capi.odk.preferences.PreferencesActivity"
android:label="@string/app_name" />
<activity
android:name="id.ac.stis.capi.preferences.AdminPreferencesActivity"
android:name="id.ac.stis.capi.odk.preferences.AdminPreferencesActivity"
android:label="@string/app_name" />
<activity
android:name="id.ac.stis.capi.activities.FormHierarchyActivity"
android:name="id.ac.stis.capi.odk.activities.FormHierarchyActivity"
android:label="@string/app_name" />
<activity
android:name="id.ac.stis.capi.activities.GeoPointActivity"
android:name="id.ac.stis.capi.odk.activities.GeoPointActivity"
android:label="@string/app_name" />
<activity
android:name="id.ac.stis.capi.activities.GeoPointMapActivity"
android:name="id.ac.stis.capi.odk.activities.GeoPointMapActivity"
android:configChanges="orientation"
android:label="@string/app_name" />
<activity
android:name="id.ac.stis.capi.activities.GeoPointOsmMapActivity"
android:name="id.ac.stis.capi.odk.activities.GeoPointOsmMapActivity"
android:configChanges="orientation"
android:label="@string/app_name" />
<activity
android:name="id.ac.stis.capi.activities.GeoShapeOsmMapActivity"
android:name="id.ac.stis.capi.odk.activities.GeoShapeOsmMapActivity"
android:configChanges="orientation"
android:label="@string/app_name" />
<activity
android:name="id.ac.stis.capi.activities.GeoShapeGoogleMapActivity"
android:name="id.ac.stis.capi.odk.activities.GeoShapeGoogleMapActivity"
android:configChanges="orientation"
android:label="@string/app_name" />
<activity
android:name="id.ac.stis.capi.activities.GeoTraceOsmMapActivity"
android:name="id.ac.stis.capi.odk.activities.GeoTraceOsmMapActivity"
android:configChanges="orientation"
android:label="@string/app_name" />
<activity
android:name="id.ac.stis.capi.activities.GeoTraceGoogleMapActivity"
android:name="id.ac.stis.capi.odk.activities.GeoTraceGoogleMapActivity"
android:configChanges="orientation"
android:label="@string/app_name" />
<activity
android:name="id.ac.stis.capi.activities.BearingActivity"
android:name="id.ac.stis.capi.odk.activities.BearingActivity"
android:label="@string/app_name" />
<activity
android:name="id.ac.stis.capi.activities.SplashScreenActivity"
android:name="id.ac.stis.capi.odk.activities.SplashScreenActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
......@@ -244,7 +244,7 @@ the specific language governing permissions and limitations under the License.
</activity>
<!-- Enable Shortcuts for Command Actions -->
<activity
android:name="id.ac.stis.capi.activities.AndroidShortcuts"
android:name="id.ac.stis.capi.odk.activities.AndroidShortcuts"
android:label="ODK Form"
android:theme="@style/Theme.AppCompat.Light.NoActionBar">
<intent-filter>
......@@ -253,11 +253,11 @@ the specific language governing permissions and limitations under the License.
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity android:name="id.ac.stis.capi.activities.CaptureSelfieActivity" />
<activity android:name="id.ac.stis.capi.activities.CaptureSelfieActivityNewApi" />
<activity android:name="id.ac.stis.capi.odk.activities.CaptureSelfieActivity" />
<activity android:name="id.ac.stis.capi.odk.activities.CaptureSelfieActivityNewApi" />
<receiver
android:name="id.ac.stis.capi.receivers.NetworkReceiver"
android:name="id.ac.stis.capi.odk.receivers.NetworkReceiver"
android:enabled="true">
<intent-filter>
<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
......@@ -294,7 +294,7 @@ the specific language governing permissions and limitations under the License.
<uses-library
android:name="com.google.android.maps"
android:required="false" />
<activity android:name="id.ac.stis.capi.activities.PermissionActivity" />
<activity android:name="id.ac.stis.capi.odk.activities.PermissionActivity" />
<!-- tambahan untuk CAPI-STIS -->
......@@ -341,13 +341,13 @@ the specific language governing permissions and limitations under the License.
android:label="Konfigurasi Peta"
android:theme="@style/VsenAppTheme" />
<activity
android:name="id.ac.stis.capi.activities.GeoPointMapboxActivity"
android:name="id.ac.stis.capi.odk.activities.GeoPointMapboxActivity"
android:label="Get Location"
android:theme="@style/AppTheme.WithCompatActionBar" />
<provider
android:name="id.ac.stis.capi.revalidasi.custom.NotifDataProvider"
android:authorities="id.ac.stis.capi.provider.odk.notifdata"
android:authorities="id.ac.stis.capi.odk.provider.odk.notifdata"
android:exported="false" />
<service android:name="id.ac.stis.capi.revalidasi.notifikasi.MyFirebaseMessagingService">
......
package id.ac.stis.capi.collectiva;
import id.ac.stis.capi.dto.Instance;
import id.ac.stis.capi.odk.dto.Instance;
import java.util.HashMap;
......
......@@ -2,7 +2,7 @@ package id.ac.stis.capi.collectiva;
import android.util.Log;
import id.ac.stis.capi.utilities.FileUtils;
import id.ac.stis.capi.odk.utilities.FileUtils;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
......
......@@ -43,43 +43,43 @@ import android.widget.Toast;
import org.apache.commons.lang3.ArrayUtils;
import id.ac.stis.capi.R;
import id.ac.stis.capi.activities.FormEntryActivity;
import id.ac.stis.capi.activities.GoogleSheetsUploaderActivity;
import id.ac.stis.capi.activities.InstanceUploaderActivity;
import id.ac.stis.capi.application.Collect;
import id.ac.stis.capi.odk.activities.FormEntryActivity;
import id.ac.stis.capi.odk.activities.GoogleSheetsUploaderActivity;
import id.ac.stis.capi.odk.activities.InstanceUploaderActivity;
import id.ac.stis.capi.odk.application.Collect;
import id.ac.stis.capi.collectiva.CapiInstance;
import id.ac.stis.capi.collectiva.preferences.CapiInstancePreferences;
import id.ac.stis.capi.collectiva.ParseXml;
import id.ac.stis.capi.collectiva.preferences.Constants;
import id.ac.stis.capi.collectiva.adapter.CapiInstanceAdapter;
import id.ac.stis.capi.dao.FormsDao;
import id.ac.stis.capi.dao.InstancesDao;
import id.ac.stis.capi.dto.Instance;
import id.ac.stis.capi.listeners.DeleteInstancesListener;
import id.ac.stis.capi.listeners.DiskSyncListener;
import id.ac.stis.capi.preferences.GeneralSharedPreferences;
import id.ac.stis.capi.preferences.PreferenceKeys;
import id.ac.stis.capi.provider.FormsProviderAPI;
import id.ac.stis.capi.provider.InstanceProviderAPI;
import id.ac.stis.capi.provider.InstanceProviderAPI.InstanceColumns;
import id.ac.stis.capi.receivers.NetworkReceiver;
import id.ac.stis.capi.tasks.DeleteInstancesTask;
import id.ac.stis.capi.tasks.InstanceSyncTask;
import id.ac.stis.capi.utilities.ApplicationConstants;
import id.ac.stis.capi.utilities.PlayServicesUtil;