Imported Upstream version 2.0.0

parent 875842b9

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
<excludeFolder url="file://$MODULE_DIR$/.eclipse" />
<excludeFolder url="file://$MODULE_DIR$/.idea" />
<excludeFolder url="file://$MODULE_DIR$/apps" />
<excludeFolder url="file://$MODULE_DIR$/asset-studio/.settings" />
<excludeFolder url="file://$MODULE_DIR$/build" />
<excludeFolder url="file://$MODULE_DIR$/common/.settings" />
<excludeFolder url="file://$MODULE_DIR$/ddmlib/.settings" />
<excludeFolder url="file://$MODULE_DIR$/files" />
<excludeFolder url="file://$MODULE_DIR$/jobb" />
<excludeFolder url="file://$MODULE_DIR$/layoutlib-api/.settings" />
<excludeFolder url="file://$MODULE_DIR$/manifest-merger/.settings" />
<excludeFolder url="file://$MODULE_DIR$/misc" />
<excludeFolder url="file://$MODULE_DIR$/rule-api/.settings" />
<excludeFolder url="file://$MODULE_DIR$/rule-api/bin" />
<excludeFolder url="file://$MODULE_DIR$/sdk-common/.settings" />
<excludeFolder url="file://$MODULE_DIR$/sdklib/.settings" />
<excludeFolder url="file://$MODULE_DIR$/sdkstats/.settings" />
<excludeFolder url="file://$MODULE_DIR$/templates" />
<excludeFolder url="file://$MODULE_DIR$/testutils/.settings" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="android" level="project" />
</component>
</module>
\ No newline at end of file
apply plugin: 'java'
apply plugin: 'sdk-java-lib'
sourceCompatibility = JavaVersion.VERSION_1_6
targetCompatibility = JavaVersion.VERSION_1_6
group = 'com.android.tools'
archivesBaseName = 'annotations'
version = rootProject.ext.baseVersion
project.ext.pomName = 'Android Tools Annotations library'
project.ext.pomDesc = 'annotations used throughout the Android tools libraries.'
javadoc {
if (JavaVersion.current().isJava8Compatible()) {
options.addStringOption 'Xdoclint:none', '-quiet'
}
}
apply from: "$rootDir/buildSrc/base/publish.gradle"
apply from: "$rootDir/buildSrc/base/bintray.gradle"
apply from: "$rootDir/buildSrc/base/javadoc.gradle"
.gradle
/local.properties
/.idea
*.iml
.DS_Store
/build
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.example.android.deviceconfig"
minSdkVersion 8
targetSdkVersion 23
}
}
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.android.deviceconfig"
android:versionCode="1"
android:versionName="1.0" >
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-feature android:name="android.hardware.camera" />
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="15" />
<application
android:icon="@drawable/icon"
android:label="@string/app_name" >
<activity
android:name=".MyActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
/*
* Copyright (C) 2012 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
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.example.android.deviceconfig;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.res.Configuration;
import android.net.Uri;
import android.opengl.GLSurfaceView;
import android.os.Bundle;
import android.util.DisplayMetrics;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.TextView;
import java.io.File;
import javax.microedition.khronos.egl.EGLConfig;
import javax.microedition.khronos.opengles.GL10;
public class MyActivity extends Activity implements OnClickListener {
private static GLView mGl;
/** Called when the activity is first created. */
@SuppressLint("SetTextI18n")
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
LinearLayout vg = (LinearLayout) findViewById(R.id.buttonHolder);
if (vg == null) {
return;
}
// Instantiate a GL surface view so we can get extensions information
mGl = new GLView(this);
// If we set the layout to be 0, it just won't render
ViewGroup.LayoutParams params = new ViewGroup.LayoutParams(1, 1);
mGl.setLayoutParams(params);
vg.addView(mGl);
Button btn = (Button) findViewById(R.id.generateConfigButton);
btn.setOnClickListener(this);
Configuration config = getResources().getConfiguration();
TextView tv = (TextView) findViewById(R.id.keyboard_state_api);
if (tv != null) {
String separator = config.orientation == Configuration.ORIENTATION_PORTRAIT ? "\n" : "";
String foo = "keyboardHidden=" + separator;
if (config.keyboardHidden == Configuration.KEYBOARDHIDDEN_NO) {
foo += "EXPOSED";
} else if (config.keyboardHidden == Configuration.KEYBOARDHIDDEN_YES) {
foo += "HIDDEN";