new passphrase prompt activity

// FREEBIE
This commit is contained in:
Jake McGinty
2014-05-13 20:41:16 -07:00
committed by Moxie Marlinspike
parent 82bb0c07e8
commit ce7b8ab75a
16 changed files with 152 additions and 36 deletions

View File

@@ -1,7 +1,13 @@
package org.whispersystems.textsecure.util;
import android.content.Context;
import android.graphics.Shader;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.DrawableContainer;
import android.graphics.drawable.StateListDrawable;
import android.telephony.TelephonyManager;
import android.view.View;
import android.widget.EditText;
import java.io.ByteArrayOutputStream;
@@ -201,4 +207,17 @@ public class Util {
throw new AssertionError(e);
}
}
/*
* source: http://stackoverflow.com/a/9500334
*/
public static void fixBackgroundRepeat(Drawable bg) {
if (bg != null) {
if (bg instanceof BitmapDrawable) {
BitmapDrawable bmp = (BitmapDrawable) bg;
bmp.mutate();
bmp.setTileModeXY(Shader.TileMode.REPEAT, Shader.TileMode.REPEAT);
}
}
}
}