Merged 'master' into 'delete-old-messages'
@@ -1,4 +1,5 @@
|
|||||||
language: android
|
language: android
|
||||||
|
sudo: false
|
||||||
|
|
||||||
android:
|
android:
|
||||||
components:
|
components:
|
||||||
|
|||||||
@@ -1,9 +1,6 @@
|
|||||||
package com.moez.QKSMS.common.utils;
|
package com.moez.QKSMS.common.utils;
|
||||||
|
|
||||||
import android.content.SharedPreferences;
|
|
||||||
import android.preference.PreferenceManager;
|
|
||||||
import android.test.AndroidTestCase;
|
import android.test.AndroidTestCase;
|
||||||
import com.moez.QKSMS.ui.settings.SettingsFragment;
|
|
||||||
|
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
|
|
||||||
@@ -12,13 +9,6 @@ public class DateFormatterTest extends AndroidTestCase {
|
|||||||
super.setUp();
|
super.setUp();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void test24Hours() {
|
|
||||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
|
|
||||||
prefs.edit().putBoolean(SettingsFragment.TIMESTAMPS_24H, true).apply();
|
|
||||||
assertTrue(DateFormatter.accountFor24HourTime(getContext(), new SimpleDateFormat("h:mm a")).equals(new SimpleDateFormat("H:mm")));
|
|
||||||
prefs.edit().putBoolean(SettingsFragment.TIMESTAMPS_24H, false).apply();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testDateSymbolsAPI(){
|
public void testDateSymbolsAPI(){
|
||||||
assertEquals(new SimpleDateFormat("H:mm a").toPattern(), "H:mm a");
|
assertEquals(new SimpleDateFormat("H:mm a").toPattern(), "H:mm a");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
<application
|
<application
|
||||||
android:name=".QKSMSApp"
|
android:name=".QKSMSApp"
|
||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
android:icon="@mipmap/ic_launcher_teal"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:largeHeap="true"
|
android:largeHeap="true"
|
||||||
android:theme="@style/AppThemeDark">
|
android:theme="@style/AppThemeDark">
|
||||||
@@ -66,9 +66,11 @@
|
|||||||
</activity>
|
</activity>
|
||||||
<activity
|
<activity
|
||||||
android:name=".ui.MainActivity"
|
android:name=".ui.MainActivity"
|
||||||
android:icon="@mipmap/ic_launcher_teal"
|
android:enabled="true"
|
||||||
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:logo="@color/transparent"
|
android:logo="@color/transparent"
|
||||||
|
android:screenOrientation="user"
|
||||||
android:windowSoftInputMode="adjustResize">
|
android:windowSoftInputMode="adjustResize">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.VIEW" />
|
<action android:name="android.intent.action.VIEW" />
|
||||||
@@ -92,22 +94,50 @@
|
|||||||
<activity
|
<activity
|
||||||
android:name=".ui.messagelist.MessageListActivity"
|
android:name=".ui.messagelist.MessageListActivity"
|
||||||
android:launchMode="singleTop"
|
android:launchMode="singleTop"
|
||||||
|
android:screenOrientation="user"
|
||||||
android:windowSoftInputMode="adjustResize" />
|
android:windowSoftInputMode="adjustResize" />
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".ui.settings.SettingsActivity"
|
android:name=".ui.settings.SettingsActivity"
|
||||||
|
android:screenOrientation="user"
|
||||||
android:windowSoftInputMode="adjustResize" />
|
android:windowSoftInputMode="adjustResize" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".ui.search.SearchActivity"
|
android:name=".ui.search.SearchActivity"
|
||||||
|
android:screenOrientation="user"
|
||||||
android:windowSoftInputMode="adjustResize" />
|
android:windowSoftInputMode="adjustResize" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".ui.compose.ComposeActivity"
|
android:name=".ui.compose.ComposeActivity"
|
||||||
|
android:screenOrientation="user"
|
||||||
android:windowSoftInputMode="adjustResize" />
|
android:windowSoftInputMode="adjustResize" />
|
||||||
|
|
||||||
<activity-alias
|
<activity-alias
|
||||||
android:name=".ui.MainActivity-Teal"
|
android:name=".ui.MainActivity-Default"
|
||||||
android:enabled="true"
|
android:enabled="true"
|
||||||
android:icon="@mipmap/ic_launcher_teal"
|
android:icon="@mipmap/ic_launcher"
|
||||||
|
android:label="@string/app_name"
|
||||||
|
android:targetActivity=".ui.MainActivity">
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
|
||||||
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
|
</intent-filter>
|
||||||
|
</activity-alias>
|
||||||
|
<activity-alias
|
||||||
|
android:name=".ui.MainActivity-Dark"
|
||||||
|
android:enabled="false"
|
||||||
|
android:icon="@mipmap/ic_launcher_dark"
|
||||||
|
android:label="@string/app_name"
|
||||||
|
android:targetActivity=".ui.MainActivity">
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
|
||||||
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
|
</intent-filter>
|
||||||
|
</activity-alias>
|
||||||
|
<activity-alias
|
||||||
|
android:name=".ui.MainActivity-Teal"
|
||||||
|
android:enabled="false"
|
||||||
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:targetActivity=".ui.MainActivity">
|
android:targetActivity=".ui.MainActivity">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
@@ -119,7 +149,7 @@
|
|||||||
<activity-alias
|
<activity-alias
|
||||||
android:name=".ui.MainActivity-Red"
|
android:name=".ui.MainActivity-Red"
|
||||||
android:enabled="false"
|
android:enabled="false"
|
||||||
android:icon="@mipmap/ic_launcher_red"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:targetActivity=".ui.MainActivity">
|
android:targetActivity=".ui.MainActivity">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
@@ -131,7 +161,7 @@
|
|||||||
<activity-alias
|
<activity-alias
|
||||||
android:name=".ui.MainActivity-Pink"
|
android:name=".ui.MainActivity-Pink"
|
||||||
android:enabled="false"
|
android:enabled="false"
|
||||||
android:icon="@mipmap/ic_launcher_pink"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:targetActivity=".ui.MainActivity">
|
android:targetActivity=".ui.MainActivity">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
@@ -143,7 +173,7 @@
|
|||||||
<activity-alias
|
<activity-alias
|
||||||
android:name=".ui.MainActivity-Purple"
|
android:name=".ui.MainActivity-Purple"
|
||||||
android:enabled="false"
|
android:enabled="false"
|
||||||
android:icon="@mipmap/ic_launcher_purple"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:targetActivity=".ui.MainActivity">
|
android:targetActivity=".ui.MainActivity">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
@@ -155,7 +185,7 @@
|
|||||||
<activity-alias
|
<activity-alias
|
||||||
android:name=".ui.MainActivity-DeepPurple"
|
android:name=".ui.MainActivity-DeepPurple"
|
||||||
android:enabled="false"
|
android:enabled="false"
|
||||||
android:icon="@mipmap/ic_launcher_deep_purple"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:targetActivity=".ui.MainActivity">
|
android:targetActivity=".ui.MainActivity">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
@@ -167,7 +197,7 @@
|
|||||||
<activity-alias
|
<activity-alias
|
||||||
android:name=".ui.MainActivity-Indigo"
|
android:name=".ui.MainActivity-Indigo"
|
||||||
android:enabled="false"
|
android:enabled="false"
|
||||||
android:icon="@mipmap/ic_launcher_indigo"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:targetActivity=".ui.MainActivity">
|
android:targetActivity=".ui.MainActivity">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
@@ -179,7 +209,7 @@
|
|||||||
<activity-alias
|
<activity-alias
|
||||||
android:name=".ui.MainActivity-Blue"
|
android:name=".ui.MainActivity-Blue"
|
||||||
android:enabled="false"
|
android:enabled="false"
|
||||||
android:icon="@mipmap/ic_launcher_blue"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:targetActivity=".ui.MainActivity">
|
android:targetActivity=".ui.MainActivity">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
@@ -191,7 +221,7 @@
|
|||||||
<activity-alias
|
<activity-alias
|
||||||
android:name=".ui.MainActivity-LightBlue"
|
android:name=".ui.MainActivity-LightBlue"
|
||||||
android:enabled="false"
|
android:enabled="false"
|
||||||
android:icon="@mipmap/ic_launcher_light_blue"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:targetActivity=".ui.MainActivity">
|
android:targetActivity=".ui.MainActivity">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
@@ -203,7 +233,7 @@
|
|||||||
<activity-alias
|
<activity-alias
|
||||||
android:name=".ui.MainActivity-Cyan"
|
android:name=".ui.MainActivity-Cyan"
|
||||||
android:enabled="false"
|
android:enabled="false"
|
||||||
android:icon="@mipmap/ic_launcher_cyan"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:targetActivity=".ui.MainActivity">
|
android:targetActivity=".ui.MainActivity">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
@@ -215,7 +245,7 @@
|
|||||||
<activity-alias
|
<activity-alias
|
||||||
android:name=".ui.MainActivity-Green"
|
android:name=".ui.MainActivity-Green"
|
||||||
android:enabled="false"
|
android:enabled="false"
|
||||||
android:icon="@mipmap/ic_launcher_green"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:targetActivity=".ui.MainActivity">
|
android:targetActivity=".ui.MainActivity">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
@@ -227,7 +257,7 @@
|
|||||||
<activity-alias
|
<activity-alias
|
||||||
android:name=".ui.MainActivity-LightGreen"
|
android:name=".ui.MainActivity-LightGreen"
|
||||||
android:enabled="false"
|
android:enabled="false"
|
||||||
android:icon="@mipmap/ic_launcher_light_green"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:targetActivity=".ui.MainActivity">
|
android:targetActivity=".ui.MainActivity">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
@@ -239,7 +269,7 @@
|
|||||||
<activity-alias
|
<activity-alias
|
||||||
android:name=".ui.MainActivity-Lime"
|
android:name=".ui.MainActivity-Lime"
|
||||||
android:enabled="false"
|
android:enabled="false"
|
||||||
android:icon="@mipmap/ic_launcher_lime"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:targetActivity=".ui.MainActivity">
|
android:targetActivity=".ui.MainActivity">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
@@ -251,7 +281,7 @@
|
|||||||
<activity-alias
|
<activity-alias
|
||||||
android:name=".ui.MainActivity-Yellow"
|
android:name=".ui.MainActivity-Yellow"
|
||||||
android:enabled="false"
|
android:enabled="false"
|
||||||
android:icon="@mipmap/ic_launcher_yellow"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:targetActivity=".ui.MainActivity">
|
android:targetActivity=".ui.MainActivity">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
@@ -263,7 +293,7 @@
|
|||||||
<activity-alias
|
<activity-alias
|
||||||
android:name=".ui.MainActivity-Amber"
|
android:name=".ui.MainActivity-Amber"
|
||||||
android:enabled="false"
|
android:enabled="false"
|
||||||
android:icon="@mipmap/ic_launcher_amber"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:targetActivity=".ui.MainActivity">
|
android:targetActivity=".ui.MainActivity">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
@@ -275,7 +305,7 @@
|
|||||||
<activity-alias
|
<activity-alias
|
||||||
android:name=".ui.MainActivity-Orange"
|
android:name=".ui.MainActivity-Orange"
|
||||||
android:enabled="false"
|
android:enabled="false"
|
||||||
android:icon="@mipmap/ic_launcher_orange"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:targetActivity=".ui.MainActivity">
|
android:targetActivity=".ui.MainActivity">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
@@ -287,7 +317,7 @@
|
|||||||
<activity-alias
|
<activity-alias
|
||||||
android:name=".ui.MainActivity-DeepOrange"
|
android:name=".ui.MainActivity-DeepOrange"
|
||||||
android:enabled="false"
|
android:enabled="false"
|
||||||
android:icon="@mipmap/ic_launcher_deep_orange"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:targetActivity=".ui.MainActivity">
|
android:targetActivity=".ui.MainActivity">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
@@ -299,7 +329,7 @@
|
|||||||
<activity-alias
|
<activity-alias
|
||||||
android:name=".ui.MainActivity-Brown"
|
android:name=".ui.MainActivity-Brown"
|
||||||
android:enabled="false"
|
android:enabled="false"
|
||||||
android:icon="@mipmap/ic_launcher_brown"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:targetActivity=".ui.MainActivity">
|
android:targetActivity=".ui.MainActivity">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
@@ -311,7 +341,7 @@
|
|||||||
<activity-alias
|
<activity-alias
|
||||||
android:name=".ui.MainActivity-Grey"
|
android:name=".ui.MainActivity-Grey"
|
||||||
android:enabled="false"
|
android:enabled="false"
|
||||||
android:icon="@mipmap/ic_launcher_grey"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:targetActivity=".ui.MainActivity">
|
android:targetActivity=".ui.MainActivity">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
@@ -323,7 +353,7 @@
|
|||||||
<activity-alias
|
<activity-alias
|
||||||
android:name=".ui.MainActivity-BlueGrey"
|
android:name=".ui.MainActivity-BlueGrey"
|
||||||
android:enabled="false"
|
android:enabled="false"
|
||||||
android:icon="@mipmap/ic_launcher_blue_grey"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:targetActivity=".ui.MainActivity">
|
android:targetActivity=".ui.MainActivity">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
@@ -335,17 +365,21 @@
|
|||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".ui.welcome.WelcomeActivity"
|
android:name=".ui.welcome.WelcomeActivity"
|
||||||
|
android:screenOrientation="portrait"
|
||||||
android:theme="@style/AppThemeLight" />
|
android:theme="@style/AppThemeLight" />
|
||||||
|
|
||||||
<!-- Popup activity -->
|
<!-- Popup activity -->
|
||||||
<activity
|
<activity
|
||||||
android:name=".ui.popup.QKReplyActivity"
|
android:name=".ui.popup.QKReplyActivity"
|
||||||
android:excludeFromRecents="true"
|
android:excludeFromRecents="true"
|
||||||
|
android:screenOrientation="user"
|
||||||
android:taskAffinity=""
|
android:taskAffinity=""
|
||||||
android:theme="@style/AppThemeLightDialog"
|
android:theme="@style/AppThemeLightDialog"
|
||||||
android:windowSoftInputMode="adjustResize" />
|
android:windowSoftInputMode="adjustResize" />
|
||||||
|
|
||||||
<activity android:name=".ui.mms.SlideshowActivity" />
|
<activity
|
||||||
|
android:name=".ui.mms.SlideshowActivity"
|
||||||
|
android:screenOrientation="user" />
|
||||||
|
|
||||||
<receiver
|
<receiver
|
||||||
android:name=".receiver.RemoteMessagingReceiver"
|
android:name=".receiver.RemoteMessagingReceiver"
|
||||||
|
|||||||
@@ -33,9 +33,9 @@ import java.util.Collections;
|
|||||||
* @hide
|
* @hide
|
||||||
*/
|
*/
|
||||||
public class DhcpInfoInternal {
|
public class DhcpInfoInternal {
|
||||||
private final static String TAG = "DhcpInfoInternal";
|
private static final String TAG = "DhcpInfoInternal";
|
||||||
|
|
||||||
private final static boolean LOCAL_LOGV = false;
|
private static final boolean LOCAL_LOGV = false;
|
||||||
public String ipAddress;
|
public String ipAddress;
|
||||||
public int prefixLength;
|
public int prefixLength;
|
||||||
|
|
||||||
@@ -140,7 +140,7 @@ public class DhcpInfoInternal {
|
|||||||
dns2 = orig.dns2;
|
dns2 = orig.dns2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mRoutes.size() == 0) {
|
if (mRoutes.isEmpty()) {
|
||||||
for (RouteInfo route : orig.getRoutes()) {
|
for (RouteInfo route : orig.getRoutes()) {
|
||||||
addRoute(route);
|
addRoute(route);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ public interface IConnectivityManager extends android.os.IInterface {
|
|||||||
/**
|
/**
|
||||||
* Local-side IPC implementation stub class.
|
* Local-side IPC implementation stub class.
|
||||||
*/
|
*/
|
||||||
public static abstract class Stub extends android.os.Binder implements android.net.IConnectivityManager {
|
public abstract static class Stub extends android.os.Binder implements android.net.IConnectivityManager {
|
||||||
private static final String DESCRIPTOR = "android.net.IConnectivityManager";
|
private static final String DESCRIPTOR = "android.net.IConnectivityManager";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ public interface INetworkPolicyListener extends android.os.IInterface {
|
|||||||
/**
|
/**
|
||||||
* Local-side IPC implementation stub class.
|
* Local-side IPC implementation stub class.
|
||||||
*/
|
*/
|
||||||
public static abstract class Stub extends android.os.Binder implements android.net.INetworkPolicyListener {
|
public abstract static class Stub extends android.os.Binder implements android.net.INetworkPolicyListener {
|
||||||
private static final String DESCRIPTOR = "android.net.INetworkPolicyListener";
|
private static final String DESCRIPTOR = "android.net.INetworkPolicyListener";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ public interface INetworkPolicyManager extends android.os.IInterface {
|
|||||||
/**
|
/**
|
||||||
* Local-side IPC implementation stub class.
|
* Local-side IPC implementation stub class.
|
||||||
*/
|
*/
|
||||||
public static abstract class Stub extends android.os.Binder implements android.net.INetworkPolicyManager {
|
public abstract static class Stub extends android.os.Binder implements android.net.INetworkPolicyManager {
|
||||||
private static final String DESCRIPTOR = "android.net.INetworkPolicyManager";
|
private static final String DESCRIPTOR = "android.net.INetworkPolicyManager";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -65,28 +65,28 @@ public class LinkCapabilities implements Parcelable {
|
|||||||
*
|
*
|
||||||
* @see ConnectivityManager
|
* @see ConnectivityManager
|
||||||
*/
|
*/
|
||||||
public final static int RO_NETWORK_TYPE = 1;
|
public static final int RO_NETWORK_TYPE = 1;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Desired minimum forward link (download) bandwidth for the
|
* Desired minimum forward link (download) bandwidth for the
|
||||||
* in kilobits per second (kbps). Values should be strings such
|
* in kilobits per second (kbps). Values should be strings such
|
||||||
* "50", "100", "1500", etc.
|
* "50", "100", "1500", etc.
|
||||||
*/
|
*/
|
||||||
public final static int RW_DESIRED_FWD_BW = 2;
|
public static final int RW_DESIRED_FWD_BW = 2;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Required minimum forward link (download) bandwidth, in
|
* Required minimum forward link (download) bandwidth, in
|
||||||
* per second (kbps), below which the socket cannot function.
|
* per second (kbps), below which the socket cannot function.
|
||||||
* Values should be strings such as "50", "100", "1500", etc.
|
* Values should be strings such as "50", "100", "1500", etc.
|
||||||
*/
|
*/
|
||||||
public final static int RW_REQUIRED_FWD_BW = 3;
|
public static final int RW_REQUIRED_FWD_BW = 3;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Available forward link (download) bandwidth for the socket.
|
* Available forward link (download) bandwidth for the socket.
|
||||||
* This value is in kilobits per second (kbps).
|
* This value is in kilobits per second (kbps).
|
||||||
* Values will be strings such as "50", "100", "1500", etc.
|
* Values will be strings such as "50", "100", "1500", etc.
|
||||||
*/
|
*/
|
||||||
public final static int RO_AVAILABLE_FWD_BW = 4;
|
public static final int RO_AVAILABLE_FWD_BW = 4;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Desired minimum reverse link (upload) bandwidth for the socket
|
* Desired minimum reverse link (upload) bandwidth for the socket
|
||||||
@@ -95,7 +95,7 @@ public class LinkCapabilities implements Parcelable {
|
|||||||
* <p/>
|
* <p/>
|
||||||
* This key is set via the needs map.
|
* This key is set via the needs map.
|
||||||
*/
|
*/
|
||||||
public final static int RW_DESIRED_REV_BW = 5;
|
public static final int RW_DESIRED_REV_BW = 5;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Required minimum reverse link (upload) bandwidth, in kilobits
|
* Required minimum reverse link (upload) bandwidth, in kilobits
|
||||||
@@ -103,21 +103,21 @@ public class LinkCapabilities implements Parcelable {
|
|||||||
* If a rate is not specified, the default rate of kbps will be
|
* If a rate is not specified, the default rate of kbps will be
|
||||||
* Values should be strings such as "50", "100", "1500", etc.
|
* Values should be strings such as "50", "100", "1500", etc.
|
||||||
*/
|
*/
|
||||||
public final static int RW_REQUIRED_REV_BW = 6;
|
public static final int RW_REQUIRED_REV_BW = 6;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Available reverse link (upload) bandwidth for the socket.
|
* Available reverse link (upload) bandwidth for the socket.
|
||||||
* This value is in kilobits per second (kbps).
|
* This value is in kilobits per second (kbps).
|
||||||
* Values will be strings such as "50", "100", "1500", etc.
|
* Values will be strings such as "50", "100", "1500", etc.
|
||||||
*/
|
*/
|
||||||
public final static int RO_AVAILABLE_REV_BW = 7;
|
public static final int RO_AVAILABLE_REV_BW = 7;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Maximum latency for the socket, in milliseconds, above which
|
* Maximum latency for the socket, in milliseconds, above which
|
||||||
* socket cannot function.
|
* socket cannot function.
|
||||||
* Values should be strings such as "50", "300", "500", etc.
|
* Values should be strings such as "50", "300", "500", etc.
|
||||||
*/
|
*/
|
||||||
public final static int RW_MAX_ALLOWED_LATENCY = 8;
|
public static final int RW_MAX_ALLOWED_LATENCY = 8;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interface that the socket is bound to. This can be a virtual
|
* Interface that the socket is bound to. This can be a virtual
|
||||||
@@ -125,7 +125,7 @@ public class LinkCapabilities implements Parcelable {
|
|||||||
* (e.g. wlan0 or rmnet0).
|
* (e.g. wlan0 or rmnet0).
|
||||||
* Values will be strings such as "wlan0", "rmnet0"
|
* Values will be strings such as "wlan0", "rmnet0"
|
||||||
*/
|
*/
|
||||||
public final static int RO_BOUND_INTERFACE = 9;
|
public static final int RO_BOUND_INTERFACE = 9;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Physical interface that the socket is routed on.
|
* Physical interface that the socket is routed on.
|
||||||
@@ -134,7 +134,7 @@ public class LinkCapabilities implements Parcelable {
|
|||||||
* if seamless mobility is supported.
|
* if seamless mobility is supported.
|
||||||
* Values will be strings such as "wlan0", "rmnet0"
|
* Values will be strings such as "wlan0", "rmnet0"
|
||||||
*/
|
*/
|
||||||
public final static int RO_PHYSICAL_INTERFACE = 10;
|
public static final int RO_PHYSICAL_INTERFACE = 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ public abstract class ElementTimeImpl implements ElementTime {
|
|||||||
// Ignore badly formatted times
|
// Ignore badly formatted times
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (beginTimeList.size() == 0) {
|
if (beginTimeList.isEmpty()) {
|
||||||
/*
|
/*
|
||||||
* What is the right default value?
|
* What is the right default value?
|
||||||
*
|
*
|
||||||
@@ -139,7 +139,7 @@ public abstract class ElementTimeImpl implements ElementTime {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// "end" time is not specified
|
// "end" time is not specified
|
||||||
if (endTimeList.size() == 0) {
|
if (endTimeList.isEmpty()) {
|
||||||
// Get duration
|
// Get duration
|
||||||
float duration = getDur();
|
float duration = getDur();
|
||||||
|
|
||||||
|
|||||||
@@ -473,7 +473,7 @@ public class TransactionService extends Service implements Observer {
|
|||||||
try {
|
try {
|
||||||
synchronized (mProcessing) {
|
synchronized (mProcessing) {
|
||||||
mProcessing.remove(transaction);
|
mProcessing.remove(transaction);
|
||||||
if (mPending.size() > 0) {
|
if (!mPending.isEmpty()) {
|
||||||
if (LOCAL_LOGV) Log.v(TAG, "update: handle next pending transaction...");
|
if (LOCAL_LOGV) Log.v(TAG, "update: handle next pending transaction...");
|
||||||
Message msg = mServiceHandler.obtainMessage(
|
Message msg = mServiceHandler.obtainMessage(
|
||||||
EVENT_HANDLE_NEXT_PENDING_TRANSACTION,
|
EVENT_HANDLE_NEXT_PENDING_TRANSACTION,
|
||||||
@@ -799,7 +799,7 @@ public class TransactionService extends Service implements Observer {
|
|||||||
|
|
||||||
public void markAllPendingTransactionsAsFailed() {
|
public void markAllPendingTransactionsAsFailed() {
|
||||||
synchronized (mProcessing) {
|
synchronized (mProcessing) {
|
||||||
while (mPending.size() != 0) {
|
while (!mPending.isEmpty()) {
|
||||||
Transaction transaction = mPending.remove(0);
|
Transaction transaction = mPending.remove(0);
|
||||||
transaction.mTransactionState.setState(TransactionState.FAILED);
|
transaction.mTransactionState.setState(TransactionState.FAILED);
|
||||||
if (transaction instanceof SendTransaction) {
|
if (transaction instanceof SendTransaction) {
|
||||||
@@ -824,7 +824,7 @@ public class TransactionService extends Service implements Observer {
|
|||||||
int numProcessTransaction;
|
int numProcessTransaction;
|
||||||
|
|
||||||
synchronized (mProcessing) {
|
synchronized (mProcessing) {
|
||||||
if (mPending.size() != 0) {
|
if (!mPending.isEmpty()) {
|
||||||
transaction = mPending.remove(0);
|
transaction = mPending.remove(0);
|
||||||
}
|
}
|
||||||
numProcessTransaction = mProcessing.size();
|
numProcessTransaction = mProcessing.size();
|
||||||
|
|||||||
@@ -34,11 +34,11 @@ public class PduComposer {
|
|||||||
/**
|
/**
|
||||||
* Address type.
|
* Address type.
|
||||||
*/
|
*/
|
||||||
static private final int PDU_PHONE_NUMBER_ADDRESS_TYPE = 1;
|
private static final int PDU_PHONE_NUMBER_ADDRESS_TYPE = 1;
|
||||||
static private final int PDU_EMAIL_ADDRESS_TYPE = 2;
|
private static final int PDU_EMAIL_ADDRESS_TYPE = 2;
|
||||||
static private final int PDU_IPV4_ADDRESS_TYPE = 3;
|
private static final int PDU_IPV4_ADDRESS_TYPE = 3;
|
||||||
static private final int PDU_IPV6_ADDRESS_TYPE = 4;
|
private static final int PDU_IPV6_ADDRESS_TYPE = 4;
|
||||||
static private final int PDU_UNKNOWN_ADDRESS_TYPE = 5;
|
private static final int PDU_UNKNOWN_ADDRESS_TYPE = 5;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Address regular expression string.
|
* Address regular expression string.
|
||||||
@@ -63,25 +63,25 @@ public class PduComposer {
|
|||||||
/**
|
/**
|
||||||
* Error values.
|
* Error values.
|
||||||
*/
|
*/
|
||||||
static private final int PDU_COMPOSE_SUCCESS = 0;
|
private static final int PDU_COMPOSE_SUCCESS = 0;
|
||||||
static private final int PDU_COMPOSE_CONTENT_ERROR = 1;
|
private static final int PDU_COMPOSE_CONTENT_ERROR = 1;
|
||||||
static private final int PDU_COMPOSE_FIELD_NOT_SET = 2;
|
private static final int PDU_COMPOSE_FIELD_NOT_SET = 2;
|
||||||
static private final int PDU_COMPOSE_FIELD_NOT_SUPPORTED = 3;
|
private static final int PDU_COMPOSE_FIELD_NOT_SUPPORTED = 3;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* WAP values defined in WSP spec.
|
* WAP values defined in WSP spec.
|
||||||
*/
|
*/
|
||||||
static private final int QUOTED_STRING_FLAG = 34;
|
private static final int QUOTED_STRING_FLAG = 34;
|
||||||
static private final int END_STRING_FLAG = 0;
|
private static final int END_STRING_FLAG = 0;
|
||||||
static private final int LENGTH_QUOTE = 31;
|
private static final int LENGTH_QUOTE = 31;
|
||||||
static private final int TEXT_MAX = 127;
|
private static final int TEXT_MAX = 127;
|
||||||
static private final int SHORT_INTEGER_MAX = 127;
|
private static final int SHORT_INTEGER_MAX = 127;
|
||||||
static private final int LONG_INTEGER_LENGTH_MAX = 8;
|
private static final int LONG_INTEGER_LENGTH_MAX = 8;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Block size when read data from InputStream.
|
* Block size when read data from InputStream.
|
||||||
*/
|
*/
|
||||||
static private final int PDU_COMPOSER_BLOCK_SIZE = 1024;
|
private static final int PDU_COMPOSER_BLOCK_SIZE = 1024;
|
||||||
private static final String TAG = "PduComposer";
|
private static final String TAG = "PduComposer";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1029,7 +1029,7 @@ public class PduComposer {
|
|||||||
/**
|
/**
|
||||||
* Record current message informations.
|
* Record current message informations.
|
||||||
*/
|
*/
|
||||||
static private class LengthRecordNode {
|
private static class LengthRecordNode {
|
||||||
ByteArrayOutputStream currentMessage = null;
|
ByteArrayOutputStream currentMessage = null;
|
||||||
public int currentPosition = 0;
|
public int currentPosition = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -903,7 +903,7 @@ public class PduPersister {
|
|||||||
* Here <table_name> shall be "video" or "audio" or "images"
|
* Here <table_name> shall be "video" or "audio" or "images"
|
||||||
* <row_index> the index of the content in given table
|
* <row_index> the index of the content in given table
|
||||||
*/
|
*/
|
||||||
static public String convertUriToPath(Context context, Uri uri) {
|
public static String convertUriToPath(Context context, Uri uri) {
|
||||||
String path = null;
|
String path = null;
|
||||||
if (null != uri) {
|
if (null != uri) {
|
||||||
String scheme = uri.getScheme();
|
String scheme = uri.getScheme();
|
||||||
|
|||||||
@@ -94,6 +94,7 @@ public class QKSMSAppBase extends MultiDexApplication {
|
|||||||
registerActivityLifecycleCallbacks(new LifecycleHandler());
|
registerActivityLifecycleCallbacks(new LifecycleHandler());
|
||||||
|
|
||||||
ThemeManager.init(this);
|
ThemeManager.init(this);
|
||||||
|
ThemeManager.migrateIcon(this); // TODO a few versions after 2.7, we can phase this out along with the old alias
|
||||||
MmsConfig.init(this);
|
MmsConfig.init(this);
|
||||||
Contact.init(this);
|
Contact.init(this);
|
||||||
DraftCache.init(this);
|
DraftCache.init(this);
|
||||||
|
|||||||
@@ -18,7 +18,13 @@ public class CIELChEvaluator implements TypeEvaluator<Integer> {
|
|||||||
private final ColorCIELCh mStartColor;
|
private final ColorCIELCh mStartColor;
|
||||||
private final ColorCIELCh mEndColor;
|
private final ColorCIELCh mEndColor;
|
||||||
|
|
||||||
|
private final int mStartInt;
|
||||||
|
private final int mEndInt;
|
||||||
|
|
||||||
public CIELChEvaluator(int startColor, int endColor) {
|
public CIELChEvaluator(int startColor, int endColor) {
|
||||||
|
mStartInt = startColor;
|
||||||
|
mEndInt = endColor;
|
||||||
|
|
||||||
mStartColor = convertRgbToCIELCH(startColor);
|
mStartColor = convertRgbToCIELCH(startColor);
|
||||||
mEndColor = convertRgbToCIELCH(endColor);
|
mEndColor = convertRgbToCIELCH(endColor);
|
||||||
}
|
}
|
||||||
@@ -29,6 +35,9 @@ public class CIELChEvaluator implements TypeEvaluator<Integer> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Integer evaluate(float fraction, Integer ignored, Integer ignored2) {
|
public Integer evaluate(float fraction, Integer ignored, Integer ignored2) {
|
||||||
|
if (mStartInt == mEndInt) {
|
||||||
|
return mStartInt;
|
||||||
|
}
|
||||||
|
|
||||||
// CIELCH to CIELAB
|
// CIELCH to CIELAB
|
||||||
double L = mStartColor.L * (1 - fraction) + mEndColor.L * fraction;
|
double L = mStartColor.L * (1 - fraction) + mEndColor.L * fraction;
|
||||||
|
|||||||
@@ -7,9 +7,11 @@ import android.util.Log;
|
|||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
import com.moez.QKSMS.R;
|
import com.moez.QKSMS.R;
|
||||||
|
import com.moez.QKSMS.enums.QKPreference;
|
||||||
import com.moez.QKSMS.external.iab.IabHelper;
|
import com.moez.QKSMS.external.iab.IabHelper;
|
||||||
import com.moez.QKSMS.external.iab.IabResult;
|
import com.moez.QKSMS.external.iab.IabResult;
|
||||||
import com.moez.QKSMS.external.iab.Purchase;
|
import com.moez.QKSMS.external.iab.Purchase;
|
||||||
|
import com.moez.QKSMS.ui.ThemeManager;
|
||||||
import com.moez.QKSMS.ui.base.QKActivity;
|
import com.moez.QKSMS.ui.base.QKActivity;
|
||||||
import com.moez.QKSMS.ui.dialog.QKDialog;
|
import com.moez.QKSMS.ui.dialog.QKDialog;
|
||||||
|
|
||||||
@@ -197,6 +199,13 @@ public class DonationManager {
|
|||||||
view.findViewById(R.id.donate_10).setOnClickListener(clickListener);
|
view.findViewById(R.id.donate_10).setOnClickListener(clickListener);
|
||||||
view.findViewById(R.id.donate_paypal).setOnClickListener(clickListener);
|
view.findViewById(R.id.donate_paypal).setOnClickListener(clickListener);
|
||||||
|
|
||||||
|
LiveViewManager.registerView(QKPreference.BACKGROUND, this, key -> {
|
||||||
|
view.findViewById(R.id.donate_1).setBackgroundDrawable(ThemeManager.getRippleBackground());
|
||||||
|
view.findViewById(R.id.donate_5).setBackgroundDrawable(ThemeManager.getRippleBackground());
|
||||||
|
view.findViewById(R.id.donate_10).setBackgroundDrawable(ThemeManager.getRippleBackground());
|
||||||
|
view.findViewById(R.id.donate_paypal).setBackgroundDrawable(ThemeManager.getRippleBackground());
|
||||||
|
});
|
||||||
|
|
||||||
QKDialog dialog = new QKDialog()
|
QKDialog dialog = new QKDialog()
|
||||||
.setContext(mContext)
|
.setContext(mContext)
|
||||||
.setCustomView(view);
|
.setCustomView(view);
|
||||||
|
|||||||
@@ -123,6 +123,11 @@ public class BlobCache implements Closeable {
|
|||||||
private byte[] mBlobHeader = new byte[BLOB_HEADER_SIZE];
|
private byte[] mBlobHeader = new byte[BLOB_HEADER_SIZE];
|
||||||
private Adler32 mAdler32 = new Adler32();
|
private Adler32 mAdler32 = new Adler32();
|
||||||
|
|
||||||
|
private int mSlotOffset;
|
||||||
|
private int mFileOffset;
|
||||||
|
|
||||||
|
private LookupRequest mLookupRequest = new LookupRequest();
|
||||||
|
|
||||||
// Creates the cache. Three files will be created:
|
// Creates the cache. Three files will be created:
|
||||||
// path + ".idx", path + ".0", and path + ".1"
|
// path + ".idx", path + ".0", and path + ".1"
|
||||||
// The ".0" file and the ".1" file each stores data for a region. Each of
|
// The ".0" file and the ".1" file each stores data for a region. Each of
|
||||||
@@ -431,7 +436,6 @@ public class BlobCache implements Closeable {
|
|||||||
|
|
||||||
// This method is for one-off lookup. For repeated lookup, use the version
|
// This method is for one-off lookup. For repeated lookup, use the version
|
||||||
// accepting LookupRequest to avoid repeated memory allocation.
|
// accepting LookupRequest to avoid repeated memory allocation.
|
||||||
private LookupRequest mLookupRequest = new LookupRequest();
|
|
||||||
public byte[] lookup(long key) throws IOException {
|
public byte[] lookup(long key) throws IOException {
|
||||||
mLookupRequest.key = key;
|
mLookupRequest.key = key;
|
||||||
mLookupRequest.buffer = null;
|
mLookupRequest.buffer = null;
|
||||||
@@ -555,8 +559,6 @@ public class BlobCache implements Closeable {
|
|||||||
// insertion.
|
// insertion.
|
||||||
// If the lookup is successful, the file offset is also saved in
|
// If the lookup is successful, the file offset is also saved in
|
||||||
// mFileOffset.
|
// mFileOffset.
|
||||||
private int mSlotOffset;
|
|
||||||
private int mFileOffset;
|
|
||||||
private boolean lookupInternal(long key, int hashStart) {
|
private boolean lookupInternal(long key, int hashStart) {
|
||||||
int slot = (int) (key % mMaxEntries);
|
int slot = (int) (key % mMaxEntries);
|
||||||
if (slot < 0) slot += mMaxEntries;
|
if (slot < 0) slot += mMaxEntries;
|
||||||
|
|||||||
@@ -35,6 +35,12 @@ package com.moez.QKSMS.common.google;
|
|||||||
public class DraftCache {
|
public class DraftCache {
|
||||||
private static final String TAG = "Mms/draft";
|
private static final String TAG = "Mms/draft";
|
||||||
|
|
||||||
|
static final String[] DRAFT_PROJECTION = new String[] {
|
||||||
|
Conversations.THREAD_ID // 0
|
||||||
|
};
|
||||||
|
|
||||||
|
static final int COLUMN_DRAFT_THREAD_ID = 0;
|
||||||
|
|
||||||
private static DraftCache sInstance;
|
private static DraftCache sInstance;
|
||||||
|
|
||||||
private final Context mContext;
|
private final Context mContext;
|
||||||
@@ -61,12 +67,6 @@ public class DraftCache {
|
|||||||
refresh();
|
refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
static final String[] DRAFT_PROJECTION = new String[] {
|
|
||||||
Conversations.THREAD_ID // 0
|
|
||||||
};
|
|
||||||
|
|
||||||
static final int COLUMN_DRAFT_THREAD_ID = 0;
|
|
||||||
|
|
||||||
/** To be called whenever the draft state might have changed.
|
/** To be called whenever the draft state might have changed.
|
||||||
* Dispatches work to a thread and returns immediately.
|
* Dispatches work to a thread and returns immediately.
|
||||||
*/
|
*/
|
||||||
@@ -131,7 +131,7 @@ public class DraftCache {
|
|||||||
// If nobody's interested in finding out about changes,
|
// If nobody's interested in finding out about changes,
|
||||||
// just bail out early.
|
// just bail out early.
|
||||||
synchronized (mChangeListenersLock) {
|
synchronized (mChangeListenersLock) {
|
||||||
if (mChangeListeners.size() < 1) {
|
if (mChangeListeners.isEmpty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -104,9 +104,9 @@ public abstract class Recycler {
|
|||||||
return /*prefs.getBoolean(MessagingPreferenceActivity.AUTO_DELETE, DEFAULT_AUTO_DELETE)*/ false;
|
return /*prefs.getBoolean(MessagingPreferenceActivity.AUTO_DELETE, DEFAULT_AUTO_DELETE)*/ false;
|
||||||
}
|
}
|
||||||
|
|
||||||
abstract public int getMessageLimit(Context context);
|
public abstract int getMessageLimit(Context context);
|
||||||
|
|
||||||
abstract public void setMessageLimit(Context context, int limit);
|
public abstract void setMessageLimit(Context context, int limit);
|
||||||
|
|
||||||
public int getMessageMinLimit() {
|
public int getMessageMinLimit() {
|
||||||
return MmsConfig.getMinMessageCountPerThread();
|
return MmsConfig.getMinMessageCountPerThread();
|
||||||
@@ -116,15 +116,15 @@ public abstract class Recycler {
|
|||||||
return MmsConfig.getMaxMessageCountPerThread();
|
return MmsConfig.getMaxMessageCountPerThread();
|
||||||
}
|
}
|
||||||
|
|
||||||
abstract protected long getThreadId(Cursor cursor);
|
protected abstract long getThreadId(Cursor cursor);
|
||||||
|
|
||||||
abstract protected Cursor getAllThreads(Context context);
|
protected abstract Cursor getAllThreads(Context context);
|
||||||
|
|
||||||
abstract protected void deleteMessagesForThread(Context context, long threadId, int keep);
|
protected abstract void deleteMessagesForThread(Context context, long threadId, int keep);
|
||||||
|
|
||||||
abstract protected void dumpMessage(Cursor cursor, Context context);
|
protected abstract void dumpMessage(Cursor cursor, Context context);
|
||||||
|
|
||||||
abstract protected boolean anyThreadOverLimit(Context context);
|
protected abstract boolean anyThreadOverLimit(Context context);
|
||||||
|
|
||||||
public static class SmsRecycler extends Recycler {
|
public static class SmsRecycler extends Recycler {
|
||||||
private static final String[] ALL_SMS_THREADS_PROJECTION = {
|
private static final String[] ALL_SMS_THREADS_PROJECTION = {
|
||||||
@@ -135,7 +135,7 @@ public abstract class Recycler {
|
|||||||
private static final int ID = 0;
|
private static final int ID = 0;
|
||||||
private static final int MESSAGE_COUNT = 1;
|
private static final int MESSAGE_COUNT = 1;
|
||||||
|
|
||||||
static private final String[] SMS_MESSAGE_PROJECTION = new String[] {
|
private static final String[] SMS_MESSAGE_PROJECTION = new String[] {
|
||||||
BaseColumns._ID,
|
BaseColumns._ID,
|
||||||
Conversations.THREAD_ID,
|
Conversations.THREAD_ID,
|
||||||
Sms.ADDRESS,
|
Sms.ADDRESS,
|
||||||
@@ -148,14 +148,14 @@ public abstract class Recycler {
|
|||||||
|
|
||||||
// The indexes of the default columns which must be consistent
|
// The indexes of the default columns which must be consistent
|
||||||
// with above PROJECTION.
|
// with above PROJECTION.
|
||||||
static private final int COLUMN_ID = 0;
|
private static final int COLUMN_ID = 0;
|
||||||
static private final int COLUMN_THREAD_ID = 1;
|
private static final int COLUMN_THREAD_ID = 1;
|
||||||
static private final int COLUMN_SMS_ADDRESS = 2;
|
private static final int COLUMN_SMS_ADDRESS = 2;
|
||||||
static private final int COLUMN_SMS_BODY = 3;
|
private static final int COLUMN_SMS_BODY = 3;
|
||||||
static private final int COLUMN_SMS_DATE = 4;
|
private static final int COLUMN_SMS_DATE = 4;
|
||||||
static private final int COLUMN_SMS_READ = 5;
|
private static final int COLUMN_SMS_READ = 5;
|
||||||
static private final int COLUMN_SMS_TYPE = 6;
|
private static final int COLUMN_SMS_TYPE = 6;
|
||||||
static private final int COLUMN_SMS_STATUS = 7;
|
private static final int COLUMN_SMS_STATUS = 7;
|
||||||
|
|
||||||
private final String MAX_SMS_MESSAGES_PER_THREAD = "MaxSmsMessagesPerThread";
|
private final String MAX_SMS_MESSAGES_PER_THREAD = "MaxSmsMessagesPerThread";
|
||||||
|
|
||||||
@@ -283,7 +283,7 @@ public abstract class Recycler {
|
|||||||
private static final int ID = 0;
|
private static final int ID = 0;
|
||||||
private static final int MESSAGE_COUNT = 1;
|
private static final int MESSAGE_COUNT = 1;
|
||||||
|
|
||||||
static private final String[] MMS_MESSAGE_PROJECTION = new String[] {
|
private static final String[] MMS_MESSAGE_PROJECTION = new String[] {
|
||||||
BaseColumns._ID,
|
BaseColumns._ID,
|
||||||
Conversations.THREAD_ID,
|
Conversations.THREAD_ID,
|
||||||
Mms.DATE,
|
Mms.DATE,
|
||||||
@@ -291,10 +291,10 @@ public abstract class Recycler {
|
|||||||
|
|
||||||
// The indexes of the default columns which must be consistent
|
// The indexes of the default columns which must be consistent
|
||||||
// with above PROJECTION.
|
// with above PROJECTION.
|
||||||
static private final int COLUMN_ID = 0;
|
private static final int COLUMN_ID = 0;
|
||||||
static private final int COLUMN_THREAD_ID = 1;
|
private static final int COLUMN_THREAD_ID = 1;
|
||||||
static private final int COLUMN_MMS_DATE = 2;
|
private static final int COLUMN_MMS_DATE = 2;
|
||||||
static private final int COLUMN_MMS_READ = 3;
|
private static final int COLUMN_MMS_READ = 3;
|
||||||
|
|
||||||
private final String MAX_MMS_MESSAGES_PER_THREAD = "MaxMmsMessagesPerThread";
|
private final String MAX_MMS_MESSAGES_PER_THREAD = "MaxMmsMessagesPerThread";
|
||||||
|
|
||||||
|
|||||||
@@ -29,6 +29,8 @@ import java.util.LinkedHashMap;
|
|||||||
* from Peter Balwin and books app.
|
* from Peter Balwin and books app.
|
||||||
*/
|
*/
|
||||||
public class SimpleCache<K, V> {
|
public class SimpleCache<K, V> {
|
||||||
|
private final SoftReferenceMap mSoftReferences;
|
||||||
|
private final HardReferenceMap mHardReferences;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A simple LRU cache to prevent the number of {@link java.util.Map.Entry} instances
|
* A simple LRU cache to prevent the number of {@link java.util.Map.Entry} instances
|
||||||
@@ -66,13 +68,6 @@ public class SimpleCache<K, V> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static <V> V unwrap(SoftReference<V> ref) {
|
|
||||||
return ref != null ? ref.get() : null;
|
|
||||||
}
|
|
||||||
|
|
||||||
private final SoftReferenceMap mSoftReferences;
|
|
||||||
private final HardReferenceMap mHardReferences;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*
|
*
|
||||||
@@ -95,6 +90,10 @@ public class SimpleCache<K, V> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static <V> V unwrap(SoftReference<V> ref) {
|
||||||
|
return ref != null ? ref.get() : null;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* See {@link java.util.Map#get(Object)}.
|
* See {@link java.util.Map#get(Object)}.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ import java.io.IOException;
|
|||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
|
|
||||||
public class UriImage {
|
public class UriImage {
|
||||||
|
private static final int NUMBER_OF_RESIZE_ATTEMPTS = 4;
|
||||||
private static final String TAG = "Mms/image";
|
private static final String TAG = "Mms/image";
|
||||||
private static final boolean DEBUG = false;
|
private static final boolean DEBUG = false;
|
||||||
private static final boolean LOCAL_LOGV = false;
|
private static final boolean LOCAL_LOGV = false;
|
||||||
@@ -259,8 +260,6 @@ public class UriImage {
|
|||||||
return part;
|
return part;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final int NUMBER_OF_RESIZE_ATTEMPTS = 4;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Resize and recompress the image such that it fits the given limits. The resulting byte
|
* Resize and recompress the image such that it fits the given limits. The resulting byte
|
||||||
* array contains an image in JPEG format, regardless of the original image's content type.
|
* array contains an image in JPEG format, regardless of the original image's content type.
|
||||||
|
|||||||
@@ -1,13 +1,10 @@
|
|||||||
package com.moez.QKSMS.common.utils;
|
package com.moez.QKSMS.common.utils;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.SharedPreferences;
|
|
||||||
import android.preference.PreferenceManager;
|
|
||||||
import android.text.format.DateFormat;
|
import android.text.format.DateFormat;
|
||||||
import android.text.format.DateUtils;
|
import android.text.format.DateUtils;
|
||||||
import com.moez.QKSMS.QKSMSApp;
|
import com.moez.QKSMS.QKSMSApp;
|
||||||
import com.moez.QKSMS.R;
|
import com.moez.QKSMS.R;
|
||||||
import com.moez.QKSMS.ui.settings.SettingsFragment;
|
|
||||||
|
|
||||||
import java.text.ParseException;
|
import java.text.ParseException;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
@@ -48,8 +45,7 @@ public abstract class DateFormatter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static SimpleDateFormat accountFor24HourTime(Context context, SimpleDateFormat input) { //pass in 12 hour time. If needed, change to 24 hr.
|
public static SimpleDateFormat accountFor24HourTime(Context context, SimpleDateFormat input) { //pass in 12 hour time. If needed, change to 24 hr.
|
||||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
boolean isUsing24HourTime = DateFormat.is24HourFormat(context);
|
||||||
boolean isUsing24HourTime = prefs.getBoolean(SettingsFragment.TIMESTAMPS_24H, DateFormat.is24HourFormat(context));
|
|
||||||
|
|
||||||
if (isUsing24HourTime) {
|
if (isUsing24HourTime) {
|
||||||
return new SimpleDateFormat(input.toPattern().replace('h', 'H').replaceAll(" a", ""));
|
return new SimpleDateFormat(input.toPattern().replace('h', 'H').replaceAll(" a", ""));
|
||||||
|
|||||||
@@ -503,14 +503,14 @@ public class Contact {
|
|||||||
while (true) {
|
while (true) {
|
||||||
Runnable r = null;
|
Runnable r = null;
|
||||||
synchronized (mThingsToLoad) {
|
synchronized (mThingsToLoad) {
|
||||||
if (mThingsToLoad.size() == 0) {
|
if (mThingsToLoad.isEmpty()) {
|
||||||
try {
|
try {
|
||||||
mThingsToLoad.wait();
|
mThingsToLoad.wait();
|
||||||
} catch (InterruptedException ex) {
|
} catch (InterruptedException ex) {
|
||||||
break; // Exception sent by Contact.init() to stop Runnable
|
break; // Exception sent by Contact.init() to stop Runnable
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (mThingsToLoad.size() > 0) {
|
if (!mThingsToLoad.isEmpty()) {
|
||||||
r = mThingsToLoad.remove(0);
|
r = mThingsToLoad.remove(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1175,7 +1175,7 @@ public class Contact {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (candidates.size() == 0) {
|
if (candidates.isEmpty()) {
|
||||||
mContactsHash.remove(key);
|
mContactsHash.remove(key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,7 +33,6 @@ public enum QKPreference {
|
|||||||
HIDE_AVATAR_RECEIVED("pref_key_hide_avatar_received", false),
|
HIDE_AVATAR_RECEIVED("pref_key_hide_avatar_received", false),
|
||||||
|
|
||||||
MESSAGE_COUNT("pref_key_message_count", false),
|
MESSAGE_COUNT("pref_key_message_count", false),
|
||||||
TIMESTAMPS_24H("pref_key_24h", false),
|
|
||||||
|
|
||||||
// General
|
// General
|
||||||
DELAYED_MESSAGING("pref_key_delayed", false),
|
DELAYED_MESSAGING("pref_key_delayed", false),
|
||||||
@@ -101,7 +100,8 @@ public enum QKPreference {
|
|||||||
|
|
||||||
// Storage
|
// Storage
|
||||||
COMPOSE_DRAFT("compose_draft", ""),
|
COMPOSE_DRAFT("compose_draft", ""),
|
||||||
LAST_AUTO_DELETE_CHECK("last_auto_delete_check", 0);
|
LAST_AUTO_DELETE_CHECK("last_auto_delete_check", 0),
|
||||||
|
MIGRATED_ICON("migrated_icon", false);
|
||||||
|
|
||||||
private String mKey;
|
private String mKey;
|
||||||
private Object mDefaultValue;
|
private Object mDefaultValue;
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ class ExifData {
|
|||||||
* Returns true if this header contains uncompressed strip.
|
* Returns true if this header contains uncompressed strip.
|
||||||
*/
|
*/
|
||||||
protected boolean hasUncompressedStrip() {
|
protected boolean hasUncompressedStrip() {
|
||||||
return mStripBytes.size() != 0;
|
return !mStripBytes.isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -264,7 +264,7 @@ class ExifData {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ret.size() == 0) {
|
if (ret.isEmpty()) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
@@ -287,7 +287,7 @@ class ExifData {
|
|||||||
for (ExifTag t : tags) {
|
for (ExifTag t : tags) {
|
||||||
ret.add(t);
|
ret.add(t);
|
||||||
}
|
}
|
||||||
if (ret.size() == 0) {
|
if (ret.isEmpty()) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
@@ -307,7 +307,7 @@ class ExifData {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ret.size() == 0) {
|
if (ret.isEmpty()) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
|
|||||||
@@ -2348,7 +2348,7 @@ public class ExifInterface {
|
|||||||
l.add(ifds[i]);
|
l.add(ifds[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (l.size() <= 0) {
|
if (l.isEmpty()) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
int[] ret = new int[l.size()];
|
int[] ret = new int[l.size()];
|
||||||
|
|||||||
@@ -40,21 +40,21 @@ package com.moez.QKSMS.external.iab;
|
|||||||
*/
|
*/
|
||||||
public class Base64 {
|
public class Base64 {
|
||||||
/** Specify encoding (value is {@code true}). */
|
/** Specify encoding (value is {@code true}). */
|
||||||
public final static boolean ENCODE = true;
|
public static final boolean ENCODE = true;
|
||||||
|
|
||||||
/** Specify decoding (value is {@code false}). */
|
/** Specify decoding (value is {@code false}). */
|
||||||
public final static boolean DECODE = false;
|
public static final boolean DECODE = false;
|
||||||
|
|
||||||
/** The equals sign (=) as a byte. */
|
/** The equals sign (=) as a byte. */
|
||||||
private final static byte EQUALS_SIGN = (byte) '=';
|
private static final byte EQUALS_SIGN = (byte) '=';
|
||||||
|
|
||||||
/** The new line character (\n) as a byte. */
|
/** The new line character (\n) as a byte. */
|
||||||
private final static byte NEW_LINE = (byte) '\n';
|
private static final byte NEW_LINE = (byte) '\n';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The 64 valid Base64 values.
|
* The 64 valid Base64 values.
|
||||||
*/
|
*/
|
||||||
private final static byte[] ALPHABET =
|
private static final byte[] ALPHABET =
|
||||||
{(byte) 'A', (byte) 'B', (byte) 'C', (byte) 'D', (byte) 'E', (byte) 'F',
|
{(byte) 'A', (byte) 'B', (byte) 'C', (byte) 'D', (byte) 'E', (byte) 'F',
|
||||||
(byte) 'G', (byte) 'H', (byte) 'I', (byte) 'J', (byte) 'K',
|
(byte) 'G', (byte) 'H', (byte) 'I', (byte) 'J', (byte) 'K',
|
||||||
(byte) 'L', (byte) 'M', (byte) 'N', (byte) 'O', (byte) 'P',
|
(byte) 'L', (byte) 'M', (byte) 'N', (byte) 'O', (byte) 'P',
|
||||||
@@ -72,7 +72,7 @@ public class Base64 {
|
|||||||
/**
|
/**
|
||||||
* The 64 valid web safe Base64 values.
|
* The 64 valid web safe Base64 values.
|
||||||
*/
|
*/
|
||||||
private final static byte[] WEBSAFE_ALPHABET =
|
private static final byte[] WEBSAFE_ALPHABET =
|
||||||
{(byte) 'A', (byte) 'B', (byte) 'C', (byte) 'D', (byte) 'E', (byte) 'F',
|
{(byte) 'A', (byte) 'B', (byte) 'C', (byte) 'D', (byte) 'E', (byte) 'F',
|
||||||
(byte) 'G', (byte) 'H', (byte) 'I', (byte) 'J', (byte) 'K',
|
(byte) 'G', (byte) 'H', (byte) 'I', (byte) 'J', (byte) 'K',
|
||||||
(byte) 'L', (byte) 'M', (byte) 'N', (byte) 'O', (byte) 'P',
|
(byte) 'L', (byte) 'M', (byte) 'N', (byte) 'O', (byte) 'P',
|
||||||
@@ -91,7 +91,7 @@ public class Base64 {
|
|||||||
* Translates a Base64 value to either its 6-bit reconstruction value
|
* Translates a Base64 value to either its 6-bit reconstruction value
|
||||||
* or a negative number indicating some other meaning.
|
* or a negative number indicating some other meaning.
|
||||||
**/
|
**/
|
||||||
private final static byte[] DECODABET = {-9, -9, -9, -9, -9, -9, -9, -9, -9, // Decimal 0 - 8
|
private static final byte[] DECODABET = {-9, -9, -9, -9, -9, -9, -9, -9, -9, // Decimal 0 - 8
|
||||||
-5, -5, // Whitespace: Tab and Linefeed
|
-5, -5, // Whitespace: Tab and Linefeed
|
||||||
-9, -9, // Decimal 11 - 12
|
-9, -9, // Decimal 11 - 12
|
||||||
-5, // Whitespace: Carriage Return
|
-5, // Whitespace: Carriage Return
|
||||||
@@ -125,7 +125,7 @@ public class Base64 {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/** The web safe decodabet */
|
/** The web safe decodabet */
|
||||||
private final static byte[] WEBSAFE_DECODABET =
|
private static final byte[] WEBSAFE_DECODABET =
|
||||||
{-9, -9, -9, -9, -9, -9, -9, -9, -9, // Decimal 0 - 8
|
{-9, -9, -9, -9, -9, -9, -9, -9, -9, // Decimal 0 - 8
|
||||||
-5, -5, // Whitespace: Tab and Linefeed
|
-5, -5, // Whitespace: Tab and Linefeed
|
||||||
-9, -9, // Decimal 11 - 12
|
-9, -9, // Decimal 11 - 12
|
||||||
@@ -161,9 +161,9 @@ public class Base64 {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Indicates white space in encoding
|
// Indicates white space in encoding
|
||||||
private final static byte WHITE_SPACE_ENC = -5;
|
private static final byte WHITE_SPACE_ENC = -5;
|
||||||
// Indicates equals sign in encoding
|
// Indicates equals sign in encoding
|
||||||
private final static byte EQUALS_SIGN_ENC = -1;
|
private static final byte EQUALS_SIGN_ENC = -1;
|
||||||
|
|
||||||
/** Defeats instantiation. */
|
/** Defeats instantiation. */
|
||||||
private Base64() {
|
private Base64() {
|
||||||
|
|||||||
@@ -921,7 +921,7 @@ public class IabHelper {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (skuList.size() == 0) {
|
if (skuList.isEmpty()) {
|
||||||
logDebug("queryPrices: nothing to do because there are no SKUs.");
|
logDebug("queryPrices: nothing to do because there are no SKUs.");
|
||||||
return BILLING_RESPONSE_RESULT_OK;
|
return BILLING_RESPONSE_RESULT_OK;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -282,7 +282,7 @@ public abstract class MediaModel extends Model implements EventListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public MediaAction getCurrentAction() {
|
public MediaAction getCurrentAction() {
|
||||||
if (0 == mMediaActions.size()) {
|
if (mMediaActions.isEmpty()) {
|
||||||
return MediaAction.NO_ACTIVE_ACTION;
|
return MediaAction.NO_ACTIVE_ACTION;
|
||||||
}
|
}
|
||||||
return mMediaActions.remove(0);
|
return mMediaActions.remove(0);
|
||||||
|
|||||||
@@ -279,16 +279,19 @@ public class SlideModel extends Model implements List<MediaModel>, EventListener
|
|||||||
* @throws ContentRestrictionException when can not add this object.
|
* @throws ContentRestrictionException when can not add this object.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean add(MediaModel object) {
|
public boolean add(MediaModel object) {
|
||||||
internalAdd(object);
|
internalAdd(object);
|
||||||
notifyModelChanged(true);
|
notifyModelChanged(true);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean addAll(Collection<? extends MediaModel> collection) {
|
public boolean addAll(Collection<? extends MediaModel> collection) {
|
||||||
throw new UnsupportedOperationException("Operation not supported.");
|
throw new UnsupportedOperationException("Operation not supported.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void clear() {
|
public void clear() {
|
||||||
if (mMedia.size() > 0) {
|
if (mMedia.size() > 0) {
|
||||||
for (MediaModel media : mMedia) {
|
for (MediaModel media : mMedia) {
|
||||||
@@ -312,22 +315,27 @@ public class SlideModel extends Model implements List<MediaModel>, EventListener
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean contains(Object object) {
|
public boolean contains(Object object) {
|
||||||
return mMedia.contains(object);
|
return mMedia.contains(object);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean containsAll(Collection<?> collection) {
|
public boolean containsAll(Collection<?> collection) {
|
||||||
return mMedia.containsAll(collection);
|
return mMedia.containsAll(collection);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isEmpty() {
|
public boolean isEmpty() {
|
||||||
return mMedia.isEmpty();
|
return mMedia.isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public Iterator<MediaModel> iterator() {
|
public Iterator<MediaModel> iterator() {
|
||||||
return mMedia.iterator();
|
return mMedia.iterator();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean remove(Object object) {
|
public boolean remove(Object object) {
|
||||||
if ((object != null) && (object instanceof MediaModel)
|
if ((object != null) && (object instanceof MediaModel)
|
||||||
&& internalRemove(object)) {
|
&& internalRemove(object)) {
|
||||||
@@ -337,35 +345,43 @@ public class SlideModel extends Model implements List<MediaModel>, EventListener
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean removeAll(Collection<?> collection) {
|
public boolean removeAll(Collection<?> collection) {
|
||||||
throw new UnsupportedOperationException("Operation not supported.");
|
throw new UnsupportedOperationException("Operation not supported.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean retainAll(Collection<?> collection) {
|
public boolean retainAll(Collection<?> collection) {
|
||||||
throw new UnsupportedOperationException("Operation not supported.");
|
throw new UnsupportedOperationException("Operation not supported.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int size() {
|
public int size() {
|
||||||
return mMedia.size();
|
return mMedia.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public Object[] toArray() {
|
public Object[] toArray() {
|
||||||
return mMedia.toArray();
|
return mMedia.toArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public <T> T[] toArray(T[] array) {
|
public <T> T[] toArray(T[] array) {
|
||||||
return mMedia.toArray(array);
|
return mMedia.toArray(array);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void add(int location, MediaModel object) {
|
public void add(int location, MediaModel object) {
|
||||||
throw new UnsupportedOperationException("Operation not supported.");
|
throw new UnsupportedOperationException("Operation not supported.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean addAll(int location,
|
public boolean addAll(int location,
|
||||||
Collection<? extends MediaModel> collection) {
|
Collection<? extends MediaModel> collection) {
|
||||||
throw new UnsupportedOperationException("Operation not supported.");
|
throw new UnsupportedOperationException("Operation not supported.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public MediaModel get(int location) {
|
public MediaModel get(int location) {
|
||||||
if (mMedia.size() == 0) {
|
if (mMedia.size() == 0) {
|
||||||
return null;
|
return null;
|
||||||
@@ -374,22 +390,27 @@ public class SlideModel extends Model implements List<MediaModel>, EventListener
|
|||||||
return mMedia.get(location);
|
return mMedia.get(location);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int indexOf(Object object) {
|
public int indexOf(Object object) {
|
||||||
return mMedia.indexOf(object);
|
return mMedia.indexOf(object);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int lastIndexOf(Object object) {
|
public int lastIndexOf(Object object) {
|
||||||
return mMedia.lastIndexOf(object);
|
return mMedia.lastIndexOf(object);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public ListIterator<MediaModel> listIterator() {
|
public ListIterator<MediaModel> listIterator() {
|
||||||
return mMedia.listIterator();
|
return mMedia.listIterator();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public ListIterator<MediaModel> listIterator(int location) {
|
public ListIterator<MediaModel> listIterator(int location) {
|
||||||
return mMedia.listIterator(location);
|
return mMedia.listIterator(location);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public MediaModel remove(int location) {
|
public MediaModel remove(int location) {
|
||||||
MediaModel media = mMedia.get(location);
|
MediaModel media = mMedia.get(location);
|
||||||
if ((media != null) && internalRemove(media)) {
|
if ((media != null) && internalRemove(media)) {
|
||||||
@@ -398,10 +419,12 @@ public class SlideModel extends Model implements List<MediaModel>, EventListener
|
|||||||
return media;
|
return media;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public MediaModel set(int location, MediaModel object) {
|
public MediaModel set(int location, MediaModel object) {
|
||||||
throw new UnsupportedOperationException("Operation not supported.");
|
throw new UnsupportedOperationException("Operation not supported.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public List<MediaModel> subList(int start, int end) {
|
public List<MediaModel> subList(int start, int end) {
|
||||||
return mMedia.subList(start, end);
|
return mMedia.subList(start, end);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -406,6 +406,7 @@ public class SlideshowModel extends Model
|
|||||||
//
|
//
|
||||||
// Implement List<E> interface.
|
// Implement List<E> interface.
|
||||||
//
|
//
|
||||||
|
@Override
|
||||||
public boolean add(SlideModel object) {
|
public boolean add(SlideModel object) {
|
||||||
int increaseSize = object.getSlideSize();
|
int increaseSize = object.getSlideSize();
|
||||||
checkMessageSize(increaseSize);
|
checkMessageSize(increaseSize);
|
||||||
@@ -422,10 +423,12 @@ public class SlideshowModel extends Model
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean addAll(Collection<? extends SlideModel> collection) {
|
public boolean addAll(Collection<? extends SlideModel> collection) {
|
||||||
throw new UnsupportedOperationException("Operation not supported.");
|
throw new UnsupportedOperationException("Operation not supported.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void clear() {
|
public void clear() {
|
||||||
if (mSlides.size() > 0) {
|
if (mSlides.size() > 0) {
|
||||||
for (SlideModel slide : mSlides) {
|
for (SlideModel slide : mSlides) {
|
||||||
@@ -440,22 +443,27 @@ public class SlideshowModel extends Model
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean contains(Object object) {
|
public boolean contains(Object object) {
|
||||||
return mSlides.contains(object);
|
return mSlides.contains(object);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean containsAll(Collection<?> collection) {
|
public boolean containsAll(Collection<?> collection) {
|
||||||
return mSlides.containsAll(collection);
|
return mSlides.containsAll(collection);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isEmpty() {
|
public boolean isEmpty() {
|
||||||
return mSlides.isEmpty();
|
return mSlides.isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public Iterator<SlideModel> iterator() {
|
public Iterator<SlideModel> iterator() {
|
||||||
return mSlides.iterator();
|
return mSlides.iterator();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean remove(Object object) {
|
public boolean remove(Object object) {
|
||||||
if ((object != null) && mSlides.remove(object)) {
|
if ((object != null) && mSlides.remove(object)) {
|
||||||
SlideModel slide = (SlideModel) object;
|
SlideModel slide = (SlideModel) object;
|
||||||
@@ -467,26 +475,32 @@ public class SlideshowModel extends Model
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean removeAll(Collection<?> collection) {
|
public boolean removeAll(Collection<?> collection) {
|
||||||
throw new UnsupportedOperationException("Operation not supported.");
|
throw new UnsupportedOperationException("Operation not supported.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean retainAll(Collection<?> collection) {
|
public boolean retainAll(Collection<?> collection) {
|
||||||
throw new UnsupportedOperationException("Operation not supported.");
|
throw new UnsupportedOperationException("Operation not supported.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int size() {
|
public int size() {
|
||||||
return mSlides.size();
|
return mSlides.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public Object[] toArray() {
|
public Object[] toArray() {
|
||||||
return mSlides.toArray();
|
return mSlides.toArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public <T> T[] toArray(T[] array) {
|
public <T> T[] toArray(T[] array) {
|
||||||
return mSlides.toArray(array);
|
return mSlides.toArray(array);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void add(int location, SlideModel object) {
|
public void add(int location, SlideModel object) {
|
||||||
if (object != null) {
|
if (object != null) {
|
||||||
int increaseSize = object.getSlideSize();
|
int increaseSize = object.getSlideSize();
|
||||||
@@ -502,31 +516,38 @@ public class SlideshowModel extends Model
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean addAll(int location,
|
public boolean addAll(int location,
|
||||||
Collection<? extends SlideModel> collection) {
|
Collection<? extends SlideModel> collection) {
|
||||||
throw new UnsupportedOperationException("Operation not supported.");
|
throw new UnsupportedOperationException("Operation not supported.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public SlideModel get(int location) {
|
public SlideModel get(int location) {
|
||||||
return (location >= 0 && location < mSlides.size()) ? mSlides.get(location) : null;
|
return (location >= 0 && location < mSlides.size()) ? mSlides.get(location) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int indexOf(Object object) {
|
public int indexOf(Object object) {
|
||||||
return mSlides.indexOf(object);
|
return mSlides.indexOf(object);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int lastIndexOf(Object object) {
|
public int lastIndexOf(Object object) {
|
||||||
return mSlides.lastIndexOf(object);
|
return mSlides.lastIndexOf(object);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public ListIterator<SlideModel> listIterator() {
|
public ListIterator<SlideModel> listIterator() {
|
||||||
return mSlides.listIterator();
|
return mSlides.listIterator();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public ListIterator<SlideModel> listIterator(int location) {
|
public ListIterator<SlideModel> listIterator(int location) {
|
||||||
return mSlides.listIterator(location);
|
return mSlides.listIterator(location);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public SlideModel remove(int location) {
|
public SlideModel remove(int location) {
|
||||||
SlideModel slide = mSlides.remove(location);
|
SlideModel slide = mSlides.remove(location);
|
||||||
if (slide != null) {
|
if (slide != null) {
|
||||||
@@ -537,6 +558,7 @@ public class SlideshowModel extends Model
|
|||||||
return slide;
|
return slide;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public SlideModel set(int location, SlideModel object) {
|
public SlideModel set(int location, SlideModel object) {
|
||||||
SlideModel slide = mSlides.get(location);
|
SlideModel slide = mSlides.get(location);
|
||||||
if (null != object) {
|
if (null != object) {
|
||||||
|
|||||||
@@ -1,12 +1,49 @@
|
|||||||
package com.moez.QKSMS.service;
|
package com.moez.QKSMS.service;
|
||||||
|
|
||||||
import android.app.Service;
|
import android.app.IntentService;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.IBinder;
|
import android.net.Uri;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.telephony.TelephonyManager;
|
||||||
|
import android.text.TextUtils;
|
||||||
|
import com.moez.QKSMS.mmssms.Message;
|
||||||
|
import com.moez.QKSMS.mmssms.Transaction;
|
||||||
|
import com.moez.QKSMS.transaction.NotificationManager;
|
||||||
|
import com.moez.QKSMS.transaction.SmsHelper;
|
||||||
|
|
||||||
|
import static com.moez.QKSMS.data.Conversation.getRecipients;
|
||||||
|
|
||||||
|
public class HeadlessSmsSendService extends IntentService {
|
||||||
|
private static final String TAG = "HeadlessSmsSendService";
|
||||||
|
|
||||||
|
public HeadlessSmsSendService() {
|
||||||
|
super(TAG);
|
||||||
|
}
|
||||||
|
|
||||||
public class HeadlessSmsSendService extends Service {
|
|
||||||
@Override
|
@Override
|
||||||
public IBinder onBind(Intent intent) {
|
protected void onHandleIntent(Intent intent) {
|
||||||
return null;
|
String action = intent.getAction();
|
||||||
|
if (!TelephonyManager.ACTION_RESPOND_VIA_MESSAGE.equals(action)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Bundle extras = intent.getExtras();
|
||||||
|
if (extras != null) {
|
||||||
|
String body = extras.getString(Intent.EXTRA_TEXT);
|
||||||
|
Uri intentUri = intent.getData();
|
||||||
|
String recipients = getRecipients(intentUri);
|
||||||
|
|
||||||
|
if (!TextUtils.isEmpty(recipients) && !TextUtils.isEmpty(body)) {
|
||||||
|
String[] destinations = TextUtils.split(recipients, ";");
|
||||||
|
|
||||||
|
Transaction sendTransaction = new Transaction(this, SmsHelper.getSendSettings(this));
|
||||||
|
|
||||||
|
Message message = new Message(body, destinations);
|
||||||
|
message.setType(Message.TYPE_SMSMMS);
|
||||||
|
|
||||||
|
sendTransaction.sendNewMessage(message, Transaction.NO_THREAD_ID);
|
||||||
|
NotificationManager.update(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,24 +11,39 @@ import android.content.Intent;
|
|||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
import android.content.res.Resources;
|
import android.content.res.Resources;
|
||||||
|
import android.graphics.Color;
|
||||||
|
import android.graphics.PorterDuff;
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.preference.PreferenceManager;
|
import android.preference.PreferenceManager;
|
||||||
|
import android.support.annotation.ColorInt;
|
||||||
|
import android.support.annotation.DrawableRes;
|
||||||
|
import android.support.v4.content.ContextCompat;
|
||||||
|
import android.support.v4.view.ViewPager;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.Gravity;
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
import android.view.animation.DecelerateInterpolator;
|
import android.view.animation.DecelerateInterpolator;
|
||||||
|
import android.view.inputmethod.EditorInfo;
|
||||||
|
import android.widget.ImageView;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
|
import android.widget.SeekBar;
|
||||||
|
import butterknife.Bind;
|
||||||
|
import butterknife.ButterKnife;
|
||||||
import com.moez.QKSMS.R;
|
import com.moez.QKSMS.R;
|
||||||
import com.moez.QKSMS.common.AnalyticsManager;
|
import com.moez.QKSMS.common.AnalyticsManager;
|
||||||
import com.moez.QKSMS.common.CIELChEvaluator;
|
import com.moez.QKSMS.common.CIELChEvaluator;
|
||||||
import com.moez.QKSMS.common.ConversationPrefsHelper;
|
import com.moez.QKSMS.common.ConversationPrefsHelper;
|
||||||
import com.moez.QKSMS.common.LiveViewManager;
|
import com.moez.QKSMS.common.LiveViewManager;
|
||||||
import com.moez.QKSMS.enums.QKPreference;
|
|
||||||
import com.moez.QKSMS.common.utils.ColorUtils;
|
import com.moez.QKSMS.common.utils.ColorUtils;
|
||||||
|
import com.moez.QKSMS.common.utils.KeyboardUtils;
|
||||||
|
import com.moez.QKSMS.enums.QKPreference;
|
||||||
import com.moez.QKSMS.receiver.IconColorReceiver;
|
import com.moez.QKSMS.receiver.IconColorReceiver;
|
||||||
import com.moez.QKSMS.ui.base.QKActivity;
|
import com.moez.QKSMS.ui.base.QKActivity;
|
||||||
|
import com.moez.QKSMS.ui.dialog.ColorPickerPagerAdapter;
|
||||||
import com.moez.QKSMS.ui.dialog.QKDialog;
|
import com.moez.QKSMS.ui.dialog.QKDialog;
|
||||||
import com.moez.QKSMS.ui.settings.SettingsFragment;
|
import com.moez.QKSMS.ui.settings.SettingsFragment;
|
||||||
|
import com.moez.QKSMS.ui.view.QKEditText;
|
||||||
import com.moez.QKSMS.ui.view.QKTextView;
|
import com.moez.QKSMS.ui.view.QKTextView;
|
||||||
import com.moez.QKSMS.ui.view.colorpicker.ColorPickerPalette;
|
import com.moez.QKSMS.ui.view.colorpicker.ColorPickerPalette;
|
||||||
import com.moez.QKSMS.ui.widget.WidgetProvider;
|
import com.moez.QKSMS.ui.widget.WidgetProvider;
|
||||||
@@ -227,7 +242,7 @@ public class ThemeManager {
|
|||||||
private static int mReceivedBubbleRes;
|
private static int mReceivedBubbleRes;
|
||||||
private static int mReceivedBubbleAltRes;
|
private static int mReceivedBubbleAltRes;
|
||||||
private static boolean mReceivedBubbleColored;
|
private static boolean mReceivedBubbleColored;
|
||||||
private static Drawable mRippleBackground;
|
private static int mRippleBackgroundRes;
|
||||||
|
|
||||||
private static Resources mResources;
|
private static Resources mResources;
|
||||||
private static SharedPreferences mPrefs;
|
private static SharedPreferences mPrefs;
|
||||||
@@ -240,7 +255,7 @@ public class ThemeManager {
|
|||||||
mPrefs = PreferenceManager.getDefaultSharedPreferences(context);
|
mPrefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||||
mResources = context.getResources();
|
mResources = context.getResources();
|
||||||
|
|
||||||
mColor = Integer.parseInt(mPrefs.getString(SettingsFragment.THEME, "" + ThemeManager.DEFAULT_COLOR));
|
mColor = Integer.parseInt(mPrefs.getString(SettingsFragment.THEME, "" + DEFAULT_COLOR));
|
||||||
mActiveColor = mColor;
|
mActiveColor = mColor;
|
||||||
|
|
||||||
initializeTheme(Theme.fromString(mPrefs.getString(SettingsFragment.BACKGROUND, "offwhite")));
|
initializeTheme(Theme.fromString(mPrefs.getString(SettingsFragment.BACKGROUND, "offwhite")));
|
||||||
@@ -281,21 +296,21 @@ public class ThemeManager {
|
|||||||
mBackgroundColor = mResources.getColor(R.color.grey_light_mega_ultra);
|
mBackgroundColor = mResources.getColor(R.color.grey_light_mega_ultra);
|
||||||
mTextOnBackgroundPrimary = mResources.getColor(R.color.theme_light_text_primary);
|
mTextOnBackgroundPrimary = mResources.getColor(R.color.theme_light_text_primary);
|
||||||
mtextOnBackgroundSecondary = mResources.getColor(R.color.theme_light_text_secondary);
|
mtextOnBackgroundSecondary = mResources.getColor(R.color.theme_light_text_secondary);
|
||||||
mRippleBackground = mResources.getDrawable(R.drawable.button_background_transparent);
|
mRippleBackgroundRes = R.drawable.ripple;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DARK:
|
case DARK:
|
||||||
mBackgroundColor = mResources.getColor(R.color.grey_material);
|
mBackgroundColor = mResources.getColor(R.color.grey_material);
|
||||||
mTextOnBackgroundPrimary = mResources.getColor(R.color.theme_dark_text_primary);
|
mTextOnBackgroundPrimary = mResources.getColor(R.color.theme_dark_text_primary);
|
||||||
mtextOnBackgroundSecondary = mResources.getColor(R.color.theme_dark_text_secondary);
|
mtextOnBackgroundSecondary = mResources.getColor(R.color.theme_dark_text_secondary);
|
||||||
mRippleBackground = mResources.getDrawable(R.drawable.button_background_transparent_light);
|
mRippleBackgroundRes = R.drawable.ripple_light;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BLACK:
|
case BLACK:
|
||||||
mBackgroundColor = mResources.getColor(R.color.black);
|
mBackgroundColor = mResources.getColor(R.color.black);
|
||||||
mTextOnBackgroundPrimary = mResources.getColor(R.color.theme_dark_text_primary);
|
mTextOnBackgroundPrimary = mResources.getColor(R.color.theme_dark_text_primary);
|
||||||
mtextOnBackgroundSecondary = mResources.getColor(R.color.theme_dark_text_secondary);
|
mtextOnBackgroundSecondary = mResources.getColor(R.color.theme_dark_text_secondary);
|
||||||
mRippleBackground = mResources.getDrawable(R.drawable.button_background_transparent_light);
|
mRippleBackgroundRes = R.drawable.ripple_light;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -311,7 +326,7 @@ public class ThemeManager {
|
|||||||
LiveViewManager.refreshViews(QKPreference.BACKGROUND);
|
LiveViewManager.refreshViews(QKPreference.BACKGROUND);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setIcon(final QKActivity context) {
|
public static void setIcon(final QKActivity context, boolean dark) {
|
||||||
new QKDialog()
|
new QKDialog()
|
||||||
.setContext(context)
|
.setContext(context)
|
||||||
.setTitle(R.string.update_icon_title)
|
.setTitle(R.string.update_icon_title)
|
||||||
@@ -320,90 +335,116 @@ public class ThemeManager {
|
|||||||
.setPositiveButton(R.string.okay, v -> {
|
.setPositiveButton(R.string.okay, v -> {
|
||||||
PackageManager packageManager = context.getPackageManager();
|
PackageManager packageManager = context.getPackageManager();
|
||||||
|
|
||||||
String[] colors = {
|
String defaultComponent = "com.moez.QKSMS.ui.MainActivity-Default";
|
||||||
"Red", "Pink", "Purple", "DeepPurple", "Indigo", "Blue",
|
String darkComponent = "com.moez.QKSMS.ui.MainActivity-Dark";
|
||||||
"LightBlue", "Cyan", "Teal", "Green", "LightGreen", "Lime",
|
|
||||||
"Yellow", "Amber", "Orange", "DeepOrange", "Brown", "Grey",
|
|
||||||
"BlueGrey"
|
|
||||||
};
|
|
||||||
|
|
||||||
// Disable all of the color aliases, except for the alias with the current
|
packageManager.setComponentEnabledSetting(
|
||||||
// color.
|
new ComponentName(context, dark ? defaultComponent : darkComponent),
|
||||||
String enabledComponent = null;
|
PackageManager.COMPONENT_ENABLED_STATE_DISABLED,
|
||||||
for (int i = 0; i < colors.length; i++) {
|
// Don't kill the app while we're in the loop! This will
|
||||||
String componentClassName = String.format(
|
// prevent the other component enabled settings from
|
||||||
"com.moez.QKSMS.ui.MainActivity-%s", colors[i]
|
// changing, i.e. they will all be disabled and the app
|
||||||
);
|
// won't show up to the user.
|
||||||
|
PackageManager.DONT_KILL_APP
|
||||||
// Save the enabled component so we can kill the app with this one when
|
);
|
||||||
// it's all done.
|
|
||||||
if (getSwatchColor(mColor) == PALETTE[i]) {
|
|
||||||
enabledComponent = componentClassName;
|
|
||||||
|
|
||||||
} else {
|
|
||||||
packageManager.setComponentEnabledSetting(
|
|
||||||
new ComponentName(context, componentClassName),
|
|
||||||
PackageManager.COMPONENT_ENABLED_STATE_DISABLED,
|
|
||||||
// Don't kill the app while we're in the loop! This will
|
|
||||||
// prevent the other component enabled settings from
|
|
||||||
// changing, i.e. they will all be disabled and the app
|
|
||||||
// won't show up to the user.
|
|
||||||
PackageManager.DONT_KILL_APP
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Broadcast an intent to a receiver that will:
|
// Broadcast an intent to a receiver that will:
|
||||||
// 1) enable the last component; and
|
// 1) enable the last component; and
|
||||||
// 2) relaunch QKSMS with the new component name.
|
// 2) relaunch QKSMS with the new component name.
|
||||||
Intent intent = new Intent(IconColorReceiver.ACTION_ICON_COLOR_CHANGED);
|
Intent intent = new Intent(IconColorReceiver.ACTION_ICON_COLOR_CHANGED);
|
||||||
intent.putExtra(IconColorReceiver.EXTRA_COMPONENT_NAME, enabledComponent);
|
intent.putExtra(IconColorReceiver.EXTRA_COMPONENT_NAME, dark ? darkComponent : defaultComponent);
|
||||||
context.sendBroadcast(intent);
|
context.sendBroadcast(intent);
|
||||||
})
|
})
|
||||||
.setNegativeButton(R.string.cancel, null)
|
.setCancelOnTouchOutside(false)
|
||||||
.show();
|
.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void migrateIcon(Context context) {
|
||||||
|
PackageManager packageManager = context.getPackageManager();
|
||||||
|
|
||||||
|
// If we've already migrated to use the MainActivity-Default component, we don't need to do anything
|
||||||
|
if (mPrefs.getBoolean(QKPreference.MIGRATED_ICON.getKey(), (Boolean) QKPreference.MIGRATED_ICON.getDefaultValue())) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
mPrefs.edit().putBoolean(QKPreference.MIGRATED_ICON.getKey(), true).apply();
|
||||||
|
|
||||||
|
String[] colors = {
|
||||||
|
"Red", "Pink", "Purple", "DeepPurple", "Indigo", "Blue",
|
||||||
|
"LightBlue", "Cyan", "Teal", "Green", "LightGreen", "Lime",
|
||||||
|
"Yellow", "Amber", "Orange", "DeepOrange", "Brown", "Grey",
|
||||||
|
"BlueGrey"
|
||||||
|
};
|
||||||
|
|
||||||
|
// Disable all of the old components
|
||||||
|
for (String color : colors) {
|
||||||
|
String componentClassName = String.format("com.moez.QKSMS.ui.MainActivity-%s", color);
|
||||||
|
packageManager.setComponentEnabledSetting(
|
||||||
|
new ComponentName(context, componentClassName),
|
||||||
|
PackageManager.COMPONENT_ENABLED_STATE_DISABLED,
|
||||||
|
PackageManager.DONT_KILL_APP
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Enable the new component
|
||||||
|
ComponentName componentName = new ComponentName(context, "com.moez.QKSMS.ui.MainActivity-Default");
|
||||||
|
packageManager.setComponentEnabledSetting(componentName,
|
||||||
|
PackageManager.COMPONENT_ENABLED_STATE_ENABLED,
|
||||||
|
PackageManager.DONT_KILL_APP
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ColorInt
|
||||||
public static int getBackgroundColor() {
|
public static int getBackgroundColor() {
|
||||||
return mBackgroundColor;
|
return mBackgroundColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ColorInt
|
||||||
public static int getTextOnColorPrimary() {
|
public static int getTextOnColorPrimary() {
|
||||||
return mTextOnColorPrimary;
|
return mTextOnColorPrimary;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ColorInt
|
||||||
public static int getTextOnColorSecondary() {
|
public static int getTextOnColorSecondary() {
|
||||||
return mTextOnColorSecondary;
|
return mTextOnColorSecondary;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ColorInt
|
||||||
public static int getTextOnBackgroundPrimary() {
|
public static int getTextOnBackgroundPrimary() {
|
||||||
return mTextOnBackgroundPrimary;
|
return mTextOnBackgroundPrimary;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ColorInt
|
||||||
public static int getTextOnBackgroundSecondary() {
|
public static int getTextOnBackgroundSecondary() {
|
||||||
return mtextOnBackgroundSecondary;
|
return mtextOnBackgroundSecondary;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@DrawableRes
|
||||||
public static int getSentBubbleRes() {
|
public static int getSentBubbleRes() {
|
||||||
return mSentBubbleRes;
|
return mSentBubbleRes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@DrawableRes
|
||||||
public static int getSentBubbleAltRes() {
|
public static int getSentBubbleAltRes() {
|
||||||
return mSentBubbleAltRes;
|
return mSentBubbleAltRes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ColorInt
|
||||||
public static int getSentBubbleColor() {
|
public static int getSentBubbleColor() {
|
||||||
return mSentBubbleColored ? mActiveColor : getNeutralBubbleColor();
|
return mSentBubbleColored ? mActiveColor : getNeutralBubbleColor();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@DrawableRes
|
||||||
public static int getReceivedBubbleRes() {
|
public static int getReceivedBubbleRes() {
|
||||||
return mReceivedBubbleRes;
|
return mReceivedBubbleRes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@DrawableRes
|
||||||
public static int getReceivedBubbleAltRes() {
|
public static int getReceivedBubbleAltRes() {
|
||||||
return mReceivedBubbleAltRes;
|
return mReceivedBubbleAltRes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ColorInt
|
||||||
public static int getReceivedBubbleColor() {
|
public static int getReceivedBubbleColor() {
|
||||||
return mReceivedBubbleColored ? mActiveColor : getNeutralBubbleColor();
|
return mReceivedBubbleColored ? mActiveColor : getNeutralBubbleColor();
|
||||||
}
|
}
|
||||||
@@ -423,6 +464,7 @@ public class ThemeManager {
|
|||||||
mReceivedBubbleColored = colored;
|
mReceivedBubbleColored = colored;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ColorInt
|
||||||
public static int getNeutralBubbleColor() {
|
public static int getNeutralBubbleColor() {
|
||||||
if (mTheme == null) {
|
if (mTheme == null) {
|
||||||
return 0xeeeeee;
|
return 0xeeeeee;
|
||||||
@@ -441,13 +483,15 @@ public class ThemeManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static Drawable getRippleBackground() {
|
public static Drawable getRippleBackground() {
|
||||||
return mRippleBackground;
|
return mResources.getDrawable(mRippleBackgroundRes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ColorInt
|
||||||
public static int getColor() {
|
public static int getColor() {
|
||||||
return mActiveColor;
|
return mActiveColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ColorInt
|
||||||
public static int getThemeColor() {
|
public static int getThemeColor() {
|
||||||
return mColor;
|
return mColor;
|
||||||
}
|
}
|
||||||
@@ -461,53 +505,143 @@ public class ThemeManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void showColorPickerDialog(final QKActivity context) {
|
public static void showColorPickerDialog(final QKActivity context) {
|
||||||
final QKDialog dialog = new QKDialog();
|
showColorPicker(context, v -> setColor(context, getColor()));
|
||||||
|
|
||||||
ColorPickerPalette palette = new ColorPickerPalette(context);
|
|
||||||
palette.setGravity(Gravity.CENTER);
|
|
||||||
palette.init(19, 4, color -> {
|
|
||||||
palette.init(getSwatch(color).length, 4, color2 -> {
|
|
||||||
setColor(context, color2);
|
|
||||||
dialog.dismiss();
|
|
||||||
});
|
|
||||||
|
|
||||||
palette.drawPalette(getSwatch(color), mColor);
|
|
||||||
});
|
|
||||||
|
|
||||||
palette.drawPalette(PALETTE, getSwatchColor(mColor));
|
|
||||||
|
|
||||||
dialog.setContext(context)
|
|
||||||
.setTitle(R.string.pref_theme)
|
|
||||||
.setCustomView(palette)
|
|
||||||
.setNegativeButton(R.string.cancel, null);
|
|
||||||
|
|
||||||
dialog.show();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void showColorPickerDialogForConversation(final QKActivity context, ConversationPrefsHelper prefs) {
|
public static void showColorPickerDialogForConversation(final QKActivity context, ConversationPrefsHelper prefs) {
|
||||||
|
showColorPicker(context, v -> {
|
||||||
|
prefs.putString(QKPreference.THEME.getKey(), "" + getColor());
|
||||||
|
LiveViewManager.refreshViews(QKPreference.CONVERSATION_THEME);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void showColorPicker(QKActivity context, View.OnClickListener saveListener) {
|
||||||
final QKDialog dialog = new QKDialog();
|
final QKDialog dialog = new QKDialog();
|
||||||
|
|
||||||
ColorPickerPalette palette = new ColorPickerPalette(context);
|
View view = LayoutInflater.from(mContext).inflate(R.layout.dialog_color_picker, null, false);
|
||||||
palette.setGravity(Gravity.CENTER);
|
ColorPickerViewHolder holder = new ColorPickerViewHolder(view);
|
||||||
palette.init(19, 4, color -> {
|
|
||||||
palette.init(getSwatch(color).length, 4, color2 -> {
|
|
||||||
prefs.putString(QKPreference.THEME.getKey(), "" + color2);
|
|
||||||
setActiveColor(color2);
|
|
||||||
LiveViewManager.refreshViews(QKPreference.CONVERSATION_THEME);
|
|
||||||
dialog.dismiss();
|
|
||||||
});
|
|
||||||
|
|
||||||
palette.drawPalette(getSwatch(color), prefs.getColor());
|
holder.mTab1.setBackgroundDrawable(getRippleBackground());
|
||||||
|
holder.mTab2.setBackgroundDrawable(getRippleBackground());
|
||||||
|
holder.mTab1.setOnClickListener(v -> holder.mPager.setCurrentItem(0));
|
||||||
|
holder.mTab2.setOnClickListener(v -> holder.mPager.setCurrentItem(1));
|
||||||
|
|
||||||
|
ColorPickerPagerAdapter adapter = new ColorPickerPagerAdapter(context);
|
||||||
|
holder.mPager.setAdapter(adapter);
|
||||||
|
holder.mPager.setOffscreenPageLimit(1);
|
||||||
|
holder.mPager.addOnPageChangeListener(new ViewPager.SimpleOnPageChangeListener() {
|
||||||
|
@Override
|
||||||
|
public void onPageSelected(int position) {
|
||||||
|
super.onPageSelected(position);
|
||||||
|
holder.mTab1.setTextColor(position == 0 ? getColor() : getTextOnBackgroundPrimary());
|
||||||
|
holder.mTab2.setTextColor(position == 1 ? getColor() : getTextOnBackgroundPrimary());
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
palette.drawPalette(PALETTE, getSwatchColor(prefs.getColor()));
|
int swatchColor = getSwatchColor(getColor());
|
||||||
|
holder.mPalette.init(19, 4, color -> {
|
||||||
|
holder.mPalette.init(getSwatch(color).length, 4, color2 -> {
|
||||||
|
setActiveColor(color2);
|
||||||
|
saveListener.onClick(null);
|
||||||
|
dialog.dismiss();
|
||||||
|
});
|
||||||
|
holder.mPalette.drawPalette(getSwatch(color), getColor());
|
||||||
|
});
|
||||||
|
holder.mPalette.drawPalette(PALETTE, swatchColor);
|
||||||
|
|
||||||
|
if (swatchColor == getColor()) { // If the current theme was set from the RGB picker, show that page instead
|
||||||
|
holder.mPager.setCurrentItem(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
SeekBar.OnSeekBarChangeListener seekListener = new SeekBar.OnSeekBarChangeListener() {
|
||||||
|
@Override
|
||||||
|
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
|
||||||
|
int color = getColor();
|
||||||
|
color = Color.rgb(seekBar == holder.mRed ? progress : Color.red(color),
|
||||||
|
seekBar == holder.mGreen ? progress : Color.green(color),
|
||||||
|
seekBar == holder.mBlue ? progress : Color.blue(color));
|
||||||
|
|
||||||
|
if (seekBar == holder.mRed) holder.mRedValue.setText(String.valueOf(progress));
|
||||||
|
if (seekBar == holder.mGreen) holder.mGreenValue.setText(String.valueOf(progress));
|
||||||
|
if (seekBar == holder.mBlue) holder.mBlueValue.setText(String.valueOf(progress));
|
||||||
|
|
||||||
|
setActiveColor(color);
|
||||||
|
String colorString = Integer.toHexString(color);
|
||||||
|
holder.mHex.setTextChangedListenerEnabled(false);
|
||||||
|
holder.mHex.setText(colorString.substring(colorString.length() > 6 ? colorString.length() - 6 : 0));
|
||||||
|
holder.mHex.setTextChangedListenerEnabled(true);
|
||||||
|
holder.mError.setVisibility(View.INVISIBLE);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onStartTrackingTouch(SeekBar seekBar) {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onStopTrackingTouch(SeekBar seekBar) {
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
Drawable thumbRed = ContextCompat.getDrawable(mContext, R.drawable.seek_thumb);
|
||||||
|
Drawable thumbGreen = ContextCompat.getDrawable(mContext, R.drawable.seek_thumb);
|
||||||
|
Drawable thumbBlue = ContextCompat.getDrawable(mContext, R.drawable.seek_thumb);
|
||||||
|
LiveViewManager.registerView(QKPreference.THEME, holder.mPreview, key -> {
|
||||||
|
holder.mPreview.setBackgroundColor(getColor());
|
||||||
|
holder.mRed.getProgressDrawable().setColorFilter(getColor(), PorterDuff.Mode.MULTIPLY);
|
||||||
|
holder.mGreen.getProgressDrawable().setColorFilter(getColor(), PorterDuff.Mode.MULTIPLY);
|
||||||
|
holder.mBlue.getProgressDrawable().setColorFilter(getColor(), PorterDuff.Mode.MULTIPLY);
|
||||||
|
if (holder.mPager.getCurrentItem() == 0) {
|
||||||
|
holder.mTab1.setTextColor(getColor());
|
||||||
|
} else {
|
||||||
|
holder.mTab2.setTextColor(getColor());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
LiveViewManager.registerView(QKPreference.BACKGROUND, holder.mHex, key -> {
|
||||||
|
holder.mHex.getBackground().setColorFilter(0x22888888, PorterDuff.Mode.MULTIPLY);
|
||||||
|
holder.mError.setColorFilter(getTextOnBackgroundSecondary(), PorterDuff.Mode.SRC_ATOP);
|
||||||
|
});
|
||||||
|
|
||||||
|
holder.mRed.setThumb(thumbRed);
|
||||||
|
holder.mRed.setOnSeekBarChangeListener(seekListener);
|
||||||
|
holder.mGreen.setThumb(thumbGreen);
|
||||||
|
holder.mGreen.setOnSeekBarChangeListener(seekListener);
|
||||||
|
holder.mBlue.setThumb(thumbBlue);
|
||||||
|
holder.mBlue.setOnSeekBarChangeListener(seekListener);
|
||||||
|
|
||||||
|
holder.mRed.setProgress(Color.red(getColor()));
|
||||||
|
holder.mGreen.setProgress(Color.green(getColor()));
|
||||||
|
holder.mBlue.setProgress(Color.blue(getColor()));
|
||||||
|
|
||||||
|
String colorString = Integer.toHexString(getColor());
|
||||||
|
holder.mHex.setText(colorString.substring(colorString.length() > 6 ? colorString.length() - 6 : 0));
|
||||||
|
holder.mHex.setOnEditorActionListener((v, actionId, event) -> {
|
||||||
|
if (actionId == EditorInfo.IME_ACTION_DONE) {
|
||||||
|
holder.mHex.clearFocus();
|
||||||
|
KeyboardUtils.hide(mContext, holder.mHex);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
holder.mHex.setTextChangedListener(s -> {
|
||||||
|
if (s.length() == 6) {
|
||||||
|
int color = Color.parseColor("#" + s.toString());
|
||||||
|
holder.mError.setVisibility(View.INVISIBLE);
|
||||||
|
if (color != getColor()) {
|
||||||
|
holder.mRed.setProgress(Color.red(color));
|
||||||
|
holder.mGreen.setProgress(Color.green(color));
|
||||||
|
holder.mBlue.setProgress(Color.blue(color));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
holder.mError.setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
dialog.setContext(context)
|
dialog.setContext(context)
|
||||||
.setTitle(R.string.pref_theme)
|
.setCustomView(view)
|
||||||
.setCustomView(palette)
|
.setNegativeButton(R.string.cancel, v -> setActiveColor(getThemeColor()))
|
||||||
.setNegativeButton(R.string.cancel, null);
|
.setPositiveButton(R.string.save, saveListener)
|
||||||
|
.show();
|
||||||
dialog.show();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
|
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
|
||||||
@@ -548,7 +682,7 @@ public class ThemeManager {
|
|||||||
getColorString(color)
|
getColorString(color)
|
||||||
);
|
);
|
||||||
|
|
||||||
int colorFrom = mColor;
|
int colorFrom = mActiveColor;
|
||||||
mColor = color;
|
mColor = color;
|
||||||
mActiveColor = color;
|
mActiveColor = color;
|
||||||
|
|
||||||
@@ -596,8 +730,10 @@ public class ThemeManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void setActiveColor(int color) {
|
public static void setActiveColor(int color) {
|
||||||
mActiveColor = color;
|
if (mActiveColor != color) {
|
||||||
LiveViewManager.refreshViews(QKPreference.THEME);
|
mActiveColor = color;
|
||||||
|
LiveViewManager.refreshViews(QKPreference.THEME);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static boolean isColorDarkEnough(int color) {
|
private static boolean isColorDarkEnough(int color) {
|
||||||
@@ -635,4 +771,25 @@ public class ThemeManager {
|
|||||||
|
|
||||||
return PALETTE;
|
return PALETTE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static class ColorPickerViewHolder {
|
||||||
|
@Bind(R.id.tab_1) QKTextView mTab1;
|
||||||
|
@Bind(R.id.tab_2) QKTextView mTab2;
|
||||||
|
@Bind(R.id.pager) ViewPager mPager;
|
||||||
|
@Bind(R.id.palette) ColorPickerPalette mPalette;
|
||||||
|
@Bind(R.id.preview) View mPreview;
|
||||||
|
@Bind(R.id.red) SeekBar mRed;
|
||||||
|
@Bind(R.id.red_value) QKTextView mRedValue;
|
||||||
|
@Bind(R.id.green) SeekBar mGreen;
|
||||||
|
@Bind(R.id.green_value) QKTextView mGreenValue;
|
||||||
|
@Bind(R.id.blue) SeekBar mBlue;
|
||||||
|
@Bind(R.id.blue_value) QKTextView mBlueValue;
|
||||||
|
@Bind(R.id.hex) QKEditText mHex;
|
||||||
|
@Bind(R.id.error) ImageView mError;
|
||||||
|
|
||||||
|
public ColorPickerViewHolder(View view) {
|
||||||
|
ButterKnife.bind(this, view);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,14 +14,11 @@ import com.moez.QKSMS.common.utils.DateFormatter;
|
|||||||
import com.moez.QKSMS.data.Contact;
|
import com.moez.QKSMS.data.Contact;
|
||||||
import com.moez.QKSMS.data.Conversation;
|
import com.moez.QKSMS.data.Conversation;
|
||||||
import com.moez.QKSMS.enums.QKPreference;
|
import com.moez.QKSMS.enums.QKPreference;
|
||||||
import com.moez.QKSMS.interfaces.LiveView;
|
|
||||||
import com.moez.QKSMS.ui.ThemeManager;
|
import com.moez.QKSMS.ui.ThemeManager;
|
||||||
import com.moez.QKSMS.ui.base.QKActivity;
|
import com.moez.QKSMS.ui.base.QKActivity;
|
||||||
import com.moez.QKSMS.ui.base.RecyclerCursorAdapter;
|
import com.moez.QKSMS.ui.base.RecyclerCursorAdapter;
|
||||||
import com.moez.QKSMS.ui.settings.SettingsFragment;
|
import com.moez.QKSMS.ui.settings.SettingsFragment;
|
||||||
|
|
||||||
import static com.moez.QKSMS.R.id.conversation;
|
|
||||||
|
|
||||||
public class ConversationListAdapter extends RecyclerCursorAdapter<ConversationListViewHolder, Conversation> {
|
public class ConversationListAdapter extends RecyclerCursorAdapter<ConversationListViewHolder, Conversation> {
|
||||||
|
|
||||||
|
|
||||||
@@ -53,6 +50,10 @@ public class ConversationListAdapter extends RecyclerCursorAdapter<ConversationL
|
|||||||
holder.errorIndicator.setColorFilter(ThemeManager.getColor());
|
holder.errorIndicator.setColorFilter(ThemeManager.getColor());
|
||||||
});
|
});
|
||||||
|
|
||||||
|
LiveViewManager.registerView(QKPreference.BACKGROUND, this, key -> {
|
||||||
|
holder.root.setBackgroundDrawable(ThemeManager.getRippleBackground());
|
||||||
|
});
|
||||||
|
|
||||||
return holder;
|
return holder;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -105,8 +106,9 @@ public class ConversationListAdapter extends RecyclerCursorAdapter<ConversationL
|
|||||||
holder.mSelected.setVisibility(View.GONE);
|
holder.mSelected.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
LiveViewManager.registerView(QKPreference.HIDE_AVATAR_CONVERSATIONS, this, key ->
|
LiveViewManager.registerView(QKPreference.HIDE_AVATAR_CONVERSATIONS, this, key -> {
|
||||||
holder.mAvatarView.setVisibility(QKPreferences.getBoolean(QKPreference.HIDE_AVATAR_CONVERSATIONS) ? View.GONE : View.VISIBLE));
|
holder.mAvatarView.setVisibility(QKPreferences.getBoolean(QKPreference.HIDE_AVATAR_CONVERSATIONS) ? View.GONE : View.VISIBLE);
|
||||||
|
});
|
||||||
|
|
||||||
// Date
|
// Date
|
||||||
holder.dateView.setText(DateFormatter.getConversationTimestamp(mContext, conversation.getDate()));
|
holder.dateView.setText(DateFormatter.getConversationTimestamp(mContext, conversation.getDate()));
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import com.moez.QKSMS.R;
|
|||||||
import com.moez.QKSMS.data.Contact;
|
import com.moez.QKSMS.data.Contact;
|
||||||
import com.moez.QKSMS.data.Conversation;
|
import com.moez.QKSMS.data.Conversation;
|
||||||
import com.moez.QKSMS.data.ConversationLegacy;
|
import com.moez.QKSMS.data.ConversationLegacy;
|
||||||
import com.moez.QKSMS.ui.MainActivity;
|
|
||||||
import com.moez.QKSMS.ui.ThemeManager;
|
import com.moez.QKSMS.ui.ThemeManager;
|
||||||
import com.moez.QKSMS.ui.base.ClickyViewHolder;
|
import com.moez.QKSMS.ui.base.ClickyViewHolder;
|
||||||
import com.moez.QKSMS.ui.base.QKActivity;
|
import com.moez.QKSMS.ui.base.QKActivity;
|
||||||
|
|||||||
@@ -208,7 +208,7 @@ public class DeliveryReportHelper {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (reportReqs.size() == 0) {
|
if (reportReqs.isEmpty()) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,57 @@
|
|||||||
|
package com.moez.QKSMS.ui.dialog;
|
||||||
|
|
||||||
|
import android.support.v4.view.PagerAdapter;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import com.moez.QKSMS.R;
|
||||||
|
import com.moez.QKSMS.ui.base.QKActivity;
|
||||||
|
|
||||||
|
public class ColorPickerPagerAdapter extends PagerAdapter {
|
||||||
|
|
||||||
|
private QKActivity mContext;
|
||||||
|
|
||||||
|
public ColorPickerPagerAdapter(QKActivity context) {
|
||||||
|
mContext = context;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object instantiateItem(ViewGroup collection, int position) {
|
||||||
|
int resId = 0;
|
||||||
|
switch (position) {
|
||||||
|
case 0:
|
||||||
|
resId = R.id.palette;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 1:
|
||||||
|
resId = R.id.rgb;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return collection.findViewById(resId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CharSequence getPageTitle(int position) {
|
||||||
|
int resId = 0;
|
||||||
|
switch (position) {
|
||||||
|
case 0:
|
||||||
|
resId = R.string.title_palette;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 1:
|
||||||
|
resId = R.string.title_rgb;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return mContext.getString(resId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getCount() {
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isViewFromObject(View arg0, Object arg1) {
|
||||||
|
return arg0 == ((View) arg1);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -24,7 +24,9 @@ import android.widget.LinearLayout;
|
|||||||
import android.widget.ListView;
|
import android.widget.ListView;
|
||||||
import android.widget.ScrollView;
|
import android.widget.ScrollView;
|
||||||
import com.moez.QKSMS.R;
|
import com.moez.QKSMS.R;
|
||||||
|
import com.moez.QKSMS.common.LiveViewManager;
|
||||||
import com.moez.QKSMS.common.utils.Units;
|
import com.moez.QKSMS.common.utils.Units;
|
||||||
|
import com.moez.QKSMS.enums.QKPreference;
|
||||||
import com.moez.QKSMS.ui.ThemeManager;
|
import com.moez.QKSMS.ui.ThemeManager;
|
||||||
import com.moez.QKSMS.ui.base.QKActivity;
|
import com.moez.QKSMS.ui.base.QKActivity;
|
||||||
import com.moez.QKSMS.ui.view.QKTextView;
|
import com.moez.QKSMS.ui.view.QKTextView;
|
||||||
@@ -130,8 +132,10 @@ public class QKDialog extends DialogFragment {
|
|||||||
mPositiveButtonView = (QKTextView) view.findViewById(R.id.buttonPositive);
|
mPositiveButtonView = (QKTextView) view.findViewById(R.id.buttonPositive);
|
||||||
mPositiveButtonView.setVisibility(View.VISIBLE);
|
mPositiveButtonView.setVisibility(View.VISIBLE);
|
||||||
mPositiveButtonView.setText(mPositiveButtonText);
|
mPositiveButtonView.setText(mPositiveButtonText);
|
||||||
mPositiveButtonView.setTextColor(ThemeManager.getColor());
|
|
||||||
mPositiveButtonView.setOnClickListener(mPositiveButtonClickListener);
|
mPositiveButtonView.setOnClickListener(mPositiveButtonClickListener);
|
||||||
|
LiveViewManager.registerView(QKPreference.THEME, mPositiveButtonView, key -> {
|
||||||
|
mPositiveButtonView.setTextColor(ThemeManager.getColor());
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mNeutralButtonEnabled) {
|
if (mNeutralButtonEnabled) {
|
||||||
|
|||||||
@@ -207,7 +207,7 @@ public class MMSSetupFragment extends QKFragment implements DialogFragmentListen
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void showConfigurationDialog() {
|
private void showConfigurationDialog() {
|
||||||
if (mAPNs.size() == 0) {
|
if (mAPNs.isEmpty()) {
|
||||||
// Give the user a support channel and further instructions if automatic
|
// Give the user a support channel and further instructions if automatic
|
||||||
// configuration failed.
|
// configuration failed.
|
||||||
launchDialog(NO_CONFIGURATIONS_FOUND);
|
launchDialog(NO_CONFIGURATIONS_FOUND);
|
||||||
|
|||||||
@@ -165,6 +165,8 @@ public class MessageListAdapter extends RecyclerCursorAdapter<MessageListViewHol
|
|||||||
}
|
}
|
||||||
|
|
||||||
LiveViewManager.registerView(QKPreference.BACKGROUND, this, key -> {
|
LiveViewManager.registerView(QKPreference.BACKGROUND, this, key -> {
|
||||||
|
holder.mRoot.setBackgroundDrawable(ThemeManager.getRippleBackground());
|
||||||
|
holder.mSlideShowButton.setBackgroundDrawable(ThemeManager.getRippleBackground());
|
||||||
holder.mMmsView.getForeground().setColorFilter(ThemeManager.getBackgroundColor(), PorterDuff.Mode.SRC_ATOP);
|
holder.mMmsView.getForeground().setColorFilter(ThemeManager.getBackgroundColor(), PorterDuff.Mode.SRC_ATOP);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -280,7 +282,7 @@ public class MessageListAdapter extends RecyclerCursorAdapter<MessageListViewHol
|
|||||||
|
|
||||||
MessageItem messageItem2 = getItem(position + 1);
|
MessageItem messageItem2 = getItem(position + 1);
|
||||||
|
|
||||||
if(mPrefs.getBoolean(SettingsFragment.FORCE_TIMESTAMPS, false)) {
|
if (mPrefs.getBoolean(SettingsFragment.FORCE_TIMESTAMPS, false)) {
|
||||||
return true;
|
return true;
|
||||||
} else if (messageItem.mDeliveryStatus != MessageItem.DeliveryStatus.NONE) {
|
} else if (messageItem.mDeliveryStatus != MessageItem.DeliveryStatus.NONE) {
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -9,7 +9,10 @@ import android.view.LayoutInflater;
|
|||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import com.moez.QKSMS.R;
|
import com.moez.QKSMS.R;
|
||||||
|
import com.moez.QKSMS.common.LiveViewManager;
|
||||||
import com.moez.QKSMS.common.utils.DateFormatter;
|
import com.moez.QKSMS.common.utils.DateFormatter;
|
||||||
|
import com.moez.QKSMS.enums.QKPreference;
|
||||||
|
import com.moez.QKSMS.ui.ThemeManager;
|
||||||
import com.moez.QKSMS.ui.base.QKActivity;
|
import com.moez.QKSMS.ui.base.QKActivity;
|
||||||
import com.moez.QKSMS.ui.base.RecyclerCursorAdapter;
|
import com.moez.QKSMS.ui.base.RecyclerCursorAdapter;
|
||||||
|
|
||||||
@@ -37,6 +40,11 @@ public class SearchAdapter extends RecyclerCursorAdapter<SearchViewHolder, Searc
|
|||||||
public SearchViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
public SearchViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||||
LayoutInflater inflater = LayoutInflater.from(mContext);
|
LayoutInflater inflater = LayoutInflater.from(mContext);
|
||||||
View view = inflater.inflate(R.layout.list_item_search, parent, false);
|
View view = inflater.inflate(R.layout.list_item_search, parent, false);
|
||||||
|
|
||||||
|
LiveViewManager.registerView(QKPreference.BACKGROUND, this, key -> {
|
||||||
|
view.setBackgroundDrawable(ThemeManager.getRippleBackground());
|
||||||
|
});
|
||||||
|
|
||||||
return new SearchViewHolder(mContext, view);
|
return new SearchViewHolder(mContext, view);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ public class SettingsFragment extends PreferenceFragment implements Preference.O
|
|||||||
public static final String CATEGORY_APPEARANCE_SYSTEM_BARS = "pref_key_category_appearance_system_bars";
|
public static final String CATEGORY_APPEARANCE_SYSTEM_BARS = "pref_key_category_appearance_system_bars";
|
||||||
|
|
||||||
public static final String THEME = "pref_key_theme";
|
public static final String THEME = "pref_key_theme";
|
||||||
public static final String ICON = "pref_key_icon";
|
public static final String ICON = "pref_key_icon_dark";
|
||||||
public static final String STATUS_TINT = "pref_key_status_tint";
|
public static final String STATUS_TINT = "pref_key_status_tint";
|
||||||
public static final String NAVIGATION_TINT = "pref_key_navigation_tint";
|
public static final String NAVIGATION_TINT = "pref_key_navigation_tint";
|
||||||
public static final String BACKGROUND = "pref_key_background";
|
public static final String BACKGROUND = "pref_key_background";
|
||||||
@@ -121,7 +121,6 @@ public class SettingsFragment extends PreferenceFragment implements Preference.O
|
|||||||
public static final String SPLIT_COUNTER = "pref_key_split_counter";
|
public static final String SPLIT_COUNTER = "pref_key_split_counter";
|
||||||
public static final String LONG_AS_MMS = "pref_key_long_as_mms";
|
public static final String LONG_AS_MMS = "pref_key_long_as_mms";
|
||||||
public static final String LONG_AS_MMS_AFTER = "pref_key_long_as_mms_after";
|
public static final String LONG_AS_MMS_AFTER = "pref_key_long_as_mms_after";
|
||||||
public static final String TIMESTAMPS_24H = "pref_key_24h";
|
|
||||||
public static final String NOTIFICATIONS = "pref_key_notifications";
|
public static final String NOTIFICATIONS = "pref_key_notifications";
|
||||||
public static final String NOTIFICATION_LED = "pref_key_led";
|
public static final String NOTIFICATION_LED = "pref_key_led";
|
||||||
public static final String NOTIFICATION_LED_COLOR = "pref_key_theme_led";
|
public static final String NOTIFICATION_LED_COLOR = "pref_key_theme_led";
|
||||||
@@ -426,6 +425,9 @@ public class SettingsFragment extends PreferenceFragment implements Preference.O
|
|||||||
case BACKGROUND:
|
case BACKGROUND:
|
||||||
ThemeManager.setTheme(ThemeManager.Theme.fromString((String) newValue));
|
ThemeManager.setTheme(ThemeManager.Theme.fromString((String) newValue));
|
||||||
break;
|
break;
|
||||||
|
case ICON:
|
||||||
|
ThemeManager.setIcon(mContext, (Boolean) newValue);
|
||||||
|
break;
|
||||||
case STATUS_TINT:
|
case STATUS_TINT:
|
||||||
ThemeManager.setStatusBarTintEnabled(mContext, (Boolean) newValue);
|
ThemeManager.setStatusBarTintEnabled(mContext, (Boolean) newValue);
|
||||||
break;
|
break;
|
||||||
@@ -569,9 +571,6 @@ public class SettingsFragment extends PreferenceFragment implements Preference.O
|
|||||||
case BUBBLES:
|
case BUBBLES:
|
||||||
new BubblePreferenceDialog().setContext(mContext).show();
|
new BubblePreferenceDialog().setContext(mContext).show();
|
||||||
break;
|
break;
|
||||||
case ICON:
|
|
||||||
ThemeManager.setIcon(mContext);
|
|
||||||
break;
|
|
||||||
case BLOCKED_FUTURE:
|
case BLOCKED_FUTURE:
|
||||||
BlockedNumberDialog.showDialog(mContext);
|
BlockedNumberDialog.showDialog(mContext);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ public class TimePickerFragment extends DialogFragment implements TimePickerDial
|
|||||||
|
|
||||||
int hour = c.get(Calendar.HOUR_OF_DAY);
|
int hour = c.get(Calendar.HOUR_OF_DAY);
|
||||||
int minute = c.get(Calendar.MINUTE);
|
int minute = c.get(Calendar.MINUTE);
|
||||||
boolean isUsing24HourTime = mPrefs.getBoolean(SettingsFragment.TIMESTAMPS_24H, DateFormat.is24HourFormat(getActivity()));
|
boolean isUsing24HourTime = DateFormat.is24HourFormat(getActivity());
|
||||||
return new TimePickerDialog(getActivity(), this, hour, minute, isUsing24HourTime);
|
return new TimePickerDialog(getActivity(), this, hour, minute, isUsing24HourTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ public class QKEditText extends android.widget.EditText {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private Context mContext;
|
private Context mContext;
|
||||||
|
private boolean mTextChangedListenerEnabled = true;
|
||||||
|
|
||||||
public QKEditText(Context context) {
|
public QKEditText(Context context) {
|
||||||
super(context);
|
super(context);
|
||||||
@@ -77,6 +78,10 @@ public class QKEditText extends android.widget.EditText {
|
|||||||
super.setText(text, type);
|
super.setText(text, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setTextChangedListenerEnabled(boolean textChangedListenerEnabled) {
|
||||||
|
mTextChangedListenerEnabled = textChangedListenerEnabled;
|
||||||
|
}
|
||||||
|
|
||||||
public void setTextChangedListener(final TextChangedListener listener) {
|
public void setTextChangedListener(final TextChangedListener listener) {
|
||||||
if (listener != null) {
|
if (listener != null) {
|
||||||
addTextChangedListener(new TextWatcher() {
|
addTextChangedListener(new TextWatcher() {
|
||||||
@@ -91,7 +96,9 @@ public class QKEditText extends android.widget.EditText {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void afterTextChanged(Editable s) {
|
public void afterTextChanged(Editable s) {
|
||||||
listener.onTextChanged(s);
|
if (mTextChangedListenerEnabled) {
|
||||||
|
listener.onTextChanged(s);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ public class ColorPickerDialog extends DialogFragment implements ColorPickerSwat
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Dialog onCreateDialog(Bundle bundle) {
|
public Dialog onCreateDialog(Bundle bundle) {
|
||||||
View view = LayoutInflater.from(getActivity()).inflate(R.layout.dialog_color_picker, null);
|
View view = LayoutInflater.from(getActivity()).inflate(R.layout.dialog_color_picker_led, null);
|
||||||
mProgress = ((ProgressBar) view.findViewById(android.R.id.progress));
|
mProgress = ((ProgressBar) view.findViewById(android.R.id.progress));
|
||||||
mPalette = ((ColorPickerPalette) view.findViewById(R.id.color_picker));
|
mPalette = ((ColorPickerPalette) view.findViewById(R.id.color_picker));
|
||||||
mPalette.init(mSize, mColumns, this);
|
mPalette.init(mSize, mColumns, this);
|
||||||
|
|||||||
@@ -1,21 +1,9 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<item
|
|
||||||
android:id="@+id/edittext_background">
|
|
||||||
<shape android:shape="rectangle" >
|
|
||||||
<solid android:color="@color/red_light" />
|
|
||||||
<padding android:bottom="1dp" />
|
|
||||||
</shape>
|
|
||||||
</item>
|
|
||||||
|
|
||||||
<item>
|
<item>
|
||||||
<shape android:shape="rectangle" >
|
<shape android:shape="rectangle">
|
||||||
<solid android:color="@color/white_pure"/>
|
<solid android:color="@color/white_pure" />
|
||||||
<padding android:bottom="4dp"
|
<corners android:radius="2dp" />
|
||||||
android:left="4dp"
|
|
||||||
android:right="4dp"
|
|
||||||
android:top="4dp" />
|
|
||||||
</shape>
|
</shape>
|
||||||
</item>
|
</item>
|
||||||
|
|
||||||
</layer-list>
|
</layer-list>
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item>
|
||||||
|
<shape android:shape="oval">
|
||||||
|
<solid android:color="@color/grey_light_ultra" />
|
||||||
|
<size
|
||||||
|
android:width="16dp"
|
||||||
|
android:height="16dp" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
</layer-list>
|
||||||
@@ -1,31 +1,208 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="wrap_content"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_height="wrap_content"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_gravity="center"
|
android:layout_width="match_parent"
|
||||||
android:gravity="center">
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
<FrameLayout
|
<LinearLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="48dp"
|
||||||
android:layout_gravity="center_horizontal"
|
android:paddingLeft="16dp"
|
||||||
android:gravity="center"
|
android:paddingRight="16dp">
|
||||||
android:padding="28dp">
|
|
||||||
|
|
||||||
<ProgressBar
|
<com.moez.QKSMS.ui.view.QKTextView
|
||||||
android:id="@android:id/progress"
|
android:id="@+id/tab_1"
|
||||||
style="?android:attr/progressBarStyleLarge"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent"
|
||||||
android:layout_gravity="center"
|
android:gravity="center"
|
||||||
android:gravity="center" />
|
android:paddingLeft="16dp"
|
||||||
|
android:paddingRight="16dp"
|
||||||
|
android:text="@string/title_palette"
|
||||||
|
app:type="primary_bold" />
|
||||||
|
|
||||||
|
<com.moez.QKSMS.ui.view.QKTextView
|
||||||
|
android:id="@+id/tab_2"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:gravity="center"
|
||||||
|
android:paddingLeft="16dp"
|
||||||
|
android:paddingRight="16dp"
|
||||||
|
android:text="@string/title_rgb"
|
||||||
|
app:type="primary_bold" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<android.support.v4.view.ViewPager
|
||||||
|
android:id="@+id/pager"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="320dp">
|
||||||
|
|
||||||
<com.moez.QKSMS.ui.view.colorpicker.ColorPickerPalette
|
<com.moez.QKSMS.ui.view.colorpicker.ColorPickerPalette
|
||||||
android:id="@+id/color_picker"
|
android:id="@+id/palette"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent"
|
||||||
android:layout_gravity="center"
|
android:gravity="center" />
|
||||||
android:gravity="center"
|
|
||||||
android:visibility="gone" />
|
<LinearLayout
|
||||||
</FrameLayout>
|
android:id="@+id/rgb"
|
||||||
</ScrollView>
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/preview"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="128dp"
|
||||||
|
android:background="#e2e28e" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="36dp"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:gravity="center_vertical">
|
||||||
|
|
||||||
|
<com.moez.QKSMS.ui.view.QKTextView
|
||||||
|
android:layout_width="24dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="16dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:lines="1"
|
||||||
|
android:text="R"
|
||||||
|
app:type="secondary"
|
||||||
|
tools:ignore="HardcodedText" />
|
||||||
|
|
||||||
|
<SeekBar
|
||||||
|
android:id="@+id/red"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:max="255" />
|
||||||
|
|
||||||
|
<com.moez.QKSMS.ui.view.QKTextView
|
||||||
|
android:id="@+id/red_value"
|
||||||
|
android:layout_width="36dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginRight="16dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:lines="1"
|
||||||
|
app:type="primary"
|
||||||
|
tools:text="41" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="36dp"
|
||||||
|
android:gravity="center_vertical">
|
||||||
|
|
||||||
|
<com.moez.QKSMS.ui.view.QKTextView
|
||||||
|
android:layout_width="24dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="16dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:lines="1"
|
||||||
|
android:text="G"
|
||||||
|
app:type="secondary"
|
||||||
|
tools:ignore="HardcodedText" />
|
||||||
|
|
||||||
|
<SeekBar
|
||||||
|
android:id="@+id/green"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:max="255" />
|
||||||
|
|
||||||
|
<com.moez.QKSMS.ui.view.QKTextView
|
||||||
|
android:id="@+id/green_value"
|
||||||
|
android:layout_width="36dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginRight="16dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:lines="1"
|
||||||
|
app:type="primary"
|
||||||
|
tools:text="22" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="36dp"
|
||||||
|
android:layout_marginBottom="16dp"
|
||||||
|
android:gravity="center_vertical">
|
||||||
|
|
||||||
|
<com.moez.QKSMS.ui.view.QKTextView
|
||||||
|
android:layout_width="24dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="16dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:lines="1"
|
||||||
|
android:text="B"
|
||||||
|
app:type="secondary"
|
||||||
|
tools:ignore="HardcodedText" />
|
||||||
|
|
||||||
|
<SeekBar
|
||||||
|
android:id="@+id/blue"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:max="255" />
|
||||||
|
|
||||||
|
<com.moez.QKSMS.ui.view.QKTextView
|
||||||
|
android:id="@+id/blue_value"
|
||||||
|
android:layout_width="36dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginRight="16dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:lines="1"
|
||||||
|
app:type="primary"
|
||||||
|
tools:text="231" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:focusableInTouchMode="true"
|
||||||
|
android:gravity="center_vertical">
|
||||||
|
|
||||||
|
<com.moez.QKSMS.ui.view.QKTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="16dp"
|
||||||
|
android:text="@string/hint_hex"
|
||||||
|
app:type="primary" />
|
||||||
|
|
||||||
|
<com.moez.QKSMS.ui.view.QKEditText
|
||||||
|
android:id="@+id/hex"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="8dp"
|
||||||
|
android:layout_marginRight="8dp"
|
||||||
|
android:background="@drawable/edittext"
|
||||||
|
android:digits="1234567890abcdef"
|
||||||
|
android:imeOptions="actionDone"
|
||||||
|
android:lines="1"
|
||||||
|
android:maxLength="6"
|
||||||
|
android:paddingBottom="8dp"
|
||||||
|
android:paddingLeft="16dp"
|
||||||
|
android:paddingRight="16dp"
|
||||||
|
android:paddingTop="8dp"
|
||||||
|
android:selectAllOnFocus="true"
|
||||||
|
android:singleLine="true" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/error"
|
||||||
|
android:layout_width="24dp"
|
||||||
|
android:layout_height="24dp"
|
||||||
|
android:src="@drawable/ic_error"
|
||||||
|
android:visibility="invisible" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</android.support.v4.view.ViewPager>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:gravity="center">
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:gravity="center"
|
||||||
|
android:padding="28dp">
|
||||||
|
|
||||||
|
<ProgressBar
|
||||||
|
android:id="@android:id/progress"
|
||||||
|
style="?android:attr/progressBarStyleLarge"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:gravity="center" />
|
||||||
|
|
||||||
|
<com.moez.QKSMS.ui.view.colorpicker.ColorPickerPalette
|
||||||
|
android:id="@+id/color_picker"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:gravity="center"
|
||||||
|
android:visibility="gone" />
|
||||||
|
</FrameLayout>
|
||||||
|
</ScrollView>
|
||||||
@@ -30,7 +30,6 @@
|
|||||||
android:id="@+id/donate_1"
|
android:id="@+id/donate_1"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?android:attr/selectableItemBackground"
|
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:padding="8dp">
|
android:padding="8dp">
|
||||||
|
|
||||||
@@ -52,7 +51,6 @@
|
|||||||
android:id="@+id/donate_5"
|
android:id="@+id/donate_5"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?android:attr/selectableItemBackground"
|
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:padding="8dp">
|
android:padding="8dp">
|
||||||
|
|
||||||
@@ -74,7 +72,6 @@
|
|||||||
android:id="@+id/donate_10"
|
android:id="@+id/donate_10"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?android:attr/selectableItemBackground"
|
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:padding="8dp">
|
android:padding="8dp">
|
||||||
|
|
||||||
@@ -104,7 +101,6 @@
|
|||||||
android:id="@+id/donate_paypal"
|
android:id="@+id/donate_paypal"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?android:attr/selectableItemBackground"
|
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:padding="8dp">
|
android:padding="8dp">
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:animateLayoutChanges="true"
|
android:animateLayoutChanges="true"
|
||||||
android:background="?android:attr/selectableItemBackground"
|
|
||||||
android:gravity="top"
|
android:gravity="top"
|
||||||
android:minHeight="72dp"
|
android:minHeight="72dp"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?android:attr/selectableItemBackground"
|
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:paddingTop="2dp">
|
android:paddingTop="2dp">
|
||||||
|
|
||||||
@@ -77,7 +76,6 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:background="@drawable/button_background_transparent"
|
|
||||||
android:padding="16dp"
|
android:padding="16dp"
|
||||||
android:src="@drawable/ic_play"
|
android:src="@drawable/ic_play"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?android:attr/selectableItemBackground"
|
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:paddingTop="2dp">
|
android:paddingTop="2dp">
|
||||||
|
|
||||||
@@ -77,7 +76,6 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:background="@drawable/button_background_transparent"
|
|
||||||
android:padding="16dp"
|
android:padding="16dp"
|
||||||
android:src="@drawable/ic_play"
|
android:src="@drawable/ic_play"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?android:attr/selectableItemBackground"
|
|
||||||
android:gravity="top"
|
android:gravity="top"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:paddingBottom="8dp"
|
android:paddingBottom="8dp"
|
||||||
|
|||||||
@@ -142,7 +142,7 @@
|
|||||||
android:id="@+id/attach"
|
android:id="@+id/attach"
|
||||||
android:layout_width="56dp"
|
android:layout_width="56dp"
|
||||||
android:layout_height="56dp"
|
android:layout_height="56dp"
|
||||||
android:background="@drawable/button_background_transparent_light"
|
android:background="@drawable/ripple_light"
|
||||||
android:padding="16dp"
|
android:padding="16dp"
|
||||||
android:src="@drawable/ic_photo" />
|
android:src="@drawable/ic_photo" />
|
||||||
|
|
||||||
@@ -150,7 +150,7 @@
|
|||||||
android:id="@+id/camera"
|
android:id="@+id/camera"
|
||||||
android:layout_width="56dp"
|
android:layout_width="56dp"
|
||||||
android:layout_height="56dp"
|
android:layout_height="56dp"
|
||||||
android:background="@drawable/button_background_transparent_light"
|
android:background="@drawable/ripple_light"
|
||||||
android:padding="16dp"
|
android:padding="16dp"
|
||||||
android:src="@drawable/ic_camera" />
|
android:src="@drawable/ic_camera" />
|
||||||
|
|
||||||
@@ -158,7 +158,7 @@
|
|||||||
android:id="@+id/delay"
|
android:id="@+id/delay"
|
||||||
android:layout_width="56dp"
|
android:layout_width="56dp"
|
||||||
android:layout_height="56dp"
|
android:layout_height="56dp"
|
||||||
android:background="@drawable/button_background_transparent_light"
|
android:background="@drawable/ripple_light"
|
||||||
android:padding="16dp"
|
android:padding="16dp"
|
||||||
android:src="@drawable/ic_timer" />
|
android:src="@drawable/ic_timer" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
android:id="@+id/widget_compose"
|
android:id="@+id/widget_compose"
|
||||||
android:layout_width="56dp"
|
android:layout_width="56dp"
|
||||||
android:layout_height="56dp"
|
android:layout_height="56dp"
|
||||||
android:background="@drawable/button_background_transparent"
|
android:background="@drawable/ripple"
|
||||||
android:contentDescription="@string/new_message"
|
android:contentDescription="@string/new_message"
|
||||||
android:padding="16dp"
|
android:padding="16dp"
|
||||||
android:src="@drawable/ic_compose" />
|
android:src="@drawable/ic_compose" />
|
||||||
|
|||||||
|
After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 9.7 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 10 KiB |
@@ -19,6 +19,7 @@
|
|||||||
<string name="hint_reply">Enter a message</string>
|
<string name="hint_reply">Enter a message</string>
|
||||||
<!--Hint for code redemption-->
|
<!--Hint for code redemption-->
|
||||||
<string name="hint_redeem">Enter code</string>
|
<string name="hint_redeem">Enter code</string>
|
||||||
|
<string name="hint_hex">Hex</string>
|
||||||
|
|
||||||
<!--Text shown for single new message in notification-->
|
<!--Text shown for single new message in notification-->
|
||||||
<string name="new_message">New message</string>
|
<string name="new_message">New message</string>
|
||||||
@@ -124,8 +125,8 @@
|
|||||||
|
|
||||||
<string name="pref_theme">Theme color</string>
|
<string name="pref_theme">Theme color</string>
|
||||||
<string name="pref_theme_summary_alt">Tap to change theme</string>
|
<string name="pref_theme_summary_alt">Tap to change theme</string>
|
||||||
<string name="pref_icon">Update QKSMS icon color</string>
|
<string name="pref_icon_dark">Use dark icon</string>
|
||||||
<string name="pref_icon_summary">Update the QKSMS icon to match your theme color</string>
|
<string name="pref_icon_dark_summary">Use the dark version of the QKSMS icon on your homescreen, to better match your wallpaper</string>
|
||||||
<string name="pref_status_tint">Tinted status bar</string>
|
<string name="pref_status_tint">Tinted status bar</string>
|
||||||
<string name="pref_navigation_tint">Tinted navigation bar</string>
|
<string name="pref_navigation_tint">Tinted navigation bar</string>
|
||||||
<string name="pref_background">Background color</string>
|
<string name="pref_background">Background color</string>
|
||||||
@@ -203,8 +204,6 @@
|
|||||||
<string name="pref_long_as_mms_summary">Send long messages as MMS instead of splitting them</string>
|
<string name="pref_long_as_mms_summary">Send long messages as MMS instead of splitting them</string>
|
||||||
<string name="pref_long_as_mms_after">Send long as MMS after</string>
|
<string name="pref_long_as_mms_after">Send long as MMS after</string>
|
||||||
<string name="pref_long_as_mms_after_summary">Send long messages as MMS when they exceed the length of a number of messages</string>
|
<string name="pref_long_as_mms_after_summary">Send long messages as MMS when they exceed the length of a number of messages</string>
|
||||||
<string name="pref_24h">24h time</string>
|
|
||||||
<string name="pref_24h_summary">Display timestamps in 24-hour format</string>
|
|
||||||
<string name="pref_return">Show return button</string>
|
<string name="pref_return">Show return button</string>
|
||||||
<string name="pref_return_summary">Show return key on keyboard instead of Emoji button</string>
|
<string name="pref_return_summary">Show return key on keyboard instead of Emoji button</string>
|
||||||
<string name="pref_text">Text</string>
|
<string name="pref_text">Text</string>
|
||||||
@@ -321,6 +320,8 @@
|
|||||||
<string name="title_block_address">Block number</string>
|
<string name="title_block_address">Block number</string>
|
||||||
<string name="title_unblock_address">Unblock number</string>
|
<string name="title_unblock_address">Unblock number</string>
|
||||||
<string name="title_conversations_selected">%s selected</string>
|
<string name="title_conversations_selected">%s selected</string>
|
||||||
|
<string name="title_palette">Palette</string>
|
||||||
|
<string name="title_rgb">RGB</string>
|
||||||
|
|
||||||
<!-- Menu shown in the context menu when long pressing on a message when the message contains
|
<!-- Menu shown in the context menu when long pressing on a message when the message contains
|
||||||
one or more phone numbers and/or email addresses and the number or email is new to
|
one or more phone numbers and/or email addresses and the number or email is new to
|
||||||
@@ -588,7 +589,7 @@
|
|||||||
<!-- Dialog title for updating app icon color -->
|
<!-- Dialog title for updating app icon color -->
|
||||||
<string name="update_icon_title">Update icon color</string>
|
<string name="update_icon_title">Update icon color</string>
|
||||||
<!-- Dialog message for updating app icon color -->
|
<!-- Dialog message for updating app icon color -->
|
||||||
<string name="update_icon_message">QKSMS must be restarted when changing the icon color. Restart now?</string>
|
<string name="update_icon_message">QKSMS must be restarted when changing the icon color</string>
|
||||||
|
|
||||||
<string name="dialog_conversation_details_title">Conversation details</string>
|
<string name="dialog_conversation_details_title">Conversation details</string>
|
||||||
<string name="dialog_conversation_details_last_message_date">Last message date</string>
|
<string name="dialog_conversation_details_last_message_date">Last message date</string>
|
||||||
|
|||||||
@@ -19,9 +19,4 @@
|
|||||||
<item name="type">tertiary</item>
|
<item name="type">tertiary</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="ButtonStyle">
|
|
||||||
<item name="android:background">?android:attr/selectableItemBackground</item>
|
|
||||||
<item name="android:soundEffectsEnabled">true</item>
|
|
||||||
</style>
|
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -3,7 +3,8 @@
|
|||||||
<Preference
|
<Preference
|
||||||
android:defaultValue="-16746133"
|
android:defaultValue="-16746133"
|
||||||
android:key="pref_key_theme" />
|
android:key="pref_key_theme" />
|
||||||
<Preference android:key="pref_key_icon" />
|
<Preference
|
||||||
|
android:key="pref_key_icon_dark" />
|
||||||
<Preference
|
<Preference
|
||||||
android:defaultValue="@bool/hasL"
|
android:defaultValue="@bool/hasL"
|
||||||
android:key="pref_key_status_tint" />
|
android:key="pref_key_status_tint" />
|
||||||
|
|||||||
@@ -10,12 +10,13 @@
|
|||||||
android:layout="@layout/list_item_preference"
|
android:layout="@layout/list_item_preference"
|
||||||
android:summary="@string/pref_theme_summary_alt"
|
android:summary="@string/pref_theme_summary_alt"
|
||||||
android:title="@string/pref_theme" />
|
android:title="@string/pref_theme" />
|
||||||
<Preference
|
<CheckBoxPreference
|
||||||
android:defaultValue="-16746133"
|
android:defaultValue="false"
|
||||||
android:key="pref_key_icon"
|
android:key="pref_key_icon_dark"
|
||||||
android:layout="@layout/list_item_preference"
|
android:layout="@layout/list_item_preference"
|
||||||
android:summary="@string/pref_icon_summary"
|
android:summary="@string/pref_icon_dark_summary"
|
||||||
android:title="@string/pref_icon" />
|
android:title="@string/pref_icon_dark"
|
||||||
|
android:widgetLayout="@layout/view_switch" />
|
||||||
<ListPreference
|
<ListPreference
|
||||||
android:defaultValue="light"
|
android:defaultValue="light"
|
||||||
android:entries="@array/background_titles"
|
android:entries="@array/background_titles"
|
||||||
@@ -135,12 +136,5 @@
|
|||||||
android:summary="@string/pref_message_count_summary"
|
android:summary="@string/pref_message_count_summary"
|
||||||
android:title="@string/pref_message_count"
|
android:title="@string/pref_message_count"
|
||||||
android:widgetLayout="@layout/view_switch" />
|
android:widgetLayout="@layout/view_switch" />
|
||||||
<CheckBoxPreference
|
|
||||||
android:defaultValue="false"
|
|
||||||
android:key="pref_key_24h"
|
|
||||||
android:layout="@layout/list_item_preference"
|
|
||||||
android:summary="@string/pref_24h_summary"
|
|
||||||
android:title="@string/pref_24h"
|
|
||||||
android:widgetLayout="@layout/view_switch" />
|
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
</PreferenceScreen>
|
</PreferenceScreen>
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
# QKSMS
|
# QKSMS
|
||||||
|
|
||||||
[](https://gitter.im/qklabs/qksms?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
[](https://gitter.im/moezbhatti/qksms?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||||
[![ZenHub] (https://raw.githubusercontent.com/ZenHubIO/support/master/zenhub-badge.png)] (https://zenhub.io)
|
[![ZenHub] (https://raw.githubusercontent.com/ZenHubIO/support/master/zenhub-badge.png)] (https://zenhub.io)
|
||||||
[](https://travis-ci.org/qklabs/qksms)
|
[](https://travis-ci.org/moezbhatti/qksms)
|
||||||
|
|
||||||
QKSMS is an open source replacement to the [stock messaging app](https://github.com/android/platform_packages_apps_mms) on Android. It is currently available on the Google Play Store.
|
QKSMS is an open source replacement to the [stock messaging app](https://github.com/android/platform_packages_apps_mms) on Android. It is currently available on the Google Play Store.
|
||||||
|
|
||||||
@@ -53,7 +53,7 @@ Any new code written should follow these guidelines.
|
|||||||
|
|
||||||
# Bug Reports / Feature Requests
|
# Bug Reports / Feature Requests
|
||||||
|
|
||||||
We track issues and feature requests using GitHub issues. You can view existing issues and create your own here: https://github.com/qklabs/qksms/issues
|
We track issues and feature requests using GitHub issues. You can view existing issues and create your own here: https://github.com/moezbhatti/qksms/issues
|
||||||
|
|
||||||
### How to help
|
### How to help
|
||||||
|
|
||||||
@@ -94,7 +94,7 @@ The conversation isn't marked as read.
|
|||||||
#### Helping reproduce bugs
|
#### Helping reproduce bugs
|
||||||
Reproducing a bug is important, since if we can't reproduce an issue then it's hard to figure out what's going wrong, and we can't know that we've fixed it.
|
Reproducing a bug is important, since if we can't reproduce an issue then it's hard to figure out what's going wrong, and we can't know that we've fixed it.
|
||||||
|
|
||||||
You can see bugs which need "repro steps" [here](https://github.com/qklabs/qksms/issues?q=is%3Aopen+is%3Aissue+label%3Aneeds-repro). If you see any bugs that you know how to reproduce (see above for example repro steps), then make a comment with the steps and we'll track the bug down!
|
You can see bugs which need "repro steps" [here](https://github.com/moezbhatti/qksms/issues?q=is%3Aopen+is%3Aissue+label%3Aneeds-repro). If you see any bugs that you know how to reproduce (see above for example repro steps), then make a comment with the steps and we'll track the bug down!
|
||||||
|
|
||||||
#### Making enhancement requests
|
#### Making enhancement requests
|
||||||
There are no rules for enhancement requests. Your ideas are all awesome. Although we may not implement every suggestion, we love brainstorming with you and hearing your feedback.
|
There are no rules for enhancement requests. Your ideas are all awesome. Although we may not implement every suggestion, we love brainstorming with you and hearing your feedback.
|
||||||
|
|||||||
@@ -3,6 +3,6 @@ buildscript {
|
|||||||
jcenter()
|
jcenter()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:2.2.0-alpha4'
|
classpath 'com.android.tools.build:gradle:2.1.2'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||