code
stringlengths 11
173k
| docstring
stringlengths 2
593k
| func_name
stringlengths 2
189
| language
stringclasses 1
value | repo
stringclasses 844
values | path
stringlengths 11
294
| url
stringlengths 60
339
| license
stringclasses 4
values |
---|---|---|---|---|---|---|---|
public AbstractStringBuilder insert(int offset, int i) {
return insert(offset, String.valueOf(i));
} |
Inserts the string representation of the second {@code int}
argument into this sequence.
<p>
The overall effect is exactly as if the second argument were
converted to a string by the method {@link String#valueOf(int)},
and the characters of that string were then
{@link #insert(int,String) inserted} into this character
sequence at the indicated offset.
<p>
The {@code offset} argument must be greater than or equal to
{@code 0}, and less than or equal to the {@linkplain #length() length}
of this sequence.
@param offset the offset.
@param i an {@code int}.
@return a reference to this object.
@throws StringIndexOutOfBoundsException if the offset is invalid.
| AbstractStringBuilder::insert | java | Reginer/aosp-android-jar | android-32/src/java/lang/AbstractStringBuilder.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/java/lang/AbstractStringBuilder.java | MIT |
public AbstractStringBuilder insert(int offset, long l) {
return insert(offset, String.valueOf(l));
} |
Inserts the string representation of the {@code long}
argument into this sequence.
<p>
The overall effect is exactly as if the second argument were
converted to a string by the method {@link String#valueOf(long)},
and the characters of that string were then
{@link #insert(int,String) inserted} into this character
sequence at the indicated offset.
<p>
The {@code offset} argument must be greater than or equal to
{@code 0}, and less than or equal to the {@linkplain #length() length}
of this sequence.
@param offset the offset.
@param l a {@code long}.
@return a reference to this object.
@throws StringIndexOutOfBoundsException if the offset is invalid.
| AbstractStringBuilder::insert | java | Reginer/aosp-android-jar | android-32/src/java/lang/AbstractStringBuilder.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/java/lang/AbstractStringBuilder.java | MIT |
public AbstractStringBuilder insert(int offset, float f) {
return insert(offset, String.valueOf(f));
} |
Inserts the string representation of the {@code float}
argument into this sequence.
<p>
The overall effect is exactly as if the second argument were
converted to a string by the method {@link String#valueOf(float)},
and the characters of that string were then
{@link #insert(int,String) inserted} into this character
sequence at the indicated offset.
<p>
The {@code offset} argument must be greater than or equal to
{@code 0}, and less than or equal to the {@linkplain #length() length}
of this sequence.
@param offset the offset.
@param f a {@code float}.
@return a reference to this object.
@throws StringIndexOutOfBoundsException if the offset is invalid.
| AbstractStringBuilder::insert | java | Reginer/aosp-android-jar | android-32/src/java/lang/AbstractStringBuilder.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/java/lang/AbstractStringBuilder.java | MIT |
public AbstractStringBuilder insert(int offset, double d) {
return insert(offset, String.valueOf(d));
} |
Inserts the string representation of the {@code double}
argument into this sequence.
<p>
The overall effect is exactly as if the second argument were
converted to a string by the method {@link String#valueOf(double)},
and the characters of that string were then
{@link #insert(int,String) inserted} into this character
sequence at the indicated offset.
<p>
The {@code offset} argument must be greater than or equal to
{@code 0}, and less than or equal to the {@linkplain #length() length}
of this sequence.
@param offset the offset.
@param d a {@code double}.
@return a reference to this object.
@throws StringIndexOutOfBoundsException if the offset is invalid.
| AbstractStringBuilder::insert | java | Reginer/aosp-android-jar | android-32/src/java/lang/AbstractStringBuilder.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/java/lang/AbstractStringBuilder.java | MIT |
public int indexOf(String str) {
return indexOf(str, 0);
} |
Returns the index within this string of the first occurrence of the
specified substring. The integer returned is the smallest value
<i>k</i> such that:
<pre>{@code
this.toString().startsWith(str, <i>k</i>)
}</pre>
is {@code true}.
@param str any string.
@return if the string argument occurs as a substring within this
object, then the index of the first character of the first
such substring is returned; if it does not occur as a
substring, {@code -1} is returned.
| AbstractStringBuilder::indexOf | java | Reginer/aosp-android-jar | android-32/src/java/lang/AbstractStringBuilder.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/java/lang/AbstractStringBuilder.java | MIT |
public int indexOf(String str, int fromIndex) {
return String.indexOf(value, 0, count, str, fromIndex);
} |
Returns the index within this string of the first occurrence of the
specified substring, starting at the specified index. The integer
returned is the smallest value {@code k} for which:
<pre>{@code
k >= Math.min(fromIndex, this.length()) &&
this.toString().startsWith(str, k)
}</pre>
If no such value of <i>k</i> exists, then -1 is returned.
@param str the substring for which to search.
@param fromIndex the index from which to start the search.
@return the index within this string of the first occurrence of the
specified substring, starting at the specified index.
| AbstractStringBuilder::indexOf | java | Reginer/aosp-android-jar | android-32/src/java/lang/AbstractStringBuilder.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/java/lang/AbstractStringBuilder.java | MIT |
public int lastIndexOf(String str) {
return lastIndexOf(str, count);
} |
Returns the index within this string of the rightmost occurrence
of the specified substring. The rightmost empty string "" is
considered to occur at the index value {@code this.length()}.
The returned index is the largest value <i>k</i> such that
<pre>{@code
this.toString().startsWith(str, k)
}</pre>
is true.
@param str the substring to search for.
@return if the string argument occurs one or more times as a substring
within this object, then the index of the first character of
the last such substring is returned. If it does not occur as
a substring, {@code -1} is returned.
| AbstractStringBuilder::lastIndexOf | java | Reginer/aosp-android-jar | android-32/src/java/lang/AbstractStringBuilder.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/java/lang/AbstractStringBuilder.java | MIT |
public int lastIndexOf(String str, int fromIndex) {
return String.lastIndexOf(value, 0, count, str, fromIndex);
} |
Returns the index within this string of the last occurrence of the
specified substring. The integer returned is the largest value <i>k</i>
such that:
<pre>{@code
k <= Math.min(fromIndex, this.length()) &&
this.toString().startsWith(str, k)
}</pre>
If no such value of <i>k</i> exists, then -1 is returned.
@param str the substring to search for.
@param fromIndex the index to start the search from.
@return the index within this sequence of the last occurrence of the
specified substring.
| AbstractStringBuilder::lastIndexOf | java | Reginer/aosp-android-jar | android-32/src/java/lang/AbstractStringBuilder.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/java/lang/AbstractStringBuilder.java | MIT |
public AbstractStringBuilder reverse() {
boolean hasSurrogates = false;
int n = count - 1;
for (int j = (n-1) >> 1; j >= 0; j--) {
int k = n - j;
char cj = value[j];
char ck = value[k];
value[j] = ck;
value[k] = cj;
if (Character.isSurrogate(cj) ||
Character.isSurrogate(ck)) {
hasSurrogates = true;
}
}
if (hasSurrogates) {
reverseAllValidSurrogatePairs();
}
return this;
} |
Causes this character sequence to be replaced by the reverse of
the sequence. If there are any surrogate pairs included in the
sequence, these are treated as single characters for the
reverse operation. Thus, the order of the high-low surrogates
is never reversed.
Let <i>n</i> be the character length of this character sequence
(not the length in {@code char} values) just prior to
execution of the {@code reverse} method. Then the
character at index <i>k</i> in the new character sequence is
equal to the character at index <i>n-k-1</i> in the old
character sequence.
<p>Note that the reverse operation may result in producing
surrogate pairs that were unpaired low-surrogates and
high-surrogates before the operation. For example, reversing
"\u005CuDC00\u005CuD800" produces "\u005CuD800\u005CuDC00" which is
a valid surrogate pair.
@return a reference to this object.
| AbstractStringBuilder::reverse | java | Reginer/aosp-android-jar | android-32/src/java/lang/AbstractStringBuilder.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/java/lang/AbstractStringBuilder.java | MIT |
private void reverseAllValidSurrogatePairs() {
for (int i = 0; i < count - 1; i++) {
char c2 = value[i];
if (Character.isLowSurrogate(c2)) {
char c1 = value[i + 1];
if (Character.isHighSurrogate(c1)) {
value[i++] = c1;
value[i] = c2;
}
}
}
} |
Causes this character sequence to be replaced by the reverse of
the sequence. If there are any surrogate pairs included in the
sequence, these are treated as single characters for the
reverse operation. Thus, the order of the high-low surrogates
is never reversed.
Let <i>n</i> be the character length of this character sequence
(not the length in {@code char} values) just prior to
execution of the {@code reverse} method. Then the
character at index <i>k</i> in the new character sequence is
equal to the character at index <i>n-k-1</i> in the old
character sequence.
<p>Note that the reverse operation may result in producing
surrogate pairs that were unpaired low-surrogates and
high-surrogates before the operation. For example, reversing
"\u005CuDC00\u005CuD800" produces "\u005CuD800\u005CuDC00" which is
a valid surrogate pair.
@return a reference to this object.
public AbstractStringBuilder reverse() {
boolean hasSurrogates = false;
int n = count - 1;
for (int j = (n-1) >> 1; j >= 0; j--) {
int k = n - j;
char cj = value[j];
char ck = value[k];
value[j] = ck;
value[k] = cj;
if (Character.isSurrogate(cj) ||
Character.isSurrogate(ck)) {
hasSurrogates = true;
}
}
if (hasSurrogates) {
reverseAllValidSurrogatePairs();
}
return this;
}
/** Outlined helper method for reverse() | AbstractStringBuilder::reverseAllValidSurrogatePairs | java | Reginer/aosp-android-jar | android-32/src/java/lang/AbstractStringBuilder.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/java/lang/AbstractStringBuilder.java | MIT |
final char[] getValue() {
return value;
} |
Needed by {@code String} for the contentEquals method.
| AbstractStringBuilder::getValue | java | Reginer/aosp-android-jar | android-32/src/java/lang/AbstractStringBuilder.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/java/lang/AbstractStringBuilder.java | MIT |
public void setWindow(CursorWindow window) {
if (window != mWindow) {
closeWindow();
mWindow = window;
}
} |
Sets a new cursor window for the cursor to use.
<p>
The cursor takes ownership of the provided cursor window; the cursor window
will be closed when the cursor is closed or when the cursor adopts a new
cursor window.
</p><p>
If the cursor previously had a cursor window, then it is closed when the
new cursor window is assigned.
</p>
@param window The new cursor window, typically a remote cursor window.
| AbstractWindowedCursor::setWindow | java | Reginer/aosp-android-jar | android-31/src/android/database/AbstractWindowedCursor.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/database/AbstractWindowedCursor.java | MIT |
public boolean hasWindow() {
return mWindow != null;
} |
Returns true if the cursor has an associated cursor window.
@return True if the cursor has an associated cursor window.
| AbstractWindowedCursor::hasWindow | java | Reginer/aosp-android-jar | android-31/src/android/database/AbstractWindowedCursor.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/database/AbstractWindowedCursor.java | MIT |
public static WifiBlobStore getInstance() {
if (sInstance == null) {
sInstance = new WifiBlobStore();
}
return sInstance;
} |
Database blob store for Wifi.
@hide
public class WifiBlobStore extends ConnectivityBlobStore {
private static final String DB_NAME = "WifiBlobStore.db";
private static final String LEGACY_KEYSTORE_SERVICE_NAME = "android.security.legacykeystore";
private static WifiBlobStore sInstance;
private WifiBlobStore() {
super(DB_NAME);
}
/** Returns an instance of WifiBlobStore. | WifiBlobStore::getInstance | java | Reginer/aosp-android-jar | android-35/src/android/net/wifi/WifiBlobStore.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/net/wifi/WifiBlobStore.java | MIT |
public static ILegacyKeystore getLegacyKeystore() {
return ILegacyKeystore.Stub.asInterface(
ServiceManager.checkService(LEGACY_KEYSTORE_SERVICE_NAME));
} |
Database blob store for Wifi.
@hide
public class WifiBlobStore extends ConnectivityBlobStore {
private static final String DB_NAME = "WifiBlobStore.db";
private static final String LEGACY_KEYSTORE_SERVICE_NAME = "android.security.legacykeystore";
private static WifiBlobStore sInstance;
private WifiBlobStore() {
super(DB_NAME);
}
/** Returns an instance of WifiBlobStore.
public static WifiBlobStore getInstance() {
if (sInstance == null) {
sInstance = new WifiBlobStore();
}
return sInstance;
}
/** Returns an interface to access the Legacy Keystore service. | WifiBlobStore::getLegacyKeystore | java | Reginer/aosp-android-jar | android-35/src/android/net/wifi/WifiBlobStore.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/net/wifi/WifiBlobStore.java | MIT |
public SurfaceConfig(SurfaceConfig sc) {
mDepthMin = sc.mDepthMin;
mDepthPref = sc.mDepthPref;
mStencilMin = sc.mStencilMin;
mStencilPref = sc.mStencilPref;
mColorMin = sc.mColorMin;
mColorPref = sc.mColorPref;
mAlphaMin = sc.mAlphaMin;
mAlphaPref = sc.mAlphaPref;
mSamplesMin = sc.mSamplesMin;
mSamplesPref = sc.mSamplesPref;
mSamplesQ = sc.mSamplesQ;
} |
@deprecated in API 16
| SurfaceConfig::SurfaceConfig | java | Reginer/aosp-android-jar | android-35/src/android/renderscript/RenderScriptGL.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/renderscript/RenderScriptGL.java | MIT |
public void setColor(int minimum, int preferred) {
validateRange(minimum, preferred, 5, 8);
mColorMin = minimum;
mColorPref = preferred;
} |
@deprecated in API 16
Set the per-component bit depth for color (red, green, blue). This
configures the surface for an unsigned integer buffer type.
@param minimum
@param preferred
| SurfaceConfig::setColor | java | Reginer/aosp-android-jar | android-35/src/android/renderscript/RenderScriptGL.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/renderscript/RenderScriptGL.java | MIT |
public void setAlpha(int minimum, int preferred) {
validateRange(minimum, preferred, 0, 8);
mAlphaMin = minimum;
mAlphaPref = preferred;
} |
@deprecated in API 16
Set the bit depth for alpha. This configures the surface for
an unsigned integer buffer type.
@param minimum
@param preferred
| SurfaceConfig::setAlpha | java | Reginer/aosp-android-jar | android-35/src/android/renderscript/RenderScriptGL.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/renderscript/RenderScriptGL.java | MIT |
public void setSamples(int minimum, int preferred, float Q) {
validateRange(minimum, preferred, 1, 32);
if (Q < 0.0f || Q > 1.0f) {
throw new RSIllegalArgumentException("Quality out of 0-1 range.");
}
mSamplesMin = minimum;
mSamplesPref = preferred;
mSamplesQ = Q;
} |
@deprecated in API 16
Configure the multisample rendering.
@param minimum The required number of samples, must be at least 1.
@param preferred The targe number of samples, must be at least
minimum
@param Q The quality of samples, range 0-1. Used to decide between
different formats which have the same number of samples but
different rendering quality.
| SurfaceConfig::setSamples | java | Reginer/aosp-android-jar | android-35/src/android/renderscript/RenderScriptGL.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/renderscript/RenderScriptGL.java | MIT |
public void setSurfaceTexture(SurfaceTexture sur, int w, int h) {
validate();
//android.util.Log.v("rs", "set surface " + sur + " w=" + w + ", h=" + h);
Surface s = null;
if (sur != null) {
s = new Surface(sur);
}
mWidth = w;
mHeight = h;
nContextSetSurface(w, h, s);
} |
@deprecated in API 16
Bind an os surface
@param w
@param h
@param sur
| SurfaceConfig::setSurfaceTexture | java | Reginer/aosp-android-jar | android-35/src/android/renderscript/RenderScriptGL.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/renderscript/RenderScriptGL.java | MIT |
public int getHeight() {
return mHeight;
} |
@deprecated in API 16
return the height of the last set surface.
@return int
| SurfaceConfig::getHeight | java | Reginer/aosp-android-jar | android-35/src/android/renderscript/RenderScriptGL.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/renderscript/RenderScriptGL.java | MIT |
public int getWidth() {
return mWidth;
} |
@deprecated in API 16
return the width of the last set surface.
@return int
| SurfaceConfig::getWidth | java | Reginer/aosp-android-jar | android-35/src/android/renderscript/RenderScriptGL.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/renderscript/RenderScriptGL.java | MIT |
public void pause() {
validate();
nContextPause();
} |
@deprecated in API 16
Temporarly halt calls to the root rendering script.
| SurfaceConfig::pause | java | Reginer/aosp-android-jar | android-35/src/android/renderscript/RenderScriptGL.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/renderscript/RenderScriptGL.java | MIT |
public void resume() {
validate();
nContextResume();
} |
@deprecated in API 16
Resume calls to the root rendering script.
| SurfaceConfig::resume | java | Reginer/aosp-android-jar | android-35/src/android/renderscript/RenderScriptGL.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/renderscript/RenderScriptGL.java | MIT |
public void bindProgramFragment(ProgramFragment p) {
validate();
nContextBindProgramFragment((int)safeID(p));
} |
@deprecated in API 16
Set the default ProgramFragment object seen as the parent state by the
root rendering script.
@param p
| SurfaceConfig::bindProgramFragment | java | Reginer/aosp-android-jar | android-35/src/android/renderscript/RenderScriptGL.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/renderscript/RenderScriptGL.java | MIT |
public BERApplicationSpecific(
int tag,
ASN1Encodable object)
throws IOException
{
this(true, tag, object);
} |
Create an application specific object with a tagging of explicit/constructed.
@param tag the tag number for this object.
@param object the object to be contained.
| BERApplicationSpecific::BERApplicationSpecific | java | Reginer/aosp-android-jar | android-35/src/com/android/internal/org/bouncycastle/asn1/BERApplicationSpecific.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/org/bouncycastle/asn1/BERApplicationSpecific.java | MIT |
public BERApplicationSpecific(
boolean constructed,
int tag,
ASN1Encodable object)
throws IOException
{
super(constructed || object.toASN1Primitive().isConstructed(), tag, getEncoding(constructed, object));
} |
Create an application specific object with the tagging style given by the value of constructed.
@param constructed true if the object is constructed.
@param tag the tag number for this object.
@param object the object to be contained.
| BERApplicationSpecific::BERApplicationSpecific | java | Reginer/aosp-android-jar | android-35/src/com/android/internal/org/bouncycastle/asn1/BERApplicationSpecific.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/org/bouncycastle/asn1/BERApplicationSpecific.java | MIT |
public BERApplicationSpecific(int tagNo, ASN1EncodableVector vec)
{
super(true, tagNo, getEncodedVector(vec));
} |
Create an application specific object which is marked as constructed
@param tagNo the tag number for this object.
@param vec the objects making up the application specific object.
| BERApplicationSpecific::BERApplicationSpecific | java | Reginer/aosp-android-jar | android-35/src/com/android/internal/org/bouncycastle/asn1/BERApplicationSpecific.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/org/bouncycastle/asn1/BERApplicationSpecific.java | MIT |
void encode(ASN1OutputStream out, boolean withTag) throws IOException
{
int flags = BERTags.APPLICATION;
if (isConstructed)
{
flags |= BERTags.CONSTRUCTED;
}
out.writeEncodedIndef(withTag, flags, tag, octets);
} |
Create an application specific object which is marked as constructed
@param tagNo the tag number for this object.
@param vec the objects making up the application specific object.
public BERApplicationSpecific(int tagNo, ASN1EncodableVector vec)
{
super(true, tagNo, getEncodedVector(vec));
}
private static byte[] getEncodedVector(ASN1EncodableVector vec)
{
ByteArrayOutputStream bOut = new ByteArrayOutputStream();
for (int i = 0; i != vec.size(); i++)
{
try
{
bOut.write(((ASN1Object)vec.get(i)).getEncoded(ASN1Encoding.BER));
}
catch (IOException e)
{
throw new ASN1ParsingException("malformed object: " + e, e);
}
}
return bOut.toByteArray();
}
/* (non-Javadoc)
@see org.bouncycastle.asn1.ASN1Primitive#encode(org.bouncycastle.asn1.DEROutputStream)
| BERApplicationSpecific::encode | java | Reginer/aosp-android-jar | android-35/src/com/android/internal/org/bouncycastle/asn1/BERApplicationSpecific.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/org/bouncycastle/asn1/BERApplicationSpecific.java | MIT |
public final static String getDefaultAlgorithm() {
String type;
type = AccessController.doPrivileged(new PrivilegedAction<String>() {
@Override
public String run() {
return Security.getProperty(
"ssl.TrustManagerFactory.algorithm");
}
});
if (type == null) {
type = "SunX509";
}
return type;
} |
Obtains the default TrustManagerFactory algorithm name.
<p>The default TrustManager can be changed at runtime by setting
the value of the {@code ssl.TrustManagerFactory.algorithm}
security property to the desired algorithm name.
@see java.security.Security security properties
@return the default algorithm name as specified by the
{@code ssl.TrustManagerFactory.algorithm} security property, or an
implementation-specific default if no such property exists.
| TrustManagerFactory::getDefaultAlgorithm | java | Reginer/aosp-android-jar | android-32/src/javax/net/ssl/TrustManagerFactory.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/javax/net/ssl/TrustManagerFactory.java | MIT |
protected TrustManagerFactory(TrustManagerFactorySpi factorySpi,
Provider provider, String algorithm) {
this.factorySpi = factorySpi;
this.provider = provider;
this.algorithm = algorithm;
} |
Creates a TrustManagerFactory object.
@param factorySpi the delegate
@param provider the provider
@param algorithm the algorithm
| TrustManagerFactory::TrustManagerFactory | java | Reginer/aosp-android-jar | android-32/src/javax/net/ssl/TrustManagerFactory.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/javax/net/ssl/TrustManagerFactory.java | MIT |
public final String getAlgorithm() {
return this.algorithm;
} |
Returns the algorithm name of this <code>TrustManagerFactory</code>
object.
<p>This is the same name that was specified in one of the
<code>getInstance</code> calls that created this
<code>TrustManagerFactory</code> object.
@return the algorithm name of this <code>TrustManagerFactory</code>
object
| TrustManagerFactory::getAlgorithm | java | Reginer/aosp-android-jar | android-32/src/javax/net/ssl/TrustManagerFactory.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/javax/net/ssl/TrustManagerFactory.java | MIT |
public static final TrustManagerFactory getInstance(String algorithm)
throws NoSuchAlgorithmException {
GetInstance.Instance instance = GetInstance.getInstance
("TrustManagerFactory", TrustManagerFactorySpi.class,
algorithm);
return new TrustManagerFactory((TrustManagerFactorySpi)instance.impl,
instance.provider, algorithm);
} |
Returns a <code>TrustManagerFactory</code> object that acts as a
factory for trust managers.
<p> This method traverses the list of registered security Providers,
starting with the most preferred Provider.
A new TrustManagerFactory object encapsulating the
TrustManagerFactorySpi implementation from the first
Provider that supports the specified algorithm is returned.
<p> Note that the list of registered providers may be retrieved via
the {@link Security#getProviders() Security.getProviders()} method.
@param algorithm the standard name of the requested trust management
algorithm. See the <a href=
"https://docs.oracle.com/javase/8/docs/technotes/guides/security/jsse/JSSERefGuide.html">
Java Secure Socket Extension Reference Guide </a>
for information about standard algorithm names.
@return the new <code>TrustManagerFactory</code> object.
@exception NoSuchAlgorithmException if no Provider supports a
TrustManagerFactorySpi implementation for the
specified algorithm.
@exception NullPointerException if algorithm is null.
@see java.security.Provider
| TrustManagerFactory::getInstance | java | Reginer/aosp-android-jar | android-32/src/javax/net/ssl/TrustManagerFactory.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/javax/net/ssl/TrustManagerFactory.java | MIT |
public static RequestWrapper create(@Nullable ActivityStarter.Request request) {
if (request == null) return null;
return new RequestWrapper(request);
} |
Wrapper of {@link com.android.server.wm.ActivityStarter.Request}.
@hide
@SystemApi(client = SystemApi.Client.MODULE_LIBRARIES)
public final class RequestWrapper {
private final ActivityStarter.Request mRequest;
private RequestWrapper(ActivityStarter.Request request) {
mRequest = request;
}
/** @hide | RequestWrapper::create | java | Reginer/aosp-android-jar | android-33/src/com/android/server/wm/RequestWrapper.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/server/wm/RequestWrapper.java | MIT |
public ActivityStarter.Request getRequest() {
return mRequest;
} |
Wrapper of {@link com.android.server.wm.ActivityStarter.Request}.
@hide
@SystemApi(client = SystemApi.Client.MODULE_LIBRARIES)
public final class RequestWrapper {
private final ActivityStarter.Request mRequest;
private RequestWrapper(ActivityStarter.Request request) {
mRequest = request;
}
/** @hide
public static RequestWrapper create(@Nullable ActivityStarter.Request request) {
if (request == null) return null;
return new RequestWrapper(request);
}
/** @hide | RequestWrapper::getRequest | java | Reginer/aosp-android-jar | android-33/src/com/android/server/wm/RequestWrapper.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/server/wm/RequestWrapper.java | MIT |
public void parse(String str) throws DateException
{
sign = 1;
weeks = 0;
days = 0;
hours = 0;
minutes = 0;
seconds = 0;
int len = str.length();
int index = 0;
char c;
if (len < 1) {
return ;
}
c = str.charAt(0);
if (c == '-') {
sign = -1;
index++;
}
else if (c == '+') {
index++;
}
if (len <= index) {
return ;
}
c = str.charAt(index);
if (c != 'P') {
throw new DateException (
"Duration.parse(str='" + str + "') expected 'P' at index="
+ index);
}
index++;
if (len <= index) {
return;
}
c = str.charAt(index);
if (c == 'T') {
index++;
}
int n = 0;
for (; index < len; index++) {
c = str.charAt(index);
if (c >= '0' && c <= '9') {
n *= 10;
n += ((int)(c-'0'));
}
else if (c == 'W') {
weeks = n;
n = 0;
}
else if (c == 'H') {
hours = n;
n = 0;
}
else if (c == 'M') {
minutes = n;
n = 0;
}
else if (c == 'S') {
seconds = n;
n = 0;
}
else if (c == 'D') {
days = n;
n = 0;
}
else if (c == 'T') {
}
else {
throw new DateException (
"Duration.parse(str='" + str + "') unexpected char '"
+ c + "' at index=" + index);
}
}
} |
Parse according to RFC2445 ss4.3.6. (It's actually a little loose with
its parsing, for better or for worse)
| Duration::parse | java | Reginer/aosp-android-jar | android-31/src/com/android/calendarcommon2/Duration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/com/android/calendarcommon2/Duration.java | MIT |
public void addTo(Calendar cal)
{
cal.add(Calendar.DAY_OF_MONTH, sign*weeks*7);
cal.add(Calendar.DAY_OF_MONTH, sign*days);
cal.add(Calendar.HOUR, sign*hours);
cal.add(Calendar.MINUTE, sign*minutes);
cal.add(Calendar.SECOND, sign*seconds);
} |
Add this to the calendar provided, in place, in the calendar.
| Duration::addTo | java | Reginer/aosp-android-jar | android-31/src/com/android/calendarcommon2/Duration.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/com/android/calendarcommon2/Duration.java | MIT |
public static boolean supportsChipsUi() {
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH;
} |
Returns true when the caller can use Chips UI in its environment.
| ChipsUtil::supportsChipsUi | java | Reginer/aosp-android-jar | android-33/src/com/android/ex/chips/ChipsUtil.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/ex/chips/ChipsUtil.java | MIT |
public static boolean isRunningMOrLater() {
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.M;
} |
Whether we are running on M or later version.
<p>This is interesting for us because new permission model is introduced in M and we need to
check if we have {@link #REQUIRED_PERMISSIONS}.
| ChipsUtil::isRunningMOrLater | java | Reginer/aosp-android-jar | android-33/src/com/android/ex/chips/ChipsUtil.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/ex/chips/ChipsUtil.java | MIT |
public static int checkPermission(Context context, String permission) {
if (isRunningMOrLater()) {
// TODO: Use "context.checkSelfPermission(permission)" once it's safe to move to M sdk
return context.checkPermission(permission, Process.myPid(), Process.myUid());
} else {
// Assume that we have permission before M.
return PackageManager.PERMISSION_GRANTED;
}
} |
Returns {@link PackageManager#PERMISSION_GRANTED} if given permission is granted, or
{@link PackageManager#PERMISSION_DENIED} if not.
| ChipsUtil::checkPermission | java | Reginer/aosp-android-jar | android-33/src/com/android/ex/chips/ChipsUtil.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/ex/chips/ChipsUtil.java | MIT |
public static boolean hasPermissions(Context context,
@Nullable PermissionsCheckListener permissionsCheckListener) {
for (String permission : REQUIRED_PERMISSIONS) {
final boolean granted =
checkPermission(context, permission) == PackageManager.PERMISSION_GRANTED;
if (permissionsCheckListener != null) {
permissionsCheckListener.onPermissionCheck(permission, granted);
}
if (!granted) {
return false;
}
}
return true;
} |
Returns true if all permissions in {@link #REQUIRED_PERMISSIONS} are granted.
<p>If {@link PermissionsCheckListener} is specified it will be called for every
{@link #checkPermission} call.
| ChipsUtil::hasPermissions | java | Reginer/aosp-android-jar | android-33/src/com/android/ex/chips/ChipsUtil.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/ex/chips/ChipsUtil.java | MIT |
public void addMix(AudioMix mix) throws IllegalArgumentException {
if (mix == null) {
throw new IllegalArgumentException("Illegal null AudioMix argument");
}
mMixes.add(mix);
} |
Add an {@link AudioMix} to be part of the audio policy being built.
@param mix a non-null {@link AudioMix} to be part of the audio policy.
@return the same Builder instance.
@throws IllegalArgumentException
| AudioPolicyConfig::addMix | java | Reginer/aosp-android-jar | android-32/src/android/media/audiopolicy/AudioPolicyConfig.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/media/audiopolicy/AudioPolicyConfig.java | MIT |
public String toCompactLogString() {
String compactDump = "reg:" + mRegistrationId;
int mixNum = 0;
for (AudioMix mix : mMixes) {
compactDump += " Mix:" + mixNum + "-Typ:" + mixTypePrefix(mix.getMixType())
+ "-Rul:" + mix.getRule().getCriteria().size();
mixNum++;
}
return compactDump;
} |
Very short dump of configuration
@return a condensed dump of configuration, uniquely identifies a policy in a log
| AudioPolicyConfig::toCompactLogString | java | Reginer/aosp-android-jar | android-32/src/android/media/audiopolicy/AudioPolicyConfig.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/media/audiopolicy/AudioPolicyConfig.java | MIT |
public FaceDataFrame(
@BiometricFaceConstants.FaceAcquired int acquiredInfo,
int vendorCode,
float pan,
float tilt,
float distance,
boolean isCancellable) {
mAcquiredInfo = acquiredInfo;
mVendorCode = vendorCode;
mPan = pan;
mTilt = tilt;
mDistance = distance;
mIsCancellable = isCancellable;
} |
A container for data common to {@link FaceAuthenticationFrame} and {@link FaceEnrollFrame}.
@param acquiredInfo An integer corresponding to a known acquired message.
@param vendorCode An integer representing a custom vendor-specific message. Ignored unless
{@code acquiredInfo} is {@code FACE_ACQUIRED_VENDOR}.
@param pan The horizontal pan of the detected face. Values in the range [-1, 1] indicate a
good capture.
@param tilt The vertical tilt of the detected face. Values in the range [-1, 1] indicate a
good capture.
@param distance The distance of the detected face from the device. Values in the range
[-1, 1] indicate a good capture.
@param isCancellable Whether the ongoing face operation should be canceled.
| FaceDataFrame::FaceDataFrame | java | Reginer/aosp-android-jar | android-31/src/android/hardware/face/FaceDataFrame.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/hardware/face/FaceDataFrame.java | MIT |
public FaceDataFrame(@BiometricFaceConstants.FaceAcquired int acquiredInfo, int vendorCode) {
mAcquiredInfo = acquiredInfo;
mVendorCode = vendorCode;
mPan = 0f;
mTilt = 0f;
mDistance = 0f;
mIsCancellable = false;
} |
A container for data common to {@link FaceAuthenticationFrame} and {@link FaceEnrollFrame}.
@param acquiredInfo An integer corresponding to a known acquired message.
@param vendorCode An integer representing a custom vendor-specific message. Ignored unless
{@code acquiredInfo} is {@code FACE_ACQUIRED_VENDOR}.
| FaceDataFrame::FaceDataFrame | java | Reginer/aosp-android-jar | android-31/src/android/hardware/face/FaceDataFrame.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/hardware/face/FaceDataFrame.java | MIT |
public int getVendorCode() {
return mVendorCode;
} |
@return An integer representing a custom vendor-specific message. Ignored unless
{@code acquiredInfo} is {@link
android.hardware.biometrics.BiometricFaceConstants#FACE_ACQUIRED_VENDOR}.
@see android.hardware.biometrics.BiometricFaceConstants
| FaceDataFrame::getVendorCode | java | Reginer/aosp-android-jar | android-31/src/android/hardware/face/FaceDataFrame.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/hardware/face/FaceDataFrame.java | MIT |
public float getPan() {
return mPan;
} |
@return The horizontal pan of the detected face. Values in the range [-1, 1] indicate a good
capture.
| FaceDataFrame::getPan | java | Reginer/aosp-android-jar | android-31/src/android/hardware/face/FaceDataFrame.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/hardware/face/FaceDataFrame.java | MIT |
public float getTilt() {
return mTilt;
} |
@return The vertical tilt of the detected face. Values in the range [-1, 1] indicate a good
capture.
| FaceDataFrame::getTilt | java | Reginer/aosp-android-jar | android-31/src/android/hardware/face/FaceDataFrame.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/hardware/face/FaceDataFrame.java | MIT |
public float getDistance() {
return mDistance;
} |
@return The distance of the detected face from the device. Values in the range [-1, 1]
indicate a good capture.
| FaceDataFrame::getDistance | java | Reginer/aosp-android-jar | android-31/src/android/hardware/face/FaceDataFrame.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/hardware/face/FaceDataFrame.java | MIT |
public boolean isCancellable() {
return mIsCancellable;
} |
@return Whether the ongoing face operation should be canceled.
| FaceDataFrame::isCancellable | java | Reginer/aosp-android-jar | android-31/src/android/hardware/face/FaceDataFrame.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/hardware/face/FaceDataFrame.java | MIT |
public ZipError(String s) {
super(s);
} |
Constructs a ZipError with the given detail message.
@param s the {@code String} containing a detail message
| ZipError::ZipError | java | Reginer/aosp-android-jar | android-31/src/java/util/zip/ZipError.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/java/util/zip/ZipError.java | MIT |
public static void createPathFromPathData(Path outPath, PathData data) {
nCreatePathFromPathData(outPath.mNativePath, data.mNativePathData);
} |
Interpret PathData as path commands and insert the commands to the given path.
@param data The source PathData to be converted.
@param outPath The Path object where path commands will be inserted.
| getSimpleName::createPathFromPathData | java | Reginer/aosp-android-jar | android-31/src/android/util/PathParser.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/util/PathParser.java | MIT |
public static boolean canMorph(PathData pathDataFrom, PathData pathDataTo) {
return nCanMorph(pathDataFrom.mNativePathData, pathDataTo.mNativePathData);
} |
@param pathDataFrom The source path represented in PathData
@param pathDataTo The target path represented in PathData
@return whether the <code>nodesFrom</code> can morph into <code>nodesTo</code>
| getSimpleName::canMorph | java | Reginer/aosp-android-jar | android-31/src/android/util/PathParser.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/util/PathParser.java | MIT |
public void setPathData(PathData source) {
nSetPathData(mNativePathData, source.mNativePathData);
} |
Update the path data to match the source.
Before calling this, make sure canMorph(target, source) is true.
@param source The source path represented in PathData
| PathData::setPathData | java | Reginer/aosp-android-jar | android-31/src/android/util/PathParser.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/util/PathParser.java | MIT |
public static boolean interpolatePathData(PathData outData, PathData fromData, PathData toData,
float fraction) {
return nInterpolatePathData(outData.mNativePathData, fromData.mNativePathData,
toData.mNativePathData, fraction);
} |
Interpolate between the <code>fromData</code> and <code>toData</code> according to the
<code>fraction</code>, and put the resulting path data into <code>outData</code>.
@param outData The resulting PathData of the interpolation
@param fromData The start value as a PathData.
@param toData The end value as a PathData
@param fraction The fraction to interpolate.
| PathData::interpolatePathData | java | Reginer/aosp-android-jar | android-31/src/android/util/PathParser.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/util/PathParser.java | MIT |
public ContentInfo(byte[] bytes) {
DerValue octetString = new DerValue(DerValue.tag_OctetString, bytes);
this.contentType = DATA_OID;
this.content = octetString;
} |
Make a contentInfo of type data.
| ContentInfo::ContentInfo | java | Reginer/aosp-android-jar | android-35/src/sun/security/pkcs/ContentInfo.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/sun/security/pkcs/ContentInfo.java | MIT |
public ContentInfo(DerInputStream derin)
throws IOException, ParsingException
{
this(derin, false);
} |
Parses a PKCS#7 content info.
| ContentInfo::ContentInfo | java | Reginer/aosp-android-jar | android-35/src/sun/security/pkcs/ContentInfo.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/sun/security/pkcs/ContentInfo.java | MIT |
public ContentInfo(DerInputStream derin, boolean oldStyle)
throws IOException, ParsingException
{
DerInputStream disType;
DerInputStream disTaggedContent;
DerValue type;
DerValue taggedContent;
DerValue[] typeAndContent;
DerValue[] contents;
typeAndContent = derin.getSequence(2);
// Parse the content type
type = typeAndContent[0];
disType = new DerInputStream(type.toByteArray());
contentType = disType.getOID();
if (oldStyle) {
// JDK1.1.x-style encoding
content = typeAndContent[1];
} else {
// This is the correct, standards-compliant encoding.
// Parse the content (OPTIONAL field).
// Skip the [0] EXPLICIT tag by pretending that the content is the
// one and only element in an implicitly tagged set
if (typeAndContent.length > 1) { // content is OPTIONAL
taggedContent = typeAndContent[1];
disTaggedContent
= new DerInputStream(taggedContent.toByteArray());
contents = disTaggedContent.getSet(1, true);
content = contents[0];
}
}
} |
Parses a PKCS#7 content info.
<p>This constructor is used only for backwards compatibility with
PKCS#7 blocks that were generated using JDK1.1.x.
@param derin the ASN.1 encoding of the content info.
@param oldStyle flag indicating whether or not the given content info
is encoded according to JDK1.1.x.
| ContentInfo::ContentInfo | java | Reginer/aosp-android-jar | android-35/src/sun/security/pkcs/ContentInfo.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/sun/security/pkcs/ContentInfo.java | MIT |
public byte[] getContentBytes() throws IOException {
if (content == null)
return null;
DerInputStream dis = new DerInputStream(content.toByteArray());
return dis.getOctetString();
} |
Returns a byte array representation of the data held in
the content field.
@return byte array representation of data held in content field
@throws IOException if content bytes are invalid
| ContentInfo::getContentBytes | java | Reginer/aosp-android-jar | android-35/src/sun/security/pkcs/ContentInfo.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/sun/security/pkcs/ContentInfo.java | MIT |
public documentimportnode05(final DOMTestDocumentBuilderFactory factory) throws org.w3c.domts.DOMTestIncompatibleException {
org.w3c.domts.DocumentBuilderSetting[] settings =
new org.w3c.domts.DocumentBuilderSetting[] {
org.w3c.domts.DocumentBuilderSetting.namespaceAware
};
DOMTestDocumentBuilderFactory testFactory = factory.newInstance(settings);
setFactory(testFactory);
//
// check if loaded documents are supported for content type
//
String contentType = getContentType();
preload(contentType, "staffNS", true);
preload(contentType, "staff", true);
} |
Constructor.
@param factory document factory, may not be null
@throws org.w3c.domts.DOMTestIncompatibleException Thrown if test is not compatible with parser configuration
| documentimportnode05::documentimportnode05 | java | Reginer/aosp-android-jar | android-32/src/org/w3c/domts/level2/core/documentimportnode05.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/org/w3c/domts/level2/core/documentimportnode05.java | MIT |
public void runTest() throws Throwable {
Document doc;
Document docImported;
Attr attr;
Node importedAttr;
String nodeName;
int nodeType;
String nodeValue;
String namespaceURI;
doc = (Document) load("staffNS", true);
docImported = (Document) load("staff", true);
attr = doc.createAttributeNS("http://www.w3.org/DOM/Test", "a_:b0");
importedAttr = docImported.importNode(attr, false);
nodeName = importedAttr.getNodeName();
nodeValue = importedAttr.getNodeValue();
nodeType = (int) importedAttr.getNodeType();
namespaceURI = importedAttr.getNamespaceURI();
assertEquals("documentimportnode05_nodeName", "a_:b0", nodeName);
assertEquals("documentimportnode05_nodeType", 2, nodeType);
assertEquals("documentimportnode05_nodeValue", "", nodeValue);
assertEquals("documentimportnode05_namespaceURI", "http://www.w3.org/DOM/Test", namespaceURI);
} |
Runs the test case.
@throws Throwable Any uncaught exception causes test to fail
| documentimportnode05::runTest | java | Reginer/aosp-android-jar | android-32/src/org/w3c/domts/level2/core/documentimportnode05.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/org/w3c/domts/level2/core/documentimportnode05.java | MIT |
public String getTargetURI() {
return "http://www.w3.org/2001/DOM-Test-Suite/level2/core/documentimportnode05";
} |
Gets URI that identifies the test.
@return uri identifier of test
| documentimportnode05::getTargetURI | java | Reginer/aosp-android-jar | android-32/src/org/w3c/domts/level2/core/documentimportnode05.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/org/w3c/domts/level2/core/documentimportnode05.java | MIT |
public static void main(final String[] args) {
DOMTestCase.doMain(documentimportnode05.class, args);
} |
Runs this test from the command line.
@param args command line arguments
| documentimportnode05::main | java | Reginer/aosp-android-jar | android-32/src/org/w3c/domts/level2/core/documentimportnode05.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/org/w3c/domts/level2/core/documentimportnode05.java | MIT |
public static int getMediaLayoutId(int mediaItemType) {
switch (mediaItemType) {
case MediaItemType.TYPE_DEVICE:
case MediaItemType.TYPE_PAIR_NEW_DEVICE:
return R.layout.media_output_list_item_advanced;
case MediaItemType.TYPE_GROUP_DIVIDER:
default:
return R.layout.media_output_list_group_divider;
}
} |
Get layout id based on media item Type.
| MediaItem::getMediaLayoutId | java | Reginer/aosp-android-jar | android-34/src/com/android/systemui/media/dialog/MediaItem.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/systemui/media/dialog/MediaItem.java | MIT |
public From() {
super(NAME);
} | Default constructor
| From::From | java | Reginer/aosp-android-jar | android-34/src/gov/nist/javax/sip/header/From.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/gov/nist/javax/sip/header/From.java | MIT |
public From(To to) {
super(NAME);
address = to.address;
parameters = to.parameters;
} | Generate a FROM header from a TO header
| From::From | java | Reginer/aosp-android-jar | android-34/src/gov/nist/javax/sip/header/From.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/gov/nist/javax/sip/header/From.java | MIT |
protected String encodeBody() {
return encodeBody(new StringBuffer()).toString();
} |
Encode the header content into a String.
@return String
| From::encodeBody | java | Reginer/aosp-android-jar | android-34/src/gov/nist/javax/sip/header/From.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/gov/nist/javax/sip/header/From.java | MIT |
public HostPort getHostPort() {
return address.getHostPort();
} |
Conveniance accessor function to get the hostPort field from the address.
Warning -- this assumes that the embedded URI is a SipURL.
@return hostport field
| From::getHostPort | java | Reginer/aosp-android-jar | android-34/src/gov/nist/javax/sip/header/From.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/gov/nist/javax/sip/header/From.java | MIT |
public String getDisplayName() {
return address.getDisplayName();
} |
Get the display name from the address.
@return Display name
| From::getDisplayName | java | Reginer/aosp-android-jar | android-34/src/gov/nist/javax/sip/header/From.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/gov/nist/javax/sip/header/From.java | MIT |
public String getTag() {
if (parameters == null)
return null;
return getParameter(ParameterNames.TAG);
} |
Get the tag parameter from the address parm list.
@return tag field
| From::getTag | java | Reginer/aosp-android-jar | android-34/src/gov/nist/javax/sip/header/From.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/gov/nist/javax/sip/header/From.java | MIT |
public boolean hasTag() {
return hasParameter(ParameterNames.TAG);
} | Boolean function
@return true if the Tag exist
| From::hasTag | java | Reginer/aosp-android-jar | android-34/src/gov/nist/javax/sip/header/From.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/gov/nist/javax/sip/header/From.java | MIT |
public void removeTag() {
parameters.delete(ParameterNames.TAG);
} | remove Tag member
| From::removeTag | java | Reginer/aosp-android-jar | android-34/src/gov/nist/javax/sip/header/From.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/gov/nist/javax/sip/header/From.java | MIT |
public void setAddress(javax.sip.address.Address address) {
this.address = (AddressImpl) address;
} |
Set the address member
@param address Address to set
| From::setAddress | java | Reginer/aosp-android-jar | android-34/src/gov/nist/javax/sip/header/From.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/gov/nist/javax/sip/header/From.java | MIT |
public void setTag(String t) throws ParseException {
// JvB: check that it is a valid token
Parser.checkToken(t);
this.setParameter(ParameterNames.TAG, t);
} |
Set the tag member
@param t tag to set. From tags are mandatory.
| From::setTag | java | Reginer/aosp-android-jar | android-34/src/gov/nist/javax/sip/header/From.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/gov/nist/javax/sip/header/From.java | MIT |
public String getUserAtHostPort() {
return address.getUserAtHostPort();
} | Get the user@host port string.
| From::getUserAtHostPort | java | Reginer/aosp-android-jar | android-34/src/gov/nist/javax/sip/header/From.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/gov/nist/javax/sip/header/From.java | MIT |
default boolean disallowPanelTouches() {
return isShowingDetail();
} |
Should touches from the notification panel be disallowed?
The notification panel might grab any touches rom QS at any time to collapse the shade.
We should disallow that in case we are showing the detail panel.
| public::disallowPanelTouches | java | Reginer/aosp-android-jar | android-33/src/com/android/systemui/plugins/qs/QS.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/systemui/plugins/qs/QS.java | MIT |
default void setTransitionToFullShadeAmount(float pxAmount, float progress) {} |
Set the amount of pixels we have currently dragged down if we're transitioning to the full
shade. 0.0f means we're not transitioning yet.
| public::setTransitionToFullShadeAmount | java | Reginer/aosp-android-jar | android-33/src/com/android/systemui/plugins/qs/QS.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/systemui/plugins/qs/QS.java | MIT |
default boolean isFullyCollapsed() {
return true;
} |
@return if quick settings is fully collapsed currently
| public::isFullyCollapsed | java | Reginer/aosp-android-jar | android-33/src/com/android/systemui/plugins/qs/QS.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/systemui/plugins/qs/QS.java | MIT |
default void setScrollListener(ScrollListener scrollListener) {} |
Set a scroll listener for the QSPanel container
| public::setScrollListener | java | Reginer/aosp-android-jar | android-33/src/com/android/systemui/plugins/qs/QS.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/systemui/plugins/qs/QS.java | MIT |
default void setOverScrollAmount(int overScrollAmount) {} |
Sets the amount of vertical over scroll that should be performed on QS.
| public::setOverScrollAmount | java | Reginer/aosp-android-jar | android-33/src/com/android/systemui/plugins/qs/QS.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/systemui/plugins/qs/QS.java | MIT |
public ProcessBuilder(List<String> command) {
if (command == null)
throw new NullPointerException();
this.command = command;
} |
Constructs a process builder with the specified operating
system program and arguments. This constructor does <i>not</i>
make a copy of the {@code command} list. Subsequent
updates to the list will be reflected in the state of the
process builder. It is not checked whether
{@code command} corresponds to a valid operating system
command.
@param command the list containing the program and its arguments
@throws NullPointerException if the argument is null
| ProcessBuilder::ProcessBuilder | java | Reginer/aosp-android-jar | android-35/src/java/lang/ProcessBuilder.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/java/lang/ProcessBuilder.java | MIT |
public ProcessBuilder(String... command) {
this.command = new ArrayList<>(command.length);
for (String arg : command)
this.command.add(arg);
} |
Constructs a process builder with the specified operating
system program and arguments. This is a convenience
constructor that sets the process builder's command to a string
list containing the same strings as the {@code command}
array, in the same order. It is not checked whether
{@code command} corresponds to a valid operating system
command.
@param command a string array containing the program and its arguments
| ProcessBuilder::ProcessBuilder | java | Reginer/aosp-android-jar | android-35/src/java/lang/ProcessBuilder.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/java/lang/ProcessBuilder.java | MIT |
public ProcessBuilder command(List<String> command) {
if (command == null)
throw new NullPointerException();
this.command = command;
return this;
} |
Sets this process builder's operating system program and
arguments. This method does <i>not</i> make a copy of the
{@code command} list. Subsequent updates to the list will
be reflected in the state of the process builder. It is not
checked whether {@code command} corresponds to a valid
operating system command.
@param command the list containing the program and its arguments
@return this process builder
@throws NullPointerException if the argument is null
| ProcessBuilder::command | java | Reginer/aosp-android-jar | android-35/src/java/lang/ProcessBuilder.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/java/lang/ProcessBuilder.java | MIT |
public ProcessBuilder command(String... command) {
this.command = new ArrayList<>(command.length);
for (String arg : command)
this.command.add(arg);
return this;
} |
Sets this process builder's operating system program and
arguments. This is a convenience method that sets the command
to a string list containing the same strings as the
{@code command} array, in the same order. It is not
checked whether {@code command} corresponds to a valid
operating system command.
@param command a string array containing the program and its arguments
@return this process builder
| ProcessBuilder::command | java | Reginer/aosp-android-jar | android-35/src/java/lang/ProcessBuilder.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/java/lang/ProcessBuilder.java | MIT |
public List<String> command() {
return command;
} |
Returns this process builder's operating system program and
arguments. The returned list is <i>not</i> a copy. Subsequent
updates to the list will be reflected in the state of this
process builder.
@return this process builder's program and its arguments
| ProcessBuilder::command | java | Reginer/aosp-android-jar | android-35/src/java/lang/ProcessBuilder.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/java/lang/ProcessBuilder.java | MIT |
public Map<String,String> environment() {
SecurityManager security = System.getSecurityManager();
if (security != null)
security.checkPermission(new RuntimePermission("getenv.*"));
if (environment == null)
environment = ProcessEnvironment.environment();
assert environment != null;
return environment;
} |
Returns a string map view of this process builder's environment.
Whenever a process builder is created, the environment is
initialized to a copy of the current process environment (see
{@link System#getenv()}). Subprocesses subsequently started by
this object's {@link #start()} method will use this map as
their environment.
<p>The returned object may be modified using ordinary {@link
java.util.Map Map} operations. These modifications will be
visible to subprocesses started via the {@link #start()}
method. Two {@code ProcessBuilder} instances always
contain independent process environments, so changes to the
returned map will never be reflected in any other
{@code ProcessBuilder} instance or the values returned by
{@link System#getenv System.getenv}.
<p>If the system does not support environment variables, an
empty map is returned.
<p>The returned map does not permit null keys or values.
Attempting to insert or query the presence of a null key or
value will throw a {@link NullPointerException}.
Attempting to query the presence of a key or value which is not
of type {@link String} will throw a {@link ClassCastException}.
<p>The behavior of the returned map is system-dependent. A
system may not allow modifications to environment variables or
may forbid certain variable names or values. For this reason,
attempts to modify the map may fail with
{@link UnsupportedOperationException} or
{@link IllegalArgumentException}
if the modification is not permitted by the operating system.
<p>Since the external format of environment variable names and
values is system-dependent, there may not be a one-to-one
mapping between them and Java's Unicode strings. Nevertheless,
the map is implemented in such a way that environment variables
which are not modified by Java code will have an unmodified
native representation in the subprocess.
<p>The returned map and its collection views may not obey the
general contract of the {@link Object#equals} and
{@link Object#hashCode} methods.
<p>The returned map is typically case-sensitive on all platforms.
<p>If a security manager exists, its
{@link SecurityManager#checkPermission checkPermission} method
is called with a
{@link RuntimePermission}{@code ("getenv.*")} permission.
This may result in a {@link SecurityException} being thrown.
<p>When passing information to a Java subprocess,
<a href=System.html#EnvironmentVSSystemProperties>system properties</a>
are generally preferred over environment variables.
@return this process builder's environment
@throws SecurityException
if a security manager exists and its
{@link SecurityManager#checkPermission checkPermission}
method doesn't allow access to the process environment
@see Runtime#exec(String[],String[],java.io.File)
@see System#getenv()
| ProcessBuilder::environment | java | Reginer/aosp-android-jar | android-35/src/java/lang/ProcessBuilder.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/java/lang/ProcessBuilder.java | MIT |
public File directory() {
return directory;
} |
Returns this process builder's working directory.
Subprocesses subsequently started by this object's {@link
#start()} method will use this as their working directory.
The returned value may be {@code null} -- this means to use
the working directory of the current Java process, usually the
directory named by the system property {@code user.dir},
as the working directory of the child process.
@return this process builder's working directory
| ProcessBuilder::directory | java | Reginer/aosp-android-jar | android-35/src/java/lang/ProcessBuilder.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/java/lang/ProcessBuilder.java | MIT |
public ProcessBuilder directory(File directory) {
this.directory = directory;
return this;
} |
Sets this process builder's working directory.
Subprocesses subsequently started by this object's {@link
#start()} method will use this as their working directory.
The argument may be {@code null} -- this means to use the
working directory of the current Java process, usually the
directory named by the system property {@code user.dir},
as the working directory of the child process.
@param directory the new working directory
@return this process builder
| ProcessBuilder::directory | java | Reginer/aosp-android-jar | android-35/src/java/lang/ProcessBuilder.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/java/lang/ProcessBuilder.java | MIT |
public static final Redirect PIPE = new Redirect() {
public Type type() { return Type.PIPE; }
public String toString() { return type().toString(); }}; |
Indicates that subprocess I/O will be connected to the
current Java process over a pipe.
This is the default handling of subprocess standard I/O.
<p>It will always be true that
<pre> {@code
Redirect.PIPE.file() == null &&
Redirect.PIPE.type() == Redirect.Type.PIPE
}</pre>
| Type::Redirect | java | Reginer/aosp-android-jar | android-35/src/java/lang/ProcessBuilder.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/java/lang/ProcessBuilder.java | MIT |
public static final Redirect INHERIT = new Redirect() {
public Type type() { return Type.INHERIT; }
public String toString() { return type().toString(); }}; |
Indicates that subprocess I/O source or destination will be the
same as those of the current process. This is the normal
behavior of most operating system command interpreters (shells).
<p>It will always be true that
<pre> {@code
Redirect.INHERIT.file() == null &&
Redirect.INHERIT.type() == Redirect.Type.INHERIT
}</pre>
| Type::Redirect | java | Reginer/aosp-android-jar | android-35/src/java/lang/ProcessBuilder.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/java/lang/ProcessBuilder.java | MIT |
public File file() { return null; } |
Returns the {@link File} source or destination associated
with this redirect, or {@code null} if there is no such file.
@return the file associated with this redirect,
or {@code null} if there is no such file
| Type::file | java | Reginer/aosp-android-jar | android-35/src/java/lang/ProcessBuilder.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/java/lang/ProcessBuilder.java | MIT |
boolean append() {
throw new UnsupportedOperationException();
} |
When redirected to a destination file, indicates if the output
is to be written to the end of the file.
| Type::append | java | Reginer/aosp-android-jar | android-35/src/java/lang/ProcessBuilder.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/java/lang/ProcessBuilder.java | MIT |
public static Redirect from(final File file) {
if (file == null)
throw new NullPointerException();
return new Redirect() {
public Type type() { return Type.READ; }
public File file() { return file; }
public String toString() {
return "redirect to read from file \"" + file + "\"";
}
};
} |
Returns a redirect to read from the specified file.
<p>It will always be true that
<pre> {@code
Redirect.from(file).file() == file &&
Redirect.from(file).type() == Redirect.Type.READ
}</pre>
@param file The {@code File} for the {@code Redirect}.
@throws NullPointerException if the specified file is null
@return a redirect to read from the specified file
| Type::from | java | Reginer/aosp-android-jar | android-35/src/java/lang/ProcessBuilder.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/java/lang/ProcessBuilder.java | MIT |
public static Redirect to(final File file) {
if (file == null)
throw new NullPointerException();
return new Redirect() {
public Type type() { return Type.WRITE; }
public File file() { return file; }
public String toString() {
return "redirect to write to file \"" + file + "\"";
}
boolean append() { return false; }
};
} |
Returns a redirect to write to the specified file.
If the specified file exists when the subprocess is started,
its previous contents will be discarded.
<p>It will always be true that
<pre> {@code
Redirect.to(file).file() == file &&
Redirect.to(file).type() == Redirect.Type.WRITE
}</pre>
@param file The {@code File} for the {@code Redirect}.
@throws NullPointerException if the specified file is null
@return a redirect to write to the specified file
| Type::to | java | Reginer/aosp-android-jar | android-35/src/java/lang/ProcessBuilder.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/java/lang/ProcessBuilder.java | MIT |
public static Redirect appendTo(final File file) {
if (file == null)
throw new NullPointerException();
return new Redirect() {
public Type type() { return Type.APPEND; }
public File file() { return file; }
public String toString() {
return "redirect to append to file \"" + file + "\"";
}
boolean append() { return true; }
};
} |
Returns a redirect to append to the specified file.
Each write operation first advances the position to the
end of the file and then writes the requested data.
Whether the advancement of the position and the writing
of the data are done in a single atomic operation is
system-dependent and therefore unspecified.
<p>It will always be true that
<pre> {@code
Redirect.appendTo(file).file() == file &&
Redirect.appendTo(file).type() == Redirect.Type.APPEND
}</pre>
@param file The {@code File} for the {@code Redirect}.
@throws NullPointerException if the specified file is null
@return a redirect to append to the specified file
| Type::appendTo | java | Reginer/aosp-android-jar | android-35/src/java/lang/ProcessBuilder.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/java/lang/ProcessBuilder.java | MIT |
public boolean equals(Object obj) {
if (obj == this)
return true;
if (! (obj instanceof Redirect))
return false;
Redirect r = (Redirect) obj;
if (r.type() != this.type())
return false;
assert this.file() != null;
return this.file().equals(r.file());
} |
Compares the specified object with this {@code Redirect} for
equality. Returns {@code true} if and only if the two
objects are identical or both objects are {@code Redirect}
instances of the same type associated with non-null equal
{@code File} instances.
| Type::equals | java | Reginer/aosp-android-jar | android-35/src/java/lang/ProcessBuilder.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/java/lang/ProcessBuilder.java | MIT |
public int hashCode() {
File file = file();
if (file == null)
return super.hashCode();
else
return file.hashCode();
} |
Returns a hash code value for this {@code Redirect}.
@return a hash code value for this {@code Redirect}
| Type::hashCode | java | Reginer/aosp-android-jar | android-35/src/java/lang/ProcessBuilder.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/java/lang/ProcessBuilder.java | MIT |
private Redirect() {} |
No public constructors. Clients must use predefined
static {@code Redirect} instances or factory methods.
| Type::Redirect | java | Reginer/aosp-android-jar | android-35/src/java/lang/ProcessBuilder.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/java/lang/ProcessBuilder.java | MIT |
public ProcessBuilder redirectInput(Redirect source) {
if (source.type() == Redirect.Type.WRITE ||
source.type() == Redirect.Type.APPEND)
throw new IllegalArgumentException(
"Redirect invalid for reading: " + source);
redirects()[0] = source;
return this;
} |
Sets this process builder's standard input source.
Subprocesses subsequently started by this object's {@link #start()}
method obtain their standard input from this source.
<p>If the source is {@link Redirect#PIPE Redirect.PIPE}
(the initial value), then the standard input of a
subprocess can be written to using the output stream
returned by {@link Process#getOutputStream()}.
If the source is set to any other value, then
{@link Process#getOutputStream()} will return a
<a href="#redirect-input">null output stream</a>.
@param source the new standard input source
@return this process builder
@throws IllegalArgumentException
if the redirect does not correspond to a valid source
of data, that is, has type
{@link ProcessBuilder.Redirect.Type#WRITE WRITE} or
{@link ProcessBuilder.Redirect.Type#APPEND APPEND}
@since 1.7
| Redirect::redirectInput | java | Reginer/aosp-android-jar | android-35/src/java/lang/ProcessBuilder.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/java/lang/ProcessBuilder.java | MIT |
public ProcessBuilder redirectOutput(Redirect destination) {
if (destination.type() == Redirect.Type.READ)
throw new IllegalArgumentException(
"Redirect invalid for writing: " + destination);
redirects()[1] = destination;
return this;
} |
Sets this process builder's standard output destination.
Subprocesses subsequently started by this object's {@link #start()}
method send their standard output to this destination.
<p>If the destination is {@link Redirect#PIPE Redirect.PIPE}
(the initial value), then the standard output of a subprocess
can be read using the input stream returned by {@link
Process#getInputStream()}.
If the destination is set to any other value, then
{@link Process#getInputStream()} will return a
<a href="#redirect-output">null input stream</a>.
@param destination the new standard output destination
@return this process builder
@throws IllegalArgumentException
if the redirect does not correspond to a valid
destination of data, that is, has type
{@link ProcessBuilder.Redirect.Type#READ READ}
@since 1.7
| Redirect::redirectOutput | java | Reginer/aosp-android-jar | android-35/src/java/lang/ProcessBuilder.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/java/lang/ProcessBuilder.java | MIT |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.