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 void setPostEq(Eq postEq) {
if (postEq.getBandCount() != mPostEq.getBandCount()) {
throw new IllegalArgumentException("PostEqBandCount changed from " +
mPostEq.getBandCount() + " to " + postEq.getBandCount());
}
mPostEq = new Eq(postEq);
} |
Sets PostEq configuration stage. New PostEq stage must have the same number of bands than
original PostEq stage.
@param postEq configuration
| Channel::setPostEq | java | Reginer/aosp-android-jar | android-31/src/android/media/audiofx/DynamicsProcessing.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/media/audiofx/DynamicsProcessing.java | MIT |
public EqBand getPostEqBand(int band) {
return mPostEq.getBand(band);
} |
Gets EqBand for PostEq stage for given band index.
@param band index of band of interest from PostEq stage
@return EqBand configuration
| Channel::getPostEqBand | java | Reginer/aosp-android-jar | android-31/src/android/media/audiofx/DynamicsProcessing.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/media/audiofx/DynamicsProcessing.java | MIT |
public void setPostEqBand(int band, EqBand postEqBand) {
mPostEq.setBand(band, postEqBand);
} |
Sets EqBand for PostEq stage for given band index
@param band index of band of interest from PostEq stage
@param postEqBand configuration to be set.
| Channel::setPostEqBand | java | Reginer/aosp-android-jar | android-31/src/android/media/audiofx/DynamicsProcessing.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/media/audiofx/DynamicsProcessing.java | MIT |
public Limiter getLimiter() {
return mLimiter;
} |
Gets Limiter configuration stage
@return Limiter configuration stage
| Channel::getLimiter | java | Reginer/aosp-android-jar | android-31/src/android/media/audiofx/DynamicsProcessing.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/media/audiofx/DynamicsProcessing.java | MIT |
public void setLimiter(Limiter limiter) {
mLimiter = new Limiter(limiter);
} |
Sets Limiter configuration stage.
@param limiter configuration stage.
| Channel::setLimiter | java | Reginer/aosp-android-jar | android-31/src/android/media/audiofx/DynamicsProcessing.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/media/audiofx/DynamicsProcessing.java | MIT |
public Config(int variant, float frameDurationMs, int channelCount,
boolean preEqInUse, int preEqBandCount,
boolean mbcInUse, int mbcBandCount,
boolean postEqInUse, int postEqBandCount,
boolean limiterInUse,
Channel[] channel) {
mVariant = variant;
mPreferredFrameDuration = frameDurationMs;
mChannelCount = channelCount;
mPreEqInUse = preEqInUse;
mPreEqBandCount = preEqBandCount;
mMbcInUse = mbcInUse;
mMbcBandCount = mbcBandCount;
mPostEqInUse = postEqInUse;
mPostEqBandCount = postEqBandCount;
mLimiterInUse = limiterInUse;
mChannel = new Channel[mChannelCount];
//check if channelconfig is null or has less channels than channel count.
//options: fill the missing with default options.
// or fail?
for (int ch = 0; ch < mChannelCount; ch++) {
if (ch < channel.length) {
mChannel[ch] = new Channel(channel[ch]); //copy create
} else {
//create a new one from scratch? //fail?
}
}
} |
@hide
Class constructor for config. None of these parameters can be changed later.
@param variant index of variant used for effect engine. See
{@link #VARIANT_FAVOR_FREQUENCY_RESOLUTION} and {@link #VARIANT_FAVOR_TIME_RESOLUTION}.
@param frameDurationMs preferred frame duration in milliseconds (ms).
@param channelCount Number of channels to be configured.
@param preEqInUse true if PreEq stage will be used, false otherwise.
@param preEqBandCount number of bands for PreEq stage.
@param mbcInUse true if Mbc stage will be used, false otherwise.
@param mbcBandCount number of bands for Mbc stage.
@param postEqInUse true if PostEq stage will be used, false otherwise.
@param postEqBandCount number of bands for PostEq stage.
@param limiterInUse true if Limiter stage will be used, false otherwise.
@param channel array of Channel objects to be used for this configuration.
| Config::Config | java | Reginer/aosp-android-jar | android-31/src/android/media/audiofx/DynamicsProcessing.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/media/audiofx/DynamicsProcessing.java | MIT |
public Config(int channelCount, Config cfg) {
mVariant = cfg.mVariant;
mPreferredFrameDuration = cfg.mPreferredFrameDuration;
mChannelCount = cfg.mChannelCount;
mPreEqInUse = cfg.mPreEqInUse;
mPreEqBandCount = cfg.mPreEqBandCount;
mMbcInUse = cfg.mMbcInUse;
mMbcBandCount = cfg.mMbcBandCount;
mPostEqInUse = cfg.mPostEqInUse;
mPostEqBandCount = cfg.mPostEqBandCount;
mLimiterInUse = cfg.mLimiterInUse;
if (mChannelCount != cfg.mChannel.length) {
throw new IllegalArgumentException("configuration channel counts differ " +
mChannelCount + " !=" + cfg.mChannel.length);
}
if (channelCount < 1) {
throw new IllegalArgumentException("channel resizing less than 1 not allowed");
}
mChannel = new Channel[channelCount];
for (int ch = 0; ch < channelCount; ch++) {
if (ch < mChannelCount) {
mChannel[ch] = new Channel(cfg.mChannel[ch]);
} else {
//duplicate last
mChannel[ch] = new Channel(cfg.mChannel[mChannelCount-1]);
}
}
} |
@hide
Class constructor for Configuration.
@param channelCount limit configuration to this number of channels. if channelCount is
greater than number of channels in cfg, the constructor will duplicate the last channel
found as many times as necessary to create a Config with channelCount number of channels.
If channelCount is less than channels in cfg, the extra channels in cfg will be ignored.
@param cfg copy constructor paremter.
| Config::Config | java | Reginer/aosp-android-jar | android-31/src/android/media/audiofx/DynamicsProcessing.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/media/audiofx/DynamicsProcessing.java | MIT |
public Config(@NonNull Config cfg) {
this(cfg.mChannelCount, cfg);
} |
@hide
Class constructor for Config
@param cfg Configuration object copy constructor
| Config::Config | java | Reginer/aosp-android-jar | android-31/src/android/media/audiofx/DynamicsProcessing.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/media/audiofx/DynamicsProcessing.java | MIT |
public int getVariant() {
return mVariant;
} |
Gets variant for effect engine See {@link #VARIANT_FAVOR_FREQUENCY_RESOLUTION} and
{@link #VARIANT_FAVOR_TIME_RESOLUTION}.
@return variant of effect engine
| Config::getVariant | java | Reginer/aosp-android-jar | android-31/src/android/media/audiofx/DynamicsProcessing.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/media/audiofx/DynamicsProcessing.java | MIT |
public float getPreferredFrameDuration() {
return mPreferredFrameDuration;
} |
Gets preferred frame duration in milliseconds (ms).
@return preferred frame duration in milliseconds (ms)
| Config::getPreferredFrameDuration | java | Reginer/aosp-android-jar | android-31/src/android/media/audiofx/DynamicsProcessing.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/media/audiofx/DynamicsProcessing.java | MIT |
public boolean isPreEqInUse() {
return mPreEqInUse;
} |
Gets if preEq stage is in use
@return true if preEq stage is in use;
| Config::isPreEqInUse | java | Reginer/aosp-android-jar | android-31/src/android/media/audiofx/DynamicsProcessing.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/media/audiofx/DynamicsProcessing.java | MIT |
public int getPreEqBandCount() {
return mPreEqBandCount;
} |
Gets number of bands configured for the PreEq stage.
@return number of bands configured for the PreEq stage.
| Config::getPreEqBandCount | java | Reginer/aosp-android-jar | android-31/src/android/media/audiofx/DynamicsProcessing.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/media/audiofx/DynamicsProcessing.java | MIT |
public boolean isMbcInUse() {
return mMbcInUse;
} |
Gets if Mbc stage is in use
@return true if Mbc stage is in use;
| Config::isMbcInUse | java | Reginer/aosp-android-jar | android-31/src/android/media/audiofx/DynamicsProcessing.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/media/audiofx/DynamicsProcessing.java | MIT |
public int getMbcBandCount() {
return mMbcBandCount;
} |
Gets number of bands configured for the Mbc stage.
@return number of bands configured for the Mbc stage.
| Config::getMbcBandCount | java | Reginer/aosp-android-jar | android-31/src/android/media/audiofx/DynamicsProcessing.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/media/audiofx/DynamicsProcessing.java | MIT |
public boolean isPostEqInUse() {
return mPostEqInUse;
} |
Gets if PostEq stage is in use
@return true if PostEq stage is in use;
| Config::isPostEqInUse | java | Reginer/aosp-android-jar | android-31/src/android/media/audiofx/DynamicsProcessing.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/media/audiofx/DynamicsProcessing.java | MIT |
public int getPostEqBandCount() {
return mPostEqBandCount;
} |
Gets number of bands configured for the PostEq stage.
@return number of bands configured for the PostEq stage.
| Config::getPostEqBandCount | java | Reginer/aosp-android-jar | android-31/src/android/media/audiofx/DynamicsProcessing.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/media/audiofx/DynamicsProcessing.java | MIT |
public boolean isLimiterInUse() {
return mLimiterInUse;
} |
Gets if Limiter stage is in use
@return true if Limiter stage is in use;
| Config::isLimiterInUse | java | Reginer/aosp-android-jar | android-31/src/android/media/audiofx/DynamicsProcessing.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/media/audiofx/DynamicsProcessing.java | MIT |
public Channel getChannelByChannelIndex(int channelIndex) {
checkChannel(channelIndex);
return mChannel[channelIndex];
} |
Gets the Channel configuration object by using the channel index
@param channelIndex of desired Channel object
@return Channel configuration object
| Config::getChannelByChannelIndex | java | Reginer/aosp-android-jar | android-31/src/android/media/audiofx/DynamicsProcessing.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/media/audiofx/DynamicsProcessing.java | MIT |
public void setChannelTo(int channelIndex, Channel channel) {
checkChannel(channelIndex);
//check all things are compatible
if (mMbcBandCount != channel.getMbc().getBandCount()) {
throw new IllegalArgumentException("MbcBandCount changed from " +
mMbcBandCount + " to " + channel.getPreEq().getBandCount());
}
if (mPreEqBandCount != channel.getPreEq().getBandCount()) {
throw new IllegalArgumentException("PreEqBandCount changed from " +
mPreEqBandCount + " to " + channel.getPreEq().getBandCount());
}
if (mPostEqBandCount != channel.getPostEq().getBandCount()) {
throw new IllegalArgumentException("PostEqBandCount changed from " +
mPostEqBandCount + " to " + channel.getPostEq().getBandCount());
}
mChannel[channelIndex] = new Channel(channel);
} |
Sets the chosen Channel object in the selected channelIndex
Note that all the stages should have the same number of bands than the existing Channel
object.
@param channelIndex index of channel to be replaced
@param channel Channel configuration object to be set
| Config::setChannelTo | java | Reginer/aosp-android-jar | android-31/src/android/media/audiofx/DynamicsProcessing.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/media/audiofx/DynamicsProcessing.java | MIT |
public void setAllChannelsTo(Channel channel) {
for (int ch = 0; ch < mChannel.length; ch++) {
setChannelTo(ch, channel);
}
} |
Sets ALL channels to the chosen Channel object. Note that all the stages should have the
same number of bands than the existing ones.
@param channel Channel configuration object to be set.
| Config::setAllChannelsTo | java | Reginer/aosp-android-jar | android-31/src/android/media/audiofx/DynamicsProcessing.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/media/audiofx/DynamicsProcessing.java | MIT |
public float getInputGainByChannelIndex(int channelIndex) {
checkChannel(channelIndex);
return mChannel[channelIndex].getInputGain();
} |
Gets inputGain value in decibels (dB) for channel indicated by channelIndex
@param channelIndex index of channel of interest
@return inputGain value in decibels (dB). 0 dB means no change.
| Config::getInputGainByChannelIndex | java | Reginer/aosp-android-jar | android-31/src/android/media/audiofx/DynamicsProcessing.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/media/audiofx/DynamicsProcessing.java | MIT |
public void setInputGainByChannelIndex(int channelIndex, float inputGain) {
checkChannel(channelIndex);
mChannel[channelIndex].setInputGain(inputGain);
} |
Sets the inputGain value in decibels (dB) for the channel indicated by channelIndex.
@param channelIndex index of channel of interest
@param inputGain desired value in decibels (dB).
| Config::setInputGainByChannelIndex | java | Reginer/aosp-android-jar | android-31/src/android/media/audiofx/DynamicsProcessing.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/media/audiofx/DynamicsProcessing.java | MIT |
public void setInputGainAllChannelsTo(float inputGain) {
for (int ch = 0; ch < mChannel.length; ch++) {
mChannel[ch].setInputGain(inputGain);
}
} |
Sets the inputGain value in decibels (dB) for ALL channels
@param inputGain desired value in decibels (dB)
| Config::setInputGainAllChannelsTo | java | Reginer/aosp-android-jar | android-31/src/android/media/audiofx/DynamicsProcessing.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/media/audiofx/DynamicsProcessing.java | MIT |
public Eq getPreEqByChannelIndex(int channelIndex) {
checkChannel(channelIndex);
return mChannel[channelIndex].getPreEq();
} |
Gets PreEq stage from channel indicated by channelIndex
@param channelIndex index of channel of interest
@return PreEq stage configuration object
| Config::getPreEqByChannelIndex | java | Reginer/aosp-android-jar | android-31/src/android/media/audiofx/DynamicsProcessing.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/media/audiofx/DynamicsProcessing.java | MIT |
public void setPreEqByChannelIndex(int channelIndex, Eq preEq) {
checkChannel(channelIndex);
mChannel[channelIndex].setPreEq(preEq);
} |
Sets the PreEq stage configuration for the channel indicated by channelIndex. Note that
new preEq stage must have the same number of bands than original preEq stage
@param channelIndex index of channel to be set
@param preEq desired PreEq configuration to be set
| Config::setPreEqByChannelIndex | java | Reginer/aosp-android-jar | android-31/src/android/media/audiofx/DynamicsProcessing.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/media/audiofx/DynamicsProcessing.java | MIT |
public void setPreEqAllChannelsTo(Eq preEq) {
for (int ch = 0; ch < mChannel.length; ch++) {
mChannel[ch].setPreEq(preEq);
}
} |
Sets the PreEq stage configuration for ALL channels. Note that new preEq stage must have
the same number of bands than original preEq stages.
@param preEq desired PreEq configuration to be set
| Config::setPreEqAllChannelsTo | java | Reginer/aosp-android-jar | android-31/src/android/media/audiofx/DynamicsProcessing.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/media/audiofx/DynamicsProcessing.java | MIT |
public int getChannelCount() {
return getOneInt(PARAM_GET_CHANNEL_COUNT);
} |
Gets the number of channels in the effect engine
@return number of channels currently in use by the effect engine
| Config::getChannelCount | java | Reginer/aosp-android-jar | android-31/src/android/media/audiofx/DynamicsProcessing.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/media/audiofx/DynamicsProcessing.java | MIT |
private void updateEffectArchitecture() {
mChannelCount = getChannelCount();
} |
helper method to update effect architecture parameters
| DynamicsProcessing::updateEffectArchitecture | java | Reginer/aosp-android-jar | android-31/src/android/media/audiofx/DynamicsProcessing.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/media/audiofx/DynamicsProcessing.java | MIT |
public void setParameterListener(OnParameterChangeListener listener) {
synchronized (mParamListenerLock) {
if (mParamListener == null) {
mBaseParamListener = new BaseParameterListener();
super.setParameterListener(mBaseParamListener);
}
mParamListener = listener;
}
} |
@hide
Registers an OnParameterChangeListener interface.
@param listener OnParameterChangeListener interface registered
| BaseParameterListener::setParameterListener | java | Reginer/aosp-android-jar | android-31/src/android/media/audiofx/DynamicsProcessing.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/media/audiofx/DynamicsProcessing.java | MIT |
public Settings(String settings) {
StringTokenizer st = new StringTokenizer(settings, "=;");
//int tokens = st.countTokens();
if (st.countTokens() != 3) {
throw new IllegalArgumentException("settings: " + settings);
}
String key = st.nextToken();
if (!key.equals("DynamicsProcessing")) {
throw new IllegalArgumentException(
"invalid settings for DynamicsProcessing: " + key);
}
try {
key = st.nextToken();
if (!key.equals("channelCount")) {
throw new IllegalArgumentException("invalid key name: " + key);
}
channelCount = Short.parseShort(st.nextToken());
if (channelCount > CHANNEL_COUNT_MAX) {
throw new IllegalArgumentException("too many channels Settings:" + settings);
}
if (st.countTokens() != channelCount*1) { //check expected parameters.
throw new IllegalArgumentException("settings: " + settings);
}
//check to see it is ok the size
inputGain = new float[channelCount];
for (int ch = 0; ch < channelCount; ch++) {
key = st.nextToken();
if (!key.equals(ch +"_inputGain")) {
throw new IllegalArgumentException("invalid key name: " + key);
}
inputGain[ch] = Float.parseFloat(st.nextToken());
}
} catch (NumberFormatException nfe) {
throw new IllegalArgumentException("invalid value for key: " + key);
}
} |
Settings class constructor from a key=value; pairs formatted string. The string is
typically returned by Settings.toString() method.
@throws IllegalArgumentException if the string is not correctly formatted.
| Settings::Settings | java | Reginer/aosp-android-jar | android-31/src/android/media/audiofx/DynamicsProcessing.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/media/audiofx/DynamicsProcessing.java | MIT |
public DynamicsProcessing.Settings getProperties() {
Settings settings = new Settings();
//TODO: just for testing, we are calling the getters one by one, this is
// supposed to be done in a single (or few calls) and get all the parameters at once.
settings.channelCount = getChannelCount();
if (settings.channelCount > CHANNEL_COUNT_MAX) {
throw new IllegalArgumentException("too many channels Settings:" + settings);
}
{ // get inputGainmB per channel
settings.inputGain = new float [settings.channelCount];
for (int ch = 0; ch < settings.channelCount; ch++) {
//TODO:with config settings.inputGain[ch] = getInputGain(ch);
}
}
return settings;
} |
@hide
Gets the DynamicsProcessing properties. This method is useful when a snapshot of current
effect settings must be saved by the application.
@return a DynamicsProcessing.Settings object containing all current parameters values
| Settings::getProperties | java | Reginer/aosp-android-jar | android-31/src/android/media/audiofx/DynamicsProcessing.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/media/audiofx/DynamicsProcessing.java | MIT |
public void setProperties(DynamicsProcessing.Settings settings) {
if (settings.channelCount != settings.inputGain.length ||
settings.channelCount != mChannelCount) {
throw new IllegalArgumentException("settings invalid channel count: "
+ settings.channelCount);
}
//TODO: for now calling multiple times.
for (int ch = 0; ch < mChannelCount; ch++) {
//TODO: use config setInputGain(ch, settings.inputGain[ch]);
}
} |
@hide
Sets the DynamicsProcessing properties. This method is useful when bass boost settings
have to be applied from a previous backup.
@param settings a DynamicsProcessing.Settings object containing the properties to apply
| Settings::setProperties | java | Reginer/aosp-android-jar | android-31/src/android/media/audiofx/DynamicsProcessing.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/media/audiofx/DynamicsProcessing.java | MIT |
public boolean hasTransition(@TransitionOldType int transition,
ArraySet<Integer> activityTypes) {
return getAdapter(transition, activityTypes) != null;
} |
Checks whether a remote animation for specific transition is defined.
@param transition The old transition type. Must be one of WindowManager.TRANSIT_OLD_* values.
@param activityTypes The set of activity types of activities that are involved in the
transition. Will be used for filtering.
@return Whether this definition has defined a remote animation for the specified transition.
| RemoteAnimationDefinition::hasTransition | java | Reginer/aosp-android-jar | android-32/src/android/view/RemoteAnimationDefinition.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/view/RemoteAnimationDefinition.java | MIT |
public @Nullable RemoteAnimationAdapter getAdapter(@TransitionOldType int transition,
ArraySet<Integer> activityTypes) {
final RemoteAnimationAdapterEntry entry = mTransitionAnimationMap.get(transition);
if (entry == null) {
return null;
}
if (entry.activityTypeFilter == ACTIVITY_TYPE_UNDEFINED
|| activityTypes.contains(entry.activityTypeFilter)) {
return entry.adapter;
} else {
return null;
}
} |
Retrieves the remote animation for a specific transition.
@param transition The old transition type. Must be one of WindowManager.TRANSIT_OLD_* values.
@param activityTypes The set of activity types of activities that are involved in the
transition. Will be used for filtering.
@return The remote animation adapter for the specified transition.
| RemoteAnimationDefinition::getAdapter | java | Reginer/aosp-android-jar | android-32/src/android/view/RemoteAnimationDefinition.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/view/RemoteAnimationDefinition.java | MIT |
public void setCallingPidUid(int pid, int uid) {
for (int i = mTransitionAnimationMap.size() - 1; i >= 0; i--) {
mTransitionAnimationMap.valueAt(i).adapter.setCallingPidUid(pid, uid);
}
} |
To be called by system_server to keep track which pid is running the remote animations inside
this definition.
| RemoteAnimationDefinition::setCallingPidUid | java | Reginer/aosp-android-jar | android-32/src/android/view/RemoteAnimationDefinition.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/view/RemoteAnimationDefinition.java | MIT |
public void linkToDeath(IBinder.DeathRecipient deathRecipient) {
try {
for (int i = 0; i < mTransitionAnimationMap.size(); i++) {
mTransitionAnimationMap.valueAt(i).adapter.getRunner().asBinder()
.linkToDeath(deathRecipient, 0 /* flags */);
}
} catch (RemoteException e) {
Slog.e("RemoteAnimationDefinition", "Failed to link to death recipient");
}
} |
Links the death of the runner to the provided death recipient.
| RemoteAnimationDefinition::linkToDeath | java | Reginer/aosp-android-jar | android-32/src/android/view/RemoteAnimationDefinition.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/view/RemoteAnimationDefinition.java | MIT |
private ContentCaptureMetricsLogger() {
} |
Class only contains static utility functions, and should not be instantiated
| ContentCaptureMetricsLogger::ContentCaptureMetricsLogger | java | Reginer/aosp-android-jar | android-33/src/com/android/server/contentcapture/ContentCaptureMetricsLogger.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/server/contentcapture/ContentCaptureMetricsLogger.java | MIT |
public static void writeServiceEvent(int eventType, @NonNull String serviceName) {
// we should not logging the application package name
FrameworkStatsLog.write(FrameworkStatsLog.CONTENT_CAPTURE_SERVICE_EVENTS, eventType,
serviceName, /* componentName= */ null, 0, 0);
} |
Class only contains static utility functions, and should not be instantiated
private ContentCaptureMetricsLogger() {
}
/** @hide | ContentCaptureMetricsLogger::writeServiceEvent | java | Reginer/aosp-android-jar | android-33/src/com/android/server/contentcapture/ContentCaptureMetricsLogger.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/server/contentcapture/ContentCaptureMetricsLogger.java | MIT |
public static void writeServiceEvent(int eventType, @NonNull ComponentName service) {
writeServiceEvent(eventType, ComponentName.flattenToShortString(service));
} |
Class only contains static utility functions, and should not be instantiated
private ContentCaptureMetricsLogger() {
}
/** @hide
public static void writeServiceEvent(int eventType, @NonNull String serviceName) {
// we should not logging the application package name
FrameworkStatsLog.write(FrameworkStatsLog.CONTENT_CAPTURE_SERVICE_EVENTS, eventType,
serviceName, /* componentName= */ null, 0, 0);
}
/** @hide | ContentCaptureMetricsLogger::writeServiceEvent | java | Reginer/aosp-android-jar | android-33/src/com/android/server/contentcapture/ContentCaptureMetricsLogger.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/server/contentcapture/ContentCaptureMetricsLogger.java | MIT |
public static void writeSetWhitelistEvent(@Nullable ComponentName service,
@Nullable List<String> packages, @Nullable List<ComponentName> activities) {
final String serviceName = ComponentName.flattenToShortString(service);
int packageCount = packages != null ? packages.size() : 0;
int activityCount = activities != null ? activities.size() : 0;
// we should not logging the application package name
// log the allow list package and activity count instead
FrameworkStatsLog.write(FrameworkStatsLog.CONTENT_CAPTURE_SERVICE_EVENTS,
FrameworkStatsLog.CONTENT_CAPTURE_SERVICE_EVENTS__EVENT__SET_WHITELIST,
serviceName, /* allowListStr= */ null, packageCount, activityCount);
} |
Class only contains static utility functions, and should not be instantiated
private ContentCaptureMetricsLogger() {
}
/** @hide
public static void writeServiceEvent(int eventType, @NonNull String serviceName) {
// we should not logging the application package name
FrameworkStatsLog.write(FrameworkStatsLog.CONTENT_CAPTURE_SERVICE_EVENTS, eventType,
serviceName, /* componentName= */ null, 0, 0);
}
/** @hide
public static void writeServiceEvent(int eventType, @NonNull ComponentName service) {
writeServiceEvent(eventType, ComponentName.flattenToShortString(service));
}
/** @hide | ContentCaptureMetricsLogger::writeSetWhitelistEvent | java | Reginer/aosp-android-jar | android-33/src/com/android/server/contentcapture/ContentCaptureMetricsLogger.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/server/contentcapture/ContentCaptureMetricsLogger.java | MIT |
public static void writeSessionEvent(int sessionId, int event, int flags,
@NonNull ComponentName service, boolean isChildSession) {
// we should not logging the application package name
FrameworkStatsLog.write(FrameworkStatsLog.CONTENT_CAPTURE_SESSION_EVENTS, sessionId, event,
flags, ComponentName.flattenToShortString(service),
/* componentName= */ null, isChildSession);
} |
Class only contains static utility functions, and should not be instantiated
private ContentCaptureMetricsLogger() {
}
/** @hide
public static void writeServiceEvent(int eventType, @NonNull String serviceName) {
// we should not logging the application package name
FrameworkStatsLog.write(FrameworkStatsLog.CONTENT_CAPTURE_SERVICE_EVENTS, eventType,
serviceName, /* componentName= */ null, 0, 0);
}
/** @hide
public static void writeServiceEvent(int eventType, @NonNull ComponentName service) {
writeServiceEvent(eventType, ComponentName.flattenToShortString(service));
}
/** @hide
public static void writeSetWhitelistEvent(@Nullable ComponentName service,
@Nullable List<String> packages, @Nullable List<ComponentName> activities) {
final String serviceName = ComponentName.flattenToShortString(service);
int packageCount = packages != null ? packages.size() : 0;
int activityCount = activities != null ? activities.size() : 0;
// we should not logging the application package name
// log the allow list package and activity count instead
FrameworkStatsLog.write(FrameworkStatsLog.CONTENT_CAPTURE_SERVICE_EVENTS,
FrameworkStatsLog.CONTENT_CAPTURE_SERVICE_EVENTS__EVENT__SET_WHITELIST,
serviceName, /* allowListStr= */ null, packageCount, activityCount);
}
/** @hide | ContentCaptureMetricsLogger::writeSessionEvent | java | Reginer/aosp-android-jar | android-33/src/com/android/server/contentcapture/ContentCaptureMetricsLogger.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/server/contentcapture/ContentCaptureMetricsLogger.java | MIT |
public static void writeSessionFlush(int sessionId, @NonNull ComponentName service,
@NonNull FlushMetrics fm, @NonNull ContentCaptureOptions options,
int flushReason) {
// we should not logging the application package name
FrameworkStatsLog.write(FrameworkStatsLog.CONTENT_CAPTURE_FLUSHED, sessionId,
ComponentName.flattenToShortString(service),
/* componentName= */ null, fm.sessionStarted, fm.sessionFinished,
fm.viewAppearedCount, fm.viewDisappearedCount, fm.viewTextChangedCount,
options.maxBufferSize, options.idleFlushingFrequencyMs,
options.textChangeFlushingFrequencyMs, flushReason);
} |
Class only contains static utility functions, and should not be instantiated
private ContentCaptureMetricsLogger() {
}
/** @hide
public static void writeServiceEvent(int eventType, @NonNull String serviceName) {
// we should not logging the application package name
FrameworkStatsLog.write(FrameworkStatsLog.CONTENT_CAPTURE_SERVICE_EVENTS, eventType,
serviceName, /* componentName= */ null, 0, 0);
}
/** @hide
public static void writeServiceEvent(int eventType, @NonNull ComponentName service) {
writeServiceEvent(eventType, ComponentName.flattenToShortString(service));
}
/** @hide
public static void writeSetWhitelistEvent(@Nullable ComponentName service,
@Nullable List<String> packages, @Nullable List<ComponentName> activities) {
final String serviceName = ComponentName.flattenToShortString(service);
int packageCount = packages != null ? packages.size() : 0;
int activityCount = activities != null ? activities.size() : 0;
// we should not logging the application package name
// log the allow list package and activity count instead
FrameworkStatsLog.write(FrameworkStatsLog.CONTENT_CAPTURE_SERVICE_EVENTS,
FrameworkStatsLog.CONTENT_CAPTURE_SERVICE_EVENTS__EVENT__SET_WHITELIST,
serviceName, /* allowListStr= */ null, packageCount, activityCount);
}
/** @hide
public static void writeSessionEvent(int sessionId, int event, int flags,
@NonNull ComponentName service, boolean isChildSession) {
// we should not logging the application package name
FrameworkStatsLog.write(FrameworkStatsLog.CONTENT_CAPTURE_SESSION_EVENTS, sessionId, event,
flags, ComponentName.flattenToShortString(service),
/* componentName= */ null, isChildSession);
}
/** @hide | ContentCaptureMetricsLogger::writeSessionFlush | java | Reginer/aosp-android-jar | android-33/src/com/android/server/contentcapture/ContentCaptureMetricsLogger.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/server/contentcapture/ContentCaptureMetricsLogger.java | MIT |
protected char[] getOriginal() {
return ORIGINAL;
} |
The characters to be replaced are \n and \r.
| SingleLineTransformationMethod::getOriginal | java | Reginer/aosp-android-jar | android-34/src/android/text/method/SingleLineTransformationMethod.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/text/method/SingleLineTransformationMethod.java | MIT |
protected char[] getReplacement() {
return REPLACEMENT;
} |
The character \n is replaced with is space;
the character \r is replaced with is FEFF (zero width space).
| SingleLineTransformationMethod::getReplacement | java | Reginer/aosp-android-jar | android-34/src/android/text/method/SingleLineTransformationMethod.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/text/method/SingleLineTransformationMethod.java | MIT |
public void addArea(RectF area) {
mCallbackAreas.add(area);
} |
This class represents a page of a launcher page used by the wallpaper
@hide
public class EngineWindowPage {
private Bitmap mScreenShot;
private volatile long mLastUpdateTime = 0;
private Set<RectF> mCallbackAreas = new ArraySet<>();
private Map<RectF, WallpaperColors> mRectFColors = new ArrayMap<>();
/** should be locked extrnally | EngineWindowPage::addArea | java | Reginer/aosp-android-jar | android-33/src/android/service/wallpaper/EngineWindowPage.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/service/wallpaper/EngineWindowPage.java | MIT |
public void addWallpaperColors(RectF area, WallpaperColors colors) {
mCallbackAreas.add(area);
mRectFColors.put(area, colors);
} |
This class represents a page of a launcher page used by the wallpaper
@hide
public class EngineWindowPage {
private Bitmap mScreenShot;
private volatile long mLastUpdateTime = 0;
private Set<RectF> mCallbackAreas = new ArraySet<>();
private Map<RectF, WallpaperColors> mRectFColors = new ArrayMap<>();
/** should be locked extrnally
public void addArea(RectF area) {
mCallbackAreas.add(area);
}
/** should be locked extrnally | EngineWindowPage::addWallpaperColors | java | Reginer/aosp-android-jar | android-33/src/android/service/wallpaper/EngineWindowPage.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/service/wallpaper/EngineWindowPage.java | MIT |
public Bitmap getBitmap() {
if (mScreenShot == null || mScreenShot.isRecycled()) return null;
return mScreenShot;
} |
This class represents a page of a launcher page used by the wallpaper
@hide
public class EngineWindowPage {
private Bitmap mScreenShot;
private volatile long mLastUpdateTime = 0;
private Set<RectF> mCallbackAreas = new ArraySet<>();
private Map<RectF, WallpaperColors> mRectFColors = new ArrayMap<>();
/** should be locked extrnally
public void addArea(RectF area) {
mCallbackAreas.add(area);
}
/** should be locked extrnally
public void addWallpaperColors(RectF area, WallpaperColors colors) {
mCallbackAreas.add(area);
mRectFColors.put(area, colors);
}
/** get screenshot bitmap | EngineWindowPage::getBitmap | java | Reginer/aosp-android-jar | android-33/src/android/service/wallpaper/EngineWindowPage.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/service/wallpaper/EngineWindowPage.java | MIT |
public void removeArea(RectF area) {
mCallbackAreas.remove(area);
mRectFColors.remove(area);
} |
This class represents a page of a launcher page used by the wallpaper
@hide
public class EngineWindowPage {
private Bitmap mScreenShot;
private volatile long mLastUpdateTime = 0;
private Set<RectF> mCallbackAreas = new ArraySet<>();
private Map<RectF, WallpaperColors> mRectFColors = new ArrayMap<>();
/** should be locked extrnally
public void addArea(RectF area) {
mCallbackAreas.add(area);
}
/** should be locked extrnally
public void addWallpaperColors(RectF area, WallpaperColors colors) {
mCallbackAreas.add(area);
mRectFColors.put(area, colors);
}
/** get screenshot bitmap
public Bitmap getBitmap() {
if (mScreenShot == null || mScreenShot.isRecycled()) return null;
return mScreenShot;
}
/** remove callbacks for an area | EngineWindowPage::removeArea | java | Reginer/aosp-android-jar | android-33/src/android/service/wallpaper/EngineWindowPage.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/service/wallpaper/EngineWindowPage.java | MIT |
public void setLastUpdateTime(long lastUpdateTime) {
mLastUpdateTime = lastUpdateTime;
} |
This class represents a page of a launcher page used by the wallpaper
@hide
public class EngineWindowPage {
private Bitmap mScreenShot;
private volatile long mLastUpdateTime = 0;
private Set<RectF> mCallbackAreas = new ArraySet<>();
private Map<RectF, WallpaperColors> mRectFColors = new ArrayMap<>();
/** should be locked extrnally
public void addArea(RectF area) {
mCallbackAreas.add(area);
}
/** should be locked extrnally
public void addWallpaperColors(RectF area, WallpaperColors colors) {
mCallbackAreas.add(area);
mRectFColors.put(area, colors);
}
/** get screenshot bitmap
public Bitmap getBitmap() {
if (mScreenShot == null || mScreenShot.isRecycled()) return null;
return mScreenShot;
}
/** remove callbacks for an area
public void removeArea(RectF area) {
mCallbackAreas.remove(area);
mRectFColors.remove(area);
}
/** set the last time the screenshot was updated | EngineWindowPage::setLastUpdateTime | java | Reginer/aosp-android-jar | android-33/src/android/service/wallpaper/EngineWindowPage.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/service/wallpaper/EngineWindowPage.java | MIT |
public long getLastUpdateTime() {
return mLastUpdateTime;
} |
This class represents a page of a launcher page used by the wallpaper
@hide
public class EngineWindowPage {
private Bitmap mScreenShot;
private volatile long mLastUpdateTime = 0;
private Set<RectF> mCallbackAreas = new ArraySet<>();
private Map<RectF, WallpaperColors> mRectFColors = new ArrayMap<>();
/** should be locked extrnally
public void addArea(RectF area) {
mCallbackAreas.add(area);
}
/** should be locked extrnally
public void addWallpaperColors(RectF area, WallpaperColors colors) {
mCallbackAreas.add(area);
mRectFColors.put(area, colors);
}
/** get screenshot bitmap
public Bitmap getBitmap() {
if (mScreenShot == null || mScreenShot.isRecycled()) return null;
return mScreenShot;
}
/** remove callbacks for an area
public void removeArea(RectF area) {
mCallbackAreas.remove(area);
mRectFColors.remove(area);
}
/** set the last time the screenshot was updated
public void setLastUpdateTime(long lastUpdateTime) {
mLastUpdateTime = lastUpdateTime;
}
/** get last screenshot time | EngineWindowPage::getLastUpdateTime | java | Reginer/aosp-android-jar | android-33/src/android/service/wallpaper/EngineWindowPage.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/service/wallpaper/EngineWindowPage.java | MIT |
public WallpaperColors getColors(RectF rect) {
return mRectFColors.get(rect);
} |
This class represents a page of a launcher page used by the wallpaper
@hide
public class EngineWindowPage {
private Bitmap mScreenShot;
private volatile long mLastUpdateTime = 0;
private Set<RectF> mCallbackAreas = new ArraySet<>();
private Map<RectF, WallpaperColors> mRectFColors = new ArrayMap<>();
/** should be locked extrnally
public void addArea(RectF area) {
mCallbackAreas.add(area);
}
/** should be locked extrnally
public void addWallpaperColors(RectF area, WallpaperColors colors) {
mCallbackAreas.add(area);
mRectFColors.put(area, colors);
}
/** get screenshot bitmap
public Bitmap getBitmap() {
if (mScreenShot == null || mScreenShot.isRecycled()) return null;
return mScreenShot;
}
/** remove callbacks for an area
public void removeArea(RectF area) {
mCallbackAreas.remove(area);
mRectFColors.remove(area);
}
/** set the last time the screenshot was updated
public void setLastUpdateTime(long lastUpdateTime) {
mLastUpdateTime = lastUpdateTime;
}
/** get last screenshot time
public long getLastUpdateTime() {
return mLastUpdateTime;
}
/** get colors for an area | EngineWindowPage::getColors | java | Reginer/aosp-android-jar | android-33/src/android/service/wallpaper/EngineWindowPage.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/service/wallpaper/EngineWindowPage.java | MIT |
public void setBitmap(Bitmap screenShot) {
mScreenShot = screenShot;
} |
This class represents a page of a launcher page used by the wallpaper
@hide
public class EngineWindowPage {
private Bitmap mScreenShot;
private volatile long mLastUpdateTime = 0;
private Set<RectF> mCallbackAreas = new ArraySet<>();
private Map<RectF, WallpaperColors> mRectFColors = new ArrayMap<>();
/** should be locked extrnally
public void addArea(RectF area) {
mCallbackAreas.add(area);
}
/** should be locked extrnally
public void addWallpaperColors(RectF area, WallpaperColors colors) {
mCallbackAreas.add(area);
mRectFColors.put(area, colors);
}
/** get screenshot bitmap
public Bitmap getBitmap() {
if (mScreenShot == null || mScreenShot.isRecycled()) return null;
return mScreenShot;
}
/** remove callbacks for an area
public void removeArea(RectF area) {
mCallbackAreas.remove(area);
mRectFColors.remove(area);
}
/** set the last time the screenshot was updated
public void setLastUpdateTime(long lastUpdateTime) {
mLastUpdateTime = lastUpdateTime;
}
/** get last screenshot time
public long getLastUpdateTime() {
return mLastUpdateTime;
}
/** get colors for an area
public WallpaperColors getColors(RectF rect) {
return mRectFColors.get(rect);
}
/** set the new bitmap version | EngineWindowPage::setBitmap | java | Reginer/aosp-android-jar | android-33/src/android/service/wallpaper/EngineWindowPage.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/service/wallpaper/EngineWindowPage.java | MIT |
public Set<RectF> getAreas() {
return mCallbackAreas;
} |
This class represents a page of a launcher page used by the wallpaper
@hide
public class EngineWindowPage {
private Bitmap mScreenShot;
private volatile long mLastUpdateTime = 0;
private Set<RectF> mCallbackAreas = new ArraySet<>();
private Map<RectF, WallpaperColors> mRectFColors = new ArrayMap<>();
/** should be locked extrnally
public void addArea(RectF area) {
mCallbackAreas.add(area);
}
/** should be locked extrnally
public void addWallpaperColors(RectF area, WallpaperColors colors) {
mCallbackAreas.add(area);
mRectFColors.put(area, colors);
}
/** get screenshot bitmap
public Bitmap getBitmap() {
if (mScreenShot == null || mScreenShot.isRecycled()) return null;
return mScreenShot;
}
/** remove callbacks for an area
public void removeArea(RectF area) {
mCallbackAreas.remove(area);
mRectFColors.remove(area);
}
/** set the last time the screenshot was updated
public void setLastUpdateTime(long lastUpdateTime) {
mLastUpdateTime = lastUpdateTime;
}
/** get last screenshot time
public long getLastUpdateTime() {
return mLastUpdateTime;
}
/** get colors for an area
public WallpaperColors getColors(RectF rect) {
return mRectFColors.get(rect);
}
/** set the new bitmap version
public void setBitmap(Bitmap screenShot) {
mScreenShot = screenShot;
}
/** get areas of interest | EngineWindowPage::getAreas | java | Reginer/aosp-android-jar | android-33/src/android/service/wallpaper/EngineWindowPage.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/service/wallpaper/EngineWindowPage.java | MIT |
public void removeColor(RectF colorArea) {
mRectFColors.remove(colorArea);
} |
This class represents a page of a launcher page used by the wallpaper
@hide
public class EngineWindowPage {
private Bitmap mScreenShot;
private volatile long mLastUpdateTime = 0;
private Set<RectF> mCallbackAreas = new ArraySet<>();
private Map<RectF, WallpaperColors> mRectFColors = new ArrayMap<>();
/** should be locked extrnally
public void addArea(RectF area) {
mCallbackAreas.add(area);
}
/** should be locked extrnally
public void addWallpaperColors(RectF area, WallpaperColors colors) {
mCallbackAreas.add(area);
mRectFColors.put(area, colors);
}
/** get screenshot bitmap
public Bitmap getBitmap() {
if (mScreenShot == null || mScreenShot.isRecycled()) return null;
return mScreenShot;
}
/** remove callbacks for an area
public void removeArea(RectF area) {
mCallbackAreas.remove(area);
mRectFColors.remove(area);
}
/** set the last time the screenshot was updated
public void setLastUpdateTime(long lastUpdateTime) {
mLastUpdateTime = lastUpdateTime;
}
/** get last screenshot time
public long getLastUpdateTime() {
return mLastUpdateTime;
}
/** get colors for an area
public WallpaperColors getColors(RectF rect) {
return mRectFColors.get(rect);
}
/** set the new bitmap version
public void setBitmap(Bitmap screenShot) {
mScreenShot = screenShot;
}
/** get areas of interest
public Set<RectF> getAreas() {
return mCallbackAreas;
}
/** nullify the area color | EngineWindowPage::removeColor | java | Reginer/aosp-android-jar | android-33/src/android/service/wallpaper/EngineWindowPage.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/service/wallpaper/EngineWindowPage.java | MIT |
public BitmapDrawable(Resources res, Bitmap bitmap) {
init(new BitmapState(bitmap), res);
} |
Create drawable from a bitmap, setting initial target density based on
the display metrics of the resources.
| BitmapDrawable::BitmapDrawable | java | Reginer/aosp-android-jar | android-34/src/android/graphics/drawable/BitmapDrawable.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/graphics/drawable/BitmapDrawable.java | MIT |
public final Paint getPaint() {
return mBitmapState.mPaint;
} |
Returns the paint used to render this drawable.
| BitmapDrawable::getPaint | java | Reginer/aosp-android-jar | android-34/src/android/graphics/drawable/BitmapDrawable.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/graphics/drawable/BitmapDrawable.java | MIT |
public final Bitmap getBitmap() {
return mBitmapState.mBitmap;
} |
Returns the bitmap used by this drawable to render. May be null.
| BitmapDrawable::getBitmap | java | Reginer/aosp-android-jar | android-34/src/android/graphics/drawable/BitmapDrawable.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/graphics/drawable/BitmapDrawable.java | MIT |
public void setBitmap(@Nullable Bitmap bitmap) {
if (mBitmapState.mBitmap != bitmap) {
mBitmapState.mBitmap = bitmap;
computeBitmapSize();
invalidateSelf();
}
} |
Switch to a new Bitmap object.
| BitmapDrawable::setBitmap | java | Reginer/aosp-android-jar | android-34/src/android/graphics/drawable/BitmapDrawable.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/graphics/drawable/BitmapDrawable.java | MIT |
public void setTargetDensity(Canvas canvas) {
setTargetDensity(canvas.getDensity());
} |
Set the density scale at which this drawable will be rendered. This
method assumes the drawable will be rendered at the same density as the
specified canvas.
@param canvas The Canvas from which the density scale must be obtained.
@see android.graphics.Bitmap#setDensity(int)
@see android.graphics.Bitmap#getDensity()
| BitmapDrawable::setTargetDensity | java | Reginer/aosp-android-jar | android-34/src/android/graphics/drawable/BitmapDrawable.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/graphics/drawable/BitmapDrawable.java | MIT |
public void setTargetDensity(DisplayMetrics metrics) {
setTargetDensity(metrics.densityDpi);
} |
Set the density scale at which this drawable will be rendered.
@param metrics The DisplayMetrics indicating the density scale for this drawable.
@see android.graphics.Bitmap#setDensity(int)
@see android.graphics.Bitmap#getDensity()
| BitmapDrawable::setTargetDensity | java | Reginer/aosp-android-jar | android-34/src/android/graphics/drawable/BitmapDrawable.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/graphics/drawable/BitmapDrawable.java | MIT |
public void setTargetDensity(int density) {
if (mTargetDensity != density) {
mTargetDensity = density == 0 ? DisplayMetrics.DENSITY_DEFAULT : density;
if (mBitmapState.mBitmap != null) {
computeBitmapSize();
}
invalidateSelf();
}
} |
Set the density at which this drawable will be rendered.
@param density The density scale for this drawable.
@see android.graphics.Bitmap#setDensity(int)
@see android.graphics.Bitmap#getDensity()
| BitmapDrawable::setTargetDensity | java | Reginer/aosp-android-jar | android-34/src/android/graphics/drawable/BitmapDrawable.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/graphics/drawable/BitmapDrawable.java | MIT |
public int getGravity() {
return mBitmapState.mGravity;
} | Get the gravity used to position/stretch the bitmap within its bounds.
See android.view.Gravity
@return the gravity applied to the bitmap
| BitmapDrawable::getGravity | java | Reginer/aosp-android-jar | android-34/src/android/graphics/drawable/BitmapDrawable.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/graphics/drawable/BitmapDrawable.java | MIT |
public void setGravity(int gravity) {
if (mBitmapState.mGravity != gravity) {
mBitmapState.mGravity = gravity;
mDstRectAndInsetsDirty = true;
invalidateSelf();
}
} | Set the gravity used to position/stretch the bitmap within its bounds.
See android.view.Gravity
@param gravity the gravity
| BitmapDrawable::setGravity | java | Reginer/aosp-android-jar | android-34/src/android/graphics/drawable/BitmapDrawable.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/graphics/drawable/BitmapDrawable.java | MIT |
public void setMipMap(boolean mipMap) {
if (mBitmapState.mBitmap != null) {
mBitmapState.mBitmap.setHasMipMap(mipMap);
invalidateSelf();
}
} |
Enables or disables the mipmap hint for this drawable's bitmap.
See {@link Bitmap#setHasMipMap(boolean)} for more information.
If the bitmap is null calling this method has no effect.
@param mipMap True if the bitmap should use mipmaps, false otherwise.
@see #hasMipMap()
| BitmapDrawable::setMipMap | java | Reginer/aosp-android-jar | android-34/src/android/graphics/drawable/BitmapDrawable.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/graphics/drawable/BitmapDrawable.java | MIT |
public boolean hasMipMap() {
return mBitmapState.mBitmap != null && mBitmapState.mBitmap.hasMipMap();
} |
Indicates whether the mipmap hint is enabled on this drawable's bitmap.
@return True if the mipmap hint is set, false otherwise. If the bitmap
is null, this method always returns false.
@see #setMipMap(boolean)
@attr ref android.R.styleable#BitmapDrawable_mipMap
| BitmapDrawable::hasMipMap | java | Reginer/aosp-android-jar | android-34/src/android/graphics/drawable/BitmapDrawable.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/graphics/drawable/BitmapDrawable.java | MIT |
public void setAntiAlias(boolean aa) {
mBitmapState.mPaint.setAntiAlias(aa);
invalidateSelf();
} |
Enables or disables anti-aliasing for this drawable. Anti-aliasing affects
the edges of the bitmap only so it applies only when the drawable is rotated.
@param aa True if the bitmap should be anti-aliased, false otherwise.
@see #hasAntiAlias()
| BitmapDrawable::setAntiAlias | java | Reginer/aosp-android-jar | android-34/src/android/graphics/drawable/BitmapDrawable.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/graphics/drawable/BitmapDrawable.java | MIT |
public boolean hasAntiAlias() {
return mBitmapState.mPaint.isAntiAlias();
} |
Indicates whether anti-aliasing is enabled for this drawable.
@return True if anti-aliasing is enabled, false otherwise.
@see #setAntiAlias(boolean)
| BitmapDrawable::hasAntiAlias | java | Reginer/aosp-android-jar | android-34/src/android/graphics/drawable/BitmapDrawable.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/graphics/drawable/BitmapDrawable.java | MIT |
public Shader.TileMode getTileModeX() {
return mBitmapState.mTileModeX;
} |
Indicates the repeat behavior of this drawable on the X axis.
@return {@link android.graphics.Shader.TileMode#CLAMP} if the bitmap does not repeat,
{@link android.graphics.Shader.TileMode#REPEAT} or
{@link android.graphics.Shader.TileMode#MIRROR} otherwise.
| BitmapDrawable::getTileModeX | java | Reginer/aosp-android-jar | android-34/src/android/graphics/drawable/BitmapDrawable.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/graphics/drawable/BitmapDrawable.java | MIT |
public Shader.TileMode getTileModeY() {
return mBitmapState.mTileModeY;
} |
Indicates the repeat behavior of this drawable on the Y axis.
@return {@link android.graphics.Shader.TileMode#CLAMP} if the bitmap does not repeat,
{@link android.graphics.Shader.TileMode#REPEAT} or
{@link android.graphics.Shader.TileMode#MIRROR} otherwise.
| BitmapDrawable::getTileModeY | java | Reginer/aosp-android-jar | android-34/src/android/graphics/drawable/BitmapDrawable.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/graphics/drawable/BitmapDrawable.java | MIT |
public void setTileModeX(Shader.TileMode mode) {
setTileModeXY(mode, mBitmapState.mTileModeY);
} |
Sets the repeat behavior of this drawable on the X axis. By default, the drawable
does not repeat its bitmap. Using {@link android.graphics.Shader.TileMode#REPEAT} or
{@link android.graphics.Shader.TileMode#MIRROR} the bitmap can be repeated (or tiled)
if the bitmap is smaller than this drawable.
@param mode The repeat mode for this drawable.
@see #setTileModeY(android.graphics.Shader.TileMode)
@see #setTileModeXY(android.graphics.Shader.TileMode, android.graphics.Shader.TileMode)
@attr ref android.R.styleable#BitmapDrawable_tileModeX
| BitmapDrawable::setTileModeX | java | Reginer/aosp-android-jar | android-34/src/android/graphics/drawable/BitmapDrawable.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/graphics/drawable/BitmapDrawable.java | MIT |
public final void setTileModeY(Shader.TileMode mode) {
setTileModeXY(mBitmapState.mTileModeX, mode);
} |
Sets the repeat behavior of this drawable on the Y axis. By default, the drawable
does not repeat its bitmap. Using {@link android.graphics.Shader.TileMode#REPEAT} or
{@link android.graphics.Shader.TileMode#MIRROR} the bitmap can be repeated (or tiled)
if the bitmap is smaller than this drawable.
@param mode The repeat mode for this drawable.
@see #setTileModeX(android.graphics.Shader.TileMode)
@see #setTileModeXY(android.graphics.Shader.TileMode, android.graphics.Shader.TileMode)
@attr ref android.R.styleable#BitmapDrawable_tileModeY
| BitmapDrawable::setTileModeY | java | Reginer/aosp-android-jar | android-34/src/android/graphics/drawable/BitmapDrawable.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/graphics/drawable/BitmapDrawable.java | MIT |
public void setTileModeXY(Shader.TileMode xmode, Shader.TileMode ymode) {
final BitmapState state = mBitmapState;
if (state.mTileModeX != xmode || state.mTileModeY != ymode) {
state.mTileModeX = xmode;
state.mTileModeY = ymode;
state.mRebuildShader = true;
mDstRectAndInsetsDirty = true;
invalidateSelf();
}
} |
Sets the repeat behavior of this drawable on both axis. By default, the drawable
does not repeat its bitmap. Using {@link android.graphics.Shader.TileMode#REPEAT} or
{@link android.graphics.Shader.TileMode#MIRROR} the bitmap can be repeated (or tiled)
if the bitmap is smaller than this drawable.
@param xmode The X repeat mode for this drawable.
@param ymode The Y repeat mode for this drawable.
@see #setTileModeX(android.graphics.Shader.TileMode)
@see #setTileModeY(android.graphics.Shader.TileMode)
| BitmapDrawable::setTileModeXY | java | Reginer/aosp-android-jar | android-34/src/android/graphics/drawable/BitmapDrawable.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/graphics/drawable/BitmapDrawable.java | MIT |
private void updateShaderMatrix(@NonNull Bitmap bitmap, @NonNull Paint paint,
@NonNull Shader shader, boolean needMirroring) {
final int sourceDensity = bitmap.getDensity();
final int targetDensity = mTargetDensity;
final boolean needScaling = sourceDensity != 0 && sourceDensity != targetDensity;
if (needScaling || needMirroring) {
final Matrix matrix = getOrCreateMirrorMatrix();
matrix.reset();
if (needMirroring) {
final int dx = mDstRect.right - mDstRect.left;
matrix.setTranslate(dx, 0);
matrix.setScale(-1, 1);
}
if (needScaling) {
final float densityScale = targetDensity / (float) sourceDensity;
matrix.postScale(densityScale, densityScale);
}
shader.setLocalMatrix(matrix);
} else {
mMirrorMatrix = null;
shader.setLocalMatrix(Matrix.IDENTITY_MATRIX);
}
paint.setShader(shader);
} |
Updates the {@code paint}'s shader matrix to be consistent with the
destination size and layout direction.
@param bitmap the bitmap to be drawn
@param paint the paint used to draw the bitmap
@param shader the shader to set on the paint
@param needMirroring whether the bitmap should be mirrored
| BitmapDrawable::updateShaderMatrix | java | Reginer/aosp-android-jar | android-34/src/android/graphics/drawable/BitmapDrawable.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/graphics/drawable/BitmapDrawable.java | MIT |
public void clearMutated() {
super.clearMutated();
mMutated = false;
} |
@hide
| BitmapDrawable::clearMutated | java | Reginer/aosp-android-jar | android-34/src/android/graphics/drawable/BitmapDrawable.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/graphics/drawable/BitmapDrawable.java | MIT |
private void verifyRequiredAttributes(TypedArray a) throws XmlPullParserException {
// If we're not waiting on a theme, verify required attributes.
final BitmapState state = mBitmapState;
if (state.mBitmap == null && (state.mThemeAttrs == null
|| state.mThemeAttrs[R.styleable.BitmapDrawable_src] == 0)) {
throw new XmlPullParserException(a.getPositionDescription() +
": <bitmap> requires a valid 'src' attribute");
}
} |
Ensures all required attributes are set.
@throws XmlPullParserException if any required attributes are missing
| BitmapDrawable::verifyRequiredAttributes | java | Reginer/aosp-android-jar | android-34/src/android/graphics/drawable/BitmapDrawable.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/graphics/drawable/BitmapDrawable.java | MIT |
private void updateStateFromTypedArray(TypedArray a, int srcDensityOverride)
throws XmlPullParserException {
final Resources r = a.getResources();
final BitmapState state = mBitmapState;
// Account for any configuration changes.
state.mChangingConfigurations |= a.getChangingConfigurations();
// Extract the theme attributes, if any.
state.mThemeAttrs = a.extractThemeAttrs();
state.mSrcDensityOverride = srcDensityOverride;
state.mTargetDensity = Drawable.resolveDensity(r, 0);
final int srcResId = a.getResourceId(R.styleable.BitmapDrawable_src, 0);
if (srcResId != 0) {
final TypedValue value = new TypedValue();
r.getValueForDensity(srcResId, srcDensityOverride, value, true);
// Pretend the requested density is actually the display density. If
// the drawable returned is not the requested density, then force it
// to be scaled later by dividing its density by the ratio of
// requested density to actual device density. Drawables that have
// undefined density or no density don't need to be handled here.
if (srcDensityOverride > 0 && value.density > 0
&& value.density != TypedValue.DENSITY_NONE) {
if (value.density == srcDensityOverride) {
value.density = r.getDisplayMetrics().densityDpi;
} else {
value.density =
(value.density * r.getDisplayMetrics().densityDpi) / srcDensityOverride;
}
}
int density = Bitmap.DENSITY_NONE;
if (value.density == TypedValue.DENSITY_DEFAULT) {
density = DisplayMetrics.DENSITY_DEFAULT;
} else if (value.density != TypedValue.DENSITY_NONE) {
density = value.density;
}
Bitmap bitmap = null;
try (InputStream is = r.openRawResource(srcResId, value)) {
ImageDecoder.Source source = ImageDecoder.createSource(r, is, density);
bitmap = ImageDecoder.decodeBitmap(source, (decoder, info, src) -> {
decoder.setAllocator(ImageDecoder.ALLOCATOR_SOFTWARE);
});
} catch (Exception e) {
// Do nothing and pick up the error below.
}
if (bitmap == null) {
throw new XmlPullParserException(a.getPositionDescription() +
": <bitmap> requires a valid 'src' attribute");
}
state.mBitmap = bitmap;
}
final boolean defMipMap = state.mBitmap != null ? state.mBitmap.hasMipMap() : false;
setMipMap(a.getBoolean(R.styleable.BitmapDrawable_mipMap, defMipMap));
state.mAutoMirrored = a.getBoolean(
R.styleable.BitmapDrawable_autoMirrored, state.mAutoMirrored);
state.mBaseAlpha = a.getFloat(R.styleable.BitmapDrawable_alpha, state.mBaseAlpha);
final int tintMode = a.getInt(R.styleable.BitmapDrawable_tintMode, -1);
if (tintMode != -1) {
state.mBlendMode = Drawable.parseBlendMode(tintMode, BlendMode.SRC_IN);
}
final ColorStateList tint = a.getColorStateList(R.styleable.BitmapDrawable_tint);
if (tint != null) {
state.mTint = tint;
}
final Paint paint = mBitmapState.mPaint;
paint.setAntiAlias(a.getBoolean(
R.styleable.BitmapDrawable_antialias, paint.isAntiAlias()));
paint.setFilterBitmap(a.getBoolean(
R.styleable.BitmapDrawable_filter, paint.isFilterBitmap()));
paint.setDither(a.getBoolean(R.styleable.BitmapDrawable_dither, paint.isDither()));
setGravity(a.getInt(R.styleable.BitmapDrawable_gravity, state.mGravity));
final int tileMode = a.getInt(R.styleable.BitmapDrawable_tileMode, TILE_MODE_UNDEFINED);
if (tileMode != TILE_MODE_UNDEFINED) {
final Shader.TileMode mode = parseTileMode(tileMode);
setTileModeXY(mode, mode);
}
final int tileModeX = a.getInt(R.styleable.BitmapDrawable_tileModeX, TILE_MODE_UNDEFINED);
if (tileModeX != TILE_MODE_UNDEFINED) {
setTileModeX(parseTileMode(tileModeX));
}
final int tileModeY = a.getInt(R.styleable.BitmapDrawable_tileModeY, TILE_MODE_UNDEFINED);
if (tileModeY != TILE_MODE_UNDEFINED) {
setTileModeY(parseTileMode(tileModeY));
}
} |
Updates the constant state from the values in the typed array.
| BitmapDrawable::updateStateFromTypedArray | java | Reginer/aosp-android-jar | android-34/src/android/graphics/drawable/BitmapDrawable.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/graphics/drawable/BitmapDrawable.java | MIT |
private void init(BitmapState state, Resources res) {
mBitmapState = state;
updateLocalState(res);
if (mBitmapState != null && res != null) {
mBitmapState.mTargetDensity = mTargetDensity;
}
} |
The one helper to rule them all. This is called by all public & private
constructors to set the state and initialize local properties.
| BitmapState::init | java | Reginer/aosp-android-jar | android-34/src/android/graphics/drawable/BitmapDrawable.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/graphics/drawable/BitmapDrawable.java | MIT |
private void updateLocalState(Resources res) {
mTargetDensity = resolveDensity(res, mBitmapState.mTargetDensity);
mBlendModeFilter = updateBlendModeFilter(mBlendModeFilter, mBitmapState.mTint,
mBitmapState.mBlendMode);
computeBitmapSize();
} |
Initializes local dynamic properties from state. This should be called
after significant state changes, e.g. from the One True Constructor and
after inflating or applying a theme.
| BitmapState::updateLocalState | java | Reginer/aosp-android-jar | android-34/src/android/graphics/drawable/BitmapDrawable.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/graphics/drawable/BitmapDrawable.java | MIT |
protected FileTypeDetector() {
this(checkPermission());
} |
Initializes a new instance of this class.
@throws SecurityException
If a security manager has been installed and it denies
{@link RuntimePermission}<tt>("fileTypeDetector")</tt>
| FileTypeDetector::FileTypeDetector | java | Reginer/aosp-android-jar | android-33/src/java/nio/file/spi/FileTypeDetector.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/java/nio/file/spi/FileTypeDetector.java | MIT |
@Override public void presentPrompt(android.security.apc.IConfirmationCallback listener, java.lang.String promptText, byte[] extraData, java.lang.String locale, int uiOptionFlags) throws android.os.RemoteException
{
} |
Present the confirmation prompt. The caller must implement IConfirmationCallback and pass
it to this function as listener.
@deprecated Android Protected Confirmation had a low adoption rate among Android device
makers and developers alike. Given the lack of devices supporting the
feature, it is deprecated. Developers can use auth-bound Keystore keys
as a partial replacement.
@param listener Must implement IConfirmationCallback. Doubles as session identifier when
passed to cancelPrompt.
@param promptText The text that will be displayed to the user using the protected
confirmation UI.
@param extraData Extra data, e.g., a nonce, that will be included in the to-be-signed
message.
@param locale The locale string is used to select the language for the instructions
displayed by the confirmation prompt.
@param uiOptionFlags Bitwise combination of FLAG_UI_OPTION_* see above.
Service specific error codes:
- ResponseCode.OPERATION_PENDING If another prompt is already pending.
- ResponseCode.SYSTEM_ERROR An unexpected error occurred.
| Default::presentPrompt | java | Reginer/aosp-android-jar | android-35/src/android/security/apc/IProtectedConfirmation.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/security/apc/IProtectedConfirmation.java | MIT |
@Override public void cancelPrompt(android.security.apc.IConfirmationCallback listener) throws android.os.RemoteException
{
} |
Cancel an ongoing prompt.
@deprecated Android Protected Confirmation had a low adoption rate among Android device
makers and developers alike. Given the lack of devices supporting the
feature, it is deprecated. Developers can use auth-bound Keystore keys as
a partial replacement.
@param listener Must implement IConfirmationCallback, although in this context this binder
token is only used to identify the session that is to be cancelled.
Service specific error code:
- ResponseCode.IGNORED If the listener does not represent an ongoing prompt session.
| Default::cancelPrompt | java | Reginer/aosp-android-jar | android-35/src/android/security/apc/IProtectedConfirmation.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/security/apc/IProtectedConfirmation.java | MIT |
@Override public boolean isSupported() throws android.os.RemoteException
{
return false;
} |
Returns true if the device supports Android Protected Confirmation.
@deprecated Android Protected Confirmation had a low adoption rate among Android device
makers and developers alike. Given the lack of devices supporting the
feature, it is deprecated. Developers can use auth-bound Keystore keys
as a partial replacement.
| Default::isSupported | java | Reginer/aosp-android-jar | android-35/src/android/security/apc/IProtectedConfirmation.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/security/apc/IProtectedConfirmation.java | MIT |
public static android.security.apc.IProtectedConfirmation asInterface(android.os.IBinder obj)
{
if ((obj==null)) {
return null;
}
android.os.IInterface iin = obj.queryLocalInterface(DESCRIPTOR);
if (((iin!=null)&&(iin instanceof android.security.apc.IProtectedConfirmation))) {
return ((android.security.apc.IProtectedConfirmation)iin);
}
return new android.security.apc.IProtectedConfirmation.Stub.Proxy(obj);
} |
Cast an IBinder object into an android.security.apc.IProtectedConfirmation interface,
generating a proxy if needed.
| Stub::asInterface | java | Reginer/aosp-android-jar | android-35/src/android/security/apc/IProtectedConfirmation.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/security/apc/IProtectedConfirmation.java | MIT |
@Override public void presentPrompt(android.security.apc.IConfirmationCallback listener, java.lang.String promptText, byte[] extraData, java.lang.String locale, int uiOptionFlags) throws android.os.RemoteException
{
android.os.Parcel _data = android.os.Parcel.obtain(asBinder());
android.os.Parcel _reply = android.os.Parcel.obtain();
try {
_data.writeInterfaceToken(DESCRIPTOR);
_data.writeStrongInterface(listener);
_data.writeString(promptText);
_data.writeByteArray(extraData);
_data.writeString(locale);
_data.writeInt(uiOptionFlags);
boolean _status = mRemote.transact(Stub.TRANSACTION_presentPrompt, _data, _reply, 0);
_reply.readException();
}
finally {
_reply.recycle();
_data.recycle();
}
} |
Present the confirmation prompt. The caller must implement IConfirmationCallback and pass
it to this function as listener.
@deprecated Android Protected Confirmation had a low adoption rate among Android device
makers and developers alike. Given the lack of devices supporting the
feature, it is deprecated. Developers can use auth-bound Keystore keys
as a partial replacement.
@param listener Must implement IConfirmationCallback. Doubles as session identifier when
passed to cancelPrompt.
@param promptText The text that will be displayed to the user using the protected
confirmation UI.
@param extraData Extra data, e.g., a nonce, that will be included in the to-be-signed
message.
@param locale The locale string is used to select the language for the instructions
displayed by the confirmation prompt.
@param uiOptionFlags Bitwise combination of FLAG_UI_OPTION_* see above.
Service specific error codes:
- ResponseCode.OPERATION_PENDING If another prompt is already pending.
- ResponseCode.SYSTEM_ERROR An unexpected error occurred.
| Proxy::presentPrompt | java | Reginer/aosp-android-jar | android-35/src/android/security/apc/IProtectedConfirmation.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/security/apc/IProtectedConfirmation.java | MIT |
@Override public void cancelPrompt(android.security.apc.IConfirmationCallback listener) throws android.os.RemoteException
{
android.os.Parcel _data = android.os.Parcel.obtain(asBinder());
android.os.Parcel _reply = android.os.Parcel.obtain();
try {
_data.writeInterfaceToken(DESCRIPTOR);
_data.writeStrongInterface(listener);
boolean _status = mRemote.transact(Stub.TRANSACTION_cancelPrompt, _data, _reply, 0);
_reply.readException();
}
finally {
_reply.recycle();
_data.recycle();
}
} |
Cancel an ongoing prompt.
@deprecated Android Protected Confirmation had a low adoption rate among Android device
makers and developers alike. Given the lack of devices supporting the
feature, it is deprecated. Developers can use auth-bound Keystore keys as
a partial replacement.
@param listener Must implement IConfirmationCallback, although in this context this binder
token is only used to identify the session that is to be cancelled.
Service specific error code:
- ResponseCode.IGNORED If the listener does not represent an ongoing prompt session.
| Proxy::cancelPrompt | java | Reginer/aosp-android-jar | android-35/src/android/security/apc/IProtectedConfirmation.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/security/apc/IProtectedConfirmation.java | MIT |
@Override public boolean isSupported() throws android.os.RemoteException
{
android.os.Parcel _data = android.os.Parcel.obtain(asBinder());
android.os.Parcel _reply = android.os.Parcel.obtain();
boolean _result;
try {
_data.writeInterfaceToken(DESCRIPTOR);
boolean _status = mRemote.transact(Stub.TRANSACTION_isSupported, _data, _reply, 0);
_reply.readException();
_result = _reply.readBoolean();
}
finally {
_reply.recycle();
_data.recycle();
}
return _result;
} |
Returns true if the device supports Android Protected Confirmation.
@deprecated Android Protected Confirmation had a low adoption rate among Android device
makers and developers alike. Given the lack of devices supporting the
feature, it is deprecated. Developers can use auth-bound Keystore keys
as a partial replacement.
| Proxy::isSupported | java | Reginer/aosp-android-jar | android-35/src/android/security/apc/IProtectedConfirmation.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/android/security/apc/IProtectedConfirmation.java | MIT |
public hc_elementsetattributenodenull(final DOMTestDocumentBuilderFactory factory) throws org.w3c.domts.DOMTestIncompatibleException {
super(factory);
//
// check if loaded documents are supported for content type
//
String contentType = getContentType();
preload(contentType, "hc_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
| hc_elementsetattributenodenull::hc_elementsetattributenodenull | java | Reginer/aosp-android-jar | android-33/src/org/w3c/domts/level1/core/hc_elementsetattributenodenull.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/org/w3c/domts/level1/core/hc_elementsetattributenodenull.java | MIT |
public void runTest() throws Throwable {
Document doc;
NodeList elementList;
Element testEmployee;
Attr newAttribute;
Attr districtAttr;
doc = (Document) load("hc_staff", true);
elementList = doc.getElementsByTagName("acronym");
testEmployee = (Element) elementList.item(2);
newAttribute = doc.createAttribute("lang");
districtAttr = testEmployee.setAttributeNode(newAttribute);
assertNull("elementSetAttributeNodeNullAssert", districtAttr);
} |
Runs the test case.
@throws Throwable Any uncaught exception causes test to fail
| hc_elementsetattributenodenull::runTest | java | Reginer/aosp-android-jar | android-33/src/org/w3c/domts/level1/core/hc_elementsetattributenodenull.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/org/w3c/domts/level1/core/hc_elementsetattributenodenull.java | MIT |
public String getTargetURI() {
return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_elementsetattributenodenull";
} |
Gets URI that identifies the test.
@return uri identifier of test
| hc_elementsetattributenodenull::getTargetURI | java | Reginer/aosp-android-jar | android-33/src/org/w3c/domts/level1/core/hc_elementsetattributenodenull.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/org/w3c/domts/level1/core/hc_elementsetattributenodenull.java | MIT |
public static void main(final String[] args) {
DOMTestCase.doMain(hc_elementsetattributenodenull.class, args);
} |
Runs this test from the command line.
@param args command line arguments
| hc_elementsetattributenodenull::main | java | Reginer/aosp-android-jar | android-33/src/org/w3c/domts/level1/core/hc_elementsetattributenodenull.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/org/w3c/domts/level1/core/hc_elementsetattributenodenull.java | MIT |
public long calculateDuration(BatteryStats.Timer timer, long rawRealtimeUs, int statsType) {
return timer == null ? 0 : timer.getTotalTimeLocked(rawRealtimeUs, statsType) / 1000;
} |
Given a {@link BatteryStats.Timer}, returns the accumulated duration.
| UsageBasedPowerEstimator::calculateDuration | java | Reginer/aosp-android-jar | android-34/src/com/android/server/power/stats/UsageBasedPowerEstimator.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/server/power/stats/UsageBasedPowerEstimator.java | MIT |
public double calculatePower(long durationMs) {
return mAveragePowerMahPerMs * durationMs;
} |
Given a duration in milliseconds, return the estimated power consumption.
| UsageBasedPowerEstimator::calculatePower | java | Reginer/aosp-android-jar | android-34/src/com/android/server/power/stats/UsageBasedPowerEstimator.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/server/power/stats/UsageBasedPowerEstimator.java | MIT |
public void moveFirstBubbleWithStackFollowing(float x, float y) {
// If we're moving the bubble around, we're not animating to any bounds.
mAnimatingToBounds.setEmpty();
// If we manually move the bubbles with the IME open, clear the return point since we don't
// want the stack to snap away from the new position.
mPreImeY = UNSET;
moveFirstBubbleWithStackFollowing(DynamicAnimation.TRANSLATION_X, x);
moveFirstBubbleWithStackFollowing(DynamicAnimation.TRANSLATION_Y, y);
// This method is called when the stack is being dragged manually, so we're clearly no
// longer flinging.
mIsMovingFromFlinging = false;
} |
Instantly move the first bubble to the given point, and animate the rest of the stack behind
it with the 'following' effect.
| StackAnimationController::moveFirstBubbleWithStackFollowing | java | Reginer/aosp-android-jar | android-34/src/com/android/wm/shell/bubbles/animation/StackAnimationController.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/wm/shell/bubbles/animation/StackAnimationController.java | MIT |
public PointF getStackPosition() {
return mStackPosition;
} |
The position of the stack - typically the position of the first bubble; if no bubbles have
been added yet, it will be where the first bubble will go when added.
| StackAnimationController::getStackPosition | java | Reginer/aosp-android-jar | android-34/src/com/android/wm/shell/bubbles/animation/StackAnimationController.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/wm/shell/bubbles/animation/StackAnimationController.java | MIT |
public boolean isStackOnLeftSide() {
if (mLayout == null || !isStackPositionSet()) {
return true; // Default to left, which is where it starts by default.
}
return mPositioner.isStackOnLeft(mStackPosition);
} |
The position of the stack - typically the position of the first bubble; if no bubbles have
been added yet, it will be where the first bubble will go when added.
public PointF getStackPosition() {
return mStackPosition;
}
/** Whether the stack is on the left side of the screen. | StackAnimationController::isStackOnLeftSide | java | Reginer/aosp-android-jar | android-34/src/com/android/wm/shell/bubbles/animation/StackAnimationController.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/wm/shell/bubbles/animation/StackAnimationController.java | MIT |
public void springStack(
float destinationX, float destinationY, float stiffness) {
notifyFloatingCoordinatorStackAnimatingTo(destinationX, destinationY);
springFirstBubbleWithStackFollowing(DynamicAnimation.TRANSLATION_X,
new SpringForce()
.setStiffness(stiffness)
.setDampingRatio(SPRING_AFTER_FLING_DAMPING_RATIO),
0 /* startXVelocity */,
destinationX);
springFirstBubbleWithStackFollowing(DynamicAnimation.TRANSLATION_Y,
new SpringForce()
.setStiffness(stiffness)
.setDampingRatio(SPRING_AFTER_FLING_DAMPING_RATIO),
0 /* startYVelocity */,
destinationY);
} |
Fling stack to given corner, within allowable screen bounds.
Note that we need new SpringForce instances per animation despite identical configs because
SpringAnimation uses SpringForce's internal (changing) velocity while the animation runs.
| StackAnimationController::springStack | java | Reginer/aosp-android-jar | android-34/src/com/android/wm/shell/bubbles/animation/StackAnimationController.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/wm/shell/bubbles/animation/StackAnimationController.java | MIT |
public void springStackAfterFling(float destinationX, float destinationY) {
springStack(destinationX, destinationY, STACK_SPRING_STIFFNESS);
} |
Springs the stack to the specified x/y coordinates, with the stiffness used for springs after
flings.
| StackAnimationController::springStackAfterFling | java | Reginer/aosp-android-jar | android-34/src/com/android/wm/shell/bubbles/animation/StackAnimationController.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/wm/shell/bubbles/animation/StackAnimationController.java | MIT |
public float flingStackThenSpringToEdge(float x, float velX, float velY) {
final boolean stackOnLeftSide = x - mBubbleSize / 2 < mLayout.getWidth() / 2;
final boolean stackShouldFlingLeft = stackOnLeftSide
? velX < ESCAPE_VELOCITY
: velX < -ESCAPE_VELOCITY;
final RectF stackBounds = mPositioner.getAllowableStackPositionRegion(getBubbleCount());
// Target X translation (either the left or right side of the screen).
final float destinationRelativeX = stackShouldFlingLeft
? stackBounds.left : stackBounds.right;
// If all bubbles were removed during a drag event, just return the X we would have animated
// to if there were still bubbles.
if (mLayout == null || mLayout.getChildCount() == 0) {
return destinationRelativeX;
}
final ContentResolver contentResolver = mLayout.getContext().getContentResolver();
final float stiffness = Settings.Secure.getFloat(contentResolver, "bubble_stiffness",
STACK_SPRING_STIFFNESS /* default */);
final float dampingRatio = Settings.Secure.getFloat(contentResolver, "bubble_damping",
SPRING_AFTER_FLING_DAMPING_RATIO);
final float friction = Settings.Secure.getFloat(contentResolver, "bubble_friction",
FLING_FRICTION);
// Minimum velocity required for the stack to make it to the targeted side of the screen,
// taking friction into account (4.2f is the number that friction scalars are multiplied by
// in DynamicAnimation.DragForce). This is an estimate - it could possibly be slightly off,
// but the SpringAnimation at the end will ensure that it reaches the destination X
// regardless.
final float minimumVelocityToReachEdge =
(destinationRelativeX - x) * (friction * 4.2f);
final float estimatedY = PhysicsAnimator.estimateFlingEndValue(
mStackPosition.y, velY,
new PhysicsAnimator.FlingConfig(
friction, stackBounds.top, stackBounds.bottom));
notifyFloatingCoordinatorStackAnimatingTo(destinationRelativeX, estimatedY);
// Use the touch event's velocity if it's sufficient, otherwise use the minimum velocity so
// that it'll make it all the way to the side of the screen.
final float startXVelocity = stackShouldFlingLeft
? Math.min(minimumVelocityToReachEdge, velX)
: Math.max(minimumVelocityToReachEdge, velX);
flingThenSpringFirstBubbleWithStackFollowing(
DynamicAnimation.TRANSLATION_X,
startXVelocity,
friction,
new SpringForce()
.setStiffness(stiffness)
.setDampingRatio(dampingRatio),
destinationRelativeX);
flingThenSpringFirstBubbleWithStackFollowing(
DynamicAnimation.TRANSLATION_Y,
velY,
friction,
new SpringForce()
.setStiffness(stiffness)
.setDampingRatio(dampingRatio),
/* destination */ null);
// If we're flinging now, there's no more touch event to catch up to.
mFirstBubbleSpringingToTouch = false;
mIsMovingFromFlinging = true;
return destinationRelativeX;
} |
Flings the stack starting with the given velocities, springing it to the nearest edge
afterward.
@return The X value that the stack will end up at after the fling/spring.
| StackAnimationController::flingStackThenSpringToEdge | java | Reginer/aosp-android-jar | android-34/src/com/android/wm/shell/bubbles/animation/StackAnimationController.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/wm/shell/bubbles/animation/StackAnimationController.java | MIT |
public PointF getStackPositionAlongNearestHorizontalEdge() {
final PointF stackPos = getStackPosition();
final boolean onLeft = mLayout.isFirstChildXLeftOfCenter(stackPos.x);
final RectF bounds = mPositioner.getAllowableStackPositionRegion(getBubbleCount());
stackPos.x = onLeft ? bounds.left : bounds.right;
return stackPos;
} |
Where the stack would be if it were snapped to the nearest horizontal edge (left or right).
| StackAnimationController::getStackPositionAlongNearestHorizontalEdge | java | Reginer/aosp-android-jar | android-34/src/com/android/wm/shell/bubbles/animation/StackAnimationController.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/wm/shell/bubbles/animation/StackAnimationController.java | MIT |
public void dump(PrintWriter pw) {
pw.println("StackAnimationController state:");
pw.print(" isActive: "); pw.println(isActiveController());
pw.print(" restingStackPos: ");
pw.println(mPositioner.getRestingPosition().toString());
pw.print(" currentStackPos: "); pw.println(mStackPosition.toString());
pw.print(" isMovingFromFlinging: "); pw.println(mIsMovingFromFlinging);
pw.print(" withinDismiss: "); pw.println(isStackStuckToTarget());
pw.print(" firstBubbleSpringing: "); pw.println(mFirstBubbleSpringingToTouch);
} |
Where the stack would be if it were snapped to the nearest horizontal edge (left or right).
public PointF getStackPositionAlongNearestHorizontalEdge() {
final PointF stackPos = getStackPosition();
final boolean onLeft = mLayout.isFirstChildXLeftOfCenter(stackPos.x);
final RectF bounds = mPositioner.getAllowableStackPositionRegion(getBubbleCount());
stackPos.x = onLeft ? bounds.left : bounds.right;
return stackPos;
}
/** Description of current animation controller state. | StackAnimationController::dump | java | Reginer/aosp-android-jar | android-34/src/com/android/wm/shell/bubbles/animation/StackAnimationController.java | https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/wm/shell/bubbles/animation/StackAnimationController.java | MIT |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.