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
#!/usr/bin/env python3 | |
# | |
# Copyright (C) 2016 The Android Open Source Project | |
# | |
# 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 | |
# |
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
index dd5f859..739e7ed 100755 | |
--- a/hwasan_symbolize | |
+++ b/hwasan_symbolize | |
@@ -1,4 +1,4 @@ | |
-#!/usr/bin/env python | |
+#!/usr/bin/env python3 | |
#===- lib/hwasan/scripts/hwasan_symbolize ----------------------------------===# | |
# | |
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | |
@@ -10,6 +10,7 @@ |
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
import 'package:logging/logging.dart'; | |
import 'dart:developer' as developer; | |
void initLogging() { | |
// disable hierarchical logger | |
hierarchicalLoggingEnabled = false; | |
// change to another level as needed. | |
Logger.root.level = Level.INFO; | |
// skip logging stactrace below the SEVERE level. | |
recordStackTraceAtLevel = Level.SEVERE; |
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
diff --git a/shell/common/shell.cc b/shell/common/shell.cc | |
index bef72617c..b73018a61 100644 | |
--- a/shell/common/shell.cc | |
+++ b/shell/common/shell.cc | |
@@ -908,15 +908,28 @@ void Shell::OnAnimatorDraw(fml::RefPtr<Pipeline<flutter::LayerTree>> pipeline) { | |
[& waiting_for_first_frame = waiting_for_first_frame_, | |
&waiting_for_first_frame_condition = waiting_for_first_frame_condition_, | |
rasterizer = rasterizer_->GetWeakPtr(), | |
- pipeline = std::move(pipeline)]() { | |
- if (rasterizer) { |
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
var orginalCallback; | |
void main() { | |
runApp(...); | |
orginalCallback = window.onReportTimings; | |
window.onReportTimings = onReportTimings; | |
} | |
const maxframes = 60; | |
final lastFrames = ListQueue<FrameTiming>(maxframes); |
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
import org.apache.maven.artifact.ant.DependenciesTask; | |
import org.apache.maven.artifact.ant.RemoteRepository; | |
import org.apache.maven.model.Dependency; | |
import org.apache.tools.ant.Project; | |
import org.junit.runners.model.InitializationError; | |
import org.robolectric.RobolectricTestRunner; | |
import org.robolectric.internal.dependency.DependencyJar; | |
import org.robolectric.internal.dependency.DependencyResolver; | |
import org.robolectric.util.Util; |
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 class PagerActivity extends AppCompatActivity { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_paper); | |
ViewPager pager = (ViewPager) findViewById(R.id.pager); | |
pager.setAdapter(new PageAdapter(getSupportFragmentManager())); | |
} |
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
import android.graphics.Rect; | |
import android.support.v7.widget.GridLayoutManager; | |
import android.support.v7.widget.RecyclerView; | |
import android.view.View; | |
public class SpacesItemDecoration extends RecyclerView.ItemDecoration { | |
private int space; | |
private int spanCount; | |
private int lastItemInFirstLane = -1; | |
public SpacesItemDecoration(int space) { |
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
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.Collection; | |
import java.util.List; | |
import android.content.Context; | |
import android.support.v7.widget.RecyclerView.ViewHolder; | |
public abstract class ArrayAdapter<T, VH extends ViewHolder> extends BaseAdapter<T, VH> { | |
private List<T> mItems; |
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
// the remote server | |
SocketAddress remote = new InetSocketAddress(Inet4Address.getByName(hostName), port); | |
// open a selector | |
Selector selector = Selector.open(); | |
// open a channel | |
SocketChannel channel = SocketChannel.open(); | |
// non-blocking | |
channel.configureBlocking(false); | |
// pending connect | |
channel.connect(remote); |
NewerOlder