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 toCamelCase(String string) { | |
String result = "" | |
string.findAll("[^\\W]+") { String word -> | |
result += word.capitalize() | |
} | |
return result | |
} | |
afterEvaluate { project -> | |
Configuration runtimeConfiguration = project.configurations.getByName('compile') |
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
<?xml version="1.0" encoding="utf-8"?><!-- | |
~ Copyright (C) 2015 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 | |
~ | |
~ 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
package cc.cubone.turbo.ui.demo; | |
import android.content.Context; | |
import android.graphics.Color; | |
import android.os.Build; | |
import android.os.Bundle; | |
import android.os.PersistableBundle; | |
import android.support.annotation.ColorInt; | |
import android.support.v4.view.GravityCompat; | |
import android.support.v4.widget.DrawerLayout; |
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 cc.cubone.turbo.core.rom; | |
import android.os.Build; | |
import android.view.Window; | |
import android.view.WindowManager; | |
import java.lang.reflect.Field; | |
import java.lang.reflect.Method; | |
/** |
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
1. To enable TLS 1.2 in Android 4.4 | |
Copy TLSSocketFactory.java | |
If using HttpsURLConnection: | |
=> conn.setSSLSocketFactory(new TLSSocketFactory()); | |
Else if using OkHttp: | |
=> new OkHttpClient.Builder().setSocketFactory(new TLSSocketFactory()). ... .build(); | |
Else if using HttpClient: | |
sample for legacy apache http library: https://github.com/Kane-Shih/TestApacheHttpClient | |
=> see: https://stackoverflow.com/questions/2603691/android-httpclient-and-https |