fix recent emoji pane

1) Make recent list properly update and invalidate.
2) Show most-recently-used first.
3) Refactoring

Closes #3171
// FREEBIE
This commit is contained in:
Jake McGinty
2015-05-14 21:08:37 -07:00
committed by Moxie Marlinspike
parent 5ec9197912
commit cf420de65f
11 changed files with 210 additions and 172 deletions

View File

@@ -24,6 +24,7 @@ import android.graphics.Typeface;
import android.os.Build;
import android.os.Build.VERSION;
import android.os.Build.VERSION_CODES;
import android.os.Looper;
import android.provider.Telephony;
import android.telephony.TelephonyManager;
import android.text.Spannable;
@@ -296,4 +297,10 @@ public class Util {
public static boolean isMmsCapable(Context context) {
return (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) || OutgoingLegacyMmsConnection.isConnectionPossible(context);
}
public static void assertMainThread() {
if (Looper.myLooper() != Looper.getMainLooper()) {
throw new AssertionError("Main-thread assertion failed.");
}
}
}