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 onDataNetworkHandoverRetryStopped(@NonNull DataNetwork dataNetwork) {}
Called when retry manager determines that the retry will no longer be performed on this data network. @param dataNetwork The data network that will never be retried handover.
DataRetryManagerCallback::onDataNetworkHandoverRetryStopped
java
Reginer/aosp-android-jar
android-34/src/com/android/internal/telephony/data/DataRetryManager.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/internal/telephony/data/DataRetryManager.java
MIT
public void onThrottleStatusChanged(@NonNull List<ThrottleStatus> throttleStatusList) {}
Called when throttle status changed reported from network. @param throttleStatusList List of throttle status.
DataRetryManagerCallback::onThrottleStatusChanged
java
Reginer/aosp-android-jar
android-34/src/com/android/internal/telephony/data/DataRetryManager.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/internal/telephony/data/DataRetryManager.java
MIT
public DataRetryManager(@NonNull Phone phone, @NonNull DataNetworkController dataNetworkController, @NonNull SparseArray<DataServiceManager> dataServiceManagers, @NonNull Looper looper, @NonNull DataRetryManagerCallback dataRetryManagerCallback) { super(looper); mPhone = phone; mRil = phone.mCi; mLogTag = "DRM-" + mPhone.getPhoneId(); mDataRetryManagerCallbacks.add(dataRetryManagerCallback); mDataServiceManagers = dataServiceManagers; mDataConfigManager = dataNetworkController.getDataConfigManager(); mDataProfileManager = dataNetworkController.getDataProfileManager(); mAlarmManager = mPhone.getContext().getSystemService(AlarmManager.class); mDataConfigManager.registerCallback(new DataConfigManagerCallback(this::post) { @Override public void onCarrierConfigChanged() { DataRetryManager.this.onCarrierConfigUpdated(); } }); for (int transport : mPhone.getAccessNetworksManager().getAvailableTransports()) { mDataServiceManagers.get(transport) .registerForApnUnthrottled(this, EVENT_DATA_PROFILE_UNTHROTTLED); } mDataProfileManager.registerCallback(new DataProfileManagerCallback(this::post) { @Override public void onDataProfilesChanged() { onReset(RESET_REASON_DATA_PROFILES_CHANGED); } }); dataNetworkController.registerDataNetworkControllerCallback( new DataNetworkControllerCallback(this::post) { /** * Called when data service is bound. * * @param transport The transport of the data service. */ @Override public void onDataServiceBound(@TransportType int transport) { onReset(RESET_REASON_DATA_SERVICE_BOUND); } /** * Called when data network is connected. * * @param transport Transport for the connected network. * @param dataProfile The data profile of the connected data network. */ @Override public void onDataNetworkConnected(@TransportType int transport, @NonNull DataProfile dataProfile) { DataRetryManager.this.onDataNetworkConnected(transport, dataProfile); } }); mRil.registerForOn(this, EVENT_RADIO_ON, null); mRil.registerForModemReset(this, EVENT_MODEM_RESET, null); // Register intent of alarm manager for long retry timer IntentFilter intentFilter = new IntentFilter(); intentFilter.addAction(ACTION_RETRY); mPhone.getContext().registerReceiver(new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { if (ACTION_RETRY.equals(intent.getAction())) { DataRetryManager.this.onAlarmIntentRetry( intent.getIntExtra(ACTION_RETRY_EXTRA_HASHCODE, -1 /*Bad hashcode*/)); } } }, intentFilter); if (mDataConfigManager.shouldResetDataThrottlingWhenTacChanges()) { mPhone.getServiceStateTracker().registerForAreaCodeChanged(this, EVENT_TAC_CHANGED, null); } }
Constructor @param phone The phone instance. @param dataNetworkController Data network controller. @param looper The looper to be used by the handler. Currently the handler thread is the phone process's main thread. @param dataRetryManagerCallback Data retry callback.
DataRetryManagerCallback::DataRetryManager
java
Reginer/aosp-android-jar
android-34/src/com/android/internal/telephony/data/DataRetryManager.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/internal/telephony/data/DataRetryManager.java
MIT
private boolean isRetryCancelled(@Nullable DataRetryEntry retryEntry) { if (retryEntry != null && retryEntry.getState() == DataRetryEntry.RETRY_STATE_NOT_RETRIED) { return false; } log("Retry was removed earlier. " + retryEntry); return true; }
@param retryEntry The retry entry to check. @return {@code true} if the retry is null or not in RETRY_STATE_NOT_RETRIED state.
DataRetryManagerCallback::isRetryCancelled
java
Reginer/aosp-android-jar
android-34/src/com/android/internal/telephony/data/DataRetryManager.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/internal/telephony/data/DataRetryManager.java
MIT
private void onCarrierConfigUpdated() { onReset(RESET_REASON_DATA_CONFIG_CHANGED); mDataSetupRetryRuleList = mDataConfigManager.getDataSetupRetryRules(); mDataHandoverRetryRuleList = mDataConfigManager.getDataHandoverRetryRules(); log("onDataConfigUpdated: mDataSetupRetryRuleList=" + mDataSetupRetryRuleList + ", mDataHandoverRetryRuleList=" + mDataHandoverRetryRuleList); }
Called when carrier config is updated.
DataRetryManagerCallback::onCarrierConfigUpdated
java
Reginer/aosp-android-jar
android-34/src/com/android/internal/telephony/data/DataRetryManager.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/internal/telephony/data/DataRetryManager.java
MIT
public void onDataNetworkConnected(@TransportType int transport, @NonNull DataProfile dataProfile) { if (dataProfile.getApnSetting() != null) { dataProfile.getApnSetting().setPermanentFailed(false); } onDataProfileUnthrottled(dataProfile, null, transport, true, false); }
Called when data network is connected. @param transport Transport for the connected network. @param dataProfile The data profile of the connected data network.
DataRetryManagerCallback::onDataNetworkConnected
java
Reginer/aosp-android-jar
android-34/src/com/android/internal/telephony/data/DataRetryManager.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/internal/telephony/data/DataRetryManager.java
MIT
public void evaluateDataSetupRetry(@NonNull DataProfile dataProfile, @TransportType int transport, @NonNull NetworkRequestList requestList, @DataFailureCause int cause, long retryDelayMillis) { post(() -> onEvaluateDataSetupRetry(dataProfile, transport, requestList, cause, retryDelayMillis)); }
Evaluate if data setup retry is needed or not. If needed, retry will be scheduled automatically after evaluation. @param dataProfile The data profile that has been used in the previous data network setup. @param transport The transport to retry data setup. @param requestList The network requests attached to the previous data network setup. @param cause The fail cause of previous data network setup. @param retryDelayMillis The retry delay in milliseconds suggested by the network/data service. {@link android.telephony.data.DataCallResponse#RETRY_DURATION_UNDEFINED} indicates network/data service did not suggest retry or not. Telephony frameworks would use its logic to perform data retry.
DataRetryManagerCallback::evaluateDataSetupRetry
java
Reginer/aosp-android-jar
android-34/src/com/android/internal/telephony/data/DataRetryManager.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/internal/telephony/data/DataRetryManager.java
MIT
public void evaluateDataHandoverRetry(@NonNull DataNetwork dataNetwork, @DataFailureCause int cause, long retryDelayMillis) { post(() -> onEvaluateDataHandoverRetry(dataNetwork, cause, retryDelayMillis)); }
Evaluate if data handover retry is needed or not. If needed, retry will be scheduled automatically after evaluation. @param dataNetwork The data network to be retried for handover. @param cause The fail cause of previous data network handover. @param retryDelayMillis The retry delay in milliseconds suggested by the network/data service. {@link android.telephony.data.DataCallResponse#RETRY_DURATION_UNDEFINED} indicates network/data service did not suggest retry or not. Telephony frameworks would use its logic to perform handover retry.
DataRetryManagerCallback::evaluateDataHandoverRetry
java
Reginer/aosp-android-jar
android-34/src/com/android/internal/telephony/data/DataRetryManager.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/internal/telephony/data/DataRetryManager.java
MIT
public boolean isDataNetworkHandoverRetryStopped(@NonNull DataNetwork dataNetwork) { // Matching the rule in configured order. for (DataHandoverRetryRule retryRule : mDataHandoverRetryRuleList) { int failedCount = getRetryFailedCount(dataNetwork, retryRule); if (failedCount == retryRule.getMaxRetries()) { log("Data handover retry failed for " + failedCount + " times. Stopped " + "handover retry."); return true; } } return false; }
@param dataNetwork The data network to check. @return {@code true} if the data network had failed the maximum number of attempts for handover according to any retry rules.
DataRetryManagerCallback::isDataNetworkHandoverRetryStopped
java
Reginer/aosp-android-jar
android-34/src/com/android/internal/telephony/data/DataRetryManager.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/internal/telephony/data/DataRetryManager.java
MIT
private void onReset(@RetryResetReason int reason) { logl("Remove all retry and throttling entries, reason=" + resetReasonToString(reason)); removeMessages(EVENT_DATA_SETUP_RETRY); removeMessages(EVENT_DATA_HANDOVER_RETRY); mDataRetryEntries.stream() .filter(entry -> entry.getState() == DataRetryEntry.RETRY_STATE_NOT_RETRIED) .forEach(entry -> entry.setState(DataRetryEntry.RETRY_STATE_CANCELLED)); for (DataThrottlingEntry dataThrottlingEntry : mDataThrottlingEntries) { DataProfile dataProfile = dataThrottlingEntry.dataProfile; String apn = dataProfile.getApnSetting() != null ? dataProfile.getApnSetting().getApnName() : null; onDataProfileUnthrottled(dataProfile, apn, dataThrottlingEntry.transport, false, true); } mDataThrottlingEntries.clear(); }
@param dataNetwork The data network to check. @return {@code true} if the data network had failed the maximum number of attempts for handover according to any retry rules. public boolean isDataNetworkHandoverRetryStopped(@NonNull DataNetwork dataNetwork) { // Matching the rule in configured order. for (DataHandoverRetryRule retryRule : mDataHandoverRetryRuleList) { int failedCount = getRetryFailedCount(dataNetwork, retryRule); if (failedCount == retryRule.getMaxRetries()) { log("Data handover retry failed for " + failedCount + " times. Stopped " + "handover retry."); return true; } } return false; } /** Cancel all retries and throttling entries.
DataRetryManagerCallback::onReset
java
Reginer/aosp-android-jar
android-34/src/com/android/internal/telephony/data/DataRetryManager.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/internal/telephony/data/DataRetryManager.java
MIT
private int getRetryFailedCount(@NonNull DataNetwork dataNetwork, @NonNull DataHandoverRetryRule dataRetryRule) { int count = 0; for (int i = mDataRetryEntries.size() - 1; i >= 0; i--) { if (mDataRetryEntries.get(i) instanceof DataHandoverRetryEntry) { DataHandoverRetryEntry entry = (DataHandoverRetryEntry) mDataRetryEntries.get(i); if (entry.dataNetwork == dataNetwork && dataRetryRule.equals(entry.appliedDataRetryRule)) { if (entry.getState() == DataRetryEntry.RETRY_STATE_SUCCEEDED || entry.getState() == DataRetryEntry.RETRY_STATE_CANCELLED) { break; } count++; } } } return count; }
Count how many times the same setup retry rule has been used for this data network but failed. @param dataNetwork The data network to check. @param dataRetryRule The data retry rule. @return The failed count since last successful data setup.
DataRetryManagerCallback::getRetryFailedCount
java
Reginer/aosp-android-jar
android-34/src/com/android/internal/telephony/data/DataRetryManager.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/internal/telephony/data/DataRetryManager.java
MIT
private int getRetryFailedCount(@NetCapability int networkCapability, @NonNull DataSetupRetryRule dataRetryRule, @TransportType int transport) { int count = 0; for (int i = mDataRetryEntries.size() - 1; i >= 0; i--) { if (mDataRetryEntries.get(i) instanceof DataSetupRetryEntry) { DataSetupRetryEntry entry = (DataSetupRetryEntry) mDataRetryEntries.get(i); // count towards the last succeeded data setup. if (entry.setupRetryType == DataSetupRetryEntry.RETRY_TYPE_NETWORK_REQUESTS && entry.transport == transport) { if (entry.networkRequestList.isEmpty()) { String msg = "Invalid data retry entry detected"; logl(msg); loge("mDataRetryEntries=" + mDataRetryEntries); AnomalyReporter.reportAnomaly( UUID.fromString("afeab78c-c0b0-49fc-a51f-f766814d7aa6"), msg, mPhone.getCarrierId()); continue; } if (entry.networkRequestList.get(0).getApnTypeNetworkCapability() == networkCapability && entry.appliedDataRetryRule.equals(dataRetryRule)) { if (entry.getState() == DataRetryEntry.RETRY_STATE_SUCCEEDED || entry.getState() == DataRetryEntry.RETRY_STATE_CANCELLED) { break; } count++; } } } } return count; }
Count how many times the same setup retry rule has been used for the capability since last success data setup. @param networkCapability The network capability to check. @param dataRetryRule The data retry rule. @param transport The transport on which setup failure has occurred. @return The failed count since last successful data setup.
DataRetryManagerCallback::getRetryFailedCount
java
Reginer/aosp-android-jar
android-34/src/com/android/internal/telephony/data/DataRetryManager.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/internal/telephony/data/DataRetryManager.java
MIT
private void schedule(@NonNull DataRetryEntry dataRetryEntry) { logl("Scheduled data retry " + dataRetryEntry + " hashcode=" + dataRetryEntry.hashCode()); mDataRetryEntries.add(dataRetryEntry); if (mDataRetryEntries.size() >= MAXIMUM_HISTORICAL_ENTRIES) { // Discard the oldest retry entry. mDataRetryEntries.remove(0); } // When the device is in doze mode, the handler message might be extremely delayed because // handler uses relative system time(not counting sleep) which is inaccurate even when we // enter the maintenance window. // Therefore, we use alarm manager when we need to schedule long timers. if (dataRetryEntry.retryDelayMillis <= RETRY_LONG_DELAY_TIMER_THRESHOLD_MILLIS) { sendMessageDelayed(obtainMessage(dataRetryEntry instanceof DataSetupRetryEntry ? EVENT_DATA_SETUP_RETRY : EVENT_DATA_HANDOVER_RETRY, dataRetryEntry), dataRetryEntry.retryDelayMillis); } else { Intent intent = new Intent(ACTION_RETRY); intent.putExtra(ACTION_RETRY_EXTRA_HASHCODE, dataRetryEntry.hashCode()); // No need to wake up the device at the exact time, the retry can wait util next time // the device wake up to save power. mAlarmManager.setAndAllowWhileIdle(AlarmManager.ELAPSED_REALTIME, dataRetryEntry.retryElapsedTime, PendingIntent.getBroadcast(mPhone.getContext(), dataRetryEntry.hashCode() /*Unique identifier of this retry attempt*/, intent, PendingIntent.FLAG_IMMUTABLE)); } }
Schedule the data retry. @param dataRetryEntry The data retry entry.
DataRetryManagerCallback::schedule
java
Reginer/aosp-android-jar
android-34/src/com/android/internal/telephony/data/DataRetryManager.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/internal/telephony/data/DataRetryManager.java
MIT
private void onAlarmIntentRetry(int retryHashcode) { DataRetryEntry dataRetryEntry = mDataRetryEntries.stream() .filter(entry -> entry.hashCode() == retryHashcode) .findAny() .orElse(null); logl("onAlarmIntentRetry: found " + dataRetryEntry + " with hashcode " + retryHashcode); if (dataRetryEntry != null) { sendMessage(obtainMessage(dataRetryEntry instanceof DataSetupRetryEntry ? EVENT_DATA_SETUP_RETRY : EVENT_DATA_HANDOVER_RETRY, dataRetryEntry)); } }
Called when it's time to retry scheduled by Alarm Manager. @param retryHashcode The hashcode is the unique identifier of which retry entry to retry.
DataRetryManagerCallback::onAlarmIntentRetry
java
Reginer/aosp-android-jar
android-34/src/com/android/internal/telephony/data/DataRetryManager.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/internal/telephony/data/DataRetryManager.java
MIT
private void updateThrottleStatus(@NonNull DataProfile dataProfile, @Nullable NetworkRequestList networkRequestList, @Nullable DataNetwork dataNetwork, @RetryType int retryType, @TransportType int transport, @ElapsedRealtimeLong long expirationTime) { DataThrottlingEntry entry = new DataThrottlingEntry(dataProfile, networkRequestList, dataNetwork, transport, retryType, expirationTime); // Remove previous entry that contains the same data profile. Therefore it should always // contain at maximum all the distinct data profiles of the current subscription. mDataThrottlingEntries.removeIf( throttlingEntry -> dataProfile.equals(throttlingEntry.dataProfile)); if (mDataThrottlingEntries.size() >= MAXIMUM_HISTORICAL_ENTRIES) { // If we don't see the anomaly report after U release, we should remove this check for // the commented reason above. AnomalyReporter.reportAnomaly( UUID.fromString("24fd4d46-1d0f-4b13-b7d6-7bad70b8289b"), "DataRetryManager throttling more than 100 data profiles", mPhone.getCarrierId()); mDataThrottlingEntries.remove(0); } logl("Add throttling entry " + entry); mDataThrottlingEntries.add(entry); // For backwards compatibility, we use RETRY_TYPE_NONE if network suggests never retry. final int dataRetryType = expirationTime == Long.MAX_VALUE ? ThrottleStatus.RETRY_TYPE_NONE : retryType; // Report to the clients. final List<ThrottleStatus> throttleStatusList = new ArrayList<>(); if (dataProfile.getApnSetting() != null) { throttleStatusList.addAll(dataProfile.getApnSetting().getApnTypes().stream() .map(apnType -> new ThrottleStatus.Builder() .setApnType(apnType) .setRetryType(dataRetryType) .setSlotIndex(mPhone.getPhoneId()) .setThrottleExpiryTimeMillis(expirationTime) .setTransportType(transport) .build()) .collect(Collectors.toList())); } mDataRetryManagerCallbacks.forEach(callback -> callback.invokeFromExecutor( () -> callback.onThrottleStatusChanged(throttleStatusList))); }
Add the latest throttling request and report it to the clients. @param dataProfile The data profile that is being throttled for setup/handover retry. @param networkRequestList The associated network request list when throttling happened. Can be {@code null} when retry type is {@link ThrottleStatus#RETRY_TYPE_HANDOVER}. @param dataNetwork The data network that is being throttled for handover retry. Must be {@code null} when retryType is {@link ThrottleStatus#RETRY_TYPE_NEW_CONNECTION}. @param retryType The retry type when throttling expires. @param transport The transport that the data profile has been throttled on. @param expirationTime The expiration time of data throttling. This is the time retrieved from {@link SystemClock#elapsedRealtime()}.
DataRetryManagerCallback::updateThrottleStatus
java
Reginer/aosp-android-jar
android-34/src/com/android/internal/telephony/data/DataRetryManager.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/internal/telephony/data/DataRetryManager.java
MIT
private void onDataProfileUnthrottled(@Nullable DataProfile dataProfile, @Nullable String apn, @TransportType int transport, boolean remove, boolean retry) { log("onDataProfileUnthrottled: dataProfile=" + dataProfile + ", apn=" + apn + ", transport=" + AccessNetworkConstants.transportTypeToString(transport) + ", remove=" + remove); long now = SystemClock.elapsedRealtime(); List<DataThrottlingEntry> dataUnthrottlingEntries = new ArrayList<>(); if (dataProfile != null) { // For AIDL-based HAL. There should be only one entry containing this data profile. // Note that the data profile reconstructed from DataProfileInfo.aidl will not be // equal to the data profiles kept in data profile manager (due to some fields missing // in DataProfileInfo.aidl), so we need to get the equivalent data profile from data // profile manager. Stream<DataThrottlingEntry> stream = mDataThrottlingEntries.stream(); stream = stream.filter(entry -> entry.expirationTimeMillis > now); if (dataProfile.getApnSetting() != null) { stream = stream .filter(entry -> entry.dataProfile.getApnSetting() != null) .filter(entry -> entry.dataProfile.getApnSetting().getApnName() .equals(dataProfile.getApnSetting().getApnName())); } stream = stream.filter(entry -> Objects.equals(entry.dataProfile.getTrafficDescriptor(), dataProfile.getTrafficDescriptor())); dataUnthrottlingEntries = stream.collect(Collectors.toList()); } else if (apn != null) { // For HIDL 1.6 or below dataUnthrottlingEntries = mDataThrottlingEntries.stream() .filter(entry -> entry.expirationTimeMillis > now && entry.dataProfile.getApnSetting() != null && apn.equals(entry.dataProfile.getApnSetting().getApnName()) && entry.transport == transport) .collect(Collectors.toList()); } if (dataUnthrottlingEntries.isEmpty()) { log("onDataProfileUnthrottled: Nothing to unthrottle."); return; } // Report to the clients. final List<ThrottleStatus> throttleStatusList = new ArrayList<>(); DataProfile unthrottledProfile = null; int retryType = ThrottleStatus.RETRY_TYPE_NONE; if (dataUnthrottlingEntries.get(0).retryType == ThrottleStatus.RETRY_TYPE_NEW_CONNECTION) { unthrottledProfile = dataUnthrottlingEntries.get(0).dataProfile; retryType = ThrottleStatus.RETRY_TYPE_NEW_CONNECTION; } else if (dataUnthrottlingEntries.get(0).retryType == ThrottleStatus.RETRY_TYPE_HANDOVER) { unthrottledProfile = dataUnthrottlingEntries.get(0).dataNetwork.getDataProfile(); retryType = ThrottleStatus.RETRY_TYPE_HANDOVER; } // Make it final so it can be used in the lambda function below. final int dataRetryType = retryType; if (unthrottledProfile != null && unthrottledProfile.getApnSetting() != null) { unthrottledProfile.getApnSetting().setPermanentFailed(false); throttleStatusList.addAll(unthrottledProfile.getApnSetting().getApnTypes().stream() .map(apnType -> new ThrottleStatus.Builder() .setApnType(apnType) .setSlotIndex(mPhone.getPhoneId()) .setNoThrottle() .setRetryType(dataRetryType) .setTransportType(transport) .build()) .collect(Collectors.toList())); } mDataRetryManagerCallbacks.forEach(callback -> callback.invokeFromExecutor( () -> callback.onThrottleStatusChanged(throttleStatusList))); if (unthrottledProfile != null) { // cancel pending retries since we will soon schedule an immediate retry cancelRetriesForDataProfile(unthrottledProfile, transport); } logl("onDataProfileUnthrottled: Removing the following throttling entries. " + dataUnthrottlingEntries); if (retry) { for (DataThrottlingEntry entry : dataUnthrottlingEntries) { // Immediately retry after unthrottling. if (entry.retryType == ThrottleStatus.RETRY_TYPE_NEW_CONNECTION) { schedule(new DataSetupRetryEntry.Builder<>() .setDataProfile(entry.dataProfile) .setTransport(entry.transport) .setSetupRetryType(DataSetupRetryEntry.RETRY_TYPE_DATA_PROFILE) .setNetworkRequestList(entry.networkRequestList) .setRetryDelay(0) .build()); } else if (entry.retryType == ThrottleStatus.RETRY_TYPE_HANDOVER) { schedule(new DataHandoverRetryEntry.Builder<>() .setDataNetwork(entry.dataNetwork) .setRetryDelay(0) .build()); } } } if (remove) { mDataThrottlingEntries.removeAll(dataUnthrottlingEntries); } }
Called when network/modem informed to cancelling the previous throttling request. @param dataProfile The data profile to be unthrottled. Note this is only supported on HAL with AIDL interface. When this is set, {@code apn} must be {@code null}. @param apn The apn to be unthrottled. Note this should be only used for HIDL 1.6 or below. When this is set, {@code dataProfile} must be {@code null}. @param transport The transport that this unthrottling request is on. @param remove Whether to remove unthrottled entries from the list of entries. @param retry Whether schedule retry after unthrottling.
DataRetryManagerCallback::onDataProfileUnthrottled
java
Reginer/aosp-android-jar
android-34/src/com/android/internal/telephony/data/DataRetryManager.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/internal/telephony/data/DataRetryManager.java
MIT
private void cancelRetriesForDataProfile(@NonNull DataProfile dataProfile, @TransportType int transport) { logl("cancelRetriesForDataProfile: Canceling pending retries for " + dataProfile); mDataRetryEntries.stream() .filter(entry -> { if (entry.getState() == DataRetryEntry.RETRY_STATE_NOT_RETRIED) { if (entry instanceof DataSetupRetryEntry) { DataSetupRetryEntry retryEntry = (DataSetupRetryEntry) entry; return dataProfile.equals(retryEntry.dataProfile) && transport == retryEntry.transport; } else if (entry instanceof DataHandoverRetryEntry) { DataHandoverRetryEntry retryEntry = (DataHandoverRetryEntry) entry; return dataProfile.equals(retryEntry.dataNetwork.getDataProfile()); } } return false; }) .forEach(entry -> entry.setState(DataRetryEntry.RETRY_STATE_CANCELLED)); }
Cancel pending retries that uses the specified data profile, with specified target transport. @param dataProfile The data profile to cancel. @param transport The target {@link TransportType} on which the retry to cancel.
DataRetryManagerCallback::cancelRetriesForDataProfile
java
Reginer/aosp-android-jar
android-34/src/com/android/internal/telephony/data/DataRetryManager.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/internal/telephony/data/DataRetryManager.java
MIT
public boolean isSimilarNetworkRequestRetryScheduled( @NonNull TelephonyNetworkRequest networkRequest, @TransportType int transport) { long now = SystemClock.elapsedRealtime(); for (int i = mDataRetryEntries.size() - 1; i >= 0; i--) { if (mDataRetryEntries.get(i) instanceof DataSetupRetryEntry) { DataSetupRetryEntry entry = (DataSetupRetryEntry) mDataRetryEntries.get(i); if (entry.getState() == DataRetryEntry.RETRY_STATE_NOT_RETRIED && entry.setupRetryType == DataSetupRetryEntry.RETRY_TYPE_NETWORK_REQUESTS && entry.retryElapsedTime > now) { if (entry.networkRequestList.isEmpty()) { String msg = "Invalid data retry entry detected"; logl(msg); loge("mDataRetryEntries=" + mDataRetryEntries); AnomalyReporter.reportAnomaly( UUID.fromString("781af571-f55d-476d-b510-7a5381f633dc"), msg, mPhone.getCarrierId()); continue; } if (entry.networkRequestList.get(0).getApnTypeNetworkCapability() == networkRequest.getApnTypeNetworkCapability() && entry.transport == transport) { return true; } } } } return false; }
Check if there is any similar network request scheduled to retry. The definition of similar is that network requests have same APN capability and on the same transport. @param networkRequest The network request to check. @param transport The transport that this request is on. @return {@code true} if similar network request scheduled to retry.
DataRetryManagerCallback::isSimilarNetworkRequestRetryScheduled
java
Reginer/aosp-android-jar
android-34/src/com/android/internal/telephony/data/DataRetryManager.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/internal/telephony/data/DataRetryManager.java
MIT
public boolean isDataProfileThrottled(@NonNull DataProfile dataProfile, @TransportType int transport) { long now = SystemClock.elapsedRealtime(); return mDataThrottlingEntries.stream().anyMatch( entry -> entry.dataProfile.equals(dataProfile) && entry.expirationTimeMillis > now && entry.transport == transport); }
Check if a specific data profile is explicitly throttled by the network. @param dataProfile The data profile to check. @param transport The transport that the request is on. @return {@code true} if the data profile is currently throttled.
DataRetryManagerCallback::isDataProfileThrottled
java
Reginer/aosp-android-jar
android-34/src/com/android/internal/telephony/data/DataRetryManager.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/internal/telephony/data/DataRetryManager.java
MIT
public void cancelPendingHandoverRetry(@NonNull DataNetwork dataNetwork) { sendMessage(obtainMessage(EVENT_CANCEL_PENDING_HANDOVER_RETRY, dataNetwork)); }
Cancel pending scheduled handover retry entries. @param dataNetwork The data network that was originally scheduled for handover retry.
DataRetryManagerCallback::cancelPendingHandoverRetry
java
Reginer/aosp-android-jar
android-34/src/com/android/internal/telephony/data/DataRetryManager.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/internal/telephony/data/DataRetryManager.java
MIT
private void onCancelPendingHandoverRetry(@NonNull DataNetwork dataNetwork) { mDataRetryEntries.stream() .filter(entry -> entry instanceof DataHandoverRetryEntry && ((DataHandoverRetryEntry) entry).dataNetwork == dataNetwork && entry.getState() == DataRetryEntry.RETRY_STATE_NOT_RETRIED) .forEach(entry -> entry.setState(DataRetryEntry.RETRY_STATE_CANCELLED)); }
Called when cancelling pending scheduled handover retry entries. @param dataNetwork The data network that was originally scheduled for handover retry.
DataRetryManagerCallback::onCancelPendingHandoverRetry
java
Reginer/aosp-android-jar
android-34/src/com/android/internal/telephony/data/DataRetryManager.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/internal/telephony/data/DataRetryManager.java
MIT
public boolean isAnyHandoverRetryScheduled(@NonNull DataNetwork dataNetwork) { return mDataRetryEntries.stream() .filter(DataHandoverRetryEntry.class::isInstance) .map(DataHandoverRetryEntry.class::cast) .anyMatch(entry -> entry.getState() == DataRetryEntry.RETRY_STATE_NOT_RETRIED && entry.dataNetwork == dataNetwork); }
Check if there is any data handover retry scheduled. @param dataNetwork The network network to retry handover. @return {@code true} if there is retry scheduled for this network capability.
DataRetryManagerCallback::isAnyHandoverRetryScheduled
java
Reginer/aosp-android-jar
android-34/src/com/android/internal/telephony/data/DataRetryManager.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/internal/telephony/data/DataRetryManager.java
MIT
public EuiccCardErrorException(@OperationCode int operationCode, int errorCode) { mOperationCode = operationCode; mErrorCode = errorCode; mErrorDetails = null; }
Creates an exception with an error code in the response of an APDU command. @param errorCode The meaning of the code depends on each APDU command. It should always be non-negative.
EuiccCardErrorException::EuiccCardErrorException
java
Reginer/aosp-android-jar
android-35/src/com/android/internal/telephony/uicc/euicc/EuiccCardErrorException.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/telephony/uicc/euicc/EuiccCardErrorException.java
MIT
public EuiccCardErrorException(@OperationCode int operationCode, int errorCode, @Nullable Asn1Node errorDetails) { mOperationCode = operationCode; mErrorCode = errorCode; mErrorDetails = errorDetails; }
Creates an exception with an error code and the error details in the response of an APDU command. @param errorCode The meaning of the code depends on each APDU command. It should always be non-negative. @param errorDetails The content of the details depends on each APDU command.
EuiccCardErrorException::EuiccCardErrorException
java
Reginer/aosp-android-jar
android-35/src/com/android/internal/telephony/uicc/euicc/EuiccCardErrorException.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/telephony/uicc/euicc/EuiccCardErrorException.java
MIT
public int getErrorCode() { return mErrorCode; }
Creates an exception with an error code and the error details in the response of an APDU command. @param errorCode The meaning of the code depends on each APDU command. It should always be non-negative. @param errorDetails The content of the details depends on each APDU command. public EuiccCardErrorException(@OperationCode int operationCode, int errorCode, @Nullable Asn1Node errorDetails) { mOperationCode = operationCode; mErrorCode = errorCode; mErrorDetails = errorDetails; } /** @return The error code. The meaning of the code depends on each APDU command.
EuiccCardErrorException::getErrorCode
java
Reginer/aosp-android-jar
android-35/src/com/android/internal/telephony/uicc/euicc/EuiccCardErrorException.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/telephony/uicc/euicc/EuiccCardErrorException.java
MIT
public int getOperationCode() { return mOperationCode; }
Creates an exception with an error code and the error details in the response of an APDU command. @param errorCode The meaning of the code depends on each APDU command. It should always be non-negative. @param errorDetails The content of the details depends on each APDU command. public EuiccCardErrorException(@OperationCode int operationCode, int errorCode, @Nullable Asn1Node errorDetails) { mOperationCode = operationCode; mErrorCode = errorCode; mErrorDetails = errorDetails; } /** @return The error code. The meaning of the code depends on each APDU command. public int getErrorCode() { return mErrorCode; } /** @return The operation code.
EuiccCardErrorException::getOperationCode
java
Reginer/aosp-android-jar
android-35/src/com/android/internal/telephony/uicc/euicc/EuiccCardErrorException.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/telephony/uicc/euicc/EuiccCardErrorException.java
MIT
protected Marshaler( MarshalQueryable<T> query, TypeReference<T> typeReference, int nativeType) { mTypeReference = checkNotNull(typeReference, "typeReference must not be null"); mNativeType = checkNativeType(nativeType); if (!query.isTypeMappingSupported(typeReference, nativeType)) { throw new UnsupportedOperationException( "Unsupported type marshaling for managed type " + typeReference + " and native type " + MarshalHelpers.toStringNativeType(nativeType)); } }
Instantiate a marshaler between a single managed/native type combination. <p>This particular managed/native type combination must be supported by {@link #isTypeMappingSupported}.</p> @param query an instance of {@link MarshalQueryable} @param typeReference the managed type reference Must be one for which {@link #isTypeMappingSupported} returns {@code true} @param nativeType the native type, e.g. {@link android.hardware.camera2.impl.CameraMetadataNative#TYPE_BYTE TYPE_BYTE}. Must be one for which {@link #isTypeMappingSupported} returns {@code true}. @throws NullPointerException if any args were {@code null} @throws UnsupportedOperationException if the type mapping was not supported
Marshaler::Marshaler
java
Reginer/aosp-android-jar
android-33/src/android/hardware/camera2/marshal/Marshaler.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/hardware/camera2/marshal/Marshaler.java
MIT
public int calculateMarshalSize(T value) { int nativeSize = getNativeSize(); if (nativeSize == NATIVE_SIZE_DYNAMIC) { throw new AssertionError("Override this function for dynamically-sized objects"); } return nativeSize; }
Get the size in bytes for how much space would be required to write this {@code value} into a byte buffer using the given {@code nativeType}. <p>If the size of this {@code T} instance when serialized into a buffer is always constant, then this method will always return the same value (and particularly, it will return an equivalent value to {@link #getNativeSize()}.</p> <p>Overriding this method is a must when the size is {@link NATIVE_SIZE_DYNAMIC dynamic}.</p> @param value the value of type T that we wish to write into the byte buffer @return the size that would need to be written to the byte buffer
Marshaler::calculateMarshalSize
java
Reginer/aosp-android-jar
android-33/src/android/hardware/camera2/marshal/Marshaler.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/hardware/camera2/marshal/Marshaler.java
MIT
public TypeReference<T> getTypeReference() { return mTypeReference; }
The type reference for {@code T} for the managed type side of this marshaler.
Marshaler::getTypeReference
java
Reginer/aosp-android-jar
android-33/src/android/hardware/camera2/marshal/Marshaler.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/hardware/camera2/marshal/Marshaler.java
MIT
public int getNativeType() { return mNativeType; }
The type reference for {@code T} for the managed type side of this marshaler. public TypeReference<T> getTypeReference() { return mTypeReference; } /** The native type corresponding to this marshaler for the native side of this marshaler.
Marshaler::getNativeType
java
Reginer/aosp-android-jar
android-33/src/android/hardware/camera2/marshal/Marshaler.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/hardware/camera2/marshal/Marshaler.java
MIT
public int getResult() { return result; }
Gets the result of the operation. <p>May be one of the predefined {@code RESULT_} constants in EuiccService or any implementation-specific code starting with {@link EuiccService#RESULT_FIRST_USER}.
GetDownloadableSubscriptionMetadataResult::getResult
java
Reginer/aosp-android-jar
android-32/src/android/service/euicc/GetDownloadableSubscriptionMetadataResult.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/service/euicc/GetDownloadableSubscriptionMetadataResult.java
MIT
public GetDownloadableSubscriptionMetadataResult(int result, @Nullable DownloadableSubscription subscription) { this.result = result; if (this.result == EuiccService.RESULT_OK) { this.mSubscription = subscription; } else { if (subscription != null) { throw new IllegalArgumentException( "Error result with non-null subscription: " + result); } this.mSubscription = null; } }
Construct a new {@link GetDownloadableSubscriptionMetadataResult}. @param result Result of the operation. May be one of the predefined {@code RESULT_} constants in EuiccService or any implementation-specific code starting with {@link EuiccService#RESULT_FIRST_USER}. @param subscription The subscription with filled-in metadata. Should only be provided if the result is {@link EuiccService#RESULT_OK}.
GetDownloadableSubscriptionMetadataResult::GetDownloadableSubscriptionMetadataResult
java
Reginer/aosp-android-jar
android-32/src/android/service/euicc/GetDownloadableSubscriptionMetadataResult.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/service/euicc/GetDownloadableSubscriptionMetadataResult.java
MIT
public static final Callback DEFAULT = new Callback() {};
Default implementation of the {@link Callback} interface which accepts all paths. @hide
ZipPathValidator::Callback
java
Reginer/aosp-android-jar
android-35/src/dalvik/system/ZipPathValidator.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/dalvik/system/ZipPathValidator.java
MIT
public static void clearCallback() { sInstance = DEFAULT; }
Clears the current validation mechanism by setting the current callback instance to a default validation.
ZipPathValidator::clearCallback
java
Reginer/aosp-android-jar
android-35/src/dalvik/system/ZipPathValidator.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/dalvik/system/ZipPathValidator.java
MIT
public static void setCallback(@NonNull Callback callback) { sInstance = Objects.requireNonNull(callback); }
Sets the current callback implementation for zip paths. <p> The provided callback should not perform IO or any blocking operations, but only perform path validation. A typical implementation will validate String entries in a single pass and throw a {@link ZipException} if the path contains potentially hazardous components such as "..". @param callback An instance of {@link Callback}'s implementation.
ZipPathValidator::setCallback
java
Reginer/aosp-android-jar
android-35/src/dalvik/system/ZipPathValidator.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/dalvik/system/ZipPathValidator.java
MIT
public static @NonNull Callback getInstance() { return sInstance; }
Retrieves the current validator set by {@link #setCallback(Callback)}. @return Current callback. @hide
ZipPathValidator::getInstance
java
Reginer/aosp-android-jar
android-35/src/dalvik/system/ZipPathValidator.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/dalvik/system/ZipPathValidator.java
MIT
public static boolean isClear() { return sInstance.equals(DEFAULT); }
Returns true if the current validator is the default implementation {@link DEFAULT}, otherwise false. @hide
ZipPathValidator::isClear
java
Reginer/aosp-android-jar
android-35/src/dalvik/system/ZipPathValidator.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/dalvik/system/ZipPathValidator.java
MIT
default void onZipEntryAccess(@NonNull String path) throws ZipException {}
Called to check the validity of the path of a zip entry. The default implementation accepts all paths without raising any exceptions. <p> This method will be called by {@link java.util.zip.ZipInputStream#getNextEntry} or {@link java.util.zip.ZipFile#ZipFile(String)}. @param path The name of the zip entry. @throws ZipException If the zip entry is invalid depending on the implementation.
ZipPathValidator::onZipEntryAccess
java
Reginer/aosp-android-jar
android-35/src/dalvik/system/ZipPathValidator.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/dalvik/system/ZipPathValidator.java
MIT
public setNamedItemNS01(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); }
Constructor. @param factory document factory, may not be null @throws org.w3c.domts.DOMTestIncompatibleException Thrown if test is not compatible with parser configuration
setNamedItemNS01::setNamedItemNS01
java
Reginer/aosp-android-jar
android-31/src/org/w3c/domts/level2/core/setNamedItemNS01.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/org/w3c/domts/level2/core/setNamedItemNS01.java
MIT
public void runTest() throws Throwable { Document doc; NodeList elementList; Node anotherElement; NamedNodeMap anotherMap; Node arg; Node testAddress; NamedNodeMap map; Node setNode; doc = (Document) load("staffNS", true); elementList = doc.getElementsByTagName("address"); anotherElement = elementList.item(2); anotherMap = anotherElement.getAttributes(); arg = anotherMap.getNamedItemNS("http://www.netzero.com", "domestic"); testAddress = elementList.item(0); map = testAddress.getAttributes(); { boolean success = false; try { setNode = map.setNamedItemNS(arg); } catch (DOMException ex) { success = (ex.code == DOMException.INUSE_ATTRIBUTE_ERR); } assertTrue("throw_INUSE_ATTRIBUTE_ERR", success); } }
Runs the test case. @throws Throwable Any uncaught exception causes test to fail
setNamedItemNS01::runTest
java
Reginer/aosp-android-jar
android-31/src/org/w3c/domts/level2/core/setNamedItemNS01.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/org/w3c/domts/level2/core/setNamedItemNS01.java
MIT
public String getTargetURI() { return "http://www.w3.org/2001/DOM-Test-Suite/level2/core/setNamedItemNS01"; }
Gets URI that identifies the test. @return uri identifier of test
setNamedItemNS01::getTargetURI
java
Reginer/aosp-android-jar
android-31/src/org/w3c/domts/level2/core/setNamedItemNS01.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/org/w3c/domts/level2/core/setNamedItemNS01.java
MIT
public static void main(final String[] args) { DOMTestCase.doMain(setNamedItemNS01.class, args); }
Runs this test from the command line. @param args command line arguments
setNamedItemNS01::main
java
Reginer/aosp-android-jar
android-31/src/org/w3c/domts/level2/core/setNamedItemNS01.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/org/w3c/domts/level2/core/setNamedItemNS01.java
MIT
protected CertPath(String type) { this.type = type; }
Creates a {@code CertPath} of the specified type. <p> This constructor is protected because most users should use a {@code CertificateFactory} to create {@code CertPath}s. @param type the standard name of the type of {@code Certificate}s in this path
CertPath::CertPath
java
Reginer/aosp-android-jar
android-35/src/java/security/cert/CertPath.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/java/security/cert/CertPath.java
MIT
public String getType() { return type; }
Returns the type of {@code Certificate}s in this certification path. This is the same string that would be returned by {@link java.security.cert.Certificate#getType() cert.getType()} for all {@code Certificate}s in the certification path. @return the type of {@code Certificate}s in this certification path (never null)
CertPath::getType
java
Reginer/aosp-android-jar
android-35/src/java/security/cert/CertPath.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/java/security/cert/CertPath.java
MIT
public boolean equals(Object other) { if (this == other) return true; if (! (other instanceof CertPath)) return false; CertPath otherCP = (CertPath) other; if (! otherCP.getType().equals(type)) return false; List<? extends Certificate> thisCertList = this.getCertificates(); List<? extends Certificate> otherCertList = otherCP.getCertificates(); return(thisCertList.equals(otherCertList)); }
Compares this certification path for equality with the specified object. Two {@code CertPath}s are equal if and only if their types are equal and their certificate {@code List}s (and by implication the {@code Certificate}s in those {@code List}s) are equal. A {@code CertPath} is never equal to an object that is not a {@code CertPath}. <p> This algorithm is implemented by this method. If it is overridden, the behavior specified here must be maintained. @param other the object to test for equality with this certification path @return true if the specified object is equal to this certification path, false otherwise
CertPath::equals
java
Reginer/aosp-android-jar
android-35/src/java/security/cert/CertPath.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/java/security/cert/CertPath.java
MIT
public int hashCode() { int hashCode = type.hashCode(); hashCode = 31*hashCode + getCertificates().hashCode(); return hashCode; }
Returns the hashcode for this certification path. The hash code of a certification path is defined to be the result of the following calculation: <pre>{@code hashCode = path.getType().hashCode(); hashCode = 31*hashCode + path.getCertificates().hashCode(); }</pre> This ensures that {@code path1.equals(path2)} implies that {@code path1.hashCode()==path2.hashCode()} for any two certification paths, {@code path1} and {@code path2}, as required by the general contract of {@code Object.hashCode}. @return the hashcode value for this certification path
CertPath::hashCode
java
Reginer/aosp-android-jar
android-35/src/java/security/cert/CertPath.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/java/security/cert/CertPath.java
MIT
public String toString() { StringBuilder sb = new StringBuilder(); Iterator<? extends Certificate> stringIterator = getCertificates().iterator(); sb.append("\n" + type + " Cert Path: length = " + getCertificates().size() + ".\n"); sb.append("[\n"); int i = 1; while (stringIterator.hasNext()) { sb.append("==========================================" + "===============Certificate " + i + " start.\n"); Certificate stringCert = stringIterator.next(); sb.append(stringCert.toString()); sb.append("\n========================================" + "=================Certificate " + i + " end.\n\n\n"); i++; } sb.append("\n]"); return sb.toString(); }
Returns a string representation of this certification path. This calls the {@code toString} method on each of the {@code Certificate}s in the path. @return a string representation of this certification path
CertPath::toString
java
Reginer/aosp-android-jar
android-35/src/java/security/cert/CertPath.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/java/security/cert/CertPath.java
MIT
protected Object writeReplace() throws ObjectStreamException { try { return new CertPathRep(type, getEncoded()); } catch (CertificateException ce) { NotSerializableException nse = new NotSerializableException ("java.security.cert.CertPath: " + type); nse.initCause(ce); throw nse; } }
Replaces the {@code CertPath} to be serialized with a {@code CertPathRep} object. @return the {@code CertPathRep} to be serialized @throws ObjectStreamException if a {@code CertPathRep} object representing this certification path could not be created
CertPath::writeReplace
java
Reginer/aosp-android-jar
android-35/src/java/security/cert/CertPath.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/java/security/cert/CertPath.java
MIT
protected CertPathRep(String type, byte[] data) { this.type = type; this.data = data; }
Creates a {@code CertPathRep} with the specified type and encoded form of a certification path. @param type the standard name of a {@code CertPath} type @param data the encoded form of the certification path
CertPathRep::CertPathRep
java
Reginer/aosp-android-jar
android-35/src/java/security/cert/CertPath.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/java/security/cert/CertPath.java
MIT
protected Object readResolve() throws ObjectStreamException { try { CertificateFactory cf = CertificateFactory.getInstance(type); return cf.generateCertPath(new ByteArrayInputStream(data)); } catch (CertificateException ce) { NotSerializableException nse = new NotSerializableException ("java.security.cert.CertPath: " + type); nse.initCause(ce); throw nse; } }
Returns a {@code CertPath} constructed from the type and data. @return the resolved {@code CertPath} object @throws ObjectStreamException if a {@code CertPath} could not be constructed
CertPathRep::readResolve
java
Reginer/aosp-android-jar
android-35/src/java/security/cert/CertPath.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/java/security/cert/CertPath.java
MIT
public EventListenerProxy(T listener) { this.listener = listener; }
Creates a proxy for the specified listener. @param listener the listener object
EventListenerProxy::EventListenerProxy
java
Reginer/aosp-android-jar
android-35/src/java/util/EventListenerProxy.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/java/util/EventListenerProxy.java
MIT
public T getListener() { return this.listener; }
Returns the listener associated with the proxy. @return the listener associated with the proxy
EventListenerProxy::getListener
java
Reginer/aosp-android-jar
android-35/src/java/util/EventListenerProxy.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/java/util/EventListenerProxy.java
MIT
public int getRenameBytesFrom() { return mRenameBytesFrom; }
A filter for Bluetooth LE devices @see ScanFilter public final class BluetoothLeDeviceFilter implements DeviceFilter<ScanResult> { private static final boolean DEBUG = false; private static final String LOG_TAG = "BluetoothLeDeviceFilter"; private static final int RENAME_PREFIX_LENGTH_LIMIT = 10; private final Pattern mNamePattern; private final ScanFilter mScanFilter; private final byte[] mRawDataFilter; private final byte[] mRawDataFilterMask; private final String mRenamePrefix; private final String mRenameSuffix; private final int mRenameBytesFrom; private final int mRenameBytesLength; private final int mRenameNameFrom; private final int mRenameNameLength; private final boolean mRenameBytesReverseOrder; private BluetoothLeDeviceFilter(Pattern namePattern, ScanFilter scanFilter, byte[] rawDataFilter, byte[] rawDataFilterMask, String renamePrefix, String renameSuffix, int renameBytesFrom, int renameBytesLength, int renameNameFrom, int renameNameLength, boolean renameBytesReverseOrder) { mNamePattern = namePattern; mScanFilter = ObjectUtils.firstNotNull(scanFilter, ScanFilter.EMPTY); mRawDataFilter = rawDataFilter; mRawDataFilterMask = rawDataFilterMask; mRenamePrefix = renamePrefix; mRenameSuffix = renameSuffix; mRenameBytesFrom = renameBytesFrom; mRenameBytesLength = renameBytesLength; mRenameNameFrom = renameNameFrom; mRenameNameLength = renameNameLength; mRenameBytesReverseOrder = renameBytesReverseOrder; } /** @hide @Nullable public Pattern getNamePattern() { return mNamePattern; } /** @hide @NonNull @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) public ScanFilter getScanFilter() { return mScanFilter; } /** @hide @Nullable public byte[] getRawDataFilter() { return mRawDataFilter; } /** @hide @Nullable public byte[] getRawDataFilterMask() { return mRawDataFilterMask; } /** @hide @Nullable public String getRenamePrefix() { return mRenamePrefix; } /** @hide @Nullable public String getRenameSuffix() { return mRenameSuffix; } /** @hide
BluetoothLeDeviceFilter::getRenameBytesFrom
java
Reginer/aosp-android-jar
android-32/src/android/companion/BluetoothLeDeviceFilter.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/companion/BluetoothLeDeviceFilter.java
MIT
public int getRenameBytesLength() { return mRenameBytesLength; }
A filter for Bluetooth LE devices @see ScanFilter public final class BluetoothLeDeviceFilter implements DeviceFilter<ScanResult> { private static final boolean DEBUG = false; private static final String LOG_TAG = "BluetoothLeDeviceFilter"; private static final int RENAME_PREFIX_LENGTH_LIMIT = 10; private final Pattern mNamePattern; private final ScanFilter mScanFilter; private final byte[] mRawDataFilter; private final byte[] mRawDataFilterMask; private final String mRenamePrefix; private final String mRenameSuffix; private final int mRenameBytesFrom; private final int mRenameBytesLength; private final int mRenameNameFrom; private final int mRenameNameLength; private final boolean mRenameBytesReverseOrder; private BluetoothLeDeviceFilter(Pattern namePattern, ScanFilter scanFilter, byte[] rawDataFilter, byte[] rawDataFilterMask, String renamePrefix, String renameSuffix, int renameBytesFrom, int renameBytesLength, int renameNameFrom, int renameNameLength, boolean renameBytesReverseOrder) { mNamePattern = namePattern; mScanFilter = ObjectUtils.firstNotNull(scanFilter, ScanFilter.EMPTY); mRawDataFilter = rawDataFilter; mRawDataFilterMask = rawDataFilterMask; mRenamePrefix = renamePrefix; mRenameSuffix = renameSuffix; mRenameBytesFrom = renameBytesFrom; mRenameBytesLength = renameBytesLength; mRenameNameFrom = renameNameFrom; mRenameNameLength = renameNameLength; mRenameBytesReverseOrder = renameBytesReverseOrder; } /** @hide @Nullable public Pattern getNamePattern() { return mNamePattern; } /** @hide @NonNull @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) public ScanFilter getScanFilter() { return mScanFilter; } /** @hide @Nullable public byte[] getRawDataFilter() { return mRawDataFilter; } /** @hide @Nullable public byte[] getRawDataFilterMask() { return mRawDataFilterMask; } /** @hide @Nullable public String getRenamePrefix() { return mRenamePrefix; } /** @hide @Nullable public String getRenameSuffix() { return mRenameSuffix; } /** @hide public int getRenameBytesFrom() { return mRenameBytesFrom; } /** @hide
BluetoothLeDeviceFilter::getRenameBytesLength
java
Reginer/aosp-android-jar
android-32/src/android/companion/BluetoothLeDeviceFilter.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/companion/BluetoothLeDeviceFilter.java
MIT
public boolean isRenameBytesReverseOrder() { return mRenameBytesReverseOrder; }
A filter for Bluetooth LE devices @see ScanFilter public final class BluetoothLeDeviceFilter implements DeviceFilter<ScanResult> { private static final boolean DEBUG = false; private static final String LOG_TAG = "BluetoothLeDeviceFilter"; private static final int RENAME_PREFIX_LENGTH_LIMIT = 10; private final Pattern mNamePattern; private final ScanFilter mScanFilter; private final byte[] mRawDataFilter; private final byte[] mRawDataFilterMask; private final String mRenamePrefix; private final String mRenameSuffix; private final int mRenameBytesFrom; private final int mRenameBytesLength; private final int mRenameNameFrom; private final int mRenameNameLength; private final boolean mRenameBytesReverseOrder; private BluetoothLeDeviceFilter(Pattern namePattern, ScanFilter scanFilter, byte[] rawDataFilter, byte[] rawDataFilterMask, String renamePrefix, String renameSuffix, int renameBytesFrom, int renameBytesLength, int renameNameFrom, int renameNameLength, boolean renameBytesReverseOrder) { mNamePattern = namePattern; mScanFilter = ObjectUtils.firstNotNull(scanFilter, ScanFilter.EMPTY); mRawDataFilter = rawDataFilter; mRawDataFilterMask = rawDataFilterMask; mRenamePrefix = renamePrefix; mRenameSuffix = renameSuffix; mRenameBytesFrom = renameBytesFrom; mRenameBytesLength = renameBytesLength; mRenameNameFrom = renameNameFrom; mRenameNameLength = renameNameLength; mRenameBytesReverseOrder = renameBytesReverseOrder; } /** @hide @Nullable public Pattern getNamePattern() { return mNamePattern; } /** @hide @NonNull @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) public ScanFilter getScanFilter() { return mScanFilter; } /** @hide @Nullable public byte[] getRawDataFilter() { return mRawDataFilter; } /** @hide @Nullable public byte[] getRawDataFilterMask() { return mRawDataFilterMask; } /** @hide @Nullable public String getRenamePrefix() { return mRenamePrefix; } /** @hide @Nullable public String getRenameSuffix() { return mRenameSuffix; } /** @hide public int getRenameBytesFrom() { return mRenameBytesFrom; } /** @hide public int getRenameBytesLength() { return mRenameBytesLength; } /** @hide
BluetoothLeDeviceFilter::isRenameBytesReverseOrder
java
Reginer/aosp-android-jar
android-32/src/android/companion/BluetoothLeDeviceFilter.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/companion/BluetoothLeDeviceFilter.java
MIT
public Builder setNamePattern(@Nullable Pattern regex) { checkNotUsed(); mNamePattern = regex; return this; }
@param regex if set, only devices with {@link BluetoothDevice#getName name} matching the given regular expression will be shown @return self for chaining
Builder::setNamePattern
java
Reginer/aosp-android-jar
android-32/src/android/companion/BluetoothLeDeviceFilter.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-32/src/android/companion/BluetoothLeDeviceFilter.java
MIT
default void onBackStarted(@NonNull BackEvent backEvent) {}
Called when a back gesture has been started, or back button has been pressed down. @param backEvent The {@link BackEvent} containing information about the touch or button press. @see BackEvent
onBackStarted
java
Reginer/aosp-android-jar
android-34/src/android/window/OnBackAnimationCallback.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/window/OnBackAnimationCallback.java
MIT
default void onBackProgressed(@NonNull BackEvent backEvent) { }
Called when a back gesture progresses. @param backEvent An {@link BackEvent} object describing the progress event. @see BackEvent
onBackProgressed
java
Reginer/aosp-android-jar
android-34/src/android/window/OnBackAnimationCallback.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/window/OnBackAnimationCallback.java
MIT
default void onBackCancelled() { }
Called when a back gesture or back button press has been cancelled.
onBackCancelled
java
Reginer/aosp-android-jar
android-34/src/android/window/OnBackAnimationCallback.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/window/OnBackAnimationCallback.java
MIT
public RFC3394WrapEngine(BlockCipher engine) { this(engine, false); }
Create a RFC 3394 WrapEngine specifying the encrypt for wrapping, decrypt for unwrapping. @param engine the block cipher to be used for wrapping.
RFC3394WrapEngine::RFC3394WrapEngine
java
Reginer/aosp-android-jar
android-35/src/com/android/internal/org/bouncycastle/crypto/engines/RFC3394WrapEngine.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/org/bouncycastle/crypto/engines/RFC3394WrapEngine.java
MIT
public RFC3394WrapEngine(BlockCipher engine, boolean useReverseDirection) { this.engine = engine; this.wrapCipherMode = (useReverseDirection) ? false : true; }
Create a RFC 3394 WrapEngine specifying the direction for wrapping and unwrapping.. @param engine the block cipher to be used for wrapping. @param useReverseDirection true if engine should be used in decryption mode for wrapping, false otherwise.
RFC3394WrapEngine::RFC3394WrapEngine
java
Reginer/aosp-android-jar
android-35/src/com/android/internal/org/bouncycastle/crypto/engines/RFC3394WrapEngine.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/internal/org/bouncycastle/crypto/engines/RFC3394WrapEngine.java
MIT
protected byte[] engineGetEncoded() { DSAParameter dsaP = new DSAParameter(currentSpec.getP(), currentSpec.getQ(), currentSpec.getG()); try { return dsaP.getEncoded(ASN1Encoding.DER); } catch (IOException e) { throw new RuntimeException("Error encoding DSAParameters"); } }
Return the X.509 ASN.1 structure DSAParameter. <pre> DSAParameter ::= SEQUENCE { prime INTEGER, -- p subprime INTEGER, -- q base INTEGER, -- g} </pre>
AlgorithmParametersSpi::engineGetEncoded
java
Reginer/aosp-android-jar
android-34/src/com/android/internal/org/bouncycastle/jcajce/provider/asymmetric/dsa/AlgorithmParametersSpi.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/com/android/internal/org/bouncycastle/jcajce/provider/asymmetric/dsa/AlgorithmParametersSpi.java
MIT
public void addEnums(int tag, int... values) { if (KeymasterDefs.getTagType(tag) != KeymasterDefs.KM_ENUM_REP) { throw new IllegalArgumentException("Not a repeating enum tag: " + tag); } for (int value : values) { addEnumTag(tag, value); } }
Adds a repeated enum tag with the provided values. @throws IllegalArgumentException if {@code tag} is not a repeating enum tag.
KeymasterArguments::addEnums
java
Reginer/aosp-android-jar
android-34/src/android/security/keymaster/KeymasterArguments.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/security/keymaster/KeymasterArguments.java
MIT
public int getEnum(int tag, int defaultValue) { if (KeymasterDefs.getTagType(tag) != KeymasterDefs.KM_ENUM) { throw new IllegalArgumentException("Not an enum tag: " + tag); } KeymasterArgument arg = getArgumentByTag(tag); if (arg == null) { return defaultValue; } return getEnumTagValue(arg); }
Returns the value of the specified enum tag or {@code defaultValue} if the tag is not present. @throws IllegalArgumentException if {@code tag} is not an enum tag.
KeymasterArguments::getEnum
java
Reginer/aosp-android-jar
android-34/src/android/security/keymaster/KeymasterArguments.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/security/keymaster/KeymasterArguments.java
MIT
public List<Integer> getEnums(int tag) { if (KeymasterDefs.getTagType(tag) != KeymasterDefs.KM_ENUM_REP) { throw new IllegalArgumentException("Not a repeating enum tag: " + tag); } List<Integer> values = new ArrayList<Integer>(); for (KeymasterArgument arg : mArguments) { if (arg.tag == tag) { values.add(getEnumTagValue(arg)); } } return values; }
Returns all values of the specified repeating enum tag. throws IllegalArgumentException if {@code tag} is not a repeating enum tag.
KeymasterArguments::getEnums
java
Reginer/aosp-android-jar
android-34/src/android/security/keymaster/KeymasterArguments.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/security/keymaster/KeymasterArguments.java
MIT
public long getUnsignedInt(int tag, long defaultValue) { if (KeymasterDefs.getTagType(tag) != KeymasterDefs.KM_UINT) { throw new IllegalArgumentException("Not an int tag: " + tag); } KeymasterArgument arg = getArgumentByTag(tag); if (arg == null) { return defaultValue; } // Keymaster's KM_UINT is unsigned 32 bit. return ((KeymasterIntArgument) arg).value & 0xffffffffL; }
Returns the value of the specified unsigned 32-bit int tag or {@code defaultValue} if the tag is not present. @throws IllegalArgumentException if {@code tag} is not an unsigned 32-bit int tag.
KeymasterArguments::getUnsignedInt
java
Reginer/aosp-android-jar
android-34/src/android/security/keymaster/KeymasterArguments.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/security/keymaster/KeymasterArguments.java
MIT
public List<BigInteger> getUnsignedLongs(int tag) { if (KeymasterDefs.getTagType(tag) != KeymasterDefs.KM_ULONG_REP) { throw new IllegalArgumentException("Tag is not a repeating long: " + tag); } List<BigInteger> values = new ArrayList<BigInteger>(); for (KeymasterArgument arg : mArguments) { if (arg.tag == tag) { values.add(getLongTagValue(arg)); } } return values; }
Returns all values of the specified repeating unsigned 64-bit long tag. @throws IllegalArgumentException if {@code tag} is not a repeating unsigned 64-bit long tag.
KeymasterArguments::getUnsignedLongs
java
Reginer/aosp-android-jar
android-34/src/android/security/keymaster/KeymasterArguments.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/security/keymaster/KeymasterArguments.java
MIT
public void addBoolean(int tag) { if (KeymasterDefs.getTagType(tag) != KeymasterDefs.KM_BOOL) { throw new IllegalArgumentException("Not a boolean tag: " + tag); } mArguments.add(new KeymasterBooleanArgument(tag)); }
Adds the provided boolean tag. Boolean tags are considered to be set to {@code true} if present and {@code false} if absent. @throws IllegalArgumentException if {@code tag} is not a boolean tag.
KeymasterArguments::addBoolean
java
Reginer/aosp-android-jar
android-34/src/android/security/keymaster/KeymasterArguments.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/security/keymaster/KeymasterArguments.java
MIT
public boolean getBoolean(int tag) { if (KeymasterDefs.getTagType(tag) != KeymasterDefs.KM_BOOL) { throw new IllegalArgumentException("Not a boolean tag: " + tag); } KeymasterArgument arg = getArgumentByTag(tag); if (arg == null) { return false; } return true; }
Returns {@code true} if the provided boolean tag is present, {@code false} if absent. @throws IllegalArgumentException if {@code tag} is not a boolean tag.
KeymasterArguments::getBoolean
java
Reginer/aosp-android-jar
android-34/src/android/security/keymaster/KeymasterArguments.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/security/keymaster/KeymasterArguments.java
MIT
public void addBytes(int tag, byte[] value) { if (KeymasterDefs.getTagType(tag) != KeymasterDefs.KM_BYTES) { throw new IllegalArgumentException("Not a bytes tag: " + tag); } if (value == null) { throw new NullPointerException("value == nulll"); } mArguments.add(new KeymasterBlobArgument(tag, value)); }
Adds a bytes tag with the provided value. @throws IllegalArgumentException if {@code tag} is not a bytes tag.
KeymasterArguments::addBytes
java
Reginer/aosp-android-jar
android-34/src/android/security/keymaster/KeymasterArguments.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/security/keymaster/KeymasterArguments.java
MIT
public byte[] getBytes(int tag, byte[] defaultValue) { if (KeymasterDefs.getTagType(tag) != KeymasterDefs.KM_BYTES) { throw new IllegalArgumentException("Not a bytes tag: " + tag); } KeymasterArgument arg = getArgumentByTag(tag); if (arg == null) { return defaultValue; } return ((KeymasterBlobArgument) arg).blob; }
Returns the value of the specified bytes tag or {@code defaultValue} if the tag is not present. @throws IllegalArgumentException if {@code tag} is not a bytes tag.
KeymasterArguments::getBytes
java
Reginer/aosp-android-jar
android-34/src/android/security/keymaster/KeymasterArguments.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/security/keymaster/KeymasterArguments.java
MIT
public void addDate(int tag, Date value) { if (KeymasterDefs.getTagType(tag) != KeymasterDefs.KM_DATE) { throw new IllegalArgumentException("Not a date tag: " + tag); } if (value == null) { throw new NullPointerException("value == nulll"); } // Keymaster's KM_DATE is unsigned, but java.util.Date is signed, thus preventing us from // using values larger than 2^63 - 1. if (value.getTime() < 0) { throw new IllegalArgumentException("Date tag value out of range: " + value); } mArguments.add(new KeymasterDateArgument(tag, value)); }
Adds a date tag with the provided value. @throws IllegalArgumentException if {@code tag} is not a date tag or if {@code value} is before the start of Unix epoch.
KeymasterArguments::addDate
java
Reginer/aosp-android-jar
android-34/src/android/security/keymaster/KeymasterArguments.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/security/keymaster/KeymasterArguments.java
MIT
public void addDateIfNotNull(int tag, Date value) { if (KeymasterDefs.getTagType(tag) != KeymasterDefs.KM_DATE) { throw new IllegalArgumentException("Not a date tag: " + tag); } if (value != null) { addDate(tag, value); } }
Adds a date tag with the provided value, if the value is not {@code null}. Does nothing if the {@code value} is null. @throws IllegalArgumentException if {@code tag} is not a date tag or if {@code value} is before the start of Unix epoch.
KeymasterArguments::addDateIfNotNull
java
Reginer/aosp-android-jar
android-34/src/android/security/keymaster/KeymasterArguments.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/security/keymaster/KeymasterArguments.java
MIT
public Date getDate(int tag, Date defaultValue) { if (KeymasterDefs.getTagType(tag) != KeymasterDefs.KM_DATE) { throw new IllegalArgumentException("Tag is not a date type: " + tag); } KeymasterArgument arg = getArgumentByTag(tag); if (arg == null) { return defaultValue; } Date result = ((KeymasterDateArgument) arg).date; // Keymaster's KM_DATE is unsigned, but java.util.Date is signed, thus preventing us from // using values larger than 2^63 - 1. if (result.getTime() < 0) { throw new IllegalArgumentException("Tag value too large. Tag: " + tag); } return result; }
Returns the value of the specified date tag or {@code defaultValue} if the tag is not present. @throws IllegalArgumentException if {@code tag} is not a date tag or if the tag's value represents a time instant which is after {@code 2^63 - 1} milliseconds since Unix epoch.
KeymasterArguments::getDate
java
Reginer/aosp-android-jar
android-34/src/android/security/keymaster/KeymasterArguments.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/security/keymaster/KeymasterArguments.java
MIT
public static BigInteger toUint64(long value) { if (value >= 0) { return BigInteger.valueOf(value); } else { return BigInteger.valueOf(value).add(UINT64_RANGE); } }
Converts the provided value to non-negative {@link BigInteger}, treating the sign bit of the provided value as the most significant bit of the result.
KeymasterArguments::toUint64
java
Reginer/aosp-android-jar
android-34/src/android/security/keymaster/KeymasterArguments.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/security/keymaster/KeymasterArguments.java
MIT
public int getTableId() { return mTableId; }
Gets table ID.
SectionSettingsWithTableInfo::getTableId
java
Reginer/aosp-android-jar
android-33/src/android/media/tv/tuner/filter/SectionSettingsWithTableInfo.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/media/tv/tuner/filter/SectionSettingsWithTableInfo.java
MIT
public int getVersion() { return mVersion; }
Gets version.
SectionSettingsWithTableInfo::getVersion
java
Reginer/aosp-android-jar
android-33/src/android/media/tv/tuner/filter/SectionSettingsWithTableInfo.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/android/media/tv/tuner/filter/SectionSettingsWithTableInfo.java
MIT
public NotificationRemoteInputManager( Context context, NotifPipelineFlags notifPipelineFlags, NotificationLockscreenUserManager lockscreenUserManager, SmartReplyController smartReplyController, NotificationVisibilityProvider visibilityProvider, NotificationEntryManager notificationEntryManager, RemoteInputNotificationRebuilder rebuilder, Lazy<Optional<CentralSurfaces>> centralSurfacesOptionalLazy, StatusBarStateController statusBarStateController, @Main Handler mainHandler, RemoteInputUriController remoteInputUriController, NotificationClickNotifier clickNotifier, ActionClickLogger logger, DumpManager dumpManager) { mContext = context; mNotifPipelineFlags = notifPipelineFlags; mLockscreenUserManager = lockscreenUserManager; mSmartReplyController = smartReplyController; mVisibilityProvider = visibilityProvider; mEntryManager = notificationEntryManager; mCentralSurfacesOptionalLazy = centralSurfacesOptionalLazy; mMainHandler = mainHandler; mLogger = logger; mBarService = IStatusBarService.Stub.asInterface( ServiceManager.getService(Context.STATUS_BAR_SERVICE)); mUserManager = (UserManager) mContext.getSystemService(Context.USER_SERVICE); mRebuilder = rebuilder; if (!mNotifPipelineFlags.isNewPipelineEnabled()) { mRemoteInputListener = createLegacyRemoteInputLifetimeExtender(mainHandler, notificationEntryManager, smartReplyController); } mKeyguardManager = context.getSystemService(KeyguardManager.class); mStatusBarStateController = statusBarStateController; mRemoteInputUriController = remoteInputUriController; mClickNotifier = clickNotifier; dumpManager.registerDumpable(this); notificationEntryManager.addNotificationEntryListener(new NotificationEntryListener() { @Override public void onPreEntryUpdated(NotificationEntry entry) { // Mark smart replies as sent whenever a notification is updated - otherwise the // smart replies are never marked as sent. mSmartReplyController.stopSending(entry); } @Override public void onEntryRemoved( @Nullable NotificationEntry entry, NotificationVisibility visibility, boolean removedByUser, int reason) { // We're removing the notification, the smart controller can forget about it. mSmartReplyController.stopSending(entry); if (removedByUser && entry != null) { onPerformRemoveNotification(entry, entry.getKey()); } } }); }
Injected constructor. See {@link CentralSurfacesDependenciesModule}.
NotificationRemoteInputManager::NotificationRemoteInputManager
java
Reginer/aosp-android-jar
android-33/src/com/android/systemui/statusbar/NotificationRemoteInputManager.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/systemui/statusbar/NotificationRemoteInputManager.java
MIT
public void setRemoteInputListener(@NonNull RemoteInputListener remoteInputListener) { if (mNotifPipelineFlags.isNewPipelineEnabled()) { if (mRemoteInputListener != null) { throw new IllegalStateException("mRemoteInputListener is already set"); } mRemoteInputListener = remoteInputListener; if (mRemoteInputController != null) { mRemoteInputListener.setRemoteInputController(mRemoteInputController); } } }
Injected constructor. See {@link CentralSurfacesDependenciesModule}. public NotificationRemoteInputManager( Context context, NotifPipelineFlags notifPipelineFlags, NotificationLockscreenUserManager lockscreenUserManager, SmartReplyController smartReplyController, NotificationVisibilityProvider visibilityProvider, NotificationEntryManager notificationEntryManager, RemoteInputNotificationRebuilder rebuilder, Lazy<Optional<CentralSurfaces>> centralSurfacesOptionalLazy, StatusBarStateController statusBarStateController, @Main Handler mainHandler, RemoteInputUriController remoteInputUriController, NotificationClickNotifier clickNotifier, ActionClickLogger logger, DumpManager dumpManager) { mContext = context; mNotifPipelineFlags = notifPipelineFlags; mLockscreenUserManager = lockscreenUserManager; mSmartReplyController = smartReplyController; mVisibilityProvider = visibilityProvider; mEntryManager = notificationEntryManager; mCentralSurfacesOptionalLazy = centralSurfacesOptionalLazy; mMainHandler = mainHandler; mLogger = logger; mBarService = IStatusBarService.Stub.asInterface( ServiceManager.getService(Context.STATUS_BAR_SERVICE)); mUserManager = (UserManager) mContext.getSystemService(Context.USER_SERVICE); mRebuilder = rebuilder; if (!mNotifPipelineFlags.isNewPipelineEnabled()) { mRemoteInputListener = createLegacyRemoteInputLifetimeExtender(mainHandler, notificationEntryManager, smartReplyController); } mKeyguardManager = context.getSystemService(KeyguardManager.class); mStatusBarStateController = statusBarStateController; mRemoteInputUriController = remoteInputUriController; mClickNotifier = clickNotifier; dumpManager.registerDumpable(this); notificationEntryManager.addNotificationEntryListener(new NotificationEntryListener() { @Override public void onPreEntryUpdated(NotificationEntry entry) { // Mark smart replies as sent whenever a notification is updated - otherwise the // smart replies are never marked as sent. mSmartReplyController.stopSending(entry); } @Override public void onEntryRemoved( @Nullable NotificationEntry entry, NotificationVisibility visibility, boolean removedByUser, int reason) { // We're removing the notification, the smart controller can forget about it. mSmartReplyController.stopSending(entry); if (removedByUser && entry != null) { onPerformRemoveNotification(entry, entry.getKey()); } } }); } /** Add a listener for various remote input events. Works with NEW pipeline only.
NotificationRemoteInputManager::setRemoteInputListener
java
Reginer/aosp-android-jar
android-33/src/com/android/systemui/statusbar/NotificationRemoteInputManager.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/systemui/statusbar/NotificationRemoteInputManager.java
MIT
public void setUpWithCallback(Callback callback, RemoteInputController.Delegate delegate) { mCallback = callback; mRemoteInputController = new RemoteInputController(delegate, mRemoteInputUriController); if (mRemoteInputListener != null) { mRemoteInputListener.setRemoteInputController(mRemoteInputController); } // Register all stored callbacks from before the Controller was initialized. for (RemoteInputController.Callback cb : mControllerCallbacks) { mRemoteInputController.addCallback(cb); } mControllerCallbacks.clear(); mRemoteInputController.addCallback(new RemoteInputController.Callback() { @Override public void onRemoteInputSent(NotificationEntry entry) { if (mRemoteInputListener != null) { mRemoteInputListener.onRemoteInputSent(entry); } try { mBarService.onNotificationDirectReplied(entry.getSbn().getKey()); if (entry.editedSuggestionInfo != null) { boolean modifiedBeforeSending = !TextUtils.equals(entry.remoteInputText, entry.editedSuggestionInfo.originalText); mBarService.onNotificationSmartReplySent( entry.getSbn().getKey(), entry.editedSuggestionInfo.index, entry.editedSuggestionInfo.originalText, NotificationLogger .getNotificationLocation(entry) .toMetricsEventEnum(), modifiedBeforeSending); } } catch (RemoteException e) { // Nothing to do, system going down } } }); if (!mNotifPipelineFlags.isNewPipelineEnabled()) { mSmartReplyController.setCallback((entry, reply) -> { StatusBarNotification newSbn = mRebuilder.rebuildForSendingSmartReply(entry, reply); mEntryManager.updateNotification(newSbn, null /* ranking */); }); } }
Injected constructor. See {@link CentralSurfacesDependenciesModule}. public NotificationRemoteInputManager( Context context, NotifPipelineFlags notifPipelineFlags, NotificationLockscreenUserManager lockscreenUserManager, SmartReplyController smartReplyController, NotificationVisibilityProvider visibilityProvider, NotificationEntryManager notificationEntryManager, RemoteInputNotificationRebuilder rebuilder, Lazy<Optional<CentralSurfaces>> centralSurfacesOptionalLazy, StatusBarStateController statusBarStateController, @Main Handler mainHandler, RemoteInputUriController remoteInputUriController, NotificationClickNotifier clickNotifier, ActionClickLogger logger, DumpManager dumpManager) { mContext = context; mNotifPipelineFlags = notifPipelineFlags; mLockscreenUserManager = lockscreenUserManager; mSmartReplyController = smartReplyController; mVisibilityProvider = visibilityProvider; mEntryManager = notificationEntryManager; mCentralSurfacesOptionalLazy = centralSurfacesOptionalLazy; mMainHandler = mainHandler; mLogger = logger; mBarService = IStatusBarService.Stub.asInterface( ServiceManager.getService(Context.STATUS_BAR_SERVICE)); mUserManager = (UserManager) mContext.getSystemService(Context.USER_SERVICE); mRebuilder = rebuilder; if (!mNotifPipelineFlags.isNewPipelineEnabled()) { mRemoteInputListener = createLegacyRemoteInputLifetimeExtender(mainHandler, notificationEntryManager, smartReplyController); } mKeyguardManager = context.getSystemService(KeyguardManager.class); mStatusBarStateController = statusBarStateController; mRemoteInputUriController = remoteInputUriController; mClickNotifier = clickNotifier; dumpManager.registerDumpable(this); notificationEntryManager.addNotificationEntryListener(new NotificationEntryListener() { @Override public void onPreEntryUpdated(NotificationEntry entry) { // Mark smart replies as sent whenever a notification is updated - otherwise the // smart replies are never marked as sent. mSmartReplyController.stopSending(entry); } @Override public void onEntryRemoved( @Nullable NotificationEntry entry, NotificationVisibility visibility, boolean removedByUser, int reason) { // We're removing the notification, the smart controller can forget about it. mSmartReplyController.stopSending(entry); if (removedByUser && entry != null) { onPerformRemoveNotification(entry, entry.getKey()); } } }); } /** Add a listener for various remote input events. Works with NEW pipeline only. public void setRemoteInputListener(@NonNull RemoteInputListener remoteInputListener) { if (mNotifPipelineFlags.isNewPipelineEnabled()) { if (mRemoteInputListener != null) { throw new IllegalStateException("mRemoteInputListener is already set"); } mRemoteInputListener = remoteInputListener; if (mRemoteInputController != null) { mRemoteInputListener.setRemoteInputController(mRemoteInputController); } } } @NonNull @VisibleForTesting protected LegacyRemoteInputLifetimeExtender createLegacyRemoteInputLifetimeExtender( Handler mainHandler, NotificationEntryManager notificationEntryManager, SmartReplyController smartReplyController) { return new LegacyRemoteInputLifetimeExtender(); } /** Initializes this component with the provided dependencies.
NotificationRemoteInputManager::setUpWithCallback
java
Reginer/aosp-android-jar
android-33/src/com/android/systemui/statusbar/NotificationRemoteInputManager.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/systemui/statusbar/NotificationRemoteInputManager.java
MIT
public boolean activateRemoteInput(View view, RemoteInput[] inputs, RemoteInput input, PendingIntent pendingIntent, @Nullable EditedSuggestionInfo editedSuggestionInfo) { return activateRemoteInput(view, inputs, input, pendingIntent, editedSuggestionInfo, null /* userMessageContent */, null /* authBypassCheck */); }
Activates a given {@link RemoteInput} @param view The view of the action button or suggestion chip that was tapped. @param inputs The remote inputs that need to be sent to the app. @param input The remote input that needs to be activated. @param pendingIntent The pending intent to be sent to the app. @param editedSuggestionInfo The smart reply that should be inserted in the remote input, or {@code null} if the user is not editing a smart reply. @return Whether the {@link RemoteInput} was activated.
NotificationRemoteInputManager::activateRemoteInput
java
Reginer/aosp-android-jar
android-33/src/com/android/systemui/statusbar/NotificationRemoteInputManager.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/systemui/statusbar/NotificationRemoteInputManager.java
MIT
public boolean activateRemoteInput(View view, RemoteInput[] inputs, RemoteInput input, PendingIntent pendingIntent, @Nullable EditedSuggestionInfo editedSuggestionInfo, @Nullable String userMessageContent, @Nullable AuthBypassPredicate authBypassCheck) { ViewParent p = view.getParent(); RemoteInputView riv = null; ExpandableNotificationRow row = null; while (p != null) { if (p instanceof View) { View pv = (View) p; if (pv.isRootNamespace()) { riv = findRemoteInputView(pv); row = (ExpandableNotificationRow) pv.getTag(R.id.row_tag_for_content_view); break; } } p = p.getParent(); } if (row == null) { return false; } row.setUserExpanded(true); final boolean deferBouncer = authBypassCheck != null; if (!deferBouncer && showBouncerForRemoteInput(view, pendingIntent, row)) { return true; } if (riv != null && !riv.isAttachedToWindow()) { // the remoteInput isn't attached to the window anymore :/ Let's focus on the expanded // one instead if it's available riv = null; } if (riv == null) { riv = findRemoteInputView(row.getPrivateLayout().getExpandedChild()); if (riv == null) { return false; } } if (riv == row.getPrivateLayout().getExpandedRemoteInput() && !row.getPrivateLayout().getExpandedChild().isShown()) { // The expanded layout is selected, but it's not shown yet, let's wait on it to // show before we do the animation. mCallback.onMakeExpandedVisibleForRemoteInput(row, view, deferBouncer, () -> { activateRemoteInput(view, inputs, input, pendingIntent, editedSuggestionInfo, userMessageContent, authBypassCheck); }); return true; } if (!riv.isAttachedToWindow()) { // if we still didn't find a view that is attached, let's abort. return false; } int width = view.getWidth(); if (view instanceof TextView) { // Center the reveal on the text which might be off-center from the TextView TextView tv = (TextView) view; if (tv.getLayout() != null) { int innerWidth = (int) tv.getLayout().getLineWidth(0); innerWidth += tv.getCompoundPaddingLeft() + tv.getCompoundPaddingRight(); width = Math.min(width, innerWidth); } } int cx = view.getLeft() + width / 2; int cy = view.getTop() + view.getHeight() / 2; int w = riv.getWidth(); int h = riv.getHeight(); int r = Math.max( Math.max(cx + cy, cx + (h - cy)), Math.max((w - cx) + cy, (w - cx) + (h - cy))); riv.getController().setRevealParams(new RemoteInputView.RevealParams(cx, cy, r)); riv.getController().setPendingIntent(pendingIntent); riv.getController().setRemoteInput(input); riv.getController().setRemoteInputs(inputs); riv.getController().setEditedSuggestionInfo(editedSuggestionInfo); riv.focusAnimated(); if (userMessageContent != null) { riv.setEditTextContent(userMessageContent); } if (deferBouncer) { final ExpandableNotificationRow finalRow = row; riv.getController().setBouncerChecker(() -> !authBypassCheck.canSendRemoteInputWithoutBouncer() && showBouncerForRemoteInput(view, pendingIntent, finalRow)); } return true; }
Activates a given {@link RemoteInput} @param view The view of the action button or suggestion chip that was tapped. @param inputs The remote inputs that need to be sent to the app. @param input The remote input that needs to be activated. @param pendingIntent The pending intent to be sent to the app. @param editedSuggestionInfo The smart reply that should be inserted in the remote input, or {@code null} if the user is not editing a smart reply. @param userMessageContent User-entered text with which to initialize the remote input view. @param authBypassCheck Optional auth bypass check associated with this remote input activation. If {@code null}, we never bypass. @return Whether the {@link RemoteInput} was activated.
NotificationRemoteInputManager::activateRemoteInput
java
Reginer/aosp-android-jar
android-33/src/com/android/systemui/statusbar/NotificationRemoteInputManager.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/systemui/statusbar/NotificationRemoteInputManager.java
MIT
public void cleanUpRemoteInputForUserRemoval(NotificationEntry entry) { if (isRemoteInputActive(entry)) { entry.mRemoteEditImeVisible = false; mRemoteInputController.removeRemoteInput(entry, null); } }
Disable remote input on the entry and remove the remote input view. This should be called when a user dismisses a notification that won't be lifetime extended.
NotificationRemoteInputManager::cleanUpRemoteInputForUserRemoval
java
Reginer/aosp-android-jar
android-33/src/com/android/systemui/statusbar/NotificationRemoteInputManager.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/systemui/statusbar/NotificationRemoteInputManager.java
MIT
public void onPanelCollapsed() { if (mRemoteInputListener != null) { mRemoteInputListener.onPanelCollapsed(); } }
Disable remote input on the entry and remove the remote input view. This should be called when a user dismisses a notification that won't be lifetime extended. public void cleanUpRemoteInputForUserRemoval(NotificationEntry entry) { if (isRemoteInputActive(entry)) { entry.mRemoteEditImeVisible = false; mRemoteInputController.removeRemoteInput(entry, null); } } /** Informs the remote input system that the panel has collapsed
NotificationRemoteInputManager::onPanelCollapsed
java
Reginer/aosp-android-jar
android-33/src/com/android/systemui/statusbar/NotificationRemoteInputManager.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/systemui/statusbar/NotificationRemoteInputManager.java
MIT
public boolean isNotificationKeptForRemoteInputHistory(String key) { return mRemoteInputListener != null && mRemoteInputListener.isNotificationKeptForRemoteInputHistory(key); }
Disable remote input on the entry and remove the remote input view. This should be called when a user dismisses a notification that won't be lifetime extended. public void cleanUpRemoteInputForUserRemoval(NotificationEntry entry) { if (isRemoteInputActive(entry)) { entry.mRemoteEditImeVisible = false; mRemoteInputController.removeRemoteInput(entry, null); } } /** Informs the remote input system that the panel has collapsed public void onPanelCollapsed() { if (mRemoteInputListener != null) { mRemoteInputListener.onPanelCollapsed(); } } /** Returns whether the given notification is lifetime extended because of remote input
NotificationRemoteInputManager::isNotificationKeptForRemoteInputHistory
java
Reginer/aosp-android-jar
android-33/src/com/android/systemui/statusbar/NotificationRemoteInputManager.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/systemui/statusbar/NotificationRemoteInputManager.java
MIT
public boolean shouldKeepForRemoteInputHistory(NotificationEntry entry) { if (!FORCE_REMOTE_INPUT_HISTORY) { return false; } return isSpinning(entry.getKey()) || entry.hasJustSentRemoteInput(); }
Disable remote input on the entry and remove the remote input view. This should be called when a user dismisses a notification that won't be lifetime extended. public void cleanUpRemoteInputForUserRemoval(NotificationEntry entry) { if (isRemoteInputActive(entry)) { entry.mRemoteEditImeVisible = false; mRemoteInputController.removeRemoteInput(entry, null); } } /** Informs the remote input system that the panel has collapsed public void onPanelCollapsed() { if (mRemoteInputListener != null) { mRemoteInputListener.onPanelCollapsed(); } } /** Returns whether the given notification is lifetime extended because of remote input public boolean isNotificationKeptForRemoteInputHistory(String key) { return mRemoteInputListener != null && mRemoteInputListener.isNotificationKeptForRemoteInputHistory(key); } /** Returns whether the notification should be lifetime extended for remote input history
NotificationRemoteInputManager::shouldKeepForRemoteInputHistory
java
Reginer/aosp-android-jar
android-33/src/com/android/systemui/statusbar/NotificationRemoteInputManager.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/systemui/statusbar/NotificationRemoteInputManager.java
MIT
private void releaseNotificationIfKeptForRemoteInputHistory(NotificationEntry entry) { if (entry == null) { return; } if (mRemoteInputListener != null) { mRemoteInputListener.releaseNotificationIfKeptForRemoteInputHistory(entry); } }
Checks if the notification is being kept due to the user sending an inline reply, and if so, releases that hold. This is called anytime an action on the notification is dispatched (after unlock, if applicable), and will then wait a short time to allow the app to update the notification in response to the action.
NotificationRemoteInputManager::releaseNotificationIfKeptForRemoteInputHistory
java
Reginer/aosp-android-jar
android-33/src/com/android/systemui/statusbar/NotificationRemoteInputManager.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/systemui/statusbar/NotificationRemoteInputManager.java
MIT
public boolean shouldKeepForSmartReplyHistory(NotificationEntry entry) { if (!FORCE_REMOTE_INPUT_HISTORY) { return false; } return mSmartReplyController.isSendingSmartReply(entry.getKey()); }
Checks if the notification is being kept due to the user sending an inline reply, and if so, releases that hold. This is called anytime an action on the notification is dispatched (after unlock, if applicable), and will then wait a short time to allow the app to update the notification in response to the action. private void releaseNotificationIfKeptForRemoteInputHistory(NotificationEntry entry) { if (entry == null) { return; } if (mRemoteInputListener != null) { mRemoteInputListener.releaseNotificationIfKeptForRemoteInputHistory(entry); } } /** Returns whether the notification should be lifetime extended for smart reply history
NotificationRemoteInputManager::shouldKeepForSmartReplyHistory
java
Reginer/aosp-android-jar
android-33/src/com/android/systemui/statusbar/NotificationRemoteInputManager.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/systemui/statusbar/NotificationRemoteInputManager.java
MIT
public RemoteViews.InteractionHandler getRemoteViewsOnClickHandler() { return mInteractionHandler; }
Return on-click handler for notification remote views @return on-click handler
NotificationRemoteInputManager::getRemoteViewsOnClickHandler
java
Reginer/aosp-android-jar
android-33/src/com/android/systemui/statusbar/NotificationRemoteInputManager.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/systemui/statusbar/NotificationRemoteInputManager.java
MIT
protected void addLifetimeExtenders() { mLifetimeExtenders.add(new RemoteInputHistoryExtender()); mLifetimeExtenders.add(new SmartReplyHistoryExtender()); mLifetimeExtenders.add(new RemoteInputActiveExtender()); }
Adds all the notification lifetime extenders. Each extender represents a reason for the NotificationRemoteInputManager to keep a notification lifetime extended.
LegacyRemoteInputLifetimeExtender::addLifetimeExtenders
java
Reginer/aosp-android-jar
android-33/src/com/android/systemui/statusbar/NotificationRemoteInputManager.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-33/src/com/android/systemui/statusbar/NotificationRemoteInputManager.java
MIT
public NanoAppRpcService(long serviceId, int serviceVersion) { mServiceId = serviceId; mServiceVersion = serviceVersion; }
@param serviceId The unique ID of this service, see {#getId()}. @param serviceVersion The software version of this service, see {#getVersion()}.
NanoAppRpcService::NanoAppRpcService
java
Reginer/aosp-android-jar
android-34/src/android/hardware/location/NanoAppRpcService.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/hardware/location/NanoAppRpcService.java
MIT
public long getId() { return mServiceId; }
The unique 64-bit ID of an RPC service published by a nanoapp. Note that the uniqueness is only required within the nanoapp's domain (i.e. the combination of the nanoapp ID and service id must be unique). This ID must remain the same for the given nanoapp RPC service once published on Android (i.e. must never change). @return The service ID.
NanoAppRpcService::getId
java
Reginer/aosp-android-jar
android-34/src/android/hardware/location/NanoAppRpcService.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/hardware/location/NanoAppRpcService.java
MIT
public int getVersion() { return mServiceVersion; }
The software version of this service, which follows the sematic versioning scheme (see semver.org). It follows the format major.minor.patch, where major and minor versions take up one byte each, and the patch version takes up the final 2 (lower) bytes. I.e. the version is encoded as 0xMMmmpppp, where MM, mm, pppp are the major, minor, patch versions, respectively. @return The service version.
NanoAppRpcService::getVersion
java
Reginer/aosp-android-jar
android-34/src/android/hardware/location/NanoAppRpcService.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/hardware/location/NanoAppRpcService.java
MIT
private int getMajorVersion() { return (mServiceVersion & 0xFF000000) >>> 24; }
@return The service's major version.
NanoAppRpcService::getMajorVersion
java
Reginer/aosp-android-jar
android-34/src/android/hardware/location/NanoAppRpcService.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/hardware/location/NanoAppRpcService.java
MIT
private int getMinorVersion() { return (mServiceVersion & 0x00FF0000) >>> 16; }
@return The service's minor version.
NanoAppRpcService::getMinorVersion
java
Reginer/aosp-android-jar
android-34/src/android/hardware/location/NanoAppRpcService.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/hardware/location/NanoAppRpcService.java
MIT
private int getPatchVersion() { return mServiceVersion & 0x0000FFFF; }
@return The service's patch version.
NanoAppRpcService::getPatchVersion
java
Reginer/aosp-android-jar
android-34/src/android/hardware/location/NanoAppRpcService.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-34/src/android/hardware/location/NanoAppRpcService.java
MIT
public GenerateRkpKeyException() { }
Constructs a new {@code GenerateRkpKeyException}.
GenerateRkpKeyException::GenerateRkpKeyException
java
Reginer/aosp-android-jar
android-31/src/android/security/GenerateRkpKeyException.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-31/src/android/security/GenerateRkpKeyException.java
MIT
void scheduleTransactionItemNow(@NonNull IApplicationThread client, @NonNull ClientTransactionItem transactionItem) throws RemoteException { final ClientTransaction clientTransaction = ClientTransaction.obtain(client); clientTransaction.addTransactionItem(transactionItem); scheduleTransaction(clientTransaction); }
Similar to {@link #scheduleTransactionItem}, but it sends the transaction immediately and it can be called without WM lock. @see WindowProcessController#setReportedProcState(int)
ClientLifecycleManager::scheduleTransactionItemNow
java
Reginer/aosp-android-jar
android-35/src/com/android/server/wm/ClientLifecycleManager.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/server/wm/ClientLifecycleManager.java
MIT
void scheduleTransactionItem(@NonNull IApplicationThread client, @NonNull ClientTransactionItem transactionItem) throws RemoteException { // The behavior is different depending on the flag. // When flag is on, we wait until RootWindowContainer#performSurfacePlacementNoTrace to // dispatch all pending transactions at once. if (Flags.bundleClientTransactionFlag()) { final ClientTransaction clientTransaction = getOrCreatePendingTransaction(client); clientTransaction.addTransactionItem(transactionItem); onClientTransactionItemScheduled(clientTransaction, false /* shouldDispatchImmediately */); } else { // TODO(b/260873529): cleanup after launch. final ClientTransaction clientTransaction = ClientTransaction.obtain(client); clientTransaction.addTransactionItem(transactionItem); scheduleTransaction(clientTransaction); } }
Schedules a single transaction item, either a callback or a lifecycle request, delivery to client application. @throws RemoteException @see ClientTransactionItem
ClientLifecycleManager::scheduleTransactionItem
java
Reginer/aosp-android-jar
android-35/src/com/android/server/wm/ClientLifecycleManager.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/server/wm/ClientLifecycleManager.java
MIT
void scheduleTransactionAndLifecycleItems(@NonNull IApplicationThread client, @NonNull ClientTransactionItem transactionItem, @NonNull ActivityLifecycleItem lifecycleItem, boolean shouldDispatchImmediately) throws RemoteException { // The behavior is different depending on the flag. // When flag is on, we wait until RootWindowContainer#performSurfacePlacementNoTrace to // dispatch all pending transactions at once. if (Flags.bundleClientTransactionFlag()) { final ClientTransaction clientTransaction = getOrCreatePendingTransaction(client); clientTransaction.addTransactionItem(transactionItem); clientTransaction.addTransactionItem(lifecycleItem); onClientTransactionItemScheduled(clientTransaction, shouldDispatchImmediately); } else { // TODO(b/260873529): cleanup after launch. final ClientTransaction clientTransaction = ClientTransaction.obtain(client); clientTransaction.addTransactionItem(transactionItem); clientTransaction.addTransactionItem(lifecycleItem); scheduleTransaction(clientTransaction); } }
Schedules a single transaction item with a lifecycle request, delivery to client application. @param shouldDispatchImmediately whether or not to dispatch the transaction immediately. This should only be {@code true} when it is important to know the result of dispatching immediately. For example, when cold launches an app, the server needs to know if the transaction is dispatched successfully, and may restart the process if not. @throws RemoteException @see ClientTransactionItem
ClientLifecycleManager::scheduleTransactionAndLifecycleItems
java
Reginer/aosp-android-jar
android-35/src/com/android/server/wm/ClientLifecycleManager.java
https://github.com/Reginer/aosp-android-jar/blob/master/android-35/src/com/android/server/wm/ClientLifecycleManager.java
MIT