-
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Release v3.5.0
- Loading branch information
Showing
222 changed files
with
24,687 additions
and
1,647 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* | ||
* 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 | ||
* | ||
* 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 android.annotation; | ||
|
||
import java.lang.annotation.Documented; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.Target; | ||
import static java.lang.annotation.ElementType.CONSTRUCTOR; | ||
import static java.lang.annotation.ElementType.METHOD; | ||
import static java.lang.annotation.ElementType.TYPE; | ||
import static java.lang.annotation.RetentionPolicy.CLASS; | ||
/** | ||
* Denotes that the annotated method can be called from any thread (e.g. it is "thread safe".) | ||
* If the annotated element is a class, then all methods in the class can be called | ||
* from any thread. | ||
* <p> | ||
* The main purpose of this method is to indicate that you believe a method can be called | ||
* from any thread; static tools can then check that nothing you call from within this method | ||
* or class have more strict threading requirements. | ||
* <p> | ||
* Example: | ||
* <pre><code> | ||
* @AnyThread | ||
* public void deliverResult(D data) { ... } | ||
* </code></pre> | ||
*/ | ||
@Documented | ||
@Retention(CLASS) | ||
@Target({METHOD,CONSTRUCTOR,TYPE}) | ||
public @interface AnyThread { | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
* 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 | ||
* 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 android.annotation; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.Target; | ||
import static java.lang.annotation.ElementType.FIELD; | ||
import static java.lang.annotation.ElementType.LOCAL_VARIABLE; | ||
import static java.lang.annotation.ElementType.METHOD; | ||
import static java.lang.annotation.ElementType.PARAMETER; | ||
import static java.lang.annotation.RetentionPolicy.CLASS; | ||
/** | ||
* Denotes that the annotated element represents a packed color | ||
* int, {@code AARRGGBB}. If applied to an int array, every element | ||
* in the array represents a color integer. | ||
* <p> | ||
* Example: | ||
* <pre>{@code | ||
* public abstract void setTextColor(@ColorInt int color); | ||
* }</pre> | ||
*/ | ||
@Retention(CLASS) | ||
@Target({PARAMETER,METHOD,LOCAL_VARIABLE,FIELD}) | ||
public @interface ColorInt { | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* | ||
* 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 | ||
* | ||
* 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 android.annotation; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.Target; | ||
import static java.lang.annotation.ElementType.FIELD; | ||
import static java.lang.annotation.ElementType.LOCAL_VARIABLE; | ||
import static java.lang.annotation.ElementType.METHOD; | ||
import static java.lang.annotation.ElementType.PARAMETER; | ||
import static java.lang.annotation.RetentionPolicy.SOURCE; | ||
/** | ||
* <p>Denotes that the annotated element represents a packed color | ||
* long. If applied to a long array, every element in the array | ||
* represents a color long. For more information on how colors | ||
* are packed in a long, please refer to the documentation of | ||
* the {link android.graphics.Color} class.</p> | ||
* | ||
* <p>Example:</p> | ||
* | ||
* <pre>{@code | ||
* public void setFillColor(@ColorLong long color); | ||
* }</pre> | ||
* | ||
* see android.graphics.Color | ||
* | ||
* @hide | ||
*/ | ||
@Retention(SOURCE) | ||
@Target({PARAMETER,METHOD,LOCAL_VARIABLE,FIELD}) | ||
public @interface ColorLong { | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* | ||
* 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 | ||
* | ||
* 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 android.annotation; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.Target; | ||
import static java.lang.annotation.ElementType.FIELD; | ||
import static java.lang.annotation.ElementType.LOCAL_VARIABLE; | ||
import static java.lang.annotation.ElementType.METHOD; | ||
import static java.lang.annotation.ElementType.PARAMETER; | ||
import static java.lang.annotation.RetentionPolicy.SOURCE; | ||
/** | ||
* <p>Denotes that the annotated element represents a half-precision floating point | ||
* value. Such values are stored in short data types and can be manipulated with | ||
* the {@link android.util.Half} class. If applied to an array of short, every | ||
* element in the array represents a half-precision float.</p> | ||
* | ||
* <p>Example:</p> | ||
* | ||
* <pre>{@code | ||
* public abstract void setPosition(@HalfFloat short x, @HalfFloat short y, @HalfFloat short z); | ||
* }</pre> | ||
* | ||
* @see android.util.Half | ||
* @see android.util.Half#toHalf(float) | ||
* @see android.util.Half#toFloat(short) | ||
* | ||
* @hide | ||
*/ | ||
@Retention(SOURCE) | ||
@Target({PARAMETER, METHOD, LOCAL_VARIABLE, FIELD}) | ||
public @interface HalfFloat { | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/* | ||
* Copyright (C) 2013 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 android.annotation; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.Target; | ||
import static java.lang.annotation.ElementType.ANNOTATION_TYPE; | ||
import static java.lang.annotation.RetentionPolicy.CLASS; | ||
/** | ||
* Denotes that the annotated element of integer type, represents | ||
* a logical type and that its value should be one of the explicitly | ||
* named constants. If the {@link #flag()} attribute is set to true, | ||
* multiple constants can be combined. | ||
* <p> | ||
* <pre><code> | ||
* @Retention(SOURCE) | ||
* @IntDef({NAVIGATION_MODE_STANDARD, NAVIGATION_MODE_LIST, NAVIGATION_MODE_TABS}) | ||
* public @interface NavigationMode {} | ||
* public static final int NAVIGATION_MODE_STANDARD = 0; | ||
* public static final int NAVIGATION_MODE_LIST = 1; | ||
* public static final int NAVIGATION_MODE_TABS = 2; | ||
* ... | ||
* public abstract void setNavigationMode(@NavigationMode int mode); | ||
* @NavigationMode | ||
* public abstract int getNavigationMode(); | ||
* </code></pre> | ||
* For a flag, set the flag attribute: | ||
* <pre><code> | ||
* @IntDef( | ||
* flag = true | ||
* value = {NAVIGATION_MODE_STANDARD, NAVIGATION_MODE_LIST, NAVIGATION_MODE_TABS}) | ||
* </code></pre> | ||
* | ||
* @hide | ||
*/ | ||
@Retention(CLASS) | ||
@Target({ANNOTATION_TYPE}) | ||
public @interface IntDef { | ||
/** Defines the allowed constants for this element */ | ||
long[] value() default {}; | ||
/** Defines whether the constants can be used as a flag, or just as an enum (the default) */ | ||
boolean flag() default false; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* | ||
* 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 | ||
* 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 android.annotation; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.Target; | ||
import static java.lang.annotation.ElementType.ANNOTATION_TYPE; | ||
import static java.lang.annotation.ElementType.FIELD; | ||
import static java.lang.annotation.ElementType.LOCAL_VARIABLE; | ||
import static java.lang.annotation.ElementType.METHOD; | ||
import static java.lang.annotation.ElementType.PARAMETER; | ||
import static java.lang.annotation.RetentionPolicy.SOURCE; | ||
/** | ||
* Denotes that the annotated element should be an int or long in the given range | ||
* <p> | ||
* Example: | ||
* <pre><code> | ||
* @IntRange(from=0,to=255) | ||
* public int getAlpha() { | ||
* ... | ||
* } | ||
* </code></pre> | ||
* | ||
* @hide | ||
*/ | ||
@Retention(SOURCE) | ||
@Target({METHOD,PARAMETER,FIELD,LOCAL_VARIABLE,ANNOTATION_TYPE}) | ||
public @interface IntRange { | ||
/** Smallest value, inclusive */ | ||
long from() default Long.MIN_VALUE; | ||
/** Largest value, inclusive */ | ||
long to() default Long.MAX_VALUE; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* Copyright (C) 2013 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 android.annotation; | ||
|
||
import java.lang.annotation.Documented; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.Target; | ||
|
||
import static java.lang.annotation.ElementType.*; | ||
import static java.lang.annotation.RetentionPolicy.CLASS; | ||
|
||
/** | ||
* Denotes that a parameter, field or method return value can never be null. | ||
* <p> | ||
* This is a marker annotation and it has no specific attributes. | ||
*/ | ||
@Documented | ||
@Retention(CLASS) | ||
@Target({METHOD, PARAMETER, FIELD, LOCAL_VARIABLE, ANNOTATION_TYPE, PACKAGE}) | ||
public @interface NonNull { | ||
} |
Oops, something went wrong.