Exploit databaseDownload repository ZIP
GH-cd474985a1d611a2a689e02bc95daae0
satheesh575555/frameworks_base_aosp10_r33_cve-2022-20142
Sources for CVE-2022-20142
1 sourcePreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.
Repository files147
satheesh575555/frameworks_base_aosp10_r33_cve-2022-20142Revision 0b10dce4665c
- ↑..Parent directory
- AbsListView.java
- AbsSeekBar.java
- AbsSpinner.java
- AbsoluteLayout.java
- AccessibilityIterators.java
- ActionMenuPresenter.java
- ActionMenuView.java
- ActivityChooserModel.java
- ActivityChooserView.java
- Adapter.java
- AdapterView.java
- AdapterViewAnimator.java
- AdapterViewFlipper.java
- Advanceable.java
- AlphabetIndexer.java
- AnalogClock.java
- AppSecurityPermissions.java
- ArrayAdapter.java
- AutoCompleteTextView.java
- BaseAdapter.java
- BaseExpandableListAdapter.java
- Button.java
- CalendarView.java
- CalendarViewLegacyDelegate.java
- CalendarViewMaterialDelegate.java
- CheckBox.java
- Checkable.java
- CheckedTextView.java
- Chronometer.java
- CompoundButton.java
- CursorAdapter.java
- CursorFilter.java
- CursorTreeAdapter.java
- DatePicker.java
- DatePickerCalendarDelegate.java
- DatePickerController.java
- DatePickerSpinnerDelegate.java
- DateTimeView.java
- DayPickerPagerAdapter.java
- DayPickerView.java
- DayPickerViewPager.java
- DialerFilter.java
- DigitalClock.java
- DoubleDigitManager.java
- DropDownListView.java
- EdgeEffect.java
- EditText.java
- Editor.java
- ExpandableListAdapter.java
- ExpandableListConnector.java
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
core/java/android/widget/DoubleDigitManager.java
Java · 3,457 bytes/*
* Copyright (C) 2007 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.widget;
import android.os.Handler;
/**
* Provides callbacks indicating the steps in two digit pressing within a
* timeout.
*
* Package private: only relevant in helping {@link TimeSpinnerHelper}.
*/
class DoubleDigitManager {
private final long timeoutInMillis;
private final CallBack mCallBack;
private Integer intermediateDigit;
/**
* @param timeoutInMillis How long after the first digit is pressed does
* the user have to press the second digit?
* @param callBack The callback to indicate what's going on with the user.
*/
public DoubleDigitManager(long timeoutInMillis, CallBack callBack) {
this.timeoutInMillis = timeoutInMillis;
mCallBack = callBack;
}
/**
* Report to this manager that a digit was pressed.
* @param digit
*/
public void reportDigit(int digit) {
if (intermediateDigit == null) {
intermediateDigit = digit;
new Handler().postDelayed(new Runnable() {
public void run() {
if (intermediateDigit != null) {
mCallBack.singleDigitFinal(intermediateDigit);
intermediateDigit = null;
}
}
}, timeoutInMillis);
if (!mCallBack.singleDigitIntermediate(digit)) {
// this wasn't a good candidate for the intermediate digit,
// make it the final digit (since there is no opportunity to
// reject the final digit).
intermediateDigit = null;
mCallBack.singleDigitFinal(digit);
}
} else if (mCallBack.twoDigitsFinal(intermediateDigit, digit)) {
intermediateDigit = null;
}
}
/**
* The callback to indicate what is going on with the digits pressed.
*/
static interface CallBack {
/**
* A digit was pressed, and there are no intermediate digits.
* @param digit The digit pressed.
* @return Whether the digit was accepted; how the user of this manager
* tells us that the intermediate digit is acceptable as an
* intermediate digit.
*/
boolean singleDigitIntermediate(int digit);
/**
* A single digit was pressed, and it is 'the final answer'.
* - a single digit pressed, and the timeout expires.
* - a single digit pressed, and {@link #singleDigitIntermediate}
* returned false.
* @param digit The digit.
*/
void singleDigitFinal(int digit);
/**
* The user pressed digit1, then digit2 within the timeout.
* @param digit1
* @param digit2
*/
boolean twoDigitsFinal(int digit1, int digit2);
}
}