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
List<Integer> list1 = new ArrayList<>(); | |
list1.add(1); | |
List<Integer> list2 = new ArrayList<>(list1); | |
list1.add(2); |
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
for (ResolvedDependency dependency : | |
project.configurations.getByName("compile").resolvedConfiguration.firstLevelModuleDependencies) { | |
// dependency是gradle api定义的依赖,可以获取moduleGroup,moduleName,moduleVersion信息, | |
// 包括maven依赖、本地子module依赖,间接依赖在dependency.children中, | |
// 而这个依赖的本地文件则在dependency.moduleArtifacts中 | |
} |
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
private static final String TAG = "RxScreenshotDetector"; | |
private static final String EXTERNAL_CONTENT_URI_MATCHER = | |
MediaStore.Images.Media.EXTERNAL_CONTENT_URI.toString(); | |
private static final String[] PROJECTION = new String[] { | |
MediaStore.Images.Media.DISPLAY_NAME, MediaStore.Images.Media.DATA, | |
MediaStore.Images.Media.DATE_ADDED | |
}; | |
private static final String SORT_ORDER = MediaStore.Images.Media.DATE_ADDED + " DESC"; | |
private static final long DEFAULT_DETECT_WINDOW_SECONDS = 10; |
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
static Observable<Integer> detect(Observable<Void> clicks, final long maxIntervalMillis, | |
final int minComboTimesCared) { | |
return clicks.map(new Func1<Void, Integer>() { | |
@Override | |
public Integer call(Void aVoid) { | |
return 1; | |
} | |
}).timestamp() | |
.scan(new Func2<Timestamped<Integer>, Timestamped<Integer>, Timestamped<Integer>>() { |
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
@Override | |
protected void onCreate(final Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
mFragmentManager = getSupportFragmentManager(); | |
mFragmentManager.beginTransaction() | |
.add(android.R.id.content, new SplashFragment(), SPLASH_FRAGMENT) | |
.commit(); | |
Observable.create(subscriber -> { | |
Timber.plant(new Timber.DebugTree()); |
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
/** | |
* List of modules that don't require Jacoco | |
*/ | |
def ignoredByJacoco = [ | |
'presentation' | |
] | |
/** | |
* module class dirs | |
* */ |
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
package com.github.piasy.model.entities; | |
import android.support.annotation.NonNull; | |
import auto.parcel.AutoParcel; | |
import com.github.piasy.common.utils.model.AutoGson; | |
/** | |
* Created by Piasy{github.com/Piasy} on 15/8/21. | |
*/ | |
@AutoParcel |
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
import com.google.gson.Gson; | |
import com.google.gson.TypeAdapter; | |
import com.google.gson.TypeAdapterFactory; | |
import com.google.gson.reflect.TypeToken; | |
public final class AutoGenTypeAdapterFactory implements TypeAdapterFactory { | |
@SuppressWarnings("unchecked") | |
@Override | |
public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) { |
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
package com.younglive.livestreaming.utils.view; | |
/* | |
* Author: Felipe Herranz ([email protected]) | |
* Contributors:Francesco Verheye ([email protected]) | |
* Israel Dominguez ([email protected]) | |
*/ | |
import android.os.Handler; | |
import android.os.Message; | |
import android.view.View; |
NewerOlder