mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-14 11:49:04 +01:00
Effectively final.
This commit is contained in:
@@ -65,7 +65,7 @@ public class KeyboardAwareLinearLayout extends LinearLayout {
|
||||
@Nullable AttributeSet attrs, int defStyle) {
|
||||
super(context, attrs, defStyle);
|
||||
rotation = getDeviceRotation();
|
||||
final int statusBarRes = getResources()
|
||||
int statusBarRes = getResources()
|
||||
.getIdentifier("status_bar_height", "dimen", "android");
|
||||
minKeyboardSize =
|
||||
getResources().getDimensionPixelSize(R.dimen.min_keyboard_size);
|
||||
@@ -199,7 +199,7 @@ public class KeyboardAwareLinearLayout extends LinearLayout {
|
||||
prefs.edit().putInt("keyboard_height_portrait", height).apply();
|
||||
}
|
||||
|
||||
public void postOnKeyboardClose(final Runnable runnable) {
|
||||
public void postOnKeyboardClose(Runnable runnable) {
|
||||
if (keyboardOpen) {
|
||||
addOnKeyboardHiddenListener(new OnKeyboardHiddenListener() {
|
||||
@Override
|
||||
@@ -213,7 +213,7 @@ public class KeyboardAwareLinearLayout extends LinearLayout {
|
||||
}
|
||||
}
|
||||
|
||||
public void postOnKeyboardOpen(final Runnable runnable) {
|
||||
public void postOnKeyboardOpen(Runnable runnable) {
|
||||
if (!keyboardOpen) {
|
||||
addOnKeyboardShownListener(new OnKeyboardShownListener() {
|
||||
@Override
|
||||
|
||||
@@ -56,7 +56,7 @@ public class EmojiDrawer extends LinearLayout {
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
final View v = LayoutInflater.from(getContext())
|
||||
View v = LayoutInflater.from(getContext())
|
||||
.inflate(R.layout.emoji_drawer, this, true);
|
||||
initializeResources(v);
|
||||
initializePageModels();
|
||||
|
||||
@@ -33,8 +33,8 @@ public class EmojiEditText extends AppCompatEditText {
|
||||
}
|
||||
|
||||
public void insertEmoji(String emoji) {
|
||||
final int start = getSelectionStart();
|
||||
final int end = getSelectionEnd();
|
||||
int start = getSelectionStart();
|
||||
int end = getSelectionEnd();
|
||||
|
||||
getText().replace(Math.min(start, end), Math.max(start, end), emoji);
|
||||
setSelection(start + emoji.length());
|
||||
|
||||
@@ -33,7 +33,7 @@ public class EmojiPageView extends FrameLayout {
|
||||
public EmojiPageView(Context context, @Nullable AttributeSet attrs,
|
||||
int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
final View view = LayoutInflater.from(getContext())
|
||||
View view = LayoutInflater.from(getContext())
|
||||
.inflate(R.layout.emoji_grid_layout, this, true);
|
||||
grid = (GridView) view.findViewById(R.id.emoji);
|
||||
grid.setColumnWidth(getResources()
|
||||
|
||||
@@ -135,10 +135,10 @@ public class EmojiProvider {
|
||||
return null;
|
||||
}
|
||||
|
||||
final EmojiDrawable drawable = new EmojiDrawable(drawInfo, decodeScale);
|
||||
EmojiDrawable drawable = new EmojiDrawable(drawInfo, decodeScale);
|
||||
drawInfo.page.get().addListener(new FutureTaskListener<Bitmap>() {
|
||||
@Override
|
||||
public void onSuccess(final Bitmap result) {
|
||||
public void onSuccess(Bitmap result) {
|
||||
androidExecutor.runOnUiThread(() -> drawable.setBitmap(result));
|
||||
}
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@ public class RecentEmojiPageModel implements EmojiPageModel {
|
||||
return result;
|
||||
}
|
||||
|
||||
private void save(final String serialized) {
|
||||
private void save(String serialized) {
|
||||
dbExecutor.execute(() -> {
|
||||
Settings settings = new Settings();
|
||||
settings.put(EMOJI_LRU_PREFERENCE, serialized);
|
||||
|
||||
@@ -41,11 +41,11 @@ public class ListenableFutureTask<V> extends FutureTask<V> {
|
||||
this.identifier = identifier;
|
||||
}
|
||||
|
||||
public ListenableFutureTask(final V result) {
|
||||
public ListenableFutureTask(V result) {
|
||||
this(result, null);
|
||||
}
|
||||
|
||||
private ListenableFutureTask(final V result, @Nullable Object identifier) {
|
||||
private ListenableFutureTask(V result, @Nullable Object identifier) {
|
||||
super(() -> result);
|
||||
this.identifier = identifier;
|
||||
this.run();
|
||||
|
||||
@@ -40,14 +40,14 @@ public class BitmapUtil {
|
||||
private static <T> Bitmap createScaledBitmapInto(Context context, T model,
|
||||
int width, int height)
|
||||
throws BitmapDecodingException {
|
||||
final Bitmap rough = Downsampler.AT_LEAST
|
||||
Bitmap rough = Downsampler.AT_LEAST
|
||||
.decode(getInputStreamForModel(context, model),
|
||||
Glide.get(context).getBitmapPool(),
|
||||
width, height, DecodeFormat.PREFER_RGB_565);
|
||||
|
||||
final Resource<Bitmap> resource = BitmapResource
|
||||
Resource<Bitmap> resource = BitmapResource
|
||||
.obtain(rough, Glide.get(context).getBitmapPool());
|
||||
final Resource<Bitmap> result =
|
||||
Resource<Bitmap> result =
|
||||
new FitCenter(context).transform(resource, width, height);
|
||||
|
||||
if (result == null) {
|
||||
|
||||
Reference in New Issue
Block a user