/** * Warn to logcat. Keeps track of messages so they are only logged once ever. */ public static void warn(String msg) { if (loggedMessages.contains(msg)) { return; } Log.w(TAG, msg); loggedMessages.add(msg); }
private void printConfigs (EGL10 egl, EGLDisplay display, EGLConfig[] configs) { int numConfigs = configs.length; Log.w(TAG, String.format("%d configurations", numConfigs)); for (int i = 0; i < numConfigs; i++) { Log.w(TAG, String.format("Configuration %d:\n", i)); printConfig(egl, display, configs[i]); } }
private void printConfigs (EGL10 egl, EGLDisplay display, EGLConfig[] configs) { int numConfigs = configs.length; Log.w(TAG, String.format("%d configurations", numConfigs)); for (int i = 0; i < numConfigs; i++) { Log.w(TAG, String.format("Configuration %d:\n", i)); printConfig(egl, display, configs[i]); } }
private void printConfigs (EGL10 egl, EGLDisplay display, EGLConfig[] configs) { int numConfigs = configs.length; Log.w(TAG, String.format("%d configurations", numConfigs)); for (int i = 0; i < numConfigs; i++) { Log.w(TAG, String.format("Configuration %d:\n", i)); printConfig(egl, display, configs[i]); } }
private void printConfigs (EGL10 egl, EGLDisplay display, EGLConfig[] configs) { int numConfigs = configs.length; Log.w(TAG, String.format("%d configurations", numConfigs)); for (int i = 0; i < numConfigs; i++) { Log.w(TAG, String.format("Configuration %d:\n", i)); printConfig(egl, display, configs[i]); } }
public FontAssetManager(Drawable.Callback callback, @Nullable FontAssetDelegate delegate) { this.delegate = delegate; if (!(callback instanceof View)) { Log.w(L.TAG, "LottieDrawable must be inside of a view for images to work."); assetManager = null; return; } assetManager = ((View) callback).getContext().getAssets(); }
private void printConfigs (EGL10 egl, EGLDisplay display, EGLConfig[] configs) { int numConfigs = configs.length; Log.w(TAG, String.format("%d configurations", numConfigs)); for (int i = 0; i < numConfigs; i++) { Log.w(TAG, String.format("Configuration %d:\n", i)); printConfig(egl, display, configs[i]); } }
private void printConfigs (EGL10 egl, EGLDisplay display, EGLConfig[] configs) { int numConfigs = configs.length; Log.w(TAG, String.format("%d configurations", numConfigs)); for (int i = 0; i < numConfigs; i++) { Log.w(TAG, String.format("Configuration %d:\n", i)); printConfig(egl, display, configs[i]); } }
public void destroySurface() { if (LOG_EGL) { Log.w("EglHelper", "destroySurface() tid=" + Thread.currentThread().getId()); } destroySurfaceImp(); }
public void destroySurface() { if (LOG_EGL) { Log.w("EglHelper", "destroySurface() tid=" + Thread.currentThread().getId()); } destroySurfaceImp(); }
private boolean writeDataDirect(ByteBuffer data, File file) { try { ByteBufferUtil.toFile(data, file); } catch (IOException e) { if (Log.isLoggable(TAG, Log.WARN)) { Log.w(TAG, "Failed to write GIF data", e); } return false; } return true; }
@RestrictTo(RestrictTo.Scope.LIBRARY) public void addWarning(String warning) { Log.w(L.TAG, warning); warnings.add(warning); }
private void notifyFailureListeners(Throwable e) { // Allows listeners to remove themselves in onResult. // Otherwise we risk ConcurrentModificationException. List<LottieListener<Throwable>> listenersCopy = new ArrayList<>(failureListeners); if (listenersCopy.isEmpty()) { Log.w(L.TAG, "Lottie encountered an error but no failure listener was added.", e); return; } for (LottieListener<Throwable> l : listenersCopy) { l.onResult(e); } }
public EGLContext createContext (EGL10 egl, EGLDisplay display, EGLConfig eglConfig) { Log.w(TAG, "creating OpenGL ES " + GLSurfaceView20.targetGLESVersion + ".0 context"); checkEglError("Before eglCreateContext "+targetGLESVersion, egl); int[] attrib_list = {EGL_CONTEXT_CLIENT_VERSION, GLSurfaceView20.targetGLESVersion, EGL10.EGL_NONE}; EGLContext context = egl.eglCreateContext(display, eglConfig, EGL10.EGL_NO_CONTEXT, attrib_list); boolean success = checkEglError("After eglCreateContext "+targetGLESVersion, egl); if ((!success || context == null) && GLSurfaceView20.targetGLESVersion > 2) { Log.w(TAG, "Falling back to GLES 2"); GLSurfaceView20.targetGLESVersion = 2; return createContext(egl, display, eglConfig); } Log.w(TAG, "Returning a GLES "+targetGLESVersion+" context"); return context; }
@Override public void onAttach(Context context) { super.onAttach(context); try { registerFragmentWithRoot(getActivity()); } catch (IllegalStateException e) { // OnAttach can be called after the activity is destroyed, see #497. if (Log.isLoggable(TAG, Log.WARN)) { Log.w(TAG, "Unable to register fragment with root", e); } } }
public void cycleScaleType(View v) { ImageView.ScaleType curr = imageViewRes.getScaleType(); Log.w(TAG, "cycle: current=" + curr); ImageView.ScaleType[] all = ImageView.ScaleType.values(); int nextOrdinal = (curr.ordinal() + 1) % all.length; ImageView.ScaleType next = all[nextOrdinal]; Log.w(TAG, "cycle: next=" + next); imageViewRes.setScaleType(next); imageViewNet.setScaleType(next); reload(); }
@Override public void delete(Key key) { String safeKey = safeKeyGenerator.getSafeKey(key); try { getDiskCache().remove(safeKey); } catch (IOException e) { if (Log.isLoggable(TAG, Log.WARN)) { Log.w(TAG, "Unable to delete from disk cache", e); } } }
public EGLContext createContext (EGL10 egl, EGLDisplay display, EGLConfig eglConfig) { Log.w(TAG, "creating OpenGL ES 2.0 context"); checkEglError("Before eglCreateContext", egl); int[] attrib_list = {EGL_CONTEXT_CLIENT_VERSION, 2, EGL10.EGL_NONE}; EGLContext context = egl.eglCreateContext(display, eglConfig, EGL10.EGL_NO_CONTEXT, attrib_list); checkEglError("After eglCreateContext", egl); return context; }
public EGLContext createContext (EGL10 egl, EGLDisplay display, EGLConfig eglConfig) { Log.w(TAG, "creating OpenGL ES 2.0 context"); checkEglError("Before eglCreateContext", egl); int[] attrib_list = {EGL_CONTEXT_CLIENT_VERSION, 2, EGL10.EGL_NONE}; EGLContext context = egl.eglCreateContext(display, eglConfig, EGL10.EGL_NO_CONTEXT, attrib_list); checkEglError("After eglCreateContext", egl); return context; }
private void reload() { Log.w(TAG, "reloading"); ((TextView) findViewById(R.id.button)) .setText(getString(R.string.scaleType, imageViewRes.getScaleType())); loadRes(); loadNet(); }