use of androidx.annotation.CallSuper in project android_packages_apps_Settings by crdroidandroid.
the class BaseSearchIndexProvider method getNonIndexableKeys.
@Override
@CallSuper
public List<String> getNonIndexableKeys(Context context) {
if (!isPageSearchEnabled(context)) {
// Entire page should be suppressed, mark all keys from this page as non-indexable.
return getNonIndexableKeysFromXml(context, true);
}
final List<String> nonIndexableKeys = new ArrayList<>();
nonIndexableKeys.addAll(getNonIndexableKeysFromXml(context, false));
final List<AbstractPreferenceController> controllers = getPreferenceControllers(context);
if (controllers != null && !controllers.isEmpty()) {
for (AbstractPreferenceController controller : controllers) {
if (controller instanceof PreferenceControllerMixin) {
((PreferenceControllerMixin) controller).updateNonIndexableKeys(nonIndexableKeys);
} else if (controller instanceof BasePreferenceController) {
((BasePreferenceController) controller).updateNonIndexableKeys(nonIndexableKeys);
} else {
Log.e(TAG, controller.getClass().getName() + " must implement " + PreferenceControllerMixin.class.getName() + " treating the key non-indexable");
nonIndexableKeys.add(controller.getPreferenceKey());
}
}
}
return nonIndexableKeys;
}
use of androidx.annotation.CallSuper in project android_packages_apps_Settings by crdroidandroid.
the class BaseSearchIndexProvider method getDynamicRawDataToIndex.
@Override
@CallSuper
public List<SearchIndexableRaw> getDynamicRawDataToIndex(Context context, boolean enabled) {
final List<SearchIndexableRaw> dynamicRaws = new ArrayList<>();
if (!isPageSearchEnabled(context)) {
// Entire page should be suppressed, do not add dynamic raw data.
return dynamicRaws;
}
final List<AbstractPreferenceController> controllers = getPreferenceControllers(context);
if (controllers == null || controllers.isEmpty()) {
return dynamicRaws;
}
for (AbstractPreferenceController controller : controllers) {
if (controller instanceof PreferenceControllerMixin) {
((PreferenceControllerMixin) controller).updateDynamicRawDataToIndex(dynamicRaws);
} else if (controller instanceof BasePreferenceController) {
((BasePreferenceController) controller).updateDynamicRawDataToIndex(dynamicRaws);
} else {
Log.e(TAG, controller.getClass().getName() + " must implement " + PreferenceControllerMixin.class.getName() + " treating the dynamic indexable");
}
}
return dynamicRaws;
}
use of androidx.annotation.CallSuper in project open-event-orga-app by fossasia.
the class AbstractBasePresenter method attach.
@Override
@CallSuper
public void attach(V view) {
this.view = view;
this.compositeDisposable = new CompositeDisposable();
attachCount++;
}
use of androidx.annotation.CallSuper in project BaseProject by feer921.
the class TheActivityLifeCycleCallback method onActivityDestroyed.
// 基类有逻辑处理,则需要调用本基类
@CallSuper
@Override
public void onActivityDestroyed(Activity activity) {
boolean isMarkedFinish = false;
Intent theFlagIntent = activity.getIntent();
if (theFlagIntent != null) {
isMarkedFinish = theFlagIntent.getBooleanExtra("onActivityFinish", false);
}
if (!isMarkedFinish) {
existActivityCount--;
}
if (LIFE_CIRCLE_DEBUG) {
CommonLog.i(TAG, "-->onActivityDestroyed() activity = " + activity + " existActivityCount = " + existActivityCount + " isMarkedFinish = " + isMarkedFinish);
}
}
use of androidx.annotation.CallSuper in project ExoPlayer by google.
the class DecoderVideoRenderer method onInputFormatChanged.
/**
* Called when a new format is read from the upstream source.
*
* @param formatHolder A {@link FormatHolder} that holds the new {@link Format}.
* @throws ExoPlaybackException If an error occurs (re-)initializing the decoder.
*/
@CallSuper
protected void onInputFormatChanged(FormatHolder formatHolder) throws ExoPlaybackException {
waitingForFirstSampleInFormat = true;
Format newFormat = Assertions.checkNotNull(formatHolder.format);
setSourceDrmSession(formatHolder.drmSession);
Format oldFormat = inputFormat;
inputFormat = newFormat;
if (decoder == null) {
maybeInitDecoder();
eventDispatcher.inputFormatChanged(inputFormat, /* decoderReuseEvaluation= */
null);
return;
}
DecoderReuseEvaluation evaluation;
if (sourceDrmSession != decoderDrmSession) {
evaluation = new DecoderReuseEvaluation(decoder.getName(), oldFormat, newFormat, REUSE_RESULT_NO, DISCARD_REASON_DRM_SESSION_CHANGED);
} else {
evaluation = canReuseDecoder(decoder.getName(), oldFormat, newFormat);
}
if (evaluation.result == REUSE_RESULT_NO) {
if (decoderReceivedBuffers) {
// Signal end of stream and wait for any final output buffers before re-initialization.
decoderReinitializationState = REINITIALIZATION_STATE_SIGNAL_END_OF_STREAM;
} else {
// There aren't any final output buffers, so release the decoder immediately.
releaseDecoder();
maybeInitDecoder();
}
}
eventDispatcher.inputFormatChanged(inputFormat, evaluation);
}
Aggregations