Commit 0ee62465 authored by rahadi's avatar rahadi

Package Refactoring

parent 03291f77
...@@ -225,6 +225,8 @@ dependencies { ...@@ -225,6 +225,8 @@ dependencies {
compile 'com.mapbox.mapboxsdk:mapbox-android-services:2.1.2' compile 'com.mapbox.mapboxsdk:mapbox-android-services:2.1.2'
compile 'com.squareup.picasso:picasso:2.5.2' compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.google.firebase:firebase-messaging:10.0.1' 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 // Must be at bottom to prevent dependency collisions
......
...@@ -10,8 +10,8 @@ import org.junit.After; ...@@ -10,8 +10,8 @@ import org.junit.After;
import org.junit.Before; import org.junit.Before;
import id.ac.stis.capi.TestUtils; import id.ac.stis.capi.TestUtils;
import id.ac.stis.capi.application.Collect; import id.ac.stis.capi.odk.application.Collect;
import id.ac.stis.capi.preferences.PreferenceKeys; import id.ac.stis.capi.odk.preferences.PreferenceKeys;
import okhttp3.mockwebserver.MockResponse; import okhttp3.mockwebserver.MockResponse;
import okhttp3.mockwebserver.MockWebServer; import okhttp3.mockwebserver.MockWebServer;
import okhttp3.mockwebserver.RecordedRequest; import okhttp3.mockwebserver.RecordedRequest;
......
...@@ -12,8 +12,8 @@ import java.util.Collections; ...@@ -12,8 +12,8 @@ import java.util.Collections;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
import id.ac.stis.capi.application.Collect; import id.ac.stis.capi.odk.application.Collect;
import id.ac.stis.capi.provider.InstanceProviderAPI; import id.ac.stis.capi.odk.provider.InstanceProviderAPI;
public final class TestUtils { public final class TestUtils {
private TestUtils() {} private TestUtils() {}
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package id.ac.stis.capi.dao; package id.ac.stis.capi.odk.dao;
import android.database.Cursor; import android.database.Cursor;
import android.support.test.runner.AndroidJUnit4; import android.support.test.runner.AndroidJUnit4;
...@@ -23,10 +23,10 @@ import org.junit.After; ...@@ -23,10 +23,10 @@ import org.junit.After;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import id.ac.stis.capi.application.Collect; import id.ac.stis.capi.odk.application.Collect;
import id.ac.stis.capi.dto.Form; import id.ac.stis.capi.odk.dto.Form;
import id.ac.stis.capi.provider.FormsProviderAPI; import id.ac.stis.capi.odk.provider.FormsProviderAPI;
import id.ac.stis.capi.utilities.ResetUtility; import id.ac.stis.capi.odk.utilities.ResetUtility;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package id.ac.stis.capi.dao; package id.ac.stis.capi.odk.dao;
import android.database.Cursor; import android.database.Cursor;
import android.support.test.runner.AndroidJUnit4; import android.support.test.runner.AndroidJUnit4;
...@@ -23,9 +23,9 @@ import org.junit.After; ...@@ -23,9 +23,9 @@ import org.junit.After;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import id.ac.stis.capi.application.Collect; import id.ac.stis.capi.odk.application.Collect;
import id.ac.stis.capi.dto.Instance; import id.ac.stis.capi.odk.dto.Instance;
import id.ac.stis.capi.provider.InstanceProviderAPI; import id.ac.stis.capi.odk.provider.InstanceProviderAPI;
import java.util.List; import java.util.List;
......
package id.ac.stis.capi.tasks; package id.ac.stis.capi.odk.tasks;
import org.junit.Test; import org.junit.Test;
import id.ac.stis.capi.MockedServerTest; 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; import java.util.Map;
......
package id.ac.stis.capi.tasks; package id.ac.stis.capi.odk.tasks;
import android.net.Uri; import android.net.Uri;
...@@ -9,10 +9,10 @@ import org.junit.Before; ...@@ -9,10 +9,10 @@ import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import id.ac.stis.capi.MockedServerTest; import id.ac.stis.capi.MockedServerTest;
import id.ac.stis.capi.dao.InstancesDao; import id.ac.stis.capi.odk.dao.InstancesDao;
import id.ac.stis.capi.dto.Instance; import id.ac.stis.capi.odk.dto.Instance;
import id.ac.stis.capi.provider.InstanceProviderAPI; import id.ac.stis.capi.odk.provider.InstanceProviderAPI;
import id.ac.stis.capi.tasks.InstanceUploaderTask.Outcome; import id.ac.stis.capi.odk.tasks.InstanceUploaderTask.Outcome;
import okhttp3.mockwebserver.RecordedRequest; import okhttp3.mockwebserver.RecordedRequest;
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package id.ac.stis.capi.utilities; package id.ac.stis.capi.odk.utilities;
import android.database.Cursor; import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteDatabase;
...@@ -23,7 +23,7 @@ import android.support.test.runner.AndroidJUnit4; ...@@ -23,7 +23,7 @@ import android.support.test.runner.AndroidJUnit4;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; 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.assertEquals;
import static junit.framework.Assert.assertFalse; import static junit.framework.Assert.assertFalse;
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package id.ac.stis.capi.utilities; package id.ac.stis.capi.odk.utilities;
import android.content.Context; import android.content.Context;
import android.support.test.filters.Suppress; import android.support.test.filters.Suppress;
...@@ -23,8 +23,8 @@ import android.support.test.runner.AndroidJUnit4; ...@@ -23,8 +23,8 @@ import android.support.test.runner.AndroidJUnit4;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import id.ac.stis.capi.application.Collect; import id.ac.stis.capi.odk.application.Collect;
import id.ac.stis.capi.logic.DatePickerDetails; import id.ac.stis.capi.odk.logic.DatePickerDetails;
import java.util.Date; import java.util.Date;
import java.util.Locale; import java.util.Locale;
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package id.ac.stis.capi.utilities; package id.ac.stis.capi.odk.utilities;
import android.graphics.Bitmap; import android.graphics.Bitmap;
import android.graphics.BitmapFactory; import android.graphics.BitmapFactory;
...@@ -26,9 +26,9 @@ import org.javarosa.form.api.FormEntryPrompt; ...@@ -26,9 +26,9 @@ import org.javarosa.form.api.FormEntryPrompt;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import id.ac.stis.capi.application.Collect; import id.ac.stis.capi.odk.application.Collect;
import id.ac.stis.capi.preferences.GeneralSharedPreferences; import id.ac.stis.capi.odk.preferences.GeneralSharedPreferences;
import id.ac.stis.capi.widgets.ImageWidget; import id.ac.stis.capi.odk.widgets.ImageWidget;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
...@@ -40,7 +40,7 @@ import timber.log.Timber; ...@@ -40,7 +40,7 @@ import timber.log.Timber;
import static junit.framework.Assert.assertEquals; import static junit.framework.Assert.assertEquals;
import static org.mockito.Mockito.mock; import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when; 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) @RunWith(AndroidJUnit4.class)
public class ImageConverterTest { public class ImageConverterTest {
......
package id.ac.stis.capi.utilities; package id.ac.stis.capi.odk.utilities;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import id.ac.stis.capi.MockedServerTest; 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.HttpClient;
import org.opendatakit.httpclientandroidlib.client.methods.HttpGet; import org.opendatakit.httpclientandroidlib.client.methods.HttpGet;
import org.opendatakit.httpclientandroidlib.protocol.HttpContext; import org.opendatakit.httpclientandroidlib.protocol.HttpContext;
......
...@@ -86,25 +86,25 @@ the specific language governing permissions and limitations under the License. ...@@ -86,25 +86,25 @@ the specific language governing permissions and limitations under the License.
android:supportsRtl="true" android:supportsRtl="true"
android:theme="@style/AppTheme.NoActionBar"> android:theme="@style/AppTheme.NoActionBar">
<provider <provider
android:name="id.ac.stis.capi.provider.FormsProvider" android:name="id.ac.stis.capi.odk.provider.FormsProvider"
android:authorities="id.ac.stis.capi.provider.odk.forms" android:authorities="id.ac.stis.capi.odk.provider.odk.forms"
android:exported="true" /> android:exported="true" />
<provider <provider
android:name="id.ac.stis.capi.provider.InstanceProvider" android:name="id.ac.stis.capi.odk.provider.InstanceProvider"
android:authorities="id.ac.stis.capi.provider.odk.instances" android:authorities="id.ac.stis.capi.odk.provider.odk.instances"
android:exported="true" /> android:exported="true" />
<activity <activity
android:name="id.ac.stis.capi.activities.MainMenuActivity" android:name="id.ac.stis.capi.odk.activities.MainMenuActivity"
android:configChanges="locale|orientation|screenSize" android:configChanges="locale|orientation|screenSize"
android:label="@string/app_name" /> android:label="@string/app_name" />
<activity <activity
android:name="id.ac.stis.capi.activities.ScannerWithFlashlightActivity" android:name="id.ac.stis.capi.odk.activities.ScannerWithFlashlightActivity"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:stateNotNeeded="true" android:stateNotNeeded="true"
android:windowSoftInputMode="stateAlwaysHidden" /> android:windowSoftInputMode="stateAlwaysHidden" />
<activity <activity
android:name="id.ac.stis.capi.activities.FormEntryActivity" android:name="id.ac.stis.capi.odk.activities.FormEntryActivity"
android:configChanges="orientation|screenSize|keyboardHidden" android:configChanges="orientation|screenSize|keyboardHidden"
android:label="@string/app_name" android:label="@string/app_name"
android:windowSoftInputMode="adjustResize"> android:windowSoftInputMode="adjustResize">
...@@ -119,25 +119,25 @@ the specific language governing permissions and limitations under the License. ...@@ -119,25 +119,25 @@ the specific language governing permissions and limitations under the License.
</intent-filter> </intent-filter>
</activity> </activity>
<activity <activity
android:name="id.ac.stis.capi.activities.NotificationActivity" android:name="id.ac.stis.capi.odk.activities.NotificationActivity"
android:excludeFromRecents="true" android:excludeFromRecents="true"
android:label="@string/app_name" android:label="@string/app_name"
android:launchMode="singleTask" android:launchMode="singleTask"
android:taskAffinity="" /> android:taskAffinity="" />
<activity <activity
android:name="id.ac.stis.capi.activities.DrawActivity" android:name="id.ac.stis.capi.odk.activities.DrawActivity"
android:label="@string/app_name" android:label="@string/app_name"
android:screenOrientation="landscape" /> android:screenOrientation="landscape" />
<activity <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" /> android:label="@string/all_open_source_licenses" />
<activity <activity
android:name="id.ac.stis.capi.activities.GoogleDriveActivity" android:name="id.ac.stis.capi.odk.activities.GoogleDriveActivity"
android:configChanges="orientation|screenSize" android:configChanges="orientation|screenSize"
android:label="@string/app_name" android:label="@string/app_name"
android:windowSoftInputMode="stateHidden" /> android:windowSoftInputMode="stateHidden" />
<activity <activity
android:name="id.ac.stis.capi.activities.InstanceChooserList" android:name="id.ac.stis.capi.odk.activities.InstanceChooserList"
android:label="@string/app_name" android:label="@string/app_name"
android:theme="@style/AppTheme.WithActionBar"> android:theme="@style/AppTheme.WithActionBar">
<intent-filter android:scheme="http"> <intent-filter android:scheme="http">
...@@ -150,7 +150,7 @@ the specific language governing permissions and limitations under the License. ...@@ -150,7 +150,7 @@ the specific language governing permissions and limitations under the License.
</intent-filter> </intent-filter>
</activity> </activity>
<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:label="@string/app_name"
android:theme="@style/AppTheme.WithActionBar"> android:theme="@style/AppTheme.WithActionBar">
<intent-filter android:scheme="http"> <intent-filter android:scheme="http">
...@@ -164,19 +164,19 @@ the specific language governing permissions and limitations under the License. ...@@ -164,19 +164,19 @@ the specific language governing permissions and limitations under the License.
</intent-filter> </intent-filter>
</activity> </activity>
<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:label="@string/app_name"
android:theme="@style/AppTheme.WithActionBar" /> android:theme="@style/AppTheme.WithActionBar" />
<activity <activity
android:name="id.ac.stis.capi.activities.FileManagerTabs" android:name="id.ac.stis.capi.odk.activities.FileManagerTabs"
android:configChanges="orientation|screenSize" android:configChanges="orientation|screenSize"
android:label="@string/app_name" /> android:label="@string/app_name" />
<activity <activity
android:name="id.ac.stis.capi.activities.GoogleSheetsUploaderActivity" android:name="id.ac.stis.capi.odk.activities.GoogleSheetsUploaderActivity"
android:configChanges="orientation|screenSize" android:configChanges="orientation|screenSize"
android:label="@string/app_name" /> android:label="@string/app_name" />
<activity <activity
android:name="id.ac.stis.capi.activities.InstanceUploaderList" android:name="id.ac.stis.capi.odk.activities.InstanceUploaderList"
android:configChanges="orientation|screenSize" android:configChanges="orientation|screenSize"
android:label="@string/app_name" android:label="@string/app_name"
android:theme="@style/AppTheme.WithActionBar"> android:theme="@style/AppTheme.WithActionBar">
...@@ -188,52 +188,52 @@ the specific language governing permissions and limitations under the License. ...@@ -188,52 +188,52 @@ the specific language governing permissions and limitations under the License.
</intent-filter> </intent-filter>
</activity> </activity>
<activity <activity
android:name="id.ac.stis.capi.activities.InstanceUploaderActivity" android:name="id.ac.stis.capi.odk.activities.InstanceUploaderActivity"
android:label="@string/app_name" /> android:label="@string/app_name" />
<activity <activity
android:name="id.ac.stis.capi.preferences.AboutPreferencesActivity" android:name="id.ac.stis.capi.odk.preferences.AboutPreferencesActivity"
android:label="@string/app_name" /> android:label="@string/app_name" />
<activity <activity
android:name="id.ac.stis.capi.preferences.PreferencesActivity" android:name="id.ac.stis.capi.odk.preferences.PreferencesActivity"
android:label="@string/app_name" /> android:label="@string/app_name" />
<activity <activity
android:name="id.ac.stis.capi.preferences.AdminPreferencesActivity" android:name="id.ac.stis.capi.odk.preferences.AdminPreferencesActivity"
android:label="@string/app_name" /> android:label="@string/app_name" />
<activity <activity
android:name="id.ac.stis.capi.activities.FormHierarchyActivity" android:name="id.ac.stis.capi.odk.activities.FormHierarchyActivity"
android:label="@string/app_name" /> android:label="@string/app_name" />
<activity