Merge "Support hardware colors for fingerprint video" into nyc-mr1-dev
This commit is contained in:
@@ -41,7 +41,6 @@ public class FingerprintLocationAnimationVideoView extends TextureView
|
|||||||
|
|
||||||
public FingerprintLocationAnimationVideoView(Context context, AttributeSet attrs) {
|
public FingerprintLocationAnimationVideoView(Context context, AttributeSet attrs) {
|
||||||
super(context, attrs);
|
super(context, attrs);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -52,6 +51,10 @@ public class FingerprintLocationAnimationVideoView extends TextureView
|
|||||||
super.onMeasure(widthMeasureSpec, MeasureSpec.makeMeasureSpec(height, MeasureSpec.EXACTLY));
|
super.onMeasure(widthMeasureSpec, MeasureSpec.makeMeasureSpec(height, MeasureSpec.EXACTLY));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected Uri getFingerprintLocationAnimation() {
|
||||||
|
return resourceEntryToUri(getContext(), R.raw.fingerprint_location_animation);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onFinishInflate() {
|
protected void onFinishInflate() {
|
||||||
super.onFinishInflate();
|
super.onFinishInflate();
|
||||||
@@ -62,7 +65,7 @@ public class FingerprintLocationAnimationVideoView extends TextureView
|
|||||||
public void onSurfaceTextureAvailable(SurfaceTexture surfaceTexture, int width,
|
public void onSurfaceTextureAvailable(SurfaceTexture surfaceTexture, int width,
|
||||||
int height) {
|
int height) {
|
||||||
setVisibility(View.INVISIBLE);
|
setVisibility(View.INVISIBLE);
|
||||||
Uri videoUri = resourceEntryToUri(mContext, R.raw.fingerprint_location_animation);
|
Uri videoUri = getFingerprintLocationAnimation();
|
||||||
if (mMediaPlayer != null) {
|
if (mMediaPlayer != null) {
|
||||||
mMediaPlayer.release();
|
mMediaPlayer.release();
|
||||||
}
|
}
|
||||||
@@ -110,7 +113,7 @@ public class FingerprintLocationAnimationVideoView extends TextureView
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Uri resourceEntryToUri (Context context, int id) {
|
protected static Uri resourceEntryToUri (Context context, int id) {
|
||||||
Resources res = context.getResources();
|
Resources res = context.getResources();
|
||||||
return Uri.parse(ContentResolver.SCHEME_ANDROID_RESOURCE + "://" +
|
return Uri.parse(ContentResolver.SCHEME_ANDROID_RESOURCE + "://" +
|
||||||
res.getResourcePackageName(id) + '/' +
|
res.getResourcePackageName(id) + '/' +
|
||||||
|
Reference in New Issue
Block a user