This file contains 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) 2013 Google, Inc. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains 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
// You need to call pause/resume in a ActivityLifecycleCallbacks, pause after all activities are stopped, resume if any is started. | |
// Just removing the callback will bork WebView rendering (animation, selection, etc). | |
private Object choreographerAnimationCallback = null; | |
@SuppressWarnings({ "JavaReflectionMemberAccess", "SynchronizationOnLocalVariableOrMethodParameter" }) | |
private void pauseAnimationCallbacks() { | |
try { | |
Class<?> choreographerType = Class.forName("android.view.Choreographer"); | |
final int CALLBACK_ANIMATION = 1; |
This file contains 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 static TypedArray obtainStyledAttributes(@NonNull Context context, int[] attrs) { | |
int[] tmp = new int[attrs.length]; | |
long[] sorted = AttrSorter.sorted(attrs); | |
@SuppressLint("Recycle") | |
android.content.res.TypedArray a = context.obtainStyledAttributes( | |
AttrSorter.sortedAttrs(sorted, tmp)); | |
return new TypedArray(a, AttrSorter.sortedIndices(sorted, tmp)); | |
} |
This file contains 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
package com.digibites.arm64bugtest; | |
import java.util.Arrays; | |
import android.util.Log; | |
public class Arm64Bug { | |
private static final String TAG = "Arm64Bug"; | |
/** |
This file contains 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
def application(env, start_response): | |
import time | |
time.sleep(5) | |
start_response('200 OK', [('Content-Type', 'text/html')]) | |
return "Hello World\n" |