diff --git a/.gradle/2.8/taskArtifacts/cache.properties.lock b/.gradle/2.8/taskArtifacts/cache.properties.lock index 64f0f45..4820725 100644 Binary files a/.gradle/2.8/taskArtifacts/cache.properties.lock and b/.gradle/2.8/taskArtifacts/cache.properties.lock differ diff --git a/.gradle/2.8/taskArtifacts/fileHashes.bin b/.gradle/2.8/taskArtifacts/fileHashes.bin index aea2a43..ac4ee3b 100644 Binary files a/.gradle/2.8/taskArtifacts/fileHashes.bin and b/.gradle/2.8/taskArtifacts/fileHashes.bin differ diff --git a/.gradle/2.8/taskArtifacts/fileSnapshots.bin b/.gradle/2.8/taskArtifacts/fileSnapshots.bin index ef546d5..dd2c8e1 100644 Binary files a/.gradle/2.8/taskArtifacts/fileSnapshots.bin and b/.gradle/2.8/taskArtifacts/fileSnapshots.bin differ diff --git a/.gradle/2.8/taskArtifacts/outputFileStates.bin b/.gradle/2.8/taskArtifacts/outputFileStates.bin index 1594788..929a554 100644 Binary files a/.gradle/2.8/taskArtifacts/outputFileStates.bin and b/.gradle/2.8/taskArtifacts/outputFileStates.bin differ diff --git a/.gradle/2.8/taskArtifacts/taskArtifacts.bin b/.gradle/2.8/taskArtifacts/taskArtifacts.bin index 46cc779..f005339 100644 Binary files a/.gradle/2.8/taskArtifacts/taskArtifacts.bin and b/.gradle/2.8/taskArtifacts/taskArtifacts.bin differ diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 2787735..7c48907 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -38,15 +38,15 @@ - - - + + + + + - - @@ -75,48 +75,25 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - + + - - - + + - + - - + + @@ -1346,7 +1323,7 @@ - @@ -1803,10 +1780,7 @@ - - - @@ -1869,8 +1843,33 @@ + + + + + + + + + + + + + + + @@ -1985,6 +1984,15 @@ + + + + + + + + + @@ -2107,7 +2115,7 @@ - + @@ -2117,27 +2125,27 @@ - - + - + - + - - + + - + + @@ -2165,6 +2173,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2193,13 +2229,6 @@ - - - - - - - @@ -2274,11 +2303,6 @@ - - - - - @@ -2293,20 +2317,6 @@ - - - - - - - - - - - - - - @@ -2328,32 +2338,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -2429,13 +2413,6 @@ - - - - - - - @@ -2443,14 +2420,6 @@ - - - - - - - - @@ -2479,49 +2448,92 @@ - + - - + + + + + + + + + + + + + + + + - + - - + + + - + - - + + - + - - + + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - + + @@ -2529,23 +2541,32 @@ - + - - - - - + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/app.iml b/app/app.iml index eafaee4..327de27 100644 --- a/app/app.iml +++ b/app/app.iml @@ -75,14 +75,10 @@ - - - - diff --git a/app/build.gradle b/app/build.gradle index e6c6a8a..ced7184 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -5,10 +5,10 @@ android { buildToolsVersion "23.0.2" defaultConfig { applicationId 'org.androidpn.client' - minSdkVersion 19 + minSdkVersion 17 targetSdkVersion 23 - versionCode 20160303 - versionName "0.5.6" + versionCode 20160308 + versionName "0.5.7" } buildTypes { release { @@ -32,10 +32,10 @@ dependencies { testCompile 'junit:junit:4.12' compile 'com.android.support:appcompat-v7:23.2.0' compile 'com.android.support:design:23.2.0' - //compile files('src/main/lib/asmack.jar') - compile "jivesoftware:smack:3.2.1" + compile "org.igniterealtime.smack:smack:3.2.1" + //TODO - //compile "org.igniterealtime.smack:smack-java7:4.1.0" + //compile "org.igniterealtime.smack:smack-android:4.1.0" // Optional for XMPPTCPConnection //compile "org.igniterealtime.smack:smack-tcp:4.1.0" // Optional for XMPP-IM (RFC 6121) support (Roster, Threaded Chats, …) @@ -43,14 +43,13 @@ dependencies { // Optional for XMPP extensions support //compile "org.igniterealtime.smack:smack-extensions:4.1.0" //compile "org.igniterealtime.smack:smack-android-extensions:4.1.0" - //compile "org.igniterealtime.smack:smack-tcp:4.1.0" //compile "org.igniterealtime.smack:smack-experimental:4.1.0" } android { lintOptions { - disable 'InnerclassSeparator','GoogleAppIndexingWarning','InvalidPackage' + disable 'InnerclassSeparator','GoogleAppIndexingWarning','InvalidPackage','IconDensities' checkReleaseBuilds false } } diff --git a/app/build/intermediates/manifests/full/debug/AndroidManifest.xml b/app/build/intermediates/manifests/full/debug/AndroidManifest.xml index 160df5f..40cbfb2 100644 --- a/app/build/intermediates/manifests/full/debug/AndroidManifest.xml +++ b/app/build/intermediates/manifests/full/debug/AndroidManifest.xml @@ -1,11 +1,11 @@ + android:versionCode="20160308" + android:versionName="0.5.7" > diff --git a/app/build/outputs/logs/manifest-merger-debug-report.txt b/app/build/outputs/logs/manifest-merger-debug-report.txt index 208e20a..723c422 100644 --- a/app/build/outputs/logs/manifest-merger-debug-report.txt +++ b/app/build/outputs/logs/manifest-merger-debug-report.txt @@ -42,7 +42,7 @@ ADDED from /home/daktak/StudioProjects/androidpn-client/app/src/main/AndroidMani android:name ADDED from /home/daktak/StudioProjects/androidpn-client/app/src/main/AndroidManifest.xml:11:26-82 application -ADDED from /home/daktak/StudioProjects/androidpn-client/app/src/main/AndroidManifest.xml:13:5-45:23 +ADDED from /home/daktak/StudioProjects/androidpn-client/app/src/main/AndroidManifest.xml:13:5-45:19 MERGED from [com.android.support:appcompat-v7:23.2.0] /home/daktak/StudioProjects/androidpn-client/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.2.0/AndroidManifest.xml:25:5-20 MERGED from [com.android.support:support-v4:23.2.0] /home/daktak/StudioProjects/androidpn-client/app/build/intermediates/exploded-aar/com.android.support/support-v4/23.2.0/AndroidManifest.xml:22:5-20 MERGED from [com.android.support:animated-vector-drawable:23.2.0] /home/daktak/StudioProjects/androidpn-client/app/build/intermediates/exploded-aar/com.android.support/animated-vector-drawable/23.2.0/AndroidManifest.xml:7:5-20 diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 4804295..c08d3e8 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -42,6 +42,6 @@ - + diff --git a/app/src/main/java/org/androidpn/client/MainActivity.java b/app/src/main/java/org/androidpn/client/MainActivity.java index 5848273..2e426dd 100644 --- a/app/src/main/java/org/androidpn/client/MainActivity.java +++ b/app/src/main/java/org/androidpn/client/MainActivity.java @@ -20,6 +20,7 @@ import android.widget.ListView; import android.widget.SimpleCursorAdapter; + import java.util.List; public class MainActivity extends AppCompatActivity @@ -35,7 +36,7 @@ public class MainActivity extends AppCompatActivity private static final String LOGTAG = LogUtil .makeLogTag(MainActivity.class); - String[] perms = { Manifest.permission.READ_PHONE_STATE }; + String[] perms = {Manifest.permission.READ_PHONE_STATE}; @Override protected void onCreate(Bundle savedInstanceState) { @@ -56,7 +57,7 @@ protected void onCreate(Bundle savedInstanceState) { } } - public void set(){ + public void set() { resetList(); SharedPreferences mySharedPreferences = PreferenceManager.getDefaultSharedPreferences(this); @@ -72,7 +73,7 @@ public void set(){ } } - public void resetList(){ + public void resetList() { datasource = new PNNotificationDataSource(this); datasource.open(); ListView notifyList = (ListView) findViewById(R.id.listView); @@ -84,31 +85,31 @@ public void resetList(){ if (datasource.getAllNotifications().isEmpty()) { Log.d(LOGTAG, "No Notifications"); } else { - if (prefDtTm){ + if (prefDtTm) { prefDtTmFrmt = mySharedPreferences.getString("prefDttmFormat", "%d/%m/%Y %H:%M"); } // The desired columns to be bound Cursor cursor = datasource.fetchAllNotifications(prefDtTmFrmt); - String[] columns = new String[] { + String[] columns = new String[]{ MySQLiteHelper.COLUMN_TITLE, MySQLiteHelper.COLUMN_MESSAGE }; // the XML defined views which the data will be bound to - int[] to = new int[] { + int[] to = new int[]{ R.id.tvTitle, R.id.tvMessage }; - if (prefDtTm){ - columns = new String[] { + if (prefDtTm) { + columns = new String[]{ MySQLiteHelper.COLUMN_TITLE, MySQLiteHelper.COLUMN_MESSAGE, MySQLiteHelper.COLUMN_DTTM }; // the XML defined views which the data will be bound to - to = new int[] { + to = new int[]{ R.id.tvTitle, R.id.tvMessage, R.id.tvDate @@ -197,11 +198,11 @@ protected void onActivityResult(int requestCode, int resultCode, Intent data) { */ boolean reset = fixTheme.fixTheme(this); if (reset) { - Log.d(LOGTAG,"Theme change"); + Log.d(LOGTAG, "Theme change"); finish(); startActivity(getIntent()); } - // loadPref(); + // loadPref(); if (EasyPermissions.hasPermissions(this, perms)) { if (serviceManager != null) { @@ -219,19 +220,19 @@ protected void onActivityResult(int requestCode, int resultCode, Intent data) { } } - @Override - protected void onResume() { - boolean reset = fixTheme.fixTheme(this); - super.onResume(); - instance = this; - if (EasyPermissions.hasPermissions(this, perms)) { - resetList(); - } else { - // Ask for both permissions - EasyPermissions.requestPermissions(this, getString(R.string.rationale_phone_state), - RC_PHONE_STATE, perms); + @Override + protected void onResume() { + super.onResume(); + boolean reset = fixTheme.fixTheme(this); + instance = this; + if (EasyPermissions.hasPermissions(this, perms)) { + resetList(); + } else { + // Ask for both permissions + EasyPermissions.requestPermissions(this, getString(R.string.rationale_phone_state), + RC_PHONE_STATE, perms); + } } - } @Override protected void onPause() { @@ -239,7 +240,6 @@ protected void onPause() { instance = null; } - @Override public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) { super.onRequestPermissionsResult(requestCode, permissions, grantResults); diff --git a/app/src/main/java/org/androidpn/client/SerivceManager/XmppManager.java b/app/src/main/java/org/androidpn/client/SerivceManager/XmppManager.java index ab34802..7916cfc 100644 --- a/app/src/main/java/org/androidpn/client/SerivceManager/XmppManager.java +++ b/app/src/main/java/org/androidpn/client/SerivceManager/XmppManager.java @@ -293,7 +293,7 @@ private ConnectTask() { public void run() { Log.i(LOGTAG, "ConnectTask.run()..."); - + boolean connected = false; if (!xmppManager.isConnected()) { // Create the configuration for this new connection ConnectionConfiguration connConfig = new ConnectionConfiguration( @@ -315,12 +315,15 @@ public void run() { ProviderManager.getInstance().addIQProvider("notification", "androidpn:iq:notification", new NotificationIQProvider()); + connected = true; } catch (XMPPException e) { Log.e(LOGTAG, "XMPP connection failed", e); } - xmppManager.runTask(); + if (connected) { + xmppManager.runTask(); + } } else { Log.i(LOGTAG, "XMPP connected already"); diff --git a/app/src/main/java/org/androidpn/client/helper/SwipeDismissListViewTouchListener.java b/app/src/main/java/org/androidpn/client/helper/SwipeDismissListViewTouchListener.java index 60b036c..fec01f0 100644 --- a/app/src/main/java/org/androidpn/client/helper/SwipeDismissListViewTouchListener.java +++ b/app/src/main/java/org/androidpn/client/helper/SwipeDismissListViewTouchListener.java @@ -316,6 +316,7 @@ public void onAnimationEnd(Animator animation) { mDownView.setTranslationX(deltaX - mSwipingSlop); mDownView.setAlpha(Math.max(0f, Math.min(1f, 1f - 2f * Math.abs(deltaX) / mViewWidth))); + view.performClick(); return true; } break; diff --git a/app/src/main/java/org/androidpn/client/helper/SwipeDismissTouchListener.java b/app/src/main/java/org/androidpn/client/helper/SwipeDismissTouchListener.java index 788289b..722e7da 100644 --- a/app/src/main/java/org/androidpn/client/helper/SwipeDismissTouchListener.java +++ b/app/src/main/java/org/androidpn/client/helper/SwipeDismissTouchListener.java @@ -237,6 +237,7 @@ public void onAnimationEnd(Animator animation) { // TODO: use an ease-out interpolator or such mView.setAlpha(Math.max(0f, Math.min(1f, 1f - 2f * Math.abs(deltaX) / mViewWidth))); + view.performClick(); return true; } break; diff --git a/app/src/main/res/drawable/notification.png b/app/src/main/res/drawable-mdpi/notification.png similarity index 100% rename from app/src/main/res/drawable/notification.png rename to app/src/main/res/drawable-mdpi/notification.png diff --git a/app/src/main/res/layout/row.xml b/app/src/main/res/layout/row.xml index 8f46a92..45c322b 100644 --- a/app/src/main/res/layout/row.xml +++ b/app/src/main/res/layout/row.xml @@ -16,7 +16,7 @@ android:textIsSelectable="false" /> - diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.png b/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index cde69bc..0000000 Binary files a/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.png b/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index c133a0c..0000000 Binary files a/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index bfa42f0..0000000 Binary files a/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index 324e72c..0000000 Binary files a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index aee44e1..0000000 Binary files a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 887f0ea..edc23ac 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -3,7 +3,6 @@ #3F51B5 #303F9F #FF042570 - #FF4081 #000000 #ff8ab000 diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml index 812cb7b..47c8224 100644 --- a/app/src/main/res/values/dimens.xml +++ b/app/src/main/res/values/dimens.xml @@ -2,5 +2,4 @@ 16dp 16dp - 16dp diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index fb4e546..6755dc8 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -18,7 +18,6 @@ Port Toast Popup Notification - Settings Run the service on boot Auto Start Show Date and Time diff --git a/app/src/main/res/xml/settings.xml b/app/src/main/res/xml/settings.xml index e1ddbf6..a38b10f 100644 --- a/app/src/main/res/xml/settings.xml +++ b/app/src/main/res/xml/settings.xml @@ -1,33 +1,6 @@ - - - - - - - - - - + + + + + + + - + sha1="6e239441500605809818997dd63b62a947195f8c"> + - + sha1="292a9fa091757208efa65e77eef63088247e51f3"> + - + sha1="e5f32fa48a3eb2de0c987025c11b6e3864b634d9"> + - + sha1="31d71e906ab5e36347bf05b9f828312648e66a9f"> + - + sha1="8c108c22c99e794eff255bb34d2a461200c4cbb0"> + - + sha1="d4c936aa8c7d2522c82e3f1829c791d9e367f009"> + - + sha1="6e3578f92f7462d1a935a1d36173e3bdd1234976"> +