This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (c) 2010 Apple Inc. All rights reserved. | |
*/ | |
function hostnameMatchesHostKnownToContainEmbeddableMedia(e) { | |
const t = /^(.+\.)?(youtube\.com|vimeo\.com|dailymotion\.com|soundcloud\.com|mixcloud\.com|embedly\.com|embed\.ly)\.?$/; | |
return t.test(e) | |
} | |
function lazyLoadingImageURLForElement(e) { | |
const t = /(data:image\/)?gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==/, | |
n = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mExecutor = new ScheduledThreadPoolExecutor(6) { | |
@Override | |
protected void afterExecute(Runnable r, Throwable t) { | |
super.afterExecute(r, t); | |
if (t == null && r instanceof Future<?>) { | |
try { | |
Future<?> future = (Future<?>) r; | |
if (future.isDone()) | |
future.get(); | |
} catch (CancellationException ce) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class BlurUtil { | |
public static Bitmap blur(Context context, Bitmap sentBitmap, int radius) { | |
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.JELLY_BEAN) { | |
Bitmap bitmap = sentBitmap.copy(sentBitmap.getConfig(), true); | |
final RenderScript rs = RenderScript.create(context); | |
final Allocation input = Allocation.createFromBitmap(rs, sentBitmap, Allocation.MipmapControl.MIPMAP_NONE, | |
Allocation.USAGE_SCRIPT); |