Updated projects for SDK 23
This commit is contained in:
parent
b379fc2acc
commit
17b7f26824
7 changed files with 85 additions and 42 deletions
28
.idea/codeStyleSettings.xml
generated
28
.idea/codeStyleSettings.xml
generated
|
@ -34,6 +34,34 @@
|
|||
<AndroidXmlCodeStyleSettings>
|
||||
<option name="USE_CUSTOM_SETTINGS" value="true" />
|
||||
</AndroidXmlCodeStyleSettings>
|
||||
<Objective-C-extensions>
|
||||
<option name="GENERATE_INSTANCE_VARIABLES_FOR_PROPERTIES" value="ASK" />
|
||||
<option name="RELEASE_STYLE" value="IVAR" />
|
||||
<option name="TYPE_QUALIFIERS_PLACEMENT" value="BEFORE" />
|
||||
<file>
|
||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Import" />
|
||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Macro" />
|
||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Typedef" />
|
||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Enum" />
|
||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Constant" />
|
||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Global" />
|
||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Struct" />
|
||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="FunctionPredecl" />
|
||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Function" />
|
||||
</file>
|
||||
<class>
|
||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Property" />
|
||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Synthesize" />
|
||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InitMethod" />
|
||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="StaticMethod" />
|
||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InstanceMethod" />
|
||||
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="DeallocMethod" />
|
||||
</class>
|
||||
<extensions>
|
||||
<pair source="cpp" header="h" />
|
||||
<pair source="c" header="h" />
|
||||
</extensions>
|
||||
</Objective-C-extensions>
|
||||
<XML>
|
||||
<option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" />
|
||||
</XML>
|
||||
|
|
12
.idea/runConfigurations.xml
generated
Normal file
12
.idea/runConfigurations.xml
generated
Normal file
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="RunConfigurationProducerService">
|
||||
<option name="ignoredProducers">
|
||||
<set>
|
||||
<option value="org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer" />
|
||||
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer" />
|
||||
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer" />
|
||||
</set>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
|
@ -8,7 +8,7 @@
|
|||
</configuration>
|
||||
</facet>
|
||||
</component>
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
|
||||
|
|
12
app/app.iml
12
app/app.iml
|
@ -12,10 +12,12 @@
|
|||
<option name="SELECTED_TEST_ARTIFACT" value="_android_test_" />
|
||||
<option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
|
||||
<option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" />
|
||||
<option name="SOURCE_GEN_TASK_NAME" value="generateDebugSources" />
|
||||
<option name="ASSEMBLE_TEST_TASK_NAME" value="assembleDebugAndroidTest" />
|
||||
<option name="COMPILE_JAVA_TEST_TASK_NAME" value="compileDebugAndroidTestSources" />
|
||||
<option name="TEST_SOURCE_GEN_TASK_NAME" value="generateDebugAndroidTestSources" />
|
||||
<afterSyncTasks>
|
||||
<task>generateDebugAndroidTestSources</task>
|
||||
<task>generateDebugSources</task>
|
||||
</afterSyncTasks>
|
||||
<option name="ALLOW_USER_CONFIGURATION" value="false" />
|
||||
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" />
|
||||
<option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" />
|
||||
|
@ -24,7 +26,7 @@
|
|||
</configuration>
|
||||
</facet>
|
||||
</component>
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="false">
|
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="false">
|
||||
<output url="file://$MODULE_DIR$/build/intermediates/classes/debug" />
|
||||
<output-test url="file://$MODULE_DIR$/build/intermediates/classes/androidTest/debug" />
|
||||
<exclude-output />
|
||||
|
@ -84,12 +86,11 @@
|
|||
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
|
||||
</content>
|
||||
<orderEntry type="jdk" jdkName="Android API 22 Platform (3)" jdkType="Android SDK" />
|
||||
<orderEntry type="jdk" jdkName="Android API 23 Platform" jdkType="Android SDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" exported="" name="gson-2.1" level="project" />
|
||||
<orderEntry type="library" exported="" name="protobuf-java-2.2.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="google-http-client-1.7.0-beta" level="project" />
|
||||
<orderEntry type="library" exported="" name="support-annotations-20.0.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="google-api-client-1.7.0-beta" level="project" />
|
||||
<orderEntry type="library" exported="" name="bitlyj-2.0.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="google-http-client-android2-1.7.0-beta" level="project" />
|
||||
|
@ -100,5 +101,6 @@
|
|||
<orderEntry type="library" exported="" name="google-api-urlshortener-v1-rev2-java-1.4.0-beta" level="project" />
|
||||
<orderEntry type="library" exported="" name="guava-11.0.1" level="project" />
|
||||
<orderEntry type="library" exported="" name="google-http-client-android3-1.7.0-beta" level="project" />
|
||||
<orderEntry type="library" exported="" name="support-annotations-23.1.0" level="project" />
|
||||
</component>
|
||||
</module>
|
|
@ -2,13 +2,13 @@ apply plugin: 'com.android.application'
|
|||
apply plugin: 'versionPlugin'
|
||||
|
||||
android {
|
||||
compileSdkVersion 22
|
||||
buildToolsVersion "21.1.2"
|
||||
compileSdkVersion 23
|
||||
buildToolsVersion "23.0.1"
|
||||
|
||||
defaultConfig {
|
||||
applicationId "net.thauvin.erik.android.emaily"
|
||||
minSdkVersion 14
|
||||
targetSdkVersion 22
|
||||
targetSdkVersion 23
|
||||
versionCode 2
|
||||
versionName "1.1b10"
|
||||
}
|
||||
|
@ -37,5 +37,5 @@ android {
|
|||
dependencies {
|
||||
compile fileTree(dir: 'libs', include: ['*.jar'])
|
||||
//compile 'com.android.support:appcompat-v7:22.0.0'
|
||||
compile 'com.android.support:support-annotations:20.0.0'
|
||||
compile 'com.android.support:support-annotations:23.1.0'
|
||||
}
|
||||
|
|
3
app/proguard-rules.pro
vendored
3
app/proguard-rules.pro
vendored
|
@ -78,4 +78,5 @@
|
|||
# Emaily
|
||||
-keep class com.google.api.client.googleapis.json.*
|
||||
-dontwarn org.apache.commons.codec.binary.StringUtils
|
||||
-dontwarn org.apache.commons.codec.binary.Base64
|
||||
-dontwarn org.apache.commons.codec.binary.Base64
|
||||
-dontwarn com.google.api.client.http.apache.*
|
|
@ -33,15 +33,6 @@
|
|||
*/
|
||||
package net.thauvin.erik.android.emaily;
|
||||
|
||||
import static com.rosaloves.bitlyj.Bitly.as;
|
||||
import static com.rosaloves.bitlyj.Bitly.shorten;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.net.UnknownHostException;
|
||||
import java.util.Date;
|
||||
|
||||
import android.accounts.Account;
|
||||
import android.accounts.AccountManager;
|
||||
import android.accounts.AccountManagerCallback;
|
||||
|
@ -78,6 +69,15 @@ import com.google.api.services.urlshortener.Urlshortener;
|
|||
import com.google.api.services.urlshortener.UrlshortenerRequest;
|
||||
import com.google.api.services.urlshortener.model.Url;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.net.UnknownHostException;
|
||||
import java.util.Date;
|
||||
|
||||
import static com.rosaloves.bitlyj.Bitly.as;
|
||||
import static com.rosaloves.bitlyj.Bitly.shorten;
|
||||
|
||||
/**
|
||||
* The <code>Emaily</code> class implements a URL shortener intent.
|
||||
*
|
||||
|
@ -93,6 +93,17 @@ public class Emaily extends Activity
|
|||
private String appName;
|
||||
private SharedPreferences sharedPrefs;
|
||||
|
||||
/**
|
||||
* Validates a string.
|
||||
*
|
||||
* @param s The string to validate.
|
||||
* @return returns <code>true</code> if the string is not empty or null, <code>false</code> otherwise.
|
||||
*/
|
||||
public static boolean isValid(String s)
|
||||
{
|
||||
return (s != null) && (!s.trim().isEmpty());
|
||||
}
|
||||
|
||||
@SuppressLint("CommitPrefEdits")
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState)
|
||||
|
@ -290,17 +301,6 @@ public class Emaily extends Activity
|
|||
startEmailyTask(intent, new Account(getPref(R.string.prefs_key_googl_account), ACCOUNT_TYPE), true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates a string.
|
||||
*
|
||||
* @param s The string to validate.
|
||||
* @return returns <code>true</code> if the string is not empty or null, <code>false</code> otherwise.
|
||||
*/
|
||||
public static boolean isValid(String s)
|
||||
{
|
||||
return (s != null) && (!s.trim().isEmpty());
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the value of the specified shared reference based on the specified string id. The default value is an empty string.
|
||||
*
|
||||
|
@ -643,10 +643,10 @@ public class Emaily extends Activity
|
|||
*/
|
||||
private class EmailyResult
|
||||
{
|
||||
private final Intent intent;
|
||||
private int code = 0;
|
||||
private String message;
|
||||
private boolean retry = false;
|
||||
private final Intent intent;
|
||||
|
||||
public EmailyResult(Intent intent)
|
||||
{
|
||||
|
@ -658,6 +658,11 @@ public class Emaily extends Activity
|
|||
return code;
|
||||
}
|
||||
|
||||
public void setCode(int code)
|
||||
{
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getMessage()
|
||||
{
|
||||
if (isValid(message))
|
||||
|
@ -670,6 +675,11 @@ public class Emaily extends Activity
|
|||
}
|
||||
}
|
||||
|
||||
public void setMessage(String message)
|
||||
{
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public Intent getIntent()
|
||||
{
|
||||
return intent;
|
||||
|
@ -685,16 +695,6 @@ public class Emaily extends Activity
|
|||
return retry;
|
||||
}
|
||||
|
||||
public void setCode(int code)
|
||||
{
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public void setMessage(String message)
|
||||
{
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public void setRetry(boolean retry)
|
||||
{
|
||||
this.retry = retry;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue