Initial commit

This commit is contained in:
2025-05-13 19:24:51 +02:00
commit a950f49678
10604 changed files with 932663 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
package com.afunx.ble.blelitelib;
/* loaded from: classes.dex */
public final class BuildConfig {
@Deprecated
public static final String APPLICATION_ID = "com.afunx.ble.blelitelib";
public static final String BUILD_TYPE = "release";
public static final boolean DEBUG = false;
public static final String FLAVOR = "";
public static final String LIBRARY_PACKAGE_NAME = "com.afunx.ble.blelitelib";
public static final int VERSION_CODE = 1;
public static final String VERSION_NAME = "1.0";
}

View File

@@ -0,0 +1,254 @@
package com.afunx.ble.blelitelib;
/* loaded from: classes.dex */
public final class R {
public static final class attr {
public static final int alpha = 0x7f040028;
public static final int coordinatorLayoutStyle = 0x7f0400c5;
public static final int font = 0x7f0400fb;
public static final int fontProviderAuthority = 0x7f0400fd;
public static final int fontProviderCerts = 0x7f0400fe;
public static final int fontProviderFetchStrategy = 0x7f0400ff;
public static final int fontProviderFetchTimeout = 0x7f040100;
public static final int fontProviderPackage = 0x7f040101;
public static final int fontProviderQuery = 0x7f040102;
public static final int fontStyle = 0x7f040103;
public static final int fontVariationSettings = 0x7f040104;
public static final int fontWeight = 0x7f040105;
public static final int keylines = 0x7f04013e;
public static final int layout_anchor = 0x7f040159;
public static final int layout_anchorGravity = 0x7f04015a;
public static final int layout_behavior = 0x7f04015b;
public static final int layout_dodgeInsetEdges = 0x7f040187;
public static final int layout_insetEdge = 0x7f040190;
public static final int layout_keyline = 0x7f040191;
public static final int statusBarBackground = 0x7f04020c;
public static final int ttcIndex = 0x7f040278;
private attr() {
}
}
public static final class color {
public static final int notification_action_color_filter = 0x7f060116;
public static final int notification_icon_bg_color = 0x7f060117;
public static final int notification_material_background_media_default_color = 0x7f060118;
public static final int primary_text_default_material_dark = 0x7f06011e;
public static final int ripple_material_light = 0x7f06012a;
public static final int secondary_text_default_material_dark = 0x7f06012b;
public static final int secondary_text_default_material_light = 0x7f06012c;
private color() {
}
}
public static final class dimen {
public static final int compat_button_inset_horizontal_material = 0x7f07013f;
public static final int compat_button_inset_vertical_material = 0x7f070140;
public static final int compat_button_padding_horizontal_material = 0x7f070141;
public static final int compat_button_padding_vertical_material = 0x7f070142;
public static final int compat_control_corner_material = 0x7f070143;
public static final int compat_notification_large_icon_max_height = 0x7f070144;
public static final int compat_notification_large_icon_max_width = 0x7f070145;
public static final int notification_action_icon_size = 0x7f071aaa;
public static final int notification_action_text_size = 0x7f071aab;
public static final int notification_big_circle_margin = 0x7f071aac;
public static final int notification_content_margin_start = 0x7f071aad;
public static final int notification_large_icon_height = 0x7f071aae;
public static final int notification_large_icon_width = 0x7f071aaf;
public static final int notification_main_column_padding_top = 0x7f071ab0;
public static final int notification_media_narrow_margin = 0x7f071ab1;
public static final int notification_right_icon_size = 0x7f071ab2;
public static final int notification_right_side_padding_top = 0x7f071ab3;
public static final int notification_small_icon_background_padding = 0x7f071ab4;
public static final int notification_small_icon_size_as_large = 0x7f071ab5;
public static final int notification_subtext_size = 0x7f071ab6;
public static final int notification_top_pad = 0x7f071ab7;
public static final int notification_top_pad_large_text = 0x7f071ab8;
public static final int subtitle_corner_radius = 0x7f071b5f;
public static final int subtitle_outline_width = 0x7f071b60;
public static final int subtitle_shadow_offset = 0x7f071b61;
public static final int subtitle_shadow_radius = 0x7f071b62;
private dimen() {
}
}
public static final class drawable {
public static final int notification_action_background = 0x7f080330;
public static final int notification_bg = 0x7f080331;
public static final int notification_bg_low = 0x7f080332;
public static final int notification_bg_low_normal = 0x7f080333;
public static final int notification_bg_low_pressed = 0x7f080334;
public static final int notification_bg_normal = 0x7f080335;
public static final int notification_bg_normal_pressed = 0x7f080336;
public static final int notification_icon_background = 0x7f080337;
public static final int notification_template_icon_bg = 0x7f080338;
public static final int notification_template_icon_low_bg = 0x7f080339;
public static final int notification_tile_bg = 0x7f08033a;
public static final int notify_panel_notification_icon_bg = 0x7f08033b;
private drawable() {
}
}
public static final class id {
public static final int action0 = 0x7f09000c;
public static final int action_container = 0x7f090017;
public static final int action_divider = 0x7f090019;
public static final int action_image = 0x7f09001a;
public static final int action_text = 0x7f090020;
public static final int actions = 0x7f090021;
public static final int async = 0x7f090046;
public static final int blocking = 0x7f090057;
public static final int bottom = 0x7f09005c;
public static final int cancel_action = 0x7f090093;
public static final int chronometer = 0x7f0900c4;
public static final int end = 0x7f090137;
public static final int end_padder = 0x7f090138;
public static final int forever = 0x7f090184;
public static final int icon = 0x7f0901bd;
public static final int icon_group = 0x7f0901be;
public static final int info = 0x7f0902cb;
public static final int italic = 0x7f0902d4;
public static final int left = 0x7f09032f;
public static final int line1 = 0x7f09033f;
public static final int line3 = 0x7f090340;
public static final int media_actions = 0x7f090382;
public static final int none = 0x7f0903a9;
public static final int normal = 0x7f0903aa;
public static final int notification_background = 0x7f0903ab;
public static final int notification_main_column = 0x7f0903ac;
public static final int notification_main_column_container = 0x7f0903ad;
public static final int right = 0x7f090419;
public static final int right_icon = 0x7f09041c;
public static final int right_side = 0x7f09041d;
public static final int start = 0x7f0904dc;
public static final int status_bar_latest_event_content = 0x7f0904e0;
public static final int tag_transition_group = 0x7f0904f8;
public static final int tag_unhandled_key_event_manager = 0x7f0904f9;
public static final int tag_unhandled_key_listeners = 0x7f0904fa;
public static final int text = 0x7f090501;
public static final int text2 = 0x7f090502;
public static final int time = 0x7f09050f;
public static final int title = 0x7f090513;
public static final int top = 0x7f090520;
private id() {
}
}
public static final class integer {
public static final int cancel_button_image_alpha = 0x7f0a0004;
public static final int status_bar_notification_info_maxnum = 0x7f0a0011;
private integer() {
}
}
public static final class layout {
public static final int notification_action = 0x7f0c01a8;
public static final int notification_action_tombstone = 0x7f0c01a9;
public static final int notification_media_action = 0x7f0c01aa;
public static final int notification_media_cancel_action = 0x7f0c01ab;
public static final int notification_template_big_media = 0x7f0c01ac;
public static final int notification_template_big_media_custom = 0x7f0c01ad;
public static final int notification_template_big_media_narrow = 0x7f0c01ae;
public static final int notification_template_big_media_narrow_custom = 0x7f0c01af;
public static final int notification_template_custom_big = 0x7f0c01b0;
public static final int notification_template_icon_group = 0x7f0c01b1;
public static final int notification_template_lines_media = 0x7f0c01b2;
public static final int notification_template_media = 0x7f0c01b3;
public static final int notification_template_media_custom = 0x7f0c01b4;
public static final int notification_template_part_chronometer = 0x7f0c01b5;
public static final int notification_template_part_time = 0x7f0c01b6;
private layout() {
}
}
public static final class string {
public static final int status_bar_notification_info_overflow = 0x7f110427;
private string() {
}
}
public static final class style {
public static final int TextAppearance_Compat_Notification = 0x7f12013b;
public static final int TextAppearance_Compat_Notification_Info = 0x7f12013c;
public static final int TextAppearance_Compat_Notification_Info_Media = 0x7f12013d;
public static final int TextAppearance_Compat_Notification_Line2 = 0x7f12013e;
public static final int TextAppearance_Compat_Notification_Line2_Media = 0x7f12013f;
public static final int TextAppearance_Compat_Notification_Media = 0x7f120140;
public static final int TextAppearance_Compat_Notification_Time = 0x7f120141;
public static final int TextAppearance_Compat_Notification_Time_Media = 0x7f120142;
public static final int TextAppearance_Compat_Notification_Title = 0x7f120143;
public static final int TextAppearance_Compat_Notification_Title_Media = 0x7f120144;
public static final int Widget_Compat_NotificationActionContainer = 0x7f1201ee;
public static final int Widget_Compat_NotificationActionText = 0x7f1201ef;
public static final int Widget_Support_CoordinatorLayout = 0x7f12021e;
private style() {
}
}
public static final class styleable {
public static final int ColorStateListItem_alpha = 0x00000002;
public static final int ColorStateListItem_android_alpha = 0x00000001;
public static final int ColorStateListItem_android_color = 0x00000000;
public static final int CoordinatorLayout_Layout_android_layout_gravity = 0x00000000;
public static final int CoordinatorLayout_Layout_layout_anchor = 0x00000001;
public static final int CoordinatorLayout_Layout_layout_anchorGravity = 0x00000002;
public static final int CoordinatorLayout_Layout_layout_behavior = 0x00000003;
public static final int CoordinatorLayout_Layout_layout_dodgeInsetEdges = 0x00000004;
public static final int CoordinatorLayout_Layout_layout_insetEdge = 0x00000005;
public static final int CoordinatorLayout_Layout_layout_keyline = 0x00000006;
public static final int CoordinatorLayout_keylines = 0x00000000;
public static final int CoordinatorLayout_statusBarBackground = 0x00000001;
public static final int FontFamilyFont_android_font = 0x00000000;
public static final int FontFamilyFont_android_fontStyle = 0x00000002;
public static final int FontFamilyFont_android_fontVariationSettings = 0x00000004;
public static final int FontFamilyFont_android_fontWeight = 0x00000001;
public static final int FontFamilyFont_android_ttcIndex = 0x00000003;
public static final int FontFamilyFont_font = 0x00000005;
public static final int FontFamilyFont_fontStyle = 0x00000006;
public static final int FontFamilyFont_fontVariationSettings = 0x00000007;
public static final int FontFamilyFont_fontWeight = 0x00000008;
public static final int FontFamilyFont_ttcIndex = 0x00000009;
public static final int FontFamily_fontProviderAuthority = 0x00000000;
public static final int FontFamily_fontProviderCerts = 0x00000001;
public static final int FontFamily_fontProviderFetchStrategy = 0x00000002;
public static final int FontFamily_fontProviderFetchTimeout = 0x00000003;
public static final int FontFamily_fontProviderPackage = 0x00000004;
public static final int FontFamily_fontProviderQuery = 0x00000005;
public static final int GradientColorItem_android_color = 0x00000000;
public static final int GradientColorItem_android_offset = 0x00000001;
public static final int GradientColor_android_centerColor = 0x00000007;
public static final int GradientColor_android_centerX = 0x00000003;
public static final int GradientColor_android_centerY = 0x00000004;
public static final int GradientColor_android_endColor = 0x00000001;
public static final int GradientColor_android_endX = 0x0000000a;
public static final int GradientColor_android_endY = 0x0000000b;
public static final int GradientColor_android_gradientRadius = 0x00000005;
public static final int GradientColor_android_startColor = 0x00000000;
public static final int GradientColor_android_startX = 0x00000008;
public static final int GradientColor_android_startY = 0x00000009;
public static final int GradientColor_android_tileMode = 0x00000006;
public static final int GradientColor_android_type = 0x00000002;
public static final int[] ColorStateListItem = {android.R.attr.color, android.R.attr.alpha, com.ubt.jimu.R.attr.alpha};
public static final int[] CoordinatorLayout = {com.ubt.jimu.R.attr.keylines, com.ubt.jimu.R.attr.statusBarBackground};
public static final int[] CoordinatorLayout_Layout = {android.R.attr.layout_gravity, com.ubt.jimu.R.attr.layout_anchor, com.ubt.jimu.R.attr.layout_anchorGravity, com.ubt.jimu.R.attr.layout_behavior, com.ubt.jimu.R.attr.layout_dodgeInsetEdges, com.ubt.jimu.R.attr.layout_insetEdge, com.ubt.jimu.R.attr.layout_keyline};
public static final int[] FontFamily = {com.ubt.jimu.R.attr.fontProviderAuthority, com.ubt.jimu.R.attr.fontProviderCerts, com.ubt.jimu.R.attr.fontProviderFetchStrategy, com.ubt.jimu.R.attr.fontProviderFetchTimeout, com.ubt.jimu.R.attr.fontProviderPackage, com.ubt.jimu.R.attr.fontProviderQuery};
public static final int[] FontFamilyFont = {android.R.attr.font, android.R.attr.fontWeight, android.R.attr.fontStyle, android.R.attr.ttcIndex, android.R.attr.fontVariationSettings, com.ubt.jimu.R.attr.font, com.ubt.jimu.R.attr.fontStyle, com.ubt.jimu.R.attr.fontVariationSettings, com.ubt.jimu.R.attr.fontWeight, com.ubt.jimu.R.attr.ttcIndex};
public static final int[] GradientColor = {android.R.attr.startColor, android.R.attr.endColor, android.R.attr.type, android.R.attr.centerX, android.R.attr.centerY, android.R.attr.gradientRadius, android.R.attr.tileMode, android.R.attr.centerColor, android.R.attr.startX, android.R.attr.startY, android.R.attr.endX, android.R.attr.endY};
public static final int[] GradientColorItem = {android.R.attr.color, android.R.attr.offset};
private styleable() {
}
}
private R() {
}
}

View File

@@ -0,0 +1,117 @@
package com.afunx.ble.blelitelib.connector;
import android.annotation.TargetApi;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothGatt;
import android.bluetooth.BluetoothGattCallback;
import android.content.Context;
import android.os.Build;
import com.afunx.ble.blelitelib.log.BleLiteLog;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
/* loaded from: classes.dex */
public class BleConnectCompat {
private static final String TAG = "BleConnectCompat";
private final Context context;
public BleConnectCompat(Context context) {
this.context = context;
}
private BluetoothGatt connectGattCompat(BluetoothGattCallback bluetoothGattCallback, BluetoothDevice bluetoothDevice, boolean z) {
BleLiteLog.v(TAG, "Connecting without reflection");
return Build.VERSION.SDK_INT >= 23 ? bluetoothDevice.connectGatt(this.context, z, bluetoothGattCallback, 2) : bluetoothDevice.connectGatt(this.context, z, bluetoothGattCallback);
}
private boolean connectUsingReflection(BluetoothGatt bluetoothGatt, BluetoothGattCallback bluetoothGattCallback, boolean z) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException, NoSuchFieldException {
BleLiteLog.v(TAG, "Connecting using reflection");
setAutoConnectValue(bluetoothGatt, z);
Method declaredMethod = bluetoothGatt.getClass().getDeclaredMethod("connect", Boolean.class, BluetoothGattCallback.class);
declaredMethod.setAccessible(true);
return ((Boolean) declaredMethod.invoke(bluetoothGatt, true, bluetoothGattCallback)).booleanValue();
}
private BluetoothGatt connectUsingReflectionx(BluetoothDevice bluetoothDevice, BluetoothGattCallback bluetoothGattCallback, boolean z) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException, NoSuchFieldException {
BleLiteLog.v(TAG, "Connecting using reflection");
Method declaredMethod = bluetoothDevice.getClass().getDeclaredMethod("connectGatt", Context.class, Boolean.TYPE, BluetoothGattCallback.class, Integer.TYPE);
declaredMethod.setAccessible(true);
return (BluetoothGatt) declaredMethod.invoke(bluetoothDevice, this.context, true, bluetoothGattCallback, 2);
}
@TargetApi(23)
private BluetoothGatt createBluetoothGatt(Object obj, BluetoothDevice bluetoothDevice) throws IllegalAccessException, InvocationTargetException, InstantiationException {
Constructor<?> constructor = BluetoothGatt.class.getDeclaredConstructors()[0];
constructor.setAccessible(true);
BleLiteLog.v(TAG, "Found constructor with args count = \" + bluetoothGattConstructor.getParameterTypes().length");
return constructor.getParameterTypes().length == 4 ? (BluetoothGatt) constructor.newInstance(this.context, obj, bluetoothDevice, 2) : (BluetoothGatt) constructor.newInstance(this.context, obj, bluetoothDevice);
}
private Object getIBluetoothGatt(Object obj) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {
if (obj == null) {
return null;
}
return getMethodFromClass(obj.getClass(), "getBluetoothGatt").invoke(obj, new Object[0]);
}
private Object getIBluetoothManager() throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {
BluetoothAdapter defaultAdapter = BluetoothAdapter.getDefaultAdapter();
if (defaultAdapter == null) {
return null;
}
return getMethodFromClass(defaultAdapter.getClass(), "getBluetoothManager").invoke(defaultAdapter, new Object[0]);
}
private Method getMethodFromClass(Class<?> cls, String str) throws NoSuchMethodException {
Method declaredMethod = cls.getDeclaredMethod(str, new Class[0]);
declaredMethod.setAccessible(true);
return declaredMethod;
}
private void setAutoConnectValue(BluetoothGatt bluetoothGatt, boolean z) throws NoSuchFieldException, IllegalAccessException {
Field declaredField = bluetoothGatt.getClass().getDeclaredField("mAutoConnect");
declaredField.setAccessible(true);
declaredField.setBoolean(bluetoothGatt, z);
}
public BluetoothGatt connectGatt(BluetoothDevice bluetoothDevice, boolean z, BluetoothGattCallback bluetoothGattCallback) {
int i;
if (bluetoothDevice == null) {
return null;
}
if (Build.VERSION.SDK_INT >= 24 || !z) {
return connectGattCompat(bluetoothGattCallback, bluetoothDevice, false);
}
String str = Build.PRODUCT;
if (str != null && str.toUpperCase().contains("LenovoTB3".toUpperCase()) && (i = Build.VERSION.SDK_INT) >= 21 && i < 23) {
return connectGattCompat(bluetoothGattCallback, bluetoothDevice, false);
}
try {
BleLiteLog.v(TAG, "Trying to connectGatt using reflection.");
if (Build.VERSION.SDK_INT >= 21 && Build.VERSION.SDK_INT < 23) {
return connectUsingReflectionx(bluetoothDevice, bluetoothGattCallback, z);
}
Object iBluetoothGatt = getIBluetoothGatt(getIBluetoothManager());
if (iBluetoothGatt == null) {
BleLiteLog.v(TAG, "Couldn't get iBluetoothGatt object");
return connectGattCompat(bluetoothGattCallback, bluetoothDevice, true);
}
BluetoothGatt createBluetoothGatt = createBluetoothGatt(iBluetoothGatt, bluetoothDevice);
if (createBluetoothGatt == null) {
BleLiteLog.v(TAG, "Couldn't create BluetoothGatt object");
return connectGattCompat(bluetoothGattCallback, bluetoothDevice, true);
}
if (!connectUsingReflection(createBluetoothGatt, bluetoothGattCallback, true)) {
BleLiteLog.v(TAG, "Connection using reflection failed, closing gatt");
createBluetoothGatt.close();
}
return createBluetoothGatt;
} catch (IllegalAccessException | IllegalArgumentException | InstantiationException | NoSuchFieldException | NoSuchMethodException | InvocationTargetException unused) {
BleLiteLog.v(TAG, "Error during reflection");
return connectGattCompat(bluetoothGattCallback, bluetoothDevice, true);
}
}
}

View File

@@ -0,0 +1,85 @@
package com.afunx.ble.blelitelib.connector;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothGatt;
import android.bluetooth.BluetoothGattCallback;
import android.content.Context;
import com.afunx.ble.blelitelib.log.BleLiteLog;
/* loaded from: classes.dex */
public class BleConnector {
private static final String TAG = "BleConnector";
private final Context mAppContext;
private final BluetoothDevice mBluetoothDevice;
private BluetoothGatt mBluetoothGatt;
private final BluetoothGattCallback mBluetoothGattCallback;
private volatile boolean mIsClosed;
public synchronized void close() {
if (!this.mIsClosed) {
this.mIsClosed = true;
if (this.mBluetoothGatt != null) {
BleLiteLog.i(TAG, "close()");
this.mBluetoothGatt.close();
}
}
}
public synchronized void connect() {
if (this.mIsClosed) {
BleLiteLog.w(TAG, "connect() has been closed already, do nothing");
return;
}
if (this.mBluetoothGatt == null) {
BleLiteLog.i(TAG, "connect() connect...");
this.mBluetoothGatt = new BleConnectCompat(this.mAppContext).connectGatt(this.mBluetoothDevice, false, this.mBluetoothGattCallback);
} else {
BleLiteLog.i(TAG, "connect() reconnect...");
this.mBluetoothGatt.connect();
}
}
public synchronized BluetoothGatt getBluetoothGatt() {
if (this.mIsClosed) {
BleLiteLog.w(TAG, "getBluetoothGatt() has been closed already, return null");
return null;
}
return this.mBluetoothGatt;
}
public static final class Builder {
private BluetoothDevice mBluetoothDevice;
private BluetoothGatt mBluetoothGatt;
private BluetoothGattCallback mBluetoothGattCallback;
private Context mContext;
public Builder build(Context context, BluetoothDevice bluetoothDevice) {
this.mContext = context;
this.mBluetoothDevice = bluetoothDevice;
return this;
}
public BleConnector create() {
return new BleConnector(this.mContext, this.mBluetoothDevice, this.mBluetoothGatt, this.mBluetoothGattCallback);
}
public Builder setGattCallback(BluetoothGattCallback bluetoothGattCallback) {
this.mBluetoothGattCallback = bluetoothGattCallback;
return this;
}
public Builder build(Context context, BluetoothDevice bluetoothDevice, BluetoothGatt bluetoothGatt) {
this.mContext = context;
this.mBluetoothDevice = bluetoothDevice;
this.mBluetoothGatt = bluetoothGatt;
return this;
}
}
private BleConnector(Context context, BluetoothDevice bluetoothDevice, BluetoothGatt bluetoothGatt, BluetoothGattCallback bluetoothGattCallback) {
this.mAppContext = context.getApplicationContext();
this.mBluetoothDevice = bluetoothDevice;
this.mBluetoothGatt = bluetoothGatt;
this.mBluetoothGattCallback = bluetoothGattCallback;
}
}

View File

@@ -0,0 +1,53 @@
package com.afunx.ble.blelitelib.log;
import android.util.Log;
/* loaded from: classes.dex */
public class BleLiteLog {
private static final String TAG = "BleLiteLog";
private static final boolean sBleLiteLogTag = true;
private static final boolean sDebug = true;
private BleLiteLog() {
}
public static int d(String str, String str2) {
return Log.d(TAG, str + ": " + str2);
}
public static int e(String str, String str2) {
return Log.e(TAG, str + ": " + str2);
}
public static int i(String str, String str2) {
return Log.i(TAG, str + ": " + str2);
}
public static int v(String str, String str2) {
return Log.v(TAG, str + ": " + str2);
}
public static int w(String str, String str2) {
return Log.w(TAG, str + ": " + str2);
}
public static int d(String str, String str2, Throwable th) {
return Log.d(TAG, str + ": " + str2, th);
}
public static int e(String str, String str2, Throwable th) {
return Log.e(TAG, str + ": " + str2, th);
}
public static int i(String str, String str2, Throwable th) {
return Log.i(TAG, str + ": " + str2, th);
}
public static int v(String str, String str2, Throwable th) {
return Log.v(TAG, str + ": " + str2, th);
}
public static int w(String str, String str2, Throwable th) {
return Log.w(TAG, str + ": " + str2, th);
}
}

View File

@@ -0,0 +1,31 @@
package com.afunx.ble.blelitelib.log;
import android.util.Log;
/* loaded from: classes.dex */
public class BleLogImpl implements IBleLog {
@Override // com.afunx.ble.blelitelib.log.IBleLog
public int d(String str, String str2) {
return Log.d(str, str2);
}
@Override // com.afunx.ble.blelitelib.log.IBleLog
public int e(String str, String str2) {
return Log.e(str, str2);
}
@Override // com.afunx.ble.blelitelib.log.IBleLog
public int i(String str, String str2) {
return Log.i(str, str2);
}
@Override // com.afunx.ble.blelitelib.log.IBleLog
public int v(String str, String str2) {
return Log.v(str, str2);
}
@Override // com.afunx.ble.blelitelib.log.IBleLog
public int w(String str, String str2) {
return Log.w(str, str2);
}
}

View File

@@ -0,0 +1,14 @@
package com.afunx.ble.blelitelib.log;
/* loaded from: classes.dex */
public interface IBleLog {
int d(String str, String str2);
int e(String str, String str2);
int i(String str, String str2);
int v(String str, String str2);
int w(String str, String str2);
}

View File

@@ -0,0 +1,41 @@
package com.afunx.ble.blelitelib.operation;
import android.bluetooth.BluetoothGatt;
import com.afunx.ble.blelitelib.log.BleLiteLog;
/* loaded from: classes.dex */
public class BleCloseOperation extends BleOperationAbs {
private static final String TAG = "BleCloseOperation";
private final BluetoothGatt mBluetoothGatt;
private boolean mIsClosed = false;
private BleCloseOperation(BluetoothGatt bluetoothGatt) {
this.mBluetoothGatt = bluetoothGatt;
}
public static BleCloseOperation createInstance(BluetoothGatt bluetoothGatt) {
return new BleCloseOperation(bluetoothGatt);
}
@Override // com.afunx.ble.blelitelib.operation.BleOperationAbs
protected void clearConcurrentOperation() {
}
@Override // com.afunx.ble.blelitelib.operation.BleOperation
public int getOperatcionCode() {
return 2;
}
@Override // com.afunx.ble.blelitelib.operation.BleOperation, java.lang.Runnable
public void run() {
if (this.mIsClosed) {
BleLiteLog.w(TAG, "it is closed already");
return;
}
this.mIsClosed = true;
BluetoothGatt bluetoothGatt = this.mBluetoothGatt;
if (bluetoothGatt != null) {
bluetoothGatt.close();
}
}
}

View File

@@ -0,0 +1,44 @@
package com.afunx.ble.blelitelib.operation;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothGattCallback;
import android.content.Context;
import com.afunx.ble.blelitelib.connector.BleConnector;
import com.afunx.ble.blelitelib.utils.BleUtils;
/* loaded from: classes.dex */
public class BleConnectOperation extends BleOperationAbs {
private final Context mAppContext;
private final String mBleAddr;
private final BluetoothGattCallback mBluetoothGattCallback;
private BleConnectOperation(Context context, String str, BluetoothGattCallback bluetoothGattCallback) {
this.mAppContext = context.getApplicationContext();
this.mBleAddr = str;
this.mBluetoothGattCallback = bluetoothGattCallback;
}
public static BleConnectOperation createInstance(Context context, String str, BluetoothGattCallback bluetoothGattCallback) {
return new BleConnectOperation(context, str, bluetoothGattCallback);
}
@Override // com.afunx.ble.blelitelib.operation.BleOperationAbs
protected void clearConcurrentOperation() {
}
@Override // com.afunx.ble.blelitelib.operation.BleOperation
public int getOperatcionCode() {
return 1;
}
@Override // com.afunx.ble.blelitelib.operation.BleOperation, java.lang.Runnable
public void run() {
BluetoothDevice remoteDevice = BleUtils.getRemoteDevice(this.mBleAddr);
BleConnector connector = getConnector();
if (connector == null) {
connector = new BleConnector.Builder().build(this.mAppContext, remoteDevice).setGattCallback(this.mBluetoothGattCallback).create();
setConnector(connector);
}
connector.connect();
}
}

View File

@@ -0,0 +1,30 @@
package com.afunx.ble.blelitelib.operation;
import android.bluetooth.BluetoothGatt;
/* loaded from: classes.dex */
public class BleDiscoverServiceOperation extends BleOperationAbs {
private final BluetoothGatt mBluetoothGatt;
private BleDiscoverServiceOperation(BluetoothGatt bluetoothGatt) {
this.mBluetoothGatt = bluetoothGatt;
}
public static BleDiscoverServiceOperation createInstance(BluetoothGatt bluetoothGatt) {
return new BleDiscoverServiceOperation(bluetoothGatt);
}
@Override // com.afunx.ble.blelitelib.operation.BleOperationAbs
protected void clearConcurrentOperation() {
}
@Override // com.afunx.ble.blelitelib.operation.BleOperation
public int getOperatcionCode() {
return 3;
}
@Override // com.afunx.ble.blelitelib.operation.BleOperation, java.lang.Runnable
public void run() {
this.mBluetoothGatt.discoverServices();
}
}

View File

@@ -0,0 +1,5 @@
package com.afunx.ble.blelitelib.operation;
/* loaded from: classes.dex */
public interface BleInterruptable {
}

View File

@@ -0,0 +1,22 @@
package com.afunx.ble.blelitelib.operation;
/* loaded from: classes.dex */
public interface BleOperation extends Runnable {
public static final int BLE_CLOSE = 2;
public static final int BLE_CONNECT = 1;
public static final int BLE_DISCOVER_SERVICE = 3;
public static final int BLE_READ_CHARACTERISTIC = 4;
public static final int BLE_REQUEST_MTU = 5;
public static final int BLE_WRITE_CHARACTERISITC_NO_RESPONSE_PACKET = 10;
public static final int BLE_WRITE_CHARACTERISITC_NO_RESPONSE_PACKET2 = 11;
public static final int BLE_WRITE_CHARACTERISTIC = 6;
public static final int BLE_WRITE_CHARACTERISTIC_NO_RESPONSE = 8;
public static final int BLE_WRITE_CHARACTERISTIC_NO_RESPONSE_20 = 9;
public static final int BLE_WRITE_CHARACTERISTIC_NO_RESPONSE_INTERRUPT = 12;
public static final int BLE_WRITE_DESCRIPTOR = 7;
int getOperatcionCode();
@Override // java.lang.Runnable
void run();
}

View File

@@ -0,0 +1,156 @@
package com.afunx.ble.blelitelib.operation;
import android.bluetooth.BluetoothGattCallback;
import android.os.Looper;
import android.util.LongSparseArray;
import android.util.SparseArray;
import com.afunx.ble.blelitelib.connector.BleConnector;
import com.afunx.ble.blelitelib.log.BleLiteLog;
import com.afunx.ble.blelitelib.proxy.BleGattClientProxy;
import com.afunx.ble.blelitelib.threadpool.BleThreadpool;
import java.util.concurrent.Future;
/* loaded from: classes.dex */
public abstract class BleOperationAbs<T> implements BleOperation {
private static final String TAG = "BleOperationAbs";
private BluetoothGattCallback mBluetoothGattCallback;
private BleConnector mConnector;
private BleGattClientProxy mOwner;
private T mResult;
private static final BleThreadpool sThreadpool = BleThreadpool.getInstance();
private static final SparseArray<Future<?>> mInterruptableTasks = new SparseArray<>();
private final LongSparseArray<Runnable> mRunnables = new LongSparseArray<>();
private final BleOperationLock mLock = new BleOperationLock();
private void clearBleOperationAbs() {
this.mRunnables.clear();
this.mResult = null;
this.mOwner = null;
this.mConnector = null;
this.mBluetoothGattCallback = null;
}
private Runnable getRunnable(long j, boolean z) {
Runnable runnable;
synchronized (this.mRunnables) {
runnable = this.mRunnables.get(j);
if (z) {
this.mRunnables.remove(j);
}
}
return runnable;
}
public final void clear() {
BleLiteLog.v(TAG, "clear() called by " + this);
clearConcurrentOperation();
clearBleOperationAbs();
}
protected abstract void clearConcurrentOperation();
public final void doRunnableAsync(long j, boolean z) {
Runnable runnable = getRunnable(j, z);
if (runnable != null) {
sThreadpool.submit(runnable);
}
}
public final void doRunnableSelfAsync(boolean z) {
if (!z) {
sThreadpool.submit(this);
} else {
if (Looper.getMainLooper() == Looper.myLooper()) {
throw new IllegalStateException("It can't be called in UI Main Thread.");
}
sThreadpool.submitInMain(this);
}
}
public final void doRunnableSelfAsyncInterruptable(int i) {
if (Looper.getMainLooper() == Looper.myLooper()) {
throw new IllegalStateException("It can't be called in UI Main Thread.");
}
if (!(this instanceof BleInterruptable)) {
throw new IllegalArgumentException("Only BleInterruptable could call the method.");
}
synchronized (mInterruptableTasks) {
Future<?> future = mInterruptableTasks.get(i);
if (future != null) {
future.cancel(true);
}
mInterruptableTasks.put(i, sThreadpool.submit(this));
}
}
public final void doRunnableUIAsync(long j, boolean z) {
Runnable runnable = getRunnable(j, z);
if (runnable != null) {
sThreadpool.submitInMain(runnable);
}
}
public final BluetoothGattCallback getBluetoothGattCallback() {
return this.mBluetoothGattCallback;
}
public final BleConnector getConnector() {
return this.mConnector;
}
public final BleGattClientProxy getOwner() {
return this.mOwner;
}
public final T getResult() {
return this.mResult;
}
public final boolean isNotified() {
return this.mLock.isNotified();
}
public final void notifyLock() {
this.mLock.notifyLock();
}
public final void putRunnable(long j, Runnable runnable) {
synchronized (this.mRunnables) {
this.mRunnables.put(j, runnable);
}
}
public final void removeRunnable(long j) {
synchronized (this.mRunnables) {
this.mRunnables.remove(j);
}
}
public final void setBluetoothGattCallback(BluetoothGattCallback bluetoothGattCallback) {
this.mBluetoothGattCallback = bluetoothGattCallback;
}
public final void setConnector(BleConnector bleConnector) {
this.mConnector = bleConnector;
}
public final void setOwner(BleGattClientProxy bleGattClientProxy) {
this.mOwner = bleGattClientProxy;
}
public final void setResult(T t) {
this.mResult = t;
}
public String toString() {
return String.format("[%s-%d-%04x]", getClass().getSimpleName(), Integer.valueOf(hashCode()), Long.valueOf(getOperatcionCode()));
}
public final void waitLock(long j) {
this.mLock.waitLock(j);
}
public final Runnable getRunnable(long j) {
return getRunnable(j, false);
}
}

View File

@@ -0,0 +1,28 @@
package com.afunx.ble.blelitelib.operation;
import java.util.concurrent.Semaphore;
import java.util.concurrent.TimeUnit;
/* loaded from: classes.dex */
public class BleOperationLock {
private final Semaphore mSemaphore = new Semaphore(0);
private volatile boolean mIsNotified = false;
boolean isNotified() {
return this.mIsNotified;
}
void notifyLock() {
this.mIsNotified = true;
this.mSemaphore.release();
}
void waitLock(long j) {
try {
this.mSemaphore.tryAcquire(1, j, TimeUnit.MILLISECONDS);
} catch (InterruptedException e) {
e.printStackTrace();
Thread.currentThread().interrupt();
}
}
}

View File

@@ -0,0 +1,33 @@
package com.afunx.ble.blelitelib.operation;
import android.bluetooth.BluetoothGatt;
import android.bluetooth.BluetoothGattCharacteristic;
/* loaded from: classes.dex */
public class BleReadCharacteristicOperation extends BleOperationAbs<byte[]> {
private final BluetoothGatt mBluetoothGatt;
private final BluetoothGattCharacteristic mGattCharacteristic;
private BleReadCharacteristicOperation(BluetoothGatt bluetoothGatt, BluetoothGattCharacteristic bluetoothGattCharacteristic) {
this.mBluetoothGatt = bluetoothGatt;
this.mGattCharacteristic = bluetoothGattCharacteristic;
}
public static BleReadCharacteristicOperation createInstance(BluetoothGatt bluetoothGatt, BluetoothGattCharacteristic bluetoothGattCharacteristic) {
return new BleReadCharacteristicOperation(bluetoothGatt, bluetoothGattCharacteristic);
}
@Override // com.afunx.ble.blelitelib.operation.BleOperationAbs
protected void clearConcurrentOperation() {
}
@Override // com.afunx.ble.blelitelib.operation.BleOperation
public int getOperatcionCode() {
return 4;
}
@Override // com.afunx.ble.blelitelib.operation.BleOperation, java.lang.Runnable
public void run() {
this.mBluetoothGatt.readCharacteristic(this.mGattCharacteristic);
}
}

View File

@@ -0,0 +1,34 @@
package com.afunx.ble.blelitelib.operation;
import android.annotation.TargetApi;
import android.bluetooth.BluetoothGatt;
/* loaded from: classes.dex */
public class BleRequestMtuOperation extends BleOperationAbs {
private final BluetoothGatt mBluetoothGatt;
private final int mMTU;
private BleRequestMtuOperation(BluetoothGatt bluetoothGatt, int i) {
this.mBluetoothGatt = bluetoothGatt;
this.mMTU = i;
}
public static BleRequestMtuOperation createInstance(BluetoothGatt bluetoothGatt, int i) {
return new BleRequestMtuOperation(bluetoothGatt, i);
}
@Override // com.afunx.ble.blelitelib.operation.BleOperationAbs
protected void clearConcurrentOperation() {
}
@Override // com.afunx.ble.blelitelib.operation.BleOperation
public int getOperatcionCode() {
return 5;
}
@Override // com.afunx.ble.blelitelib.operation.BleOperation, java.lang.Runnable
@TargetApi(21)
public void run() {
this.mBluetoothGatt.requestMtu(this.mMTU);
}
}

View File

@@ -0,0 +1,64 @@
package com.afunx.ble.blelitelib.operation;
import android.bluetooth.BluetoothGatt;
import android.bluetooth.BluetoothGattCharacteristic;
import com.afunx.ble.blelitelib.log.BleLiteLog;
import com.afunx.ble.blelitelib.utils.HexUtils;
import java.util.Arrays;
/* loaded from: classes.dex */
public class BleWriteCharacterisitcNoResponsePacketOperation extends BleOperationAbs {
private static final String TAG = "BleWriteCharacterisitcNoResponsePacketOperation";
private final BluetoothGatt mBluetoothGatt;
private final BluetoothGattCharacteristic mCharacteristic;
private final byte[] mMsg;
private final int mPacketInterval;
private final int mPacketSize;
private BleWriteCharacterisitcNoResponsePacketOperation(BluetoothGatt bluetoothGatt, BluetoothGattCharacteristic bluetoothGattCharacteristic, byte[] bArr, int i, int i2) {
this.mBluetoothGatt = bluetoothGatt;
this.mCharacteristic = bluetoothGattCharacteristic;
this.mMsg = bArr;
this.mPacketSize = i;
this.mPacketInterval = i2;
}
public static BleWriteCharacterisitcNoResponsePacketOperation createInstance(BluetoothGatt bluetoothGatt, BluetoothGattCharacteristic bluetoothGattCharacteristic, byte[] bArr, int i, int i2) {
return new BleWriteCharacterisitcNoResponsePacketOperation(bluetoothGatt, bluetoothGattCharacteristic, bArr, i, i2);
}
@Override // com.afunx.ble.blelitelib.operation.BleOperationAbs
protected void clearConcurrentOperation() {
}
@Override // com.afunx.ble.blelitelib.operation.BleOperation
public int getOperatcionCode() {
return 10;
}
@Override // com.afunx.ble.blelitelib.operation.BleOperation, java.lang.Runnable
public void run() {
this.mCharacteristic.setWriteType(1);
int i = this.mPacketSize;
int i2 = this.mPacketInterval;
int length = this.mMsg.length;
int i3 = 0;
while (i3 < length) {
int i4 = i3 + i;
int i5 = i4 <= length ? i : length - i3;
byte[] copyOfRange = Arrays.copyOfRange(this.mMsg, i3, i3 + i5);
this.mCharacteristic.setValue(copyOfRange);
this.mBluetoothGatt.writeCharacteristic(this.mCharacteristic);
BleLiteLog.i(TAG, "writeCharacteristic() " + HexUtils.bytes2HexStringWithSpace(copyOfRange, 0, i5));
if (i2 > 0) {
try {
Thread.sleep(i2);
} catch (InterruptedException unused) {
Thread.currentThread().interrupt();
return;
}
}
i3 = i4;
}
}
}

View File

@@ -0,0 +1,102 @@
package com.afunx.ble.blelitelib.operation;
import android.bluetooth.BluetoothGatt;
import android.bluetooth.BluetoothGattCharacteristic;
import com.afunx.ble.blelitelib.log.BleLiteLog;
import com.afunx.ble.blelitelib.utils.HexUtils;
import java.util.Arrays;
import java.util.concurrent.atomic.AtomicInteger;
/* loaded from: classes.dex */
public class BleWriteCharacterisitcNoResponsePacketOperation2 extends BleOperationAbs {
private static final int PACKET_SIZE = 20;
private static final String TAG = "BleWriteCharacterisitcNoResponsePacketOperation2";
private final BluetoothGatt mBluetoothGatt;
private final BluetoothGattCharacteristic mCharacteristic;
private final byte[] mMsg;
private static int[] PACKET_INTERVALS = {5, 5, 5, 35};
private static final AtomicInteger mAutoId = new AtomicInteger(0);
private static volatile long lastTimestamp = 0;
private BleWriteCharacterisitcNoResponsePacketOperation2(BluetoothGatt bluetoothGatt, BluetoothGattCharacteristic bluetoothGattCharacteristic, byte[] bArr) {
this.mBluetoothGatt = bluetoothGatt;
this.mCharacteristic = bluetoothGattCharacteristic;
this.mMsg = bArr;
}
public static BleWriteCharacterisitcNoResponsePacketOperation2 createInstance(BluetoothGatt bluetoothGatt, BluetoothGattCharacteristic bluetoothGattCharacteristic, byte[] bArr) {
return new BleWriteCharacterisitcNoResponsePacketOperation2(bluetoothGatt, bluetoothGattCharacteristic, bArr);
}
public static void setPacketIntervals(int[] iArr) {
PACKET_INTERVALS = iArr;
}
private static void sleep() {
int currentTimeMillis;
synchronized (BleWriteCharacterisitcNoResponsePacketOperation2.class) {
int andAdd = mAutoId.getAndAdd(1) % PACKET_INTERVALS.length;
if (lastTimestamp == 0) {
currentTimeMillis = 0;
} else {
currentTimeMillis = PACKET_INTERVALS[andAdd] - ((int) (System.currentTimeMillis() - lastTimestamp));
}
if (currentTimeMillis > 0) {
try {
BleWriteCharacterisitcNoResponsePacketOperation2.class.wait(currentTimeMillis);
} catch (InterruptedException unused) {
Thread.currentThread().interrupt();
}
}
}
}
private static synchronized void updateLastTimestamp() {
synchronized (BleWriteCharacterisitcNoResponsePacketOperation2.class) {
lastTimestamp = System.currentTimeMillis();
}
}
@Override // com.afunx.ble.blelitelib.operation.BleOperationAbs
protected void clearConcurrentOperation() {
}
@Override // com.afunx.ble.blelitelib.operation.BleOperation
public int getOperatcionCode() {
return 11;
}
@Override // com.afunx.ble.blelitelib.operation.BleOperation, java.lang.Runnable
public void run() {
int length = this.mMsg.length;
this.mCharacteristic.setWriteType(1);
int i = 0;
int i2 = 0;
while (i < length) {
sleep();
int i3 = i + 20 <= length ? 20 : length - i;
byte[] copyOfRange = Arrays.copyOfRange(this.mMsg, i, i + i3);
this.mCharacteristic.setValue(copyOfRange);
boolean writeCharacteristic = this.mBluetoothGatt.writeCharacteristic(this.mCharacteristic);
if (writeCharacteristic) {
i2 = 0;
} else {
i2++;
if (i2 > 3) {
BleLiteLog.e(TAG, "writeCharacteristic() fail");
return;
}
i -= i3;
try {
Thread.sleep(50L);
} catch (InterruptedException e) {
e.printStackTrace();
Thread.currentThread().interrupt();
}
}
BleLiteLog.i(TAG, "writeCharacteristic() " + HexUtils.bytes2HexStringWithSpace(copyOfRange, 0, i3) + ", isWriteSuc: " + writeCharacteristic);
updateLastTimestamp();
i += i3;
}
}
}

View File

@@ -0,0 +1,59 @@
package com.afunx.ble.blelitelib.operation;
import android.bluetooth.BluetoothGatt;
import android.bluetooth.BluetoothGattCharacteristic;
import android.util.Log;
import com.afunx.ble.blelitelib.log.BleLiteLog;
import com.afunx.ble.blelitelib.utils.HexUtils;
import java.util.Arrays;
/* loaded from: classes.dex */
public class BleWriteCharacteristicNoResponse20Operation extends BleOperationAbs {
private static final String TAG = "BleWriteCharacteristicNoResponse20Operation";
private static final int TWEENTY = 20;
private final BluetoothGatt mBluetoothGatt;
private final BluetoothGattCharacteristic mCharacteristic;
private final byte[] mMsg;
private BleWriteCharacteristicNoResponse20Operation(BluetoothGatt bluetoothGatt, BluetoothGattCharacteristic bluetoothGattCharacteristic, byte[] bArr) {
this.mBluetoothGatt = bluetoothGatt;
this.mCharacteristic = bluetoothGattCharacteristic;
this.mMsg = bArr;
Log.e("NoResponse20Operation", "msg: " + HexUtils.bytes2HexStringWithSpace(bArr));
}
public static BleWriteCharacteristicNoResponse20Operation createInstance(BluetoothGatt bluetoothGatt, BluetoothGattCharacteristic bluetoothGattCharacteristic, byte[] bArr) {
return new BleWriteCharacteristicNoResponse20Operation(bluetoothGatt, bluetoothGattCharacteristic, bArr);
}
@Override // com.afunx.ble.blelitelib.operation.BleOperationAbs
protected void clearConcurrentOperation() {
}
@Override // com.afunx.ble.blelitelib.operation.BleOperation
public int getOperatcionCode() {
return 9;
}
@Override // com.afunx.ble.blelitelib.operation.BleOperation, java.lang.Runnable
public void run() {
this.mCharacteristic.setWriteType(1);
int length = this.mMsg.length;
int i = 0;
while (i < length) {
int i2 = i + 20;
int i3 = i2 <= length ? 20 : length - i;
byte[] copyOfRange = Arrays.copyOfRange(this.mMsg, i, i + i3);
this.mCharacteristic.setValue(copyOfRange);
this.mBluetoothGatt.writeCharacteristic(this.mCharacteristic);
BleLiteLog.i(TAG, "writeCharacteristic() " + HexUtils.bytes2HexStringWithSpace(copyOfRange, 0, i3));
try {
Thread.sleep(2L);
} catch (InterruptedException e) {
e.printStackTrace();
Thread.currentThread().interrupt();
}
i = i2;
}
}
}

View File

@@ -0,0 +1,192 @@
package com.afunx.ble.blelitelib.operation;
import android.bluetooth.BluetoothGatt;
import android.bluetooth.BluetoothGattCharacteristic;
import com.afunx.ble.blelitelib.log.BleLiteLog;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
import java.util.concurrent.atomic.AtomicInteger;
/* loaded from: classes.dex */
public class BleWriteCharacteristicNoResponseInterruptOperation extends BleOperationAbs implements BleInterruptable {
private static final int PACKET_SIZE = 20;
private static final String TAG = "BleWriteCharacteristicNoResponseInterruptOperation";
private final BluetoothGatt mBluetoothGatt;
private final BluetoothGattCharacteristic mCharacteristic;
private final byte[] mMsg;
private static int[] PACKET_INTERVALS = {5, 5, 5, 35};
private static final AtomicInteger mAutoId = new AtomicInteger(0);
private static volatile long lastTimestamp = 0;
private static final Map<UUID, byte[][]> mBufferMap = new HashMap();
private BleWriteCharacteristicNoResponseInterruptOperation(BluetoothGatt bluetoothGatt, BluetoothGattCharacteristic bluetoothGattCharacteristic, byte[] bArr) {
this.mBluetoothGatt = bluetoothGatt;
this.mCharacteristic = bluetoothGattCharacteristic;
this.mMsg = bArr;
}
public static BleWriteCharacteristicNoResponseInterruptOperation createInstance(BluetoothGatt bluetoothGatt, BluetoothGattCharacteristic bluetoothGattCharacteristic, byte[] bArr) {
return new BleWriteCharacteristicNoResponseInterruptOperation(bluetoothGatt, bluetoothGattCharacteristic, bArr);
}
private static byte[][] getBuffer20(UUID uuid, int i) {
byte[][] bArr = mBufferMap.get(uuid);
if (bArr == null) {
bArr = new byte[i][];
int i2 = 0;
while (i2 < bArr.length) {
int i3 = i2 + 1;
bArr[i2] = new byte[i3];
i2 = i3;
}
mBufferMap.put(uuid, bArr);
}
return bArr;
}
private static byte[] getSendMessage(UUID uuid, int i, byte[] bArr, int i2, int i3) {
byte[][] buffer20 = getBuffer20(uuid, i);
int i4 = i3 - 1;
System.arraycopy(bArr, i2, buffer20[i4], 0, i3);
return buffer20[i4];
}
private static boolean sleep() {
synchronized (BleWriteCharacteristicNoResponseInterruptOperation.class) {
int currentTimeMillis = PACKET_INTERVALS[mAutoId.getAndAdd(1) % PACKET_INTERVALS.length] - ((int) (System.currentTimeMillis() - lastTimestamp));
if (currentTimeMillis <= 0) {
return Thread.interrupted();
}
try {
BleWriteCharacteristicNoResponseInterruptOperation.class.wait(currentTimeMillis);
return false;
} catch (InterruptedException unused) {
BleLiteLog.e(TAG, "sleep() is interrupted, return true");
Thread.currentThread().interrupt();
return true;
}
}
}
private static synchronized void updateLastTimestamp() {
synchronized (BleWriteCharacteristicNoResponseInterruptOperation.class) {
lastTimestamp = System.currentTimeMillis();
}
}
@Override // com.afunx.ble.blelitelib.operation.BleOperationAbs
protected void clearConcurrentOperation() {
}
@Override // com.afunx.ble.blelitelib.operation.BleOperation
public int getOperatcionCode() {
return 12;
}
/* JADX WARN: Code restructure failed: missing block: B:34:0x0019, code lost:
com.afunx.ble.blelitelib.operation.BleWriteCharacteristicNoResponseInterruptOperation.mAutoId.wait(50);
*/
@Override // com.afunx.ble.blelitelib.operation.BleOperation, java.lang.Runnable
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct code enable 'Show inconsistent code' option in preferences
*/
public void run() {
/*
r12 = this;
byte[] r0 = r12.mMsg
int r0 = r0.length
java.util.concurrent.atomic.AtomicInteger r1 = com.afunx.ble.blelitelib.operation.BleWriteCharacteristicNoResponseInterruptOperation.mAutoId
monitor-enter(r1)
android.bluetooth.BluetoothGattCharacteristic r2 = r12.mCharacteristic // Catch: java.lang.Throwable -> La4
r3 = 1
r2.setWriteType(r3) // Catch: java.lang.Throwable -> La4
r2 = 0
r4 = 0
r5 = 0
Lf:
if (r4 >= r0) goto La2
boolean r6 = sleep() // Catch: java.lang.Throwable -> La4
r7 = 50
if (r6 == 0) goto L2e
java.util.concurrent.atomic.AtomicInteger r0 = com.afunx.ble.blelitelib.operation.BleWriteCharacteristicNoResponseInterruptOperation.mAutoId // Catch: java.lang.InterruptedException -> L1f java.lang.Throwable -> La4
r0.wait(r7) // Catch: java.lang.InterruptedException -> L1f java.lang.Throwable -> La4
goto L2a
L1f:
r0 = move-exception
r0.printStackTrace() // Catch: java.lang.Throwable -> La4
java.lang.Thread r0 = java.lang.Thread.currentThread() // Catch: java.lang.Throwable -> La4
r0.interrupt() // Catch: java.lang.Throwable -> La4
L2a:
updateLastTimestamp() // Catch: java.lang.Throwable -> La4
goto La2
L2e:
int r6 = r4 + 20
r9 = 20
if (r6 > r0) goto L37
r6 = 20
goto L39
L37:
int r6 = r0 - r4
L39:
android.bluetooth.BluetoothGattCharacteristic r10 = r12.mCharacteristic // Catch: java.lang.Throwable -> La4
java.util.UUID r10 = r10.getUuid() // Catch: java.lang.Throwable -> La4
byte[] r11 = r12.mMsg // Catch: java.lang.Throwable -> La4
byte[] r9 = getSendMessage(r10, r9, r11, r4, r6) // Catch: java.lang.Throwable -> La4
android.bluetooth.BluetoothGattCharacteristic r10 = r12.mCharacteristic // Catch: java.lang.Throwable -> La4
r10.setValue(r9) // Catch: java.lang.Throwable -> La4
android.bluetooth.BluetoothGatt r10 = r12.mBluetoothGatt // Catch: java.lang.Throwable -> La4
android.bluetooth.BluetoothGattCharacteristic r11 = r12.mCharacteristic // Catch: java.lang.Throwable -> La4
boolean r10 = r10.writeCharacteristic(r11) // Catch: java.lang.Throwable -> La4
if (r10 == 0) goto L56
r5 = 0
goto L69
L56:
int r5 = r5 + r3
r11 = 3
if (r5 <= r11) goto L63
java.lang.String r0 = "BleWriteCharacteristicNoResponseInterruptOperation"
java.lang.String r2 = "writeCharacteristic() fail"
com.afunx.ble.blelitelib.log.BleLiteLog.e(r0, r2) // Catch: java.lang.Throwable -> La4
monitor-exit(r1) // Catch: java.lang.Throwable -> La4
return
L63:
int r4 = r4 - r6
java.util.concurrent.atomic.AtomicInteger r11 = com.afunx.ble.blelitelib.operation.BleWriteCharacteristicNoResponseInterruptOperation.mAutoId // Catch: java.lang.InterruptedException -> L91 java.lang.Throwable -> La4
r11.wait(r7) // Catch: java.lang.InterruptedException -> L91 java.lang.Throwable -> La4
L69:
java.lang.String r7 = "BleWriteCharacteristicNoResponseInterruptOperation"
java.lang.StringBuilder r8 = new java.lang.StringBuilder // Catch: java.lang.Throwable -> La4
r8.<init>() // Catch: java.lang.Throwable -> La4
java.lang.String r11 = "writeCharacteristic() "
r8.append(r11) // Catch: java.lang.Throwable -> La4
java.lang.String r9 = com.afunx.ble.blelitelib.utils.HexUtils.bytes2HexStringWithSpace(r9, r2, r6) // Catch: java.lang.Throwable -> La4
r8.append(r9) // Catch: java.lang.Throwable -> La4
java.lang.String r9 = ", isWriteSuc: "
r8.append(r9) // Catch: java.lang.Throwable -> La4
r8.append(r10) // Catch: java.lang.Throwable -> La4
java.lang.String r8 = r8.toString() // Catch: java.lang.Throwable -> La4
com.afunx.ble.blelitelib.log.BleLiteLog.i(r7, r8) // Catch: java.lang.Throwable -> La4
updateLastTimestamp() // Catch: java.lang.Throwable -> La4
int r4 = r4 + r6
goto Lf
L91:
java.lang.String r0 = "BleWriteCharacteristicNoResponseInterruptOperation"
java.lang.String r2 = "sleep() is interrupted, break"
com.afunx.ble.blelitelib.log.BleLiteLog.e(r0, r2) // Catch: java.lang.Throwable -> La4
updateLastTimestamp() // Catch: java.lang.Throwable -> La4
java.lang.Thread r0 = java.lang.Thread.currentThread() // Catch: java.lang.Throwable -> La4
r0.interrupt() // Catch: java.lang.Throwable -> La4
La2:
monitor-exit(r1) // Catch: java.lang.Throwable -> La4
return
La4:
r0 = move-exception
monitor-exit(r1) // Catch: java.lang.Throwable -> La4
throw r0
*/
throw new UnsupportedOperationException("Method not decompiled: com.afunx.ble.blelitelib.operation.BleWriteCharacteristicNoResponseInterruptOperation.run():void");
}
}

View File

@@ -0,0 +1,54 @@
package com.afunx.ble.blelitelib.operation;
import android.bluetooth.BluetoothGatt;
import android.bluetooth.BluetoothGattCharacteristic;
import com.afunx.ble.blelitelib.log.BleLiteLog;
/* loaded from: classes.dex */
public class BleWriteCharacteristicNoResponseOperation extends BleOperationAbs {
private static final String TAG = "BleWriteCharacteristicNoResponseOperation";
private final BluetoothGatt mBluetoothGatt;
private final BluetoothGattCharacteristic mCharacteristic;
private final byte[] mMsg;
private BleWriteCharacteristicNoResponseOperation(BluetoothGatt bluetoothGatt, BluetoothGattCharacteristic bluetoothGattCharacteristic, byte[] bArr) {
this.mBluetoothGatt = bluetoothGatt;
this.mCharacteristic = bluetoothGattCharacteristic;
this.mMsg = bArr;
}
public static BleWriteCharacteristicNoResponseOperation createInstance(BluetoothGatt bluetoothGatt, BluetoothGattCharacteristic bluetoothGattCharacteristic, byte[] bArr) {
return new BleWriteCharacteristicNoResponseOperation(bluetoothGatt, bluetoothGattCharacteristic, bArr);
}
@Override // com.afunx.ble.blelitelib.operation.BleOperationAbs
protected void clearConcurrentOperation() {
}
@Override // com.afunx.ble.blelitelib.operation.BleOperation
public int getOperatcionCode() {
return 8;
}
@Override // com.afunx.ble.blelitelib.operation.BleOperation, java.lang.Runnable
public void run() {
this.mCharacteristic.setValue(this.mMsg);
this.mCharacteristic.setWriteType(1);
boolean z = false;
for (int i = 0; !z && i < 3; i++) {
if (i > 0) {
try {
Thread.sleep(50L);
} catch (InterruptedException e) {
e.printStackTrace();
Thread.currentThread().interrupt();
}
}
z = this.mBluetoothGatt.writeCharacteristic(this.mCharacteristic);
}
if (z) {
return;
}
BleLiteLog.e(TAG, "writeCharacteristic() fail");
}
}

View File

@@ -0,0 +1,36 @@
package com.afunx.ble.blelitelib.operation;
import android.bluetooth.BluetoothGatt;
import android.bluetooth.BluetoothGattCharacteristic;
/* loaded from: classes.dex */
public class BleWriteCharacteristicOperation extends BleOperationAbs {
private final BluetoothGatt mBluetoothGatt;
private final BluetoothGattCharacteristic mCharacteristic;
private final byte[] mMsg;
private BleWriteCharacteristicOperation(BluetoothGatt bluetoothGatt, BluetoothGattCharacteristic bluetoothGattCharacteristic, byte[] bArr) {
this.mBluetoothGatt = bluetoothGatt;
this.mCharacteristic = bluetoothGattCharacteristic;
this.mMsg = bArr;
}
public static BleWriteCharacteristicOperation createInstance(BluetoothGatt bluetoothGatt, BluetoothGattCharacteristic bluetoothGattCharacteristic, byte[] bArr) {
return new BleWriteCharacteristicOperation(bluetoothGatt, bluetoothGattCharacteristic, bArr);
}
@Override // com.afunx.ble.blelitelib.operation.BleOperationAbs
protected void clearConcurrentOperation() {
}
@Override // com.afunx.ble.blelitelib.operation.BleOperation
public int getOperatcionCode() {
return 6;
}
@Override // com.afunx.ble.blelitelib.operation.BleOperation, java.lang.Runnable
public void run() {
this.mCharacteristic.setValue(this.mMsg);
this.mBluetoothGatt.writeCharacteristic(this.mCharacteristic);
}
}

View File

@@ -0,0 +1,36 @@
package com.afunx.ble.blelitelib.operation;
import android.bluetooth.BluetoothGatt;
import android.bluetooth.BluetoothGattDescriptor;
/* loaded from: classes.dex */
public class BleWriteDescriptorOperation extends BleOperationAbs {
private final BluetoothGatt mBluetoothGatt;
private final BluetoothGattDescriptor mDescriptor;
private final byte[] mMsg;
private BleWriteDescriptorOperation(BluetoothGatt bluetoothGatt, BluetoothGattDescriptor bluetoothGattDescriptor, byte[] bArr) {
this.mBluetoothGatt = bluetoothGatt;
this.mDescriptor = bluetoothGattDescriptor;
this.mMsg = bArr;
}
public static BleWriteDescriptorOperation createInstance(BluetoothGatt bluetoothGatt, BluetoothGattDescriptor bluetoothGattDescriptor, byte[] bArr) {
return new BleWriteDescriptorOperation(bluetoothGatt, bluetoothGattDescriptor, bArr);
}
@Override // com.afunx.ble.blelitelib.operation.BleOperationAbs
protected void clearConcurrentOperation() {
}
@Override // com.afunx.ble.blelitelib.operation.BleOperation
public int getOperatcionCode() {
return 7;
}
@Override // com.afunx.ble.blelitelib.operation.BleOperation, java.lang.Runnable
public void run() {
this.mDescriptor.setValue(this.mMsg);
this.mBluetoothGatt.writeDescriptor(this.mDescriptor);
}
}

View File

@@ -0,0 +1,48 @@
package com.afunx.ble.blelitelib.proxy;
import android.annotation.TargetApi;
import android.bluetooth.BluetoothGattCharacteristic;
import android.bluetooth.BluetoothGattService;
import java.util.List;
import java.util.UUID;
/* loaded from: classes.dex */
public interface BleGattClientProxy {
public interface OnCharacteristicNotificationListener {
void onCharacteristicNotification(byte[] bArr);
}
void close();
boolean connect(String str, long j);
BluetoothGattCharacteristic discoverCharacteristic(BluetoothGattService bluetoothGattService, UUID uuid);
BluetoothGattService discoverService(UUID uuid, long j);
List<BluetoothGattService> discoverServices(long j);
byte[] readCharacteristic(BluetoothGattCharacteristic bluetoothGattCharacteristic, long j);
boolean registerCharacteristicNotification(BluetoothGattCharacteristic bluetoothGattCharacteristic, OnCharacteristicNotificationListener onCharacteristicNotificationListener);
@TargetApi(21)
boolean requestMtu(int i, long j);
void setDisconnectCallback(Runnable runnable, long j);
void unregisterCharacteristicNotification(UUID uuid);
boolean writeCharacterisitcNoResponse2(BluetoothGattCharacteristic bluetoothGattCharacteristic, byte[] bArr);
boolean writeCharacteristic(BluetoothGattCharacteristic bluetoothGattCharacteristic, byte[] bArr, long j);
boolean writeCharacteristicNoResponse(BluetoothGattCharacteristic bluetoothGattCharacteristic, byte[] bArr, long j);
boolean writeCharacteristicNoResponse20(BluetoothGattCharacteristic bluetoothGattCharacteristic, byte[] bArr);
boolean writeCharacteristicNoResponsePacket(BluetoothGattCharacteristic bluetoothGattCharacteristic, byte[] bArr, int i, int i2);
boolean writeCharacteristicNoResponsePreemptible(BluetoothGattCharacteristic bluetoothGattCharacteristic, byte[] bArr);
}

View File

@@ -0,0 +1,613 @@
package com.afunx.ble.blelitelib.proxy;
import android.bluetooth.BluetoothGatt;
import android.bluetooth.BluetoothGattCallback;
import android.bluetooth.BluetoothGattCharacteristic;
import android.bluetooth.BluetoothGattDescriptor;
import android.bluetooth.BluetoothGattService;
import android.content.Context;
import android.os.Build;
import android.util.Log;
import android.util.LongSparseArray;
import com.afunx.ble.blelitelib.connector.BleConnector;
import com.afunx.ble.blelitelib.log.BleLiteLog;
import com.afunx.ble.blelitelib.operation.BleCloseOperation;
import com.afunx.ble.blelitelib.operation.BleConnectOperation;
import com.afunx.ble.blelitelib.operation.BleDiscoverServiceOperation;
import com.afunx.ble.blelitelib.operation.BleOperation;
import com.afunx.ble.blelitelib.operation.BleReadCharacteristicOperation;
import com.afunx.ble.blelitelib.operation.BleRequestMtuOperation;
import com.afunx.ble.blelitelib.operation.BleWriteCharacterisitcNoResponsePacketOperation;
import com.afunx.ble.blelitelib.operation.BleWriteCharacterisitcNoResponsePacketOperation2;
import com.afunx.ble.blelitelib.operation.BleWriteCharacteristicNoResponse20Operation;
import com.afunx.ble.blelitelib.operation.BleWriteCharacteristicNoResponseInterruptOperation;
import com.afunx.ble.blelitelib.operation.BleWriteCharacteristicNoResponseOperation;
import com.afunx.ble.blelitelib.operation.BleWriteCharacteristicOperation;
import com.afunx.ble.blelitelib.operation.BleWriteDescriptorOperation;
import com.afunx.ble.blelitelib.proxy.BleGattClientProxy;
import com.afunx.ble.blelitelib.proxy.scheme.BleGattReconnectScheme;
import com.afunx.ble.blelitelib.proxy.scheme.BleGattReconnectSchemeDefaultImpl;
import com.afunx.ble.blelitelib.threadpool.BleThreadpool;
import com.afunx.ble.blelitelib.utils.BleGattStateParser;
import com.afunx.ble.blelitelib.utils.BleGattStatusParser;
import com.afunx.ble.blelitelib.utils.BleUuidUtils;
import com.afunx.ble.blelitelib.utils.HexUtils;
import java.util.List;
import java.util.UUID;
/* loaded from: classes.dex */
public class BleGattClientProxyImpl implements BleGattClientProxy {
private static final String TAG = "BleGattClientProxyImpl";
private static final String UUID_CLIENT_CHARACTERISTIC_CONFIG_DESCRIPTOR = "00002902-0000-1000-8000-00805f9b34fb";
private static final String VERSION = "v0.9.5";
private final Context mAppContext;
private BleConnector mBleConnector;
private volatile boolean mIsClosed = false;
private final LongSparseArray<BleOperation> mOperations = new LongSparseArray<>();
private final LongSparseArray<BleGattClientProxy.OnCharacteristicNotificationListener> mListeners = new LongSparseArray<>();
private final BleGattReconnectScheme mReconnectScheme = new BleGattReconnectSchemeDefaultImpl();
private final Object mLock4Connect = new Object();
private final Object mLock4Close = new Object();
private BluetoothGattCallback mBluetoothGattCallback = new BluetoothGattCallback() { // from class: com.afunx.ble.blelitelib.proxy.BleGattClientProxyImpl.1
@Override // android.bluetooth.BluetoothGattCallback
public void onCharacteristicChanged(BluetoothGatt bluetoothGatt, BluetoothGattCharacteristic bluetoothGattCharacteristic) {
UUID uuid = bluetoothGattCharacteristic.getUuid();
byte[] value = bluetoothGattCharacteristic.getValue();
BleLiteLog.i(BleGattClientProxyImpl.TAG, "onCharacteristicChanged() characteristic uuid: " + uuid + " msg: " + HexUtils.bytes2HexStringWithSpace(value));
BleGattClientProxy.OnCharacteristicNotificationListener listener = BleGattClientProxyImpl.this.getListener(uuid);
if (listener != null) {
listener.onCharacteristicNotification(value);
}
}
@Override // android.bluetooth.BluetoothGattCallback
public void onCharacteristicRead(BluetoothGatt bluetoothGatt, BluetoothGattCharacteristic bluetoothGattCharacteristic, int i) {
BleLiteLog.i(BleGattClientProxyImpl.TAG, "onCharacteristicRead() characteristic uuid: " + bluetoothGattCharacteristic.getUuid() + ", status: " + BleGattStatusParser.parse(i));
BleReadCharacteristicOperation readCharacteristicOperation = BleGattClientProxyImpl.this.getReadCharacteristicOperation();
if (i != 0 || readCharacteristicOperation == null) {
return;
}
readCharacteristicOperation.setResult(bluetoothGattCharacteristic.getValue());
readCharacteristicOperation.notifyLock();
}
@Override // android.bluetooth.BluetoothGattCallback
public void onCharacteristicWrite(BluetoothGatt bluetoothGatt, BluetoothGattCharacteristic bluetoothGattCharacteristic, int i) {
BleLiteLog.i(BleGattClientProxyImpl.TAG, "onCharacteristicWrite() characteristic uuid: " + bluetoothGattCharacteristic.getUuid() + ", status: " + BleGattStatusParser.parse(i));
BleWriteCharacteristicOperation writeCharacteristicOperation = BleGattClientProxyImpl.this.getWriteCharacteristicOperation();
if (i != 0 || writeCharacteristicOperation == null) {
return;
}
writeCharacteristicOperation.notifyLock();
}
@Override // android.bluetooth.BluetoothGattCallback
public void onConnectionStateChange(BluetoothGatt bluetoothGatt, int i, int i2) {
BleLiteLog.i(BleGattClientProxyImpl.TAG, "onConnectionStateChange() status: " + BleGattStatusParser.parse(i) + ", newState: " + BleGattStateParser.parse(i2));
BleConnectOperation connectOperation = BleGattClientProxyImpl.this.getConnectOperation();
if (i2 != 0) {
if (i2 == 1 || i2 != 2) {
return;
}
BleGattClientProxyImpl.this.mReconnectScheme.clearRetryCount();
if (connectOperation != null) {
connectOperation.notifyLock();
return;
}
return;
}
synchronized (BleGattClientProxyImpl.this.mLock4Close) {
if (!BleGattClientProxyImpl.this.mIsClosed) {
if (!BleGattClientProxyImpl.this.mReconnectScheme.tryAgain()) {
BleLiteLog.w(BleGattClientProxyImpl.TAG, "onConnectionStateChange() stop reconnect");
return;
}
if (i == 8) {
BleGattClientProxyImpl.this.mReconnectScheme.callDisconnectCallbackInstantly();
BleGattClientProxyImpl.this.__close();
} else {
final long sleepTimestamp = BleGattClientProxyImpl.this.mReconnectScheme.getSleepTimestamp(BleGattClientProxyImpl.this.mReconnectScheme.addAndGetRetryCount());
BleThreadpool.getInstance().submit(new Runnable() { // from class: com.afunx.ble.blelitelib.proxy.BleGattClientProxyImpl.1.1
@Override // java.lang.Runnable
public void run() {
try {
Thread.sleep(sleepTimestamp);
} catch (InterruptedException unused) {
Thread.currentThread().interrupt();
}
BleConnectOperation connectOperation2 = BleGattClientProxyImpl.this.getConnectOperation();
if (connectOperation2 == null) {
BleLiteLog.i(BleGattClientProxyImpl.TAG, "onConnectionStateChange() connectOperation is null");
} else {
BleLiteLog.i(BleGattClientProxyImpl.TAG, "onConnectionStateChange() reconnect...");
connectOperation2.doRunnableSelfAsync(true);
}
}
});
}
}
}
}
@Override // android.bluetooth.BluetoothGattCallback
public void onDescriptorWrite(BluetoothGatt bluetoothGatt, BluetoothGattDescriptor bluetoothGattDescriptor, int i) {
BleLiteLog.i(BleGattClientProxyImpl.TAG, "onDescriptorWrite() characteristic uuid: " + bluetoothGattDescriptor.getUuid());
BleWriteDescriptorOperation writeDescriptorOperation = BleGattClientProxyImpl.this.getWriteDescriptorOperation();
if (i != 0 || writeDescriptorOperation == null) {
return;
}
writeDescriptorOperation.notifyLock();
}
@Override // android.bluetooth.BluetoothGattCallback
public void onMtuChanged(BluetoothGatt bluetoothGatt, int i, int i2) {
BleLiteLog.i(BleGattClientProxyImpl.TAG, "onMtuChanged() mtu: " + i + ", status: " + BleGattStatusParser.parse(i2));
BleRequestMtuOperation requestMtuOperation = BleGattClientProxyImpl.this.getRequestMtuOperation();
if (i2 != 0 || requestMtuOperation == null) {
return;
}
requestMtuOperation.notifyLock();
}
@Override // android.bluetooth.BluetoothGattCallback
public void onServicesDiscovered(BluetoothGatt bluetoothGatt, int i) {
BleLiteLog.i(BleGattClientProxyImpl.TAG, "onServicesDiscovered() status: " + BleGattStatusParser.parse(i));
BleDiscoverServiceOperation discoverServiceOperation = BleGattClientProxyImpl.this.getDiscoverServiceOperation();
if (i != 0 || discoverServiceOperation == null) {
return;
}
discoverServiceOperation.notifyLock();
}
};
public BleGattClientProxyImpl(Context context) {
Log.i(TAG, "blelitelib version: v0.9.5");
this.mAppContext = context.getApplicationContext();
}
/* JADX INFO: Access modifiers changed from: private */
public void __close() {
if (this.mIsClosed) {
BleLiteLog.i(TAG, "__close() it is closed already");
return;
}
this.mIsClosed = true;
BleLiteLog.i(TAG, "__close() closing");
unregister(1L);
unregister(3L);
unregister(5L);
unregister(4L);
unregister(6L);
BluetoothGatt bluetoothGatt = getBluetoothGatt();
if (bluetoothGatt == null) {
BleLiteLog.i(TAG, "__close() bluetoothGatt is null");
}
BleCloseOperation.createInstance(bluetoothGatt).run();
BleLiteLog.i(TAG, "__close() closed");
}
private boolean __connect(String str, long j) {
synchronized (this.mLock4Close) {
this.mIsClosed = false;
}
this.mReconnectScheme.clearRetryCount();
Context context = this.mAppContext;
BleConnectOperation connectOperation = getConnectOperation();
if (connectOperation == null) {
connectOperation = BleConnectOperation.createInstance(context, str, this.mBluetoothGattCallback);
register(connectOperation);
} else {
BleLiteLog.w(TAG, "__connect() close old connection, it should't appear frequently.");
__close();
}
long currentTimeMillis = System.currentTimeMillis();
connectOperation.doRunnableSelfAsync(true);
connectOperation.waitLock(j);
long currentTimeMillis2 = System.currentTimeMillis() - currentTimeMillis;
setBleConnector(connectOperation.getConnector());
boolean isNotified = connectOperation.isNotified();
BleLiteLog.i(TAG, "__connect() suc: " + isNotified + ", consume: " + currentTimeMillis2 + " ms");
if (!isNotified) {
close();
}
return isNotified;
}
private BluetoothGattCharacteristic __discoverCharacteristic(BluetoothGattService bluetoothGattService, UUID uuid) {
BluetoothGattCharacteristic characteristic = bluetoothGattService.getCharacteristic(uuid);
StringBuilder sb = new StringBuilder();
sb.append("__discoverCharacteristic() gattService uuid: ");
sb.append(bluetoothGattService.getUuid());
sb.append(", characteristic uuid: ");
sb.append(uuid);
sb.append(", gattCharacteristic is ");
sb.append(characteristic != null ? "found" : "missed");
BleLiteLog.i(TAG, sb.toString());
return characteristic;
}
private boolean __discoverService(BluetoothGatt bluetoothGatt, long j) {
if (bluetoothGatt == null) {
BleLiteLog.w(TAG, "__discoverService() fail for bluetoothGatt is null");
return false;
}
BleDiscoverServiceOperation createInstance = BleDiscoverServiceOperation.createInstance(bluetoothGatt);
register(createInstance);
long currentTimeMillis = System.currentTimeMillis();
createInstance.doRunnableSelfAsync(true);
createInstance.waitLock(j);
long currentTimeMillis2 = System.currentTimeMillis() - currentTimeMillis;
boolean isNotified = createInstance.isNotified();
BleLiteLog.i(TAG, "__discoverService() discover services suc: " + isNotified + ", consume: " + currentTimeMillis2 + " ms");
return isNotified;
}
private List<BluetoothGattService> __discoverServices(long j) {
BluetoothGatt bluetoothGatt = getBluetoothGatt();
if (bluetoothGatt == null) {
BleLiteLog.w(TAG, "__discoverServices() fail for bluetoothGatt is null");
return null;
}
if (__discoverService(bluetoothGatt, j)) {
return bluetoothGatt.getServices();
}
return null;
}
private byte[] __readCharacteristic(BluetoothGattCharacteristic bluetoothGattCharacteristic, long j) {
BluetoothGatt bluetoothGatt = getBluetoothGatt();
if (bluetoothGatt == null) {
BleLiteLog.w(TAG, "__readCharacteristic() fail for bluetoothGatt is null");
return null;
}
BleReadCharacteristicOperation createInstance = BleReadCharacteristicOperation.createInstance(bluetoothGatt, bluetoothGattCharacteristic);
register(createInstance);
long currentTimeMillis = System.currentTimeMillis();
createInstance.doRunnableSelfAsync(false);
createInstance.waitLock(j);
long currentTimeMillis2 = System.currentTimeMillis() - currentTimeMillis;
byte[] result = createInstance.isNotified() ? createInstance.getResult() : null;
BleLiteLog.i(TAG, "__readCharacteristic() gattCharacteristic's uuid: " + bluetoothGattCharacteristic.getUuid() + ", consume: " + currentTimeMillis2 + " ms, msg: " + HexUtils.bytes2HexStringWithSpace(result));
return result;
}
private boolean __registerCharacteristicNotification(BluetoothGattCharacteristic bluetoothGattCharacteristic, BleGattClientProxy.OnCharacteristicNotificationListener onCharacteristicNotificationListener) {
BluetoothGatt bluetoothGatt = getBluetoothGatt();
if (bluetoothGatt == null) {
BleLiteLog.w(TAG, "__registerCharacteristicNotification() fail for bluetoothGatt is null");
return false;
}
if (bluetoothGattCharacteristic == null) {
BleLiteLog.e(TAG, "__registerCharacteristicNotification() fail for characteristic is null");
return false;
}
boolean characteristicNotification = bluetoothGatt.setCharacteristicNotification(bluetoothGattCharacteristic, true);
if (characteristicNotification) {
registerListener(bluetoothGattCharacteristic.getUuid(), onCharacteristicNotificationListener);
}
BleLiteLog.i(TAG, "__registerCharacteristicNotification() characteristic's uuid: " + bluetoothGattCharacteristic.getUuid() + ", register suc: " + characteristicNotification);
BluetoothGattDescriptor descriptor = bluetoothGattCharacteristic.getDescriptor(BleUuidUtils.str2uuid(UUID_CLIENT_CHARACTERISTIC_CONFIG_DESCRIPTOR));
return descriptor != null ? __writeDescriptor(descriptor, BluetoothGattDescriptor.ENABLE_NOTIFICATION_VALUE, 2000L) : characteristicNotification;
}
private boolean __requestMtu(int i, long j) {
if (Build.VERSION.SDK_INT < 21) {
BleLiteLog.w(TAG, "__requestMtu() fail for android version is to low(lower than 5.0 LOLLIPOP)");
return false;
}
BluetoothGatt bluetoothGatt = getBluetoothGatt();
if (bluetoothGatt == null) {
BleLiteLog.w(TAG, "__requestMtu() fail for bluetoothGatt is null");
return false;
}
BleRequestMtuOperation createInstance = BleRequestMtuOperation.createInstance(bluetoothGatt, i);
register(createInstance);
long currentTimeMillis = System.currentTimeMillis();
createInstance.doRunnableSelfAsync(false);
createInstance.waitLock(j);
long currentTimeMillis2 = System.currentTimeMillis() - currentTimeMillis;
boolean isNotified = createInstance.isNotified();
BleLiteLog.i(TAG, "__requestMtu() mtu: " + i + " suc: " + isNotified + ", consume: " + currentTimeMillis2 + " ms");
return isNotified;
}
private void __unregisterCharacteristicNotification(UUID uuid) {
unregisterListener(uuid);
}
private boolean __writeCharacterisitcNoResponsePacket2(BluetoothGattCharacteristic bluetoothGattCharacteristic, byte[] bArr) {
BluetoothGatt bluetoothGatt = getBluetoothGatt();
if (bluetoothGatt == null) {
BleLiteLog.w(TAG, "__writeCharacterisitcNoResponsePacket2() fail for bluetoothGatt is null");
return false;
}
BleWriteCharacterisitcNoResponsePacketOperation2.createInstance(bluetoothGatt, bluetoothGattCharacteristic, bArr).doRunnableSelfAsync(false);
return true;
}
private boolean __writeCharacteristic(BluetoothGattCharacteristic bluetoothGattCharacteristic, byte[] bArr, long j) {
BluetoothGatt bluetoothGatt = getBluetoothGatt();
if (bluetoothGatt == null) {
BleLiteLog.w(TAG, "__writeCharacteristic() fail for bluetoothGatt is null");
return false;
}
BleWriteCharacteristicOperation createInstance = BleWriteCharacteristicOperation.createInstance(bluetoothGatt, bluetoothGattCharacteristic, bArr);
register(createInstance);
long currentTimeMillis = System.currentTimeMillis();
createInstance.doRunnableSelfAsync(false);
createInstance.waitLock(j);
long currentTimeMillis2 = System.currentTimeMillis() - currentTimeMillis;
boolean isNotified = createInstance.isNotified();
BleLiteLog.i(TAG, "__writeCharacteristic() msg: " + HexUtils.bytes2HexStringWithSpace(bArr) + " suc: " + isNotified + ", consume: " + currentTimeMillis2 + " ms");
return isNotified;
}
private boolean __writeCharacteristicNoResponse(BluetoothGattCharacteristic bluetoothGattCharacteristic, byte[] bArr, long j) {
BluetoothGatt bluetoothGatt = getBluetoothGatt();
if (bluetoothGatt == null) {
BleLiteLog.w(TAG, "__writeCharacteristicNoResponse() fail for bluetoothGatt is null");
return false;
}
BleWriteCharacteristicNoResponseOperation.createInstance(bluetoothGatt, bluetoothGattCharacteristic, bArr).doRunnableSelfAsync(false);
if (j > 0) {
try {
Thread.sleep(j);
} catch (InterruptedException unused) {
Thread.currentThread().interrupt();
return false;
}
}
BleLiteLog.i(TAG, "__writeCharacteristicNoResponse() msg: " + HexUtils.bytes2HexStringWithSpace(bArr) + " suc: true, interval: " + j + " ms");
return true;
}
private boolean __writeCharacteristicNoResponse20(BluetoothGattCharacteristic bluetoothGattCharacteristic, byte[] bArr) {
BluetoothGatt bluetoothGatt = getBluetoothGatt();
if (bluetoothGatt == null) {
BleLiteLog.w(TAG, "__writeCharacteristicNoResponse20() fail for bluetoothGatt is null");
return false;
}
BleWriteCharacteristicNoResponse20Operation.createInstance(bluetoothGatt, bluetoothGattCharacteristic, bArr).doRunnableSelfAsync(false);
return true;
}
private boolean __writeCharacteristicNoResponsePacket(BluetoothGattCharacteristic bluetoothGattCharacteristic, byte[] bArr, int i, int i2) {
BluetoothGatt bluetoothGatt = getBluetoothGatt();
if (bluetoothGatt == null) {
BleLiteLog.w(TAG, "__writeCharacteristicNoResponsePacket() fail for bluetoothGatt is null");
return false;
}
BleWriteCharacterisitcNoResponsePacketOperation.createInstance(bluetoothGatt, bluetoothGattCharacteristic, bArr, i, i2).doRunnableSelfAsync(false);
return true;
}
private boolean __writeCharacteristicNoResponsePreemptible(BluetoothGattCharacteristic bluetoothGattCharacteristic, byte[] bArr) {
BluetoothGatt bluetoothGatt = getBluetoothGatt();
if (bluetoothGatt == null) {
BleLiteLog.w(TAG, "__writeCharacteristicNoResponsePreemptible() fail for bluetoothGatt is null");
return false;
}
BleWriteCharacteristicNoResponseInterruptOperation createInstance = BleWriteCharacteristicNoResponseInterruptOperation.createInstance(bluetoothGatt, bluetoothGattCharacteristic, bArr);
createInstance.doRunnableSelfAsyncInterruptable(createInstance.getOperatcionCode());
return true;
}
private boolean __writeDescriptor(BluetoothGattDescriptor bluetoothGattDescriptor, byte[] bArr, long j) {
BluetoothGatt bluetoothGatt = getBluetoothGatt();
if (bluetoothGatt == null) {
BleLiteLog.w(TAG, "__writeDescriptor() fail for bluetoothGatt is null");
return false;
}
BleWriteDescriptorOperation createInstance = BleWriteDescriptorOperation.createInstance(bluetoothGatt, bluetoothGattDescriptor, bArr);
register(createInstance);
long currentTimeMillis = System.currentTimeMillis();
createInstance.doRunnableSelfAsync(false);
createInstance.waitLock(j);
long currentTimeMillis2 = System.currentTimeMillis() - currentTimeMillis;
boolean isNotified = createInstance.isNotified();
BleLiteLog.i(TAG, "__writeDescriptor() msg: " + HexUtils.bytes2HexStringWithSpace(bArr) + " suc: " + isNotified + ", consume: " + currentTimeMillis2 + " ms");
return isNotified;
}
private BluetoothGatt getBluetoothGatt() {
BleConnector bleConnector = this.mBleConnector;
if (bleConnector != null) {
return bleConnector.getBluetoothGatt();
}
return null;
}
/* JADX INFO: Access modifiers changed from: private */
public BleConnectOperation getConnectOperation() {
BleOperation bleOperation = this.mOperations.get(1L);
if (bleOperation != null) {
return (BleConnectOperation) bleOperation;
}
return null;
}
/* JADX INFO: Access modifiers changed from: private */
public BleDiscoverServiceOperation getDiscoverServiceOperation() {
BleOperation bleOperation = this.mOperations.get(3L);
if (bleOperation != null) {
return (BleDiscoverServiceOperation) bleOperation;
}
return null;
}
/* JADX INFO: Access modifiers changed from: private */
public BleGattClientProxy.OnCharacteristicNotificationListener getListener(UUID uuid) {
return this.mListeners.get(BleUuidUtils.uuid2int(uuid));
}
/* JADX INFO: Access modifiers changed from: private */
public BleReadCharacteristicOperation getReadCharacteristicOperation() {
BleOperation bleOperation = this.mOperations.get(4L);
if (bleOperation != null) {
return (BleReadCharacteristicOperation) bleOperation;
}
return null;
}
/* JADX INFO: Access modifiers changed from: private */
public BleRequestMtuOperation getRequestMtuOperation() {
BleOperation bleOperation = this.mOperations.get(5L);
if (bleOperation != null) {
return (BleRequestMtuOperation) bleOperation;
}
return null;
}
/* JADX INFO: Access modifiers changed from: private */
public BleWriteCharacteristicOperation getWriteCharacteristicOperation() {
BleOperation bleOperation = this.mOperations.get(6L);
if (bleOperation != null) {
return (BleWriteCharacteristicOperation) bleOperation;
}
return null;
}
/* JADX INFO: Access modifiers changed from: private */
public BleWriteDescriptorOperation getWriteDescriptorOperation() {
BleOperation bleOperation = this.mOperations.get(7L);
if (bleOperation != null) {
return (BleWriteDescriptorOperation) bleOperation;
}
return null;
}
private void register(BleOperation bleOperation) {
BleLiteLog.d(TAG, "register() operation: " + bleOperation);
this.mOperations.put((long) bleOperation.getOperatcionCode(), bleOperation);
}
private void registerListener(UUID uuid, BleGattClientProxy.OnCharacteristicNotificationListener onCharacteristicNotificationListener) {
long uuid2int = BleUuidUtils.uuid2int(uuid);
BleLiteLog.d(TAG, "registerListener() uuid: " + uuid + ", key: " + uuid2int);
this.mListeners.put(uuid2int, onCharacteristicNotificationListener);
}
private void setBleConnector(BleConnector bleConnector) {
this.mBleConnector = bleConnector;
}
private void unregister(long j) {
BleLiteLog.d(TAG, "unregister() operationCode: " + j);
this.mOperations.remove(j);
}
private void unregisterListener(UUID uuid) {
long uuid2int = BleUuidUtils.uuid2int(uuid);
BleLiteLog.d(TAG, "unregisterListener() uuid: " + uuid + ", key: " + uuid2int);
this.mListeners.remove(uuid2int);
}
@Override // com.afunx.ble.blelitelib.proxy.BleGattClientProxy
public void close() {
synchronized (this.mLock4Close) {
__close();
}
}
@Override // com.afunx.ble.blelitelib.proxy.BleGattClientProxy
public boolean connect(String str, long j) {
boolean __connect;
synchronized (this.mLock4Connect) {
__connect = __connect(str, j);
}
return __connect;
}
@Override // com.afunx.ble.blelitelib.proxy.BleGattClientProxy
public BluetoothGattCharacteristic discoverCharacteristic(BluetoothGattService bluetoothGattService, UUID uuid) {
return __discoverCharacteristic(bluetoothGattService, uuid);
}
@Override // com.afunx.ble.blelitelib.proxy.BleGattClientProxy
public BluetoothGattService discoverService(UUID uuid, long j) {
return __discoverService(uuid, j);
}
@Override // com.afunx.ble.blelitelib.proxy.BleGattClientProxy
public List<BluetoothGattService> discoverServices(long j) {
return __discoverServices(j);
}
@Override // com.afunx.ble.blelitelib.proxy.BleGattClientProxy
public byte[] readCharacteristic(BluetoothGattCharacteristic bluetoothGattCharacteristic, long j) {
return __readCharacteristic(bluetoothGattCharacteristic, j);
}
@Override // com.afunx.ble.blelitelib.proxy.BleGattClientProxy
public boolean registerCharacteristicNotification(BluetoothGattCharacteristic bluetoothGattCharacteristic, BleGattClientProxy.OnCharacteristicNotificationListener onCharacteristicNotificationListener) {
return __registerCharacteristicNotification(bluetoothGattCharacteristic, onCharacteristicNotificationListener);
}
@Override // com.afunx.ble.blelitelib.proxy.BleGattClientProxy
public boolean requestMtu(int i, long j) {
return __requestMtu(i, j);
}
@Override // com.afunx.ble.blelitelib.proxy.BleGattClientProxy
public void setDisconnectCallback(Runnable runnable, long j) {
this.mReconnectScheme.setDisconnectCallback(runnable, j);
}
@Override // com.afunx.ble.blelitelib.proxy.BleGattClientProxy
public void unregisterCharacteristicNotification(UUID uuid) {
__unregisterCharacteristicNotification(uuid);
}
@Override // com.afunx.ble.blelitelib.proxy.BleGattClientProxy
public boolean writeCharacterisitcNoResponse2(BluetoothGattCharacteristic bluetoothGattCharacteristic, byte[] bArr) {
return __writeCharacterisitcNoResponsePacket2(bluetoothGattCharacteristic, bArr);
}
@Override // com.afunx.ble.blelitelib.proxy.BleGattClientProxy
public boolean writeCharacteristic(BluetoothGattCharacteristic bluetoothGattCharacteristic, byte[] bArr, long j) {
return __writeCharacteristic(bluetoothGattCharacteristic, bArr, j);
}
@Override // com.afunx.ble.blelitelib.proxy.BleGattClientProxy
public boolean writeCharacteristicNoResponse(BluetoothGattCharacteristic bluetoothGattCharacteristic, byte[] bArr, long j) {
return __writeCharacteristicNoResponse(bluetoothGattCharacteristic, bArr, j);
}
@Override // com.afunx.ble.blelitelib.proxy.BleGattClientProxy
public boolean writeCharacteristicNoResponse20(BluetoothGattCharacteristic bluetoothGattCharacteristic, byte[] bArr) {
return __writeCharacteristicNoResponse20(bluetoothGattCharacteristic, bArr);
}
@Override // com.afunx.ble.blelitelib.proxy.BleGattClientProxy
public boolean writeCharacteristicNoResponsePacket(BluetoothGattCharacteristic bluetoothGattCharacteristic, byte[] bArr, int i, int i2) {
return __writeCharacteristicNoResponsePacket(bluetoothGattCharacteristic, bArr, i, i2);
}
@Override // com.afunx.ble.blelitelib.proxy.BleGattClientProxy
public boolean writeCharacteristicNoResponsePreemptible(BluetoothGattCharacteristic bluetoothGattCharacteristic, byte[] bArr) {
return __writeCharacteristicNoResponsePreemptible(bluetoothGattCharacteristic, bArr);
}
private BluetoothGattService __discoverService(UUID uuid, long j) {
BluetoothGatt bluetoothGatt = getBluetoothGatt();
if (bluetoothGatt == null) {
BleLiteLog.w(TAG, "__discoverService() fail for bluetoothGatt is null");
return null;
}
BluetoothGattService service = bluetoothGatt.getService(uuid);
if (service != null) {
BleLiteLog.i(TAG, "__discoverService() uuid: " + uuid + ", gattService is exist already");
return service;
}
if (__discoverService(bluetoothGatt, j)) {
service = bluetoothGatt.getService(uuid);
StringBuilder sb = new StringBuilder();
sb.append("__discoverService() uuid: ");
sb.append(uuid);
sb.append(", gattService is ");
sb.append(service != null ? "found" : "missed");
BleLiteLog.i(TAG, sb.toString());
}
return service;
}
}

View File

@@ -0,0 +1,16 @@
package com.afunx.ble.blelitelib.proxy.scheme;
/* loaded from: classes.dex */
public interface BleGattReconnectScheme {
int addAndGetRetryCount();
void callDisconnectCallbackInstantly();
void clearRetryCount();
long getSleepTimestamp(int i);
void setDisconnectCallback(Runnable runnable, long j);
boolean tryAgain();
}

View File

@@ -0,0 +1,95 @@
package com.afunx.ble.blelitelib.proxy.scheme;
import com.afunx.ble.blelitelib.log.BleLiteLog;
import java.util.Timer;
import java.util.TimerTask;
import java.util.concurrent.atomic.AtomicInteger;
/* loaded from: classes.dex */
public class BleGattReconnectSchemeDefaultImpl implements BleGattReconnectScheme {
private static final String TAG = "BleGattReconnectSchemeDefaultImpl";
private Runnable mDisconnectedCallback;
private final AtomicInteger mCount = new AtomicInteger();
private final Timer mTimer = new Timer();
private TimerTask mTimerTask = null;
private volatile long mTimeoutMilli = 0;
private volatile boolean mTryAgain = true;
private synchronized void addTimerTask(long j) {
BleLiteLog.i(TAG, "addTimerTask() delayMilli: " + j);
this.mTimerTask = new TimerTask() { // from class: com.afunx.ble.blelitelib.proxy.scheme.BleGattReconnectSchemeDefaultImpl.1
@Override // java.util.TimerTask, java.lang.Runnable
public void run() {
BleLiteLog.i(BleGattReconnectSchemeDefaultImpl.TAG, "addTimerTask() run()");
BleGattReconnectSchemeDefaultImpl.this.mTryAgain = false;
if (BleGattReconnectSchemeDefaultImpl.this.mDisconnectedCallback != null) {
BleGattReconnectSchemeDefaultImpl.this.mDisconnectedCallback.run();
}
}
};
this.mTimer.schedule(this.mTimerTask, j);
}
private synchronized boolean removeTimerTask() {
BleLiteLog.i(TAG, "removeTimerTask()");
if (this.mTimerTask == null) {
this.mTryAgain = true;
BleLiteLog.i(TAG, "removeTimerTask() mTryAgain = true");
return false;
}
BleLiteLog.i(TAG, "removeTimerTask() cancel()");
boolean cancel = this.mTimerTask.cancel();
this.mTimerTask = null;
return cancel;
}
@Override // com.afunx.ble.blelitelib.proxy.scheme.BleGattReconnectScheme
public int addAndGetRetryCount() {
return this.mCount.addAndGet(1);
}
@Override // com.afunx.ble.blelitelib.proxy.scheme.BleGattReconnectScheme
public synchronized void callDisconnectCallbackInstantly() {
BleLiteLog.i(TAG, "callDisconnectCallbackInstantly()");
if (this.mTimerTask == null) {
BleLiteLog.i(TAG, "callDisconnectCallbackInstantly() run()");
if (this.mDisconnectedCallback != null) {
this.mDisconnectedCallback.run();
}
} else if (removeTimerTask()) {
BleLiteLog.i(TAG, "callDisconnectCallbackInstantly() run() for cancelled already");
if (this.mDisconnectedCallback != null) {
this.mDisconnectedCallback.run();
}
}
}
@Override // com.afunx.ble.blelitelib.proxy.scheme.BleGattReconnectScheme
public void clearRetryCount() {
removeTimerTask();
this.mCount.set(0);
}
@Override // com.afunx.ble.blelitelib.proxy.scheme.BleGattReconnectScheme
public synchronized long getSleepTimestamp(int i) {
BleLiteLog.i(TAG, "getSleepTimestamp() retryCount: " + i + ", mDisconnectedCallback: " + this.mDisconnectedCallback);
if (i == 1 && this.mDisconnectedCallback != null) {
addTimerTask(this.mTimeoutMilli);
}
return (2 << (i - 1)) * 1000;
}
@Override // com.afunx.ble.blelitelib.proxy.scheme.BleGattReconnectScheme
public synchronized void setDisconnectCallback(Runnable runnable, long j) {
if (j < 0) {
throw new IllegalArgumentException("timeoutMilli should >= 0");
}
this.mTimeoutMilli = j;
this.mDisconnectedCallback = runnable;
}
@Override // com.afunx.ble.blelitelib.proxy.scheme.BleGattReconnectScheme
public boolean tryAgain() {
return this.mTryAgain;
}
}

View File

@@ -0,0 +1,74 @@
package com.afunx.ble.blelitelib.scanner;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.le.BluetoothLeScanner;
import android.bluetooth.le.ScanCallback;
import android.util.Log;
import java.util.UUID;
/* loaded from: classes.dex */
public class BleScanner {
private static final String TAG = "BlueScanner";
private static BluetoothAdapter getAdapter() {
return BluetoothAdapter.getDefaultAdapter();
}
public static boolean startLeScan(UUID[] uuidArr, BluetoothAdapter.LeScanCallback leScanCallback) {
BluetoothAdapter adapter = getAdapter();
if (adapter != null) {
return adapter.startLeScan(uuidArr, leScanCallback);
}
Log.e(TAG, "This hardware not support bluetooth!");
return false;
}
public static boolean startScan(ScanCallback scanCallback) {
BluetoothAdapter adapter = getAdapter();
if (adapter == null) {
Log.e(TAG, "This hardware not support bluetooth!");
return false;
}
BluetoothLeScanner bluetoothLeScanner = adapter.getBluetoothLeScanner();
if (bluetoothLeScanner == null) {
Log.e(TAG, "The bluetooth is disabled!");
return false;
}
bluetoothLeScanner.startScan(scanCallback);
return true;
}
public static boolean stopLeScan(BluetoothAdapter.LeScanCallback leScanCallback) {
BluetoothAdapter adapter = getAdapter();
if (adapter == null) {
Log.e(TAG, "This hardware not support bluetooth!");
return false;
}
adapter.stopLeScan(leScanCallback);
return true;
}
public static boolean stopScan(ScanCallback scanCallback) {
BluetoothAdapter adapter = getAdapter();
if (adapter == null) {
Log.e(TAG, "This hardware not support bluetooth!");
return false;
}
BluetoothLeScanner bluetoothLeScanner = adapter.getBluetoothLeScanner();
if (bluetoothLeScanner == null) {
Log.e(TAG, "The bluetooth is disabled!");
return false;
}
bluetoothLeScanner.stopScan(scanCallback);
return true;
}
public static boolean startLeScan(BluetoothAdapter.LeScanCallback leScanCallback) {
BluetoothAdapter adapter = getAdapter();
if (adapter == null) {
Log.e(TAG, "This hardware not support bluetooth!");
return false;
}
return adapter.startLeScan(leScanCallback);
}
}

View File

@@ -0,0 +1,47 @@
package com.afunx.ble.blelitelib.threadpool;
import android.os.Handler;
import android.os.Looper;
import java.util.List;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
/* loaded from: classes.dex */
public class BleThreadpool {
private static BleThreadpool instance = new BleThreadpool();
private Handler mMainHandler = new Handler(Looper.getMainLooper());
private ExecutorService mExecutor = Executors.newCachedThreadPool();
private BleThreadpool() {
}
public static BleThreadpool getInstance() {
return instance;
}
public void shutdown() {
this.mExecutor.shutdown();
}
public List<Runnable> shutdownNow() {
return this.mExecutor.shutdownNow();
}
public <T> Future<T> submit(Callable<T> callable) {
return this.mExecutor.submit(callable);
}
public void submitInMain(Runnable runnable) {
if (Looper.myLooper() == Looper.getMainLooper()) {
runnable.run();
} else {
this.mMainHandler.post(runnable);
}
}
public Future<?> submit(Runnable runnable) {
return this.mExecutor.submit(runnable);
}
}

View File

@@ -0,0 +1,8 @@
package com.afunx.ble.blelitelib.utils;
/* loaded from: classes.dex */
public class BleGattStateParser {
public static String parse(int i) {
return i != 0 ? i != 1 ? i != 2 ? i != 3 ? String.format("UNKNOWN (0x%04x)", Integer.valueOf(i & 65535)) : "STATE DISCONNECTING" : "STATE CONNECTED" : "STATE CONNECTING" : "STATE DISCONNECTED";
}
}

View File

@@ -0,0 +1,83 @@
package com.afunx.ble.blelitelib.utils;
import com.twitter.sdk.android.core.TwitterAuthConfig;
import com.ubtrobot.jimu.robotapi.PeripheralType;
/* loaded from: classes.dex */
public class BleGattStatusParser {
public static String parse(int i) {
switch (i) {
case 0:
return "GATT SUCCESS";
case 1:
return "GATT INVALID HANDLE";
case 2:
return "GATT READ NOT PERMIT";
case 3:
return "GATT WRITE NOT PERMIT";
case 4:
return "GATT INVALID PDU";
case 5:
return "GATT INSUF AUTHENTICATION";
case 6:
return "GATT REQ NOT SUPPORTED";
case 7:
return "GATT INVALID OFFSET";
case 8:
return "GATT INSUF AUTHORIZATION";
case 9:
return "GATT PREPARE Q FULL";
case 10:
return "GATT NOT FOUND";
case 11:
return "GATT NOT LONG";
case 12:
return "GATT INSUF KEY SIZE";
case 13:
return "GATT INVALID ATTR LEN";
case 14:
return "GATT ERR UNLIKELY";
case 15:
return "GATT INSUF ENCRYPTION";
case 16:
return "GATT UNSUPPORT GRP TYPE";
case 17:
return "GATT INSUF RESOURCE";
default:
switch (i) {
case PeripheralType.SERVO /* 128 */:
return "GATT NO RESOURCES";
case 129:
return "GATT INTERNAL ERROR";
case 130:
return "GATT WRONG STATE";
case 131:
return "GATT DB FULL";
case 132:
return "GATT BUSY";
case 133:
return "GATT ERROR";
case 134:
return "GATT CMD STARTED";
case 135:
return "GATT ILLEGAL PARAMETER";
case 136:
return "GATT PENDING";
case 137:
return "GATT AUTH FAIL";
case 138:
return "GATT MORE";
case 139:
return "GATT INVALID CFG";
case TwitterAuthConfig.DEFAULT_AUTH_REQUEST_CODE /* 140 */:
return "GATT SERVICE STARTED";
case 141:
return "GATT ENCRYPED NO MITM";
case 142:
return "GATT NOT ENCRYPTED";
default:
return String.format("UNKNOWN (0x%04x)", Integer.valueOf(i & 65535));
}
}
}
}

View File

@@ -0,0 +1,29 @@
package com.afunx.ble.blelitelib.utils;
import android.app.Activity;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
import android.content.Intent;
/* loaded from: classes.dex */
public class BleUtils {
public static boolean disableBluetooth() {
return BluetoothAdapter.getDefaultAdapter().disable();
}
public static boolean enableBluetooth() {
return BluetoothAdapter.getDefaultAdapter().enable();
}
public static BluetoothDevice getRemoteDevice(String str) {
return BluetoothAdapter.getDefaultAdapter().getRemoteDevice(str);
}
public static boolean isBluetoothEnabled() {
return BluetoothAdapter.getDefaultAdapter().isEnabled();
}
public static void tryEnableBluetooth(Activity activity, int i) {
activity.startActivityForResult(new Intent("android.bluetooth.adapter.action.REQUEST_ENABLE"), i);
}
}

View File

@@ -0,0 +1,62 @@
package com.afunx.ble.blelitelib.utils;
import java.util.UUID;
/* loaded from: classes.dex */
public class BleUuidUtils {
private static String MAGIC_HEAD_STR = "0000";
private static String MAGIC_TAIL_STR = "49535343";
private static final int UUID_LENGTH = 36;
public static String int2str(int i) {
if (i < 0 || i > 65535) {
throw new IllegalArgumentException("uuid int range is [0x0000,0xffff]");
}
StringBuilder sb = new StringBuilder();
sb.append(MAGIC_HEAD_STR);
String hexString = Integer.toHexString(i);
for (int i2 = 0; i2 < 4 - hexString.length(); i2++) {
sb.append("0");
}
sb.append(hexString);
sb.append(MAGIC_TAIL_STR);
return sb.toString();
}
public static UUID int2uuid(int i) {
return UUID.fromString(int2str(i));
}
public static void setMagicHeadStr(String str) {
if (str.length() != MAGIC_HEAD_STR.length()) {
throw new IllegalArgumentException("magicHeadStr length is invalid");
}
MAGIC_HEAD_STR = str;
}
public static void setMagicTailStr(String str) {
if (str.length() != MAGIC_TAIL_STR.length()) {
throw new IllegalArgumentException("magicTailStr length is invalid");
}
MAGIC_TAIL_STR = str;
}
public static int str2int(String str) {
if (str != null && str.length() == 36 && str.startsWith(MAGIC_TAIL_STR)) {
return Integer.parseInt(str.substring(4, 8), 16);
}
throw new IllegalArgumentException("invalid uuid string");
}
public static UUID str2uuid(String str) {
return UUID.fromString(str);
}
public static int uuid2int(UUID uuid) {
return str2int(uuid.toString());
}
public static String uuid2str(UUID uuid) {
return uuid.toString();
}
}

View File

@@ -0,0 +1,49 @@
package com.afunx.ble.blelitelib.utils;
/* loaded from: classes.dex */
public class HexUtils {
private static final char[] hexDigits = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'};
public static String bytes2HexString(byte[] bArr) {
if (bArr == null) {
return null;
}
return bArr.length == 0 ? "" : bytes2HexString(bArr, 0, bArr.length);
}
public static String bytes2HexStringWithSpace(byte[] bArr) {
if (bArr == null) {
return null;
}
return bArr.length == 0 ? "" : bytes2HexStringWithSpace(bArr, 0, bArr.length);
}
public static String bytes2HexString(byte[] bArr, int i, int i2) {
if (bArr == null || i < 0 || i2 <= 0 || i2 - i > bArr.length) {
return null;
}
StringBuilder sb = new StringBuilder();
for (int i3 = 0; i3 < i2; i3++) {
int i4 = i3 + i;
sb.append(hexDigits[(bArr[i4] >>> 4) & 15]);
sb.append(hexDigits[bArr[i4] & 15]);
}
return sb.toString();
}
public static String bytes2HexStringWithSpace(byte[] bArr, int i, int i2) {
if (bArr == null || i < 0 || i2 <= 0 || i2 - i > bArr.length) {
return null;
}
StringBuilder sb = new StringBuilder();
for (int i3 = 0; i3 < i2; i3++) {
int i4 = i3 + i;
sb.append(hexDigits[(bArr[i4] >>> 4) & 15]);
sb.append(hexDigits[bArr[i4] & 15]);
if (i3 != i2 - 1) {
sb.append(" ");
}
}
return sb.toString();
}
}

View File

@@ -0,0 +1,5 @@
package com.aigestudio.wheelpicker;
/* loaded from: classes.dex */
public interface IDebug {
}

View File

@@ -0,0 +1,5 @@
package com.aigestudio.wheelpicker;
/* loaded from: classes.dex */
public interface IWheelPicker {
}

View File

@@ -0,0 +1,6 @@
package com.aigestudio.wheelpicker;
/* loaded from: classes.dex */
public final class R$array {
public static final int WheelArrayWeek = 2130903040;
}

View File

@@ -0,0 +1,332 @@
package com.aigestudio.wheelpicker;
/* loaded from: classes.dex */
public final class R$dimen {
public static final int abc_action_bar_content_inset_material = 2131165184;
public static final int abc_action_bar_content_inset_with_nav = 2131165185;
public static final int abc_action_bar_default_height_material = 2131165186;
public static final int abc_action_bar_default_padding_end_material = 2131165187;
public static final int abc_action_bar_default_padding_start_material = 2131165188;
public static final int abc_action_bar_elevation_material = 2131165189;
public static final int abc_action_bar_icon_vertical_padding_material = 2131165190;
public static final int abc_action_bar_overflow_padding_end_material = 2131165191;
public static final int abc_action_bar_overflow_padding_start_material = 2131165192;
public static final int abc_action_bar_stacked_max_height = 2131165193;
public static final int abc_action_bar_stacked_tab_max_width = 2131165194;
public static final int abc_action_bar_subtitle_bottom_margin_material = 2131165195;
public static final int abc_action_bar_subtitle_top_margin_material = 2131165196;
public static final int abc_action_button_min_height_material = 2131165197;
public static final int abc_action_button_min_width_material = 2131165198;
public static final int abc_action_button_min_width_overflow_material = 2131165199;
public static final int abc_alert_dialog_button_bar_height = 2131165200;
public static final int abc_alert_dialog_button_dimen = 2131165201;
public static final int abc_button_inset_horizontal_material = 2131165202;
public static final int abc_button_inset_vertical_material = 2131165203;
public static final int abc_button_padding_horizontal_material = 2131165204;
public static final int abc_button_padding_vertical_material = 2131165205;
public static final int abc_cascading_menus_min_smallest_width = 2131165206;
public static final int abc_config_prefDialogWidth = 2131165207;
public static final int abc_control_corner_material = 2131165208;
public static final int abc_control_inset_material = 2131165209;
public static final int abc_control_padding_material = 2131165210;
public static final int abc_dialog_corner_radius_material = 2131165211;
public static final int abc_dialog_fixed_height_major = 2131165212;
public static final int abc_dialog_fixed_height_minor = 2131165213;
public static final int abc_dialog_fixed_width_major = 2131165214;
public static final int abc_dialog_fixed_width_minor = 2131165215;
public static final int abc_dialog_list_padding_bottom_no_buttons = 2131165216;
public static final int abc_dialog_list_padding_top_no_title = 2131165217;
public static final int abc_dialog_min_width_major = 2131165218;
public static final int abc_dialog_min_width_minor = 2131165219;
public static final int abc_dialog_padding_material = 2131165220;
public static final int abc_dialog_padding_top_material = 2131165221;
public static final int abc_dialog_title_divider_material = 2131165222;
public static final int abc_disabled_alpha_material_dark = 2131165223;
public static final int abc_disabled_alpha_material_light = 2131165224;
public static final int abc_dropdownitem_icon_width = 2131165225;
public static final int abc_dropdownitem_text_padding_left = 2131165226;
public static final int abc_dropdownitem_text_padding_right = 2131165227;
public static final int abc_edit_text_inset_bottom_material = 2131165228;
public static final int abc_edit_text_inset_horizontal_material = 2131165229;
public static final int abc_edit_text_inset_top_material = 2131165230;
public static final int abc_floating_window_z = 2131165231;
public static final int abc_list_item_padding_horizontal_material = 2131165232;
public static final int abc_panel_menu_list_width = 2131165233;
public static final int abc_progress_bar_height_material = 2131165234;
public static final int abc_search_view_preferred_height = 2131165235;
public static final int abc_search_view_preferred_width = 2131165236;
public static final int abc_seekbar_track_background_height_material = 2131165237;
public static final int abc_seekbar_track_progress_height_material = 2131165238;
public static final int abc_select_dialog_padding_start_material = 2131165239;
public static final int abc_switch_padding = 2131165240;
public static final int abc_text_size_body_1_material = 2131165241;
public static final int abc_text_size_body_2_material = 2131165242;
public static final int abc_text_size_button_material = 2131165243;
public static final int abc_text_size_caption_material = 2131165244;
public static final int abc_text_size_display_1_material = 2131165245;
public static final int abc_text_size_display_2_material = 2131165246;
public static final int abc_text_size_display_3_material = 2131165247;
public static final int abc_text_size_display_4_material = 2131165248;
public static final int abc_text_size_headline_material = 2131165249;
public static final int abc_text_size_large_material = 2131165250;
public static final int abc_text_size_medium_material = 2131165251;
public static final int abc_text_size_menu_header_material = 2131165252;
public static final int abc_text_size_menu_material = 2131165253;
public static final int abc_text_size_small_material = 2131165254;
public static final int abc_text_size_subhead_material = 2131165255;
public static final int abc_text_size_subtitle_material_toolbar = 2131165256;
public static final int abc_text_size_title_material = 2131165257;
public static final int abc_text_size_title_material_toolbar = 2131165258;
public static final int browser_actions_context_menu_max_width = 2131165318;
public static final int browser_actions_context_menu_min_padding = 2131165319;
public static final int cardview_compat_inset_shadow = 2131165337;
public static final int cardview_default_elevation = 2131165338;
public static final int cardview_default_radius = 2131165339;
public static final int com_facebook_auth_dialog_corner_radius = 2131165341;
public static final int com_facebook_auth_dialog_corner_radius_oversized = 2131165342;
public static final int com_facebook_button_corner_radius = 2131165343;
public static final int com_facebook_button_login_corner_radius = 2131165344;
public static final int com_facebook_likeboxcountview_border_radius = 2131165345;
public static final int com_facebook_likeboxcountview_border_width = 2131165346;
public static final int com_facebook_likeboxcountview_caret_height = 2131165347;
public static final int com_facebook_likeboxcountview_caret_width = 2131165348;
public static final int com_facebook_likeboxcountview_text_padding = 2131165349;
public static final int com_facebook_likeboxcountview_text_size = 2131165350;
public static final int com_facebook_likeview_edge_padding = 2131165351;
public static final int com_facebook_likeview_internal_padding = 2131165352;
public static final int com_facebook_likeview_text_size = 2131165353;
public static final int com_facebook_profilepictureview_preset_size_large = 2131165354;
public static final int com_facebook_profilepictureview_preset_size_normal = 2131165355;
public static final int com_facebook_profilepictureview_preset_size_small = 2131165356;
public static final int com_facebook_share_button_compound_drawable_padding = 2131165357;
public static final int com_facebook_share_button_padding_bottom = 2131165358;
public static final int com_facebook_share_button_padding_left = 2131165359;
public static final int com_facebook_share_button_padding_right = 2131165360;
public static final int com_facebook_share_button_padding_top = 2131165361;
public static final int com_facebook_share_button_text_size = 2131165362;
public static final int com_facebook_tooltip_horizontal_padding = 2131165363;
public static final int comm_big_dialog_imglog_margin_top = 2131165365;
public static final int comm_dialog_border_radius = 2131165367;
public static final int comm_dialog_imglog_margin_top = 2131165368;
public static final int comm_dialog_title_margin_top = 2131165369;
public static final int comm_dialog_tvtips_margin_beside = 2131165370;
public static final int comm_dialog_tvtips_margin_top = 2131165371;
public static final int comm_simple_dialog_padding_bottom = 2131165399;
public static final int comm_simple_dialog_tv_content_margin_top = 2131165400;
public static final int comm_toast_min_height = 2131165402;
public static final int comm_toast_width = 2131165403;
public static final int compat_button_inset_horizontal_material = 2131165503;
public static final int compat_button_inset_vertical_material = 2131165504;
public static final int compat_button_padding_horizontal_material = 2131165505;
public static final int compat_button_padding_vertical_material = 2131165506;
public static final int compat_control_corner_material = 2131165507;
public static final int compat_notification_large_icon_max_height = 2131165508;
public static final int compat_notification_large_icon_max_width = 2131165509;
public static final int disabled_alpha_material_dark = 2131165654;
public static final int disabled_alpha_material_light = 2131165655;
public static final int error_icon_size = 2131169795;
public static final int error_msg_width = 2131169796;
public static final int highlight_alpha_material_colored = 2131169820;
public static final int highlight_alpha_material_dark = 2131169821;
public static final int highlight_alpha_material_light = 2131169822;
public static final int hint_alpha_material_dark = 2131169823;
public static final int hint_alpha_material_light = 2131169824;
public static final int hint_pressed_alpha_material_dark = 2131169825;
public static final int hint_pressed_alpha_material_light = 2131169826;
public static final int loading_normal = 2131169927;
public static final int loading_small = 2131169928;
public static final int main_header_size = 2131169933;
public static final int menu_bottom_margin = 2131171939;
public static final int menu_corner = 2131171940;
public static final int menu_height = 2131171941;
public static final int menu_margin = 2131171942;
public static final int menu_width = 2131171944;
public static final int notification_action_icon_size = 2131172010;
public static final int notification_action_text_size = 2131172011;
public static final int notification_big_circle_margin = 2131172012;
public static final int notification_content_margin_start = 2131172013;
public static final int notification_large_icon_height = 2131172014;
public static final int notification_large_icon_width = 2131172015;
public static final int notification_main_column_padding_top = 2131172016;
public static final int notification_media_narrow_margin = 2131172017;
public static final int notification_right_icon_size = 2131172018;
public static final int notification_right_side_padding_top = 2131172019;
public static final int notification_small_icon_background_padding = 2131172020;
public static final int notification_small_icon_size_as_large = 2131172021;
public static final int notification_subtext_size = 2131172022;
public static final int notification_top_pad = 2131172023;
public static final int notification_top_pad_large_text = 2131172024;
public static final int subtitle_corner_radius = 2131172191;
public static final int subtitle_outline_width = 2131172192;
public static final int subtitle_shadow_offset = 2131172193;
public static final int subtitle_shadow_radius = 2131172194;
public static final int theme_10dp = 2131172228;
public static final int theme_10sp = 2131172229;
public static final int theme_11sp = 2131172230;
public static final int theme_12sp = 2131172231;
public static final int theme_13sp = 2131172232;
public static final int theme_14dp = 2131172233;
public static final int theme_14sp = 2131172234;
public static final int theme_15sp = 2131172235;
public static final int theme_16sp = 2131172236;
public static final int theme_17sp = 2131172237;
public static final int theme_18dp = 2131172238;
public static final int theme_18sp = 2131172239;
public static final int theme_25dp = 2131172240;
public static final int theme_30dp = 2131172241;
public static final int theme_36sp = 2131172242;
public static final int theme_50sp = 2131172243;
public static final int theme_7dp = 2131172244;
public static final int theme_8dp = 2131172245;
public static final int theme_big_dialog_window_height = 2131172246;
public static final int theme_big_dialog_window_width = 2131172247;
public static final int theme_btn_height = 2131172248;
public static final int theme_btn_middle_width = 2131172249;
public static final int theme_btn_txt = 2131172250;
public static final int theme_dialog_btn_margin_beside = 2131172251;
public static final int theme_dialog_btn_width = 2131172252;
public static final int theme_dialog_btns_distance = 2131172253;
public static final int theme_dialog_hori_padding = 2131172254;
public static final int theme_dialog_window_height = 2131172255;
public static final int theme_dialog_window_width = 2131172256;
public static final int theme_input_divider_height = 2131172258;
public static final int theme_input_divider_width = 2131172259;
public static final int theme_input_height = 2131172260;
public static final int theme_input_icon_size = 2131172261;
public static final int theme_input_margin_left = 2131172262;
public static final int theme_input_margin_right = 2131172263;
public static final int theme_input_txt = 2131172264;
public static final int theme_input_width = 2131172265;
public static final int theme_line_spacing_6sp = 2131172266;
public static final int theme_list_item_size = 2131172267;
public static final int theme_navigation_large_size = 2131172268;
public static final int theme_navigation_min_size = 2131172269;
public static final int theme_navigation_size = 2131172270;
public static final int theme_tag_height = 2131172271;
public static final int theme_wheel_item_space = 2131172273;
public static final int tooltip_corner_radius = 2131172288;
public static final int tooltip_horizontal_padding = 2131172289;
public static final int tooltip_margin = 2131172290;
public static final int tooltip_precise_anchor_extra_offset = 2131172291;
public static final int tooltip_precise_anchor_threshold = 2131172292;
public static final int tooltip_vertical_padding = 2131172293;
public static final int tooltip_y_offset_non_touch = 2131172294;
public static final int tooltip_y_offset_touch = 2131172295;
public static final int tw__badge_padding = 2131172303;
public static final int tw__btn_bar_margin_left = 2131172304;
public static final int tw__btn_bar_margin_right = 2131172305;
public static final int tw__card_font_size_medium = 2131172306;
public static final int tw__card_font_size_small = 2131172307;
public static final int tw__card_maximum_width = 2131172308;
public static final int tw__card_radius_medium = 2131172309;
public static final int tw__card_radius_small = 2131172310;
public static final int tw__card_spacing_large = 2131172311;
public static final int tw__card_spacing_medium = 2131172312;
public static final int tw__card_spacing_small = 2131172313;
public static final int tw__compact_tweet_action_bar_offset_left = 2131172314;
public static final int tw__compact_tweet_attribution_line_margin_right = 2131172315;
public static final int tw__compact_tweet_avatar_margin_left = 2131172316;
public static final int tw__compact_tweet_avatar_margin_right = 2131172317;
public static final int tw__compact_tweet_avatar_margin_top = 2131172318;
public static final int tw__compact_tweet_container_bottom_separator = 2131172319;
public static final int tw__compact_tweet_container_padding_top = 2131172320;
public static final int tw__compact_tweet_full_name_margin_right = 2131172321;
public static final int tw__compact_tweet_full_name_margin_top = 2131172322;
public static final int tw__compact_tweet_logo_margin_right = 2131172323;
public static final int tw__compact_tweet_logo_margin_top = 2131172324;
public static final int tw__compact_tweet_media_margin_bottom = 2131172325;
public static final int tw__compact_tweet_media_margin_right = 2131172326;
public static final int tw__compact_tweet_media_margin_top = 2131172327;
public static final int tw__compact_tweet_quote_tweet_margin_left = 2131172328;
public static final int tw__compact_tweet_quote_tweet_margin_right = 2131172329;
public static final int tw__compact_tweet_retweeted_by_drawable_padding = 2131172330;
public static final int tw__compact_tweet_retweeted_by_margin_bottom = 2131172331;
public static final int tw__compact_tweet_retweeted_by_margin_left = 2131172332;
public static final int tw__compact_tweet_retweeted_by_margin_top = 2131172333;
public static final int tw__compact_tweet_screen_name_layout_width = 2131172334;
public static final int tw__compact_tweet_screen_name_margin_bottom = 2131172335;
public static final int tw__compact_tweet_screen_name_margin_top = 2131172336;
public static final int tw__compact_tweet_screen_name_padding_left = 2131172337;
public static final int tw__compact_tweet_text_margin_left = 2131172338;
public static final int tw__compact_tweet_text_margin_right = 2131172339;
public static final int tw__compact_tweet_text_margin_top = 2131172340;
public static final int tw__compact_tweet_timestamp_margin_top = 2131172341;
public static final int tw__composer_avatar_size = 2131172342;
public static final int tw__composer_char_count_height = 2131172343;
public static final int tw__composer_close_size = 2131172344;
public static final int tw__composer_divider_height = 2131172345;
public static final int tw__composer_font_size_small = 2131172346;
public static final int tw__composer_logo_height = 2131172347;
public static final int tw__composer_logo_width = 2131172348;
public static final int tw__composer_spacing_large = 2131172349;
public static final int tw__composer_spacing_medium = 2131172350;
public static final int tw__composer_spacing_small = 2131172351;
public static final int tw__composer_tweet_btn_height = 2131172352;
public static final int tw__composer_tweet_btn_radius = 2131172353;
public static final int tw__cta_border_size = 2131172354;
public static final int tw__cta_margin_top = 2131172355;
public static final int tw__cta_padding = 2131172356;
public static final int tw__cta_radius = 2131172357;
public static final int tw__gallery_page_margin = 2131172358;
public static final int tw__login_btn_drawable_padding = 2131172359;
public static final int tw__login_btn_height = 2131172360;
public static final int tw__login_btn_left_padding = 2131172361;
public static final int tw__login_btn_radius = 2131172362;
public static final int tw__login_btn_right_padding = 2131172363;
public static final int tw__login_btn_text_size = 2131172364;
public static final int tw__media_view_divider_size = 2131172365;
public static final int tw__media_view_radius = 2131172366;
public static final int tw__padding_permission_horizontal_container = 2131172367;
public static final int tw__padding_permission_vertical_container = 2131172368;
public static final int tw__permission_description_text_size = 2131172369;
public static final int tw__permission_title_text_size = 2131172370;
public static final int tw__quote_tweet_attribution_text_margin_horizontal = 2131172371;
public static final int tw__quote_tweet_attribution_text_margin_top = 2131172372;
public static final int tw__quote_tweet_border_width = 2131172373;
public static final int tw__quote_tweet_media_margin_bottom = 2131172374;
public static final int tw__quote_tweet_media_margin_horizontal = 2131172375;
public static final int tw__quote_tweet_text_margin_bottom = 2131172376;
public static final int tw__quote_tweet_text_margin_horizontal = 2131172377;
public static final int tw__seekbar_thumb_inner_padding = 2131172378;
public static final int tw__seekbar_thumb_outer_padding = 2131172379;
public static final int tw__seekbar_thumb_size = 2131172380;
public static final int tw__text_size_large = 2131172381;
public static final int tw__text_size_medium = 2131172382;
public static final int tw__text_size_small = 2131172383;
public static final int tw__tweet_action_bar_offset_bottom = 2131172384;
public static final int tw__tweet_action_bar_offset_left = 2131172385;
public static final int tw__tweet_action_button_margin_top = 2131172386;
public static final int tw__tweet_action_button_spacing = 2131172387;
public static final int tw__tweet_action_heart_size = 2131172388;
public static final int tw__tweet_action_share_padding = 2131172389;
public static final int tw__tweet_avatar_margin_left = 2131172390;
public static final int tw__tweet_avatar_margin_right = 2131172391;
public static final int tw__tweet_avatar_margin_top = 2131172392;
public static final int tw__tweet_avatar_size = 2131172393;
public static final int tw__tweet_container_bottom_separator = 2131172394;
public static final int tw__tweet_full_name_drawable_padding = 2131172395;
public static final int tw__tweet_full_name_margin_right = 2131172396;
public static final int tw__tweet_full_name_margin_top = 2131172397;
public static final int tw__tweet_logo_margin_right = 2131172398;
public static final int tw__tweet_logo_margin_top = 2131172399;
public static final int tw__tweet_media_badge_margin = 2131172400;
public static final int tw__tweet_quote_tweet_margin_horizontal = 2131172401;
public static final int tw__tweet_quote_tweet_margin_top = 2131172402;
public static final int tw__tweet_retweeted_by_drawable_padding = 2131172403;
public static final int tw__tweet_retweeted_by_margin_bottom = 2131172404;
public static final int tw__tweet_retweeted_by_margin_left = 2131172405;
public static final int tw__tweet_retweeted_by_margin_top = 2131172406;
public static final int tw__tweet_screen_name_margin_bottom = 2131172407;
public static final int tw__tweet_screen_name_margin_top = 2131172408;
public static final int tw__tweet_text_margin_left = 2131172409;
public static final int tw__tweet_text_margin_right = 2131172410;
public static final int tw__tweet_text_margin_top = 2131172411;
public static final int tw__tweet_timestamp_margin_top = 2131172412;
public static final int tw__tweet_timestamp_padding_left = 2131172413;
public static final int tw__video_control_height = 2131172414;
public static final int tw__video_control_text_size = 2131172415;
public static final int wheel_indicator_size = 2131172548;
public static final int wheel_item_space = 2131172549;
public static final int wheel_item_text_size = 2131172550;
public static final int wheel_margins = 2131172551;
}

View File

@@ -0,0 +1,549 @@
package com.aigestudio.wheelpicker;
import com.ubt.jimu.R;
/* loaded from: classes.dex */
public final class R$styleable {
public static final int ActionBarLayout_android_layout_gravity = 0;
public static final int ActionBar_background = 0;
public static final int ActionBar_backgroundSplit = 1;
public static final int ActionBar_backgroundStacked = 2;
public static final int ActionBar_contentInsetEnd = 3;
public static final int ActionBar_contentInsetEndWithActions = 4;
public static final int ActionBar_contentInsetLeft = 5;
public static final int ActionBar_contentInsetRight = 6;
public static final int ActionBar_contentInsetStart = 7;
public static final int ActionBar_contentInsetStartWithNavigation = 8;
public static final int ActionBar_customNavigationLayout = 9;
public static final int ActionBar_displayOptions = 10;
public static final int ActionBar_divider = 11;
public static final int ActionBar_elevation = 12;
public static final int ActionBar_height = 13;
public static final int ActionBar_hideOnContentScroll = 14;
public static final int ActionBar_homeAsUpIndicator = 15;
public static final int ActionBar_homeLayout = 16;
public static final int ActionBar_icon = 17;
public static final int ActionBar_indeterminateProgressStyle = 18;
public static final int ActionBar_itemPadding = 19;
public static final int ActionBar_logo = 20;
public static final int ActionBar_navigationMode = 21;
public static final int ActionBar_popupTheme = 22;
public static final int ActionBar_progressBarPadding = 23;
public static final int ActionBar_progressBarStyle = 24;
public static final int ActionBar_subtitle = 25;
public static final int ActionBar_subtitleTextStyle = 26;
public static final int ActionBar_title = 27;
public static final int ActionBar_titleTextStyle = 28;
public static final int ActionMenuItemView_android_minWidth = 0;
public static final int ActionMode_background = 0;
public static final int ActionMode_backgroundSplit = 1;
public static final int ActionMode_closeItemLayout = 2;
public static final int ActionMode_height = 3;
public static final int ActionMode_subtitleTextStyle = 4;
public static final int ActionMode_titleTextStyle = 5;
public static final int ActivityChooserView_expandActivityOverflowButtonDrawable = 0;
public static final int ActivityChooserView_initialActivityCount = 1;
public static final int AlertDialog_android_layout = 0;
public static final int AlertDialog_buttonIconDimen = 1;
public static final int AlertDialog_buttonPanelSideLayout = 2;
public static final int AlertDialog_listItemLayout = 3;
public static final int AlertDialog_listLayout = 4;
public static final int AlertDialog_multiChoiceItemLayout = 5;
public static final int AlertDialog_showTitle = 6;
public static final int AlertDialog_singleChoiceItemLayout = 7;
public static final int AnimatedStateListDrawableCompat_android_constantSize = 3;
public static final int AnimatedStateListDrawableCompat_android_dither = 0;
public static final int AnimatedStateListDrawableCompat_android_enterFadeDuration = 4;
public static final int AnimatedStateListDrawableCompat_android_exitFadeDuration = 5;
public static final int AnimatedStateListDrawableCompat_android_variablePadding = 2;
public static final int AnimatedStateListDrawableCompat_android_visible = 1;
public static final int AnimatedStateListDrawableItem_android_drawable = 1;
public static final int AnimatedStateListDrawableItem_android_id = 0;
public static final int AnimatedStateListDrawableTransition_android_drawable = 0;
public static final int AnimatedStateListDrawableTransition_android_fromId = 2;
public static final int AnimatedStateListDrawableTransition_android_reversible = 3;
public static final int AnimatedStateListDrawableTransition_android_toId = 1;
public static final int AppCompatImageView_android_src = 0;
public static final int AppCompatImageView_srcCompat = 1;
public static final int AppCompatImageView_tint = 2;
public static final int AppCompatImageView_tintMode = 3;
public static final int AppCompatSeekBar_android_thumb = 0;
public static final int AppCompatSeekBar_tickMark = 1;
public static final int AppCompatSeekBar_tickMarkTint = 2;
public static final int AppCompatSeekBar_tickMarkTintMode = 3;
public static final int AppCompatTextHelper_android_drawableBottom = 2;
public static final int AppCompatTextHelper_android_drawableEnd = 6;
public static final int AppCompatTextHelper_android_drawableLeft = 3;
public static final int AppCompatTextHelper_android_drawableRight = 4;
public static final int AppCompatTextHelper_android_drawableStart = 5;
public static final int AppCompatTextHelper_android_drawableTop = 1;
public static final int AppCompatTextHelper_android_textAppearance = 0;
public static final int AppCompatTextView_android_textAppearance = 0;
public static final int AppCompatTextView_autoSizeMaxTextSize = 1;
public static final int AppCompatTextView_autoSizeMinTextSize = 2;
public static final int AppCompatTextView_autoSizePresetSizes = 3;
public static final int AppCompatTextView_autoSizeStepGranularity = 4;
public static final int AppCompatTextView_autoSizeTextType = 5;
public static final int AppCompatTextView_firstBaselineToTopHeight = 6;
public static final int AppCompatTextView_fontFamily = 7;
public static final int AppCompatTextView_lastBaselineToBottomHeight = 8;
public static final int AppCompatTextView_lineHeight = 9;
public static final int AppCompatTextView_textAllCaps = 10;
public static final int AppCompatTheme_actionBarDivider = 2;
public static final int AppCompatTheme_actionBarItemBackground = 3;
public static final int AppCompatTheme_actionBarPopupTheme = 4;
public static final int AppCompatTheme_actionBarSize = 5;
public static final int AppCompatTheme_actionBarSplitStyle = 6;
public static final int AppCompatTheme_actionBarStyle = 7;
public static final int AppCompatTheme_actionBarTabBarStyle = 8;
public static final int AppCompatTheme_actionBarTabStyle = 9;
public static final int AppCompatTheme_actionBarTabTextStyle = 10;
public static final int AppCompatTheme_actionBarTheme = 11;
public static final int AppCompatTheme_actionBarWidgetTheme = 12;
public static final int AppCompatTheme_actionButtonStyle = 13;
public static final int AppCompatTheme_actionDropDownStyle = 14;
public static final int AppCompatTheme_actionMenuTextAppearance = 15;
public static final int AppCompatTheme_actionMenuTextColor = 16;
public static final int AppCompatTheme_actionModeBackground = 17;
public static final int AppCompatTheme_actionModeCloseButtonStyle = 18;
public static final int AppCompatTheme_actionModeCloseDrawable = 19;
public static final int AppCompatTheme_actionModeCopyDrawable = 20;
public static final int AppCompatTheme_actionModeCutDrawable = 21;
public static final int AppCompatTheme_actionModeFindDrawable = 22;
public static final int AppCompatTheme_actionModePasteDrawable = 23;
public static final int AppCompatTheme_actionModePopupWindowStyle = 24;
public static final int AppCompatTheme_actionModeSelectAllDrawable = 25;
public static final int AppCompatTheme_actionModeShareDrawable = 26;
public static final int AppCompatTheme_actionModeSplitBackground = 27;
public static final int AppCompatTheme_actionModeStyle = 28;
public static final int AppCompatTheme_actionModeWebSearchDrawable = 29;
public static final int AppCompatTheme_actionOverflowButtonStyle = 30;
public static final int AppCompatTheme_actionOverflowMenuStyle = 31;
public static final int AppCompatTheme_activityChooserViewStyle = 32;
public static final int AppCompatTheme_alertDialogButtonGroupStyle = 33;
public static final int AppCompatTheme_alertDialogCenterButtons = 34;
public static final int AppCompatTheme_alertDialogStyle = 35;
public static final int AppCompatTheme_alertDialogTheme = 36;
public static final int AppCompatTheme_android_windowAnimationStyle = 1;
public static final int AppCompatTheme_android_windowIsFloating = 0;
public static final int AppCompatTheme_autoCompleteTextViewStyle = 37;
public static final int AppCompatTheme_borderlessButtonStyle = 38;
public static final int AppCompatTheme_buttonBarButtonStyle = 39;
public static final int AppCompatTheme_buttonBarNegativeButtonStyle = 40;
public static final int AppCompatTheme_buttonBarNeutralButtonStyle = 41;
public static final int AppCompatTheme_buttonBarPositiveButtonStyle = 42;
public static final int AppCompatTheme_buttonBarStyle = 43;
public static final int AppCompatTheme_buttonStyle = 44;
public static final int AppCompatTheme_buttonStyleSmall = 45;
public static final int AppCompatTheme_checkboxStyle = 46;
public static final int AppCompatTheme_checkedTextViewStyle = 47;
public static final int AppCompatTheme_colorAccent = 48;
public static final int AppCompatTheme_colorBackgroundFloating = 49;
public static final int AppCompatTheme_colorButtonNormal = 50;
public static final int AppCompatTheme_colorControlActivated = 51;
public static final int AppCompatTheme_colorControlHighlight = 52;
public static final int AppCompatTheme_colorControlNormal = 53;
public static final int AppCompatTheme_colorError = 54;
public static final int AppCompatTheme_colorPrimary = 55;
public static final int AppCompatTheme_colorPrimaryDark = 56;
public static final int AppCompatTheme_colorSwitchThumbNormal = 57;
public static final int AppCompatTheme_controlBackground = 58;
public static final int AppCompatTheme_dialogCornerRadius = 59;
public static final int AppCompatTheme_dialogPreferredPadding = 60;
public static final int AppCompatTheme_dialogTheme = 61;
public static final int AppCompatTheme_dividerHorizontal = 62;
public static final int AppCompatTheme_dividerVertical = 63;
public static final int AppCompatTheme_dropDownListViewStyle = 64;
public static final int AppCompatTheme_dropdownListPreferredItemHeight = 65;
public static final int AppCompatTheme_editTextBackground = 66;
public static final int AppCompatTheme_editTextColor = 67;
public static final int AppCompatTheme_editTextStyle = 68;
public static final int AppCompatTheme_homeAsUpIndicator = 69;
public static final int AppCompatTheme_imageButtonStyle = 70;
public static final int AppCompatTheme_listChoiceBackgroundIndicator = 71;
public static final int AppCompatTheme_listDividerAlertDialog = 72;
public static final int AppCompatTheme_listMenuViewStyle = 73;
public static final int AppCompatTheme_listPopupWindowStyle = 74;
public static final int AppCompatTheme_listPreferredItemHeight = 75;
public static final int AppCompatTheme_listPreferredItemHeightLarge = 76;
public static final int AppCompatTheme_listPreferredItemHeightSmall = 77;
public static final int AppCompatTheme_listPreferredItemPaddingLeft = 78;
public static final int AppCompatTheme_listPreferredItemPaddingRight = 79;
public static final int AppCompatTheme_panelBackground = 80;
public static final int AppCompatTheme_panelMenuListTheme = 81;
public static final int AppCompatTheme_panelMenuListWidth = 82;
public static final int AppCompatTheme_popupMenuStyle = 83;
public static final int AppCompatTheme_popupWindowStyle = 84;
public static final int AppCompatTheme_radioButtonStyle = 85;
public static final int AppCompatTheme_ratingBarStyle = 86;
public static final int AppCompatTheme_ratingBarStyleIndicator = 87;
public static final int AppCompatTheme_ratingBarStyleSmall = 88;
public static final int AppCompatTheme_searchViewStyle = 89;
public static final int AppCompatTheme_seekBarStyle = 90;
public static final int AppCompatTheme_selectableItemBackground = 91;
public static final int AppCompatTheme_selectableItemBackgroundBorderless = 92;
public static final int AppCompatTheme_spinnerDropDownItemStyle = 93;
public static final int AppCompatTheme_spinnerStyle = 94;
public static final int AppCompatTheme_switchStyle = 95;
public static final int AppCompatTheme_textAppearanceLargePopupMenu = 96;
public static final int AppCompatTheme_textAppearanceListItem = 97;
public static final int AppCompatTheme_textAppearanceListItemSecondary = 98;
public static final int AppCompatTheme_textAppearanceListItemSmall = 99;
public static final int AppCompatTheme_textAppearancePopupMenuHeader = 100;
public static final int AppCompatTheme_textAppearanceSearchResultSubtitle = 101;
public static final int AppCompatTheme_textAppearanceSearchResultTitle = 102;
public static final int AppCompatTheme_textAppearanceSmallPopupMenu = 103;
public static final int AppCompatTheme_textColorAlertDialogListItem = 104;
public static final int AppCompatTheme_textColorSearchUrl = 105;
public static final int AppCompatTheme_toolbarNavigationButtonStyle = 106;
public static final int AppCompatTheme_toolbarStyle = 107;
public static final int AppCompatTheme_tooltipForegroundColor = 108;
public static final int AppCompatTheme_tooltipFrameBackground = 109;
public static final int AppCompatTheme_viewInflaterClass = 110;
public static final int AppCompatTheme_windowActionBar = 111;
public static final int AppCompatTheme_windowActionBarOverlay = 112;
public static final int AppCompatTheme_windowActionModeOverlay = 113;
public static final int AppCompatTheme_windowFixedHeightMajor = 114;
public static final int AppCompatTheme_windowFixedHeightMinor = 115;
public static final int AppCompatTheme_windowFixedWidthMajor = 116;
public static final int AppCompatTheme_windowFixedWidthMinor = 117;
public static final int AppCompatTheme_windowMinWidthMajor = 118;
public static final int AppCompatTheme_windowMinWidthMinor = 119;
public static final int AppCompatTheme_windowNoTitle = 120;
public static final int AspectRatioFrameLayout_tw__frame_layout_aspect_ratio = 0;
public static final int AspectRatioFrameLayout_tw__frame_layout_dimension_to_adjust = 1;
public static final int ButtonBarLayout_allowStacking = 0;
public static final int CardView_android_minHeight = 1;
public static final int CardView_android_minWidth = 0;
public static final int CardView_cardBackgroundColor = 2;
public static final int CardView_cardCornerRadius = 3;
public static final int CardView_cardElevation = 4;
public static final int CardView_cardMaxElevation = 5;
public static final int CardView_cardPreventCornerOverlap = 6;
public static final int CardView_cardUseCompatPadding = 7;
public static final int CardView_contentPadding = 8;
public static final int CardView_contentPaddingBottom = 9;
public static final int CardView_contentPaddingLeft = 10;
public static final int CardView_contentPaddingRight = 11;
public static final int CardView_contentPaddingTop = 12;
public static final int ColorStateListItem_alpha = 2;
public static final int ColorStateListItem_android_alpha = 1;
public static final int ColorStateListItem_android_color = 0;
public static final int CompoundButton_android_button = 0;
public static final int CompoundButton_buttonTint = 1;
public static final int CompoundButton_buttonTintMode = 2;
public static final int CoordinatorLayout_Layout_android_layout_gravity = 0;
public static final int CoordinatorLayout_Layout_layout_anchor = 1;
public static final int CoordinatorLayout_Layout_layout_anchorGravity = 2;
public static final int CoordinatorLayout_Layout_layout_behavior = 3;
public static final int CoordinatorLayout_Layout_layout_dodgeInsetEdges = 4;
public static final int CoordinatorLayout_Layout_layout_insetEdge = 5;
public static final int CoordinatorLayout_Layout_layout_keyline = 6;
public static final int CoordinatorLayout_keylines = 0;
public static final int CoordinatorLayout_statusBarBackground = 1;
public static final int DrawerArrowToggle_arrowHeadLength = 0;
public static final int DrawerArrowToggle_arrowShaftLength = 1;
public static final int DrawerArrowToggle_barLength = 2;
public static final int DrawerArrowToggle_color = 3;
public static final int DrawerArrowToggle_drawableSize = 4;
public static final int DrawerArrowToggle_gapBetweenBars = 5;
public static final int DrawerArrowToggle_spinBars = 6;
public static final int DrawerArrowToggle_thickness = 7;
public static final int FontFamilyFont_android_font = 0;
public static final int FontFamilyFont_android_fontStyle = 2;
public static final int FontFamilyFont_android_fontVariationSettings = 4;
public static final int FontFamilyFont_android_fontWeight = 1;
public static final int FontFamilyFont_android_ttcIndex = 3;
public static final int FontFamilyFont_font = 5;
public static final int FontFamilyFont_fontStyle = 6;
public static final int FontFamilyFont_fontVariationSettings = 7;
public static final int FontFamilyFont_fontWeight = 8;
public static final int FontFamilyFont_ttcIndex = 9;
public static final int FontFamily_fontProviderAuthority = 0;
public static final int FontFamily_fontProviderCerts = 1;
public static final int FontFamily_fontProviderFetchStrategy = 2;
public static final int FontFamily_fontProviderFetchTimeout = 3;
public static final int FontFamily_fontProviderPackage = 4;
public static final int FontFamily_fontProviderQuery = 5;
public static final int GradientColorItem_android_color = 0;
public static final int GradientColorItem_android_offset = 1;
public static final int GradientColor_android_centerColor = 7;
public static final int GradientColor_android_centerX = 3;
public static final int GradientColor_android_centerY = 4;
public static final int GradientColor_android_endColor = 1;
public static final int GradientColor_android_endX = 10;
public static final int GradientColor_android_endY = 11;
public static final int GradientColor_android_gradientRadius = 5;
public static final int GradientColor_android_startColor = 0;
public static final int GradientColor_android_startX = 8;
public static final int GradientColor_android_startY = 9;
public static final int GradientColor_android_tileMode = 6;
public static final int GradientColor_android_type = 2;
public static final int LinearLayoutCompat_Layout_android_layout_gravity = 0;
public static final int LinearLayoutCompat_Layout_android_layout_height = 2;
public static final int LinearLayoutCompat_Layout_android_layout_weight = 3;
public static final int LinearLayoutCompat_Layout_android_layout_width = 1;
public static final int LinearLayoutCompat_android_baselineAligned = 2;
public static final int LinearLayoutCompat_android_baselineAlignedChildIndex = 3;
public static final int LinearLayoutCompat_android_gravity = 0;
public static final int LinearLayoutCompat_android_orientation = 1;
public static final int LinearLayoutCompat_android_weightSum = 4;
public static final int LinearLayoutCompat_divider = 5;
public static final int LinearLayoutCompat_dividerPadding = 6;
public static final int LinearLayoutCompat_measureWithLargestChild = 7;
public static final int LinearLayoutCompat_showDividers = 8;
public static final int ListPopupWindow_android_dropDownHorizontalOffset = 0;
public static final int ListPopupWindow_android_dropDownVerticalOffset = 1;
public static final int LoadingImageView_circleCrop = 0;
public static final int LoadingImageView_imageAspectRatio = 1;
public static final int LoadingImageView_imageAspectRatioAdjust = 2;
public static final int MenuGroup_android_checkableBehavior = 5;
public static final int MenuGroup_android_enabled = 0;
public static final int MenuGroup_android_id = 1;
public static final int MenuGroup_android_menuCategory = 3;
public static final int MenuGroup_android_orderInCategory = 4;
public static final int MenuGroup_android_visible = 2;
public static final int MenuItem_actionLayout = 13;
public static final int MenuItem_actionProviderClass = 14;
public static final int MenuItem_actionViewClass = 15;
public static final int MenuItem_alphabeticModifiers = 16;
public static final int MenuItem_android_alphabeticShortcut = 9;
public static final int MenuItem_android_checkable = 11;
public static final int MenuItem_android_checked = 3;
public static final int MenuItem_android_enabled = 1;
public static final int MenuItem_android_icon = 0;
public static final int MenuItem_android_id = 2;
public static final int MenuItem_android_menuCategory = 5;
public static final int MenuItem_android_numericShortcut = 10;
public static final int MenuItem_android_onClick = 12;
public static final int MenuItem_android_orderInCategory = 6;
public static final int MenuItem_android_title = 7;
public static final int MenuItem_android_titleCondensed = 8;
public static final int MenuItem_android_visible = 4;
public static final int MenuItem_contentDescription = 17;
public static final int MenuItem_iconTint = 18;
public static final int MenuItem_iconTintMode = 19;
public static final int MenuItem_numericModifiers = 20;
public static final int MenuItem_showAsAction = 21;
public static final int MenuItem_tooltipText = 22;
public static final int MenuView_android_headerBackground = 4;
public static final int MenuView_android_horizontalDivider = 2;
public static final int MenuView_android_itemBackground = 5;
public static final int MenuView_android_itemIconDisabledAlpha = 6;
public static final int MenuView_android_itemTextAppearance = 1;
public static final int MenuView_android_verticalDivider = 3;
public static final int MenuView_android_windowAnimationStyle = 0;
public static final int MenuView_preserveIconSpacing = 7;
public static final int MenuView_subMenuArrow = 8;
public static final int PopupWindowBackgroundState_state_above_anchor = 0;
public static final int PopupWindow_android_popupAnimationStyle = 1;
public static final int PopupWindow_android_popupBackground = 0;
public static final int PopupWindow_overlapAnchor = 2;
public static final int RecycleListView_paddingBottomNoButtons = 0;
public static final int RecycleListView_paddingTopNoTitle = 1;
public static final int SearchView_android_focusable = 0;
public static final int SearchView_android_imeOptions = 3;
public static final int SearchView_android_inputType = 2;
public static final int SearchView_android_maxWidth = 1;
public static final int SearchView_closeIcon = 4;
public static final int SearchView_commitIcon = 5;
public static final int SearchView_defaultQueryHint = 6;
public static final int SearchView_goIcon = 7;
public static final int SearchView_iconifiedByDefault = 8;
public static final int SearchView_layout = 9;
public static final int SearchView_queryBackground = 10;
public static final int SearchView_queryHint = 11;
public static final int SearchView_searchHintIcon = 12;
public static final int SearchView_searchIcon = 13;
public static final int SearchView_submitBackground = 14;
public static final int SearchView_suggestionRowLayout = 15;
public static final int SearchView_voiceIcon = 16;
public static final int SignInButton_buttonSize = 0;
public static final int SignInButton_colorScheme = 1;
public static final int SignInButton_scopeUris = 2;
public static final int Spinner_android_dropDownWidth = 3;
public static final int Spinner_android_entries = 0;
public static final int Spinner_android_popupBackground = 1;
public static final int Spinner_android_prompt = 2;
public static final int Spinner_popupTheme = 4;
public static final int StateListDrawableItem_android_drawable = 0;
public static final int StateListDrawable_android_constantSize = 3;
public static final int StateListDrawable_android_dither = 0;
public static final int StateListDrawable_android_enterFadeDuration = 4;
public static final int StateListDrawable_android_exitFadeDuration = 5;
public static final int StateListDrawable_android_variablePadding = 2;
public static final int StateListDrawable_android_visible = 1;
public static final int SwitchCompat_android_textOff = 1;
public static final int SwitchCompat_android_textOn = 0;
public static final int SwitchCompat_android_thumb = 2;
public static final int SwitchCompat_showText = 3;
public static final int SwitchCompat_splitTrack = 4;
public static final int SwitchCompat_switchMinWidth = 5;
public static final int SwitchCompat_switchPadding = 6;
public static final int SwitchCompat_switchTextAppearance = 7;
public static final int SwitchCompat_thumbTextPadding = 8;
public static final int SwitchCompat_thumbTint = 9;
public static final int SwitchCompat_thumbTintMode = 10;
public static final int SwitchCompat_track = 11;
public static final int SwitchCompat_trackTint = 12;
public static final int SwitchCompat_trackTintMode = 13;
public static final int TextAppearance_android_fontFamily = 10;
public static final int TextAppearance_android_shadowColor = 6;
public static final int TextAppearance_android_shadowDx = 7;
public static final int TextAppearance_android_shadowDy = 8;
public static final int TextAppearance_android_shadowRadius = 9;
public static final int TextAppearance_android_textColor = 3;
public static final int TextAppearance_android_textColorHint = 4;
public static final int TextAppearance_android_textColorLink = 5;
public static final int TextAppearance_android_textSize = 0;
public static final int TextAppearance_android_textStyle = 2;
public static final int TextAppearance_android_typeface = 1;
public static final int TextAppearance_fontFamily = 11;
public static final int TextAppearance_textAllCaps = 12;
public static final int ToggleImageButton_contentDescriptionOff = 0;
public static final int ToggleImageButton_contentDescriptionOn = 1;
public static final int ToggleImageButton_state_toggled_on = 2;
public static final int ToggleImageButton_toggleOnClick = 3;
public static final int Toolbar_android_gravity = 0;
public static final int Toolbar_android_minHeight = 1;
public static final int Toolbar_buttonGravity = 2;
public static final int Toolbar_collapseContentDescription = 3;
public static final int Toolbar_collapseIcon = 4;
public static final int Toolbar_contentInsetEnd = 5;
public static final int Toolbar_contentInsetEndWithActions = 6;
public static final int Toolbar_contentInsetLeft = 7;
public static final int Toolbar_contentInsetRight = 8;
public static final int Toolbar_contentInsetStart = 9;
public static final int Toolbar_contentInsetStartWithNavigation = 10;
public static final int Toolbar_logo = 11;
public static final int Toolbar_logoDescription = 12;
public static final int Toolbar_maxButtonHeight = 13;
public static final int Toolbar_navigationContentDescription = 14;
public static final int Toolbar_navigationIcon = 15;
public static final int Toolbar_popupTheme = 16;
public static final int Toolbar_subtitle = 17;
public static final int Toolbar_subtitleTextAppearance = 18;
public static final int Toolbar_subtitleTextColor = 19;
public static final int Toolbar_title = 20;
public static final int Toolbar_titleMargin = 21;
public static final int Toolbar_titleMarginBottom = 22;
public static final int Toolbar_titleMarginEnd = 23;
public static final int Toolbar_titleMarginStart = 24;
public static final int Toolbar_titleMarginTop = 25;
public static final int Toolbar_titleMargins = 26;
public static final int Toolbar_titleTextAppearance = 27;
public static final int Toolbar_titleTextColor = 28;
public static final int ViewBackgroundHelper_android_background = 0;
public static final int ViewBackgroundHelper_backgroundTint = 1;
public static final int ViewBackgroundHelper_backgroundTintMode = 2;
public static final int ViewStubCompat_android_id = 0;
public static final int ViewStubCompat_android_inflatedId = 2;
public static final int ViewStubCompat_android_layout = 1;
public static final int View_android_focusable = 1;
public static final int View_android_theme = 0;
public static final int View_paddingEnd = 2;
public static final int View_paddingStart = 3;
public static final int View_theme = 4;
public static final int WheelPicker_wheel_atmospheric = 0;
public static final int WheelPicker_wheel_curtain = 1;
public static final int WheelPicker_wheel_curtain_color = 2;
public static final int WheelPicker_wheel_curved = 3;
public static final int WheelPicker_wheel_cyclic = 4;
public static final int WheelPicker_wheel_data = 5;
public static final int WheelPicker_wheel_font_path = 6;
public static final int WheelPicker_wheel_indicator = 7;
public static final int WheelPicker_wheel_indicator_color = 8;
public static final int WheelPicker_wheel_indicator_size = 9;
public static final int WheelPicker_wheel_item_align = 10;
public static final int WheelPicker_wheel_item_space = 11;
public static final int WheelPicker_wheel_item_text_color = 12;
public static final int WheelPicker_wheel_item_text_size = 13;
public static final int WheelPicker_wheel_maximum_width_text = 14;
public static final int WheelPicker_wheel_maximum_width_text_position = 15;
public static final int WheelPicker_wheel_same_width = 16;
public static final int WheelPicker_wheel_selected_item_position = 17;
public static final int WheelPicker_wheel_selected_item_text_color = 18;
public static final int WheelPicker_wheel_visible_item_count = 19;
public static final int com_facebook_like_view_com_facebook_auxiliary_view_position = 0;
public static final int com_facebook_like_view_com_facebook_foreground_color = 1;
public static final int com_facebook_like_view_com_facebook_horizontal_alignment = 2;
public static final int com_facebook_like_view_com_facebook_object_id = 3;
public static final int com_facebook_like_view_com_facebook_object_type = 4;
public static final int com_facebook_like_view_com_facebook_style = 5;
public static final int com_facebook_login_view_com_facebook_confirm_logout = 0;
public static final int com_facebook_login_view_com_facebook_login_text = 1;
public static final int com_facebook_login_view_com_facebook_logout_text = 2;
public static final int com_facebook_login_view_com_facebook_tooltip_mode = 3;
public static final int com_facebook_profile_picture_view_com_facebook_is_cropped = 0;
public static final int com_facebook_profile_picture_view_com_facebook_preset_size = 1;
public static final int tw__AspectRatioImageView_tw__image_aspect_ratio = 0;
public static final int tw__AspectRatioImageView_tw__image_dimension_to_adjust = 1;
public static final int tw__TweetView_tw__action_color = 0;
public static final int tw__TweetView_tw__action_highlight_color = 1;
public static final int tw__TweetView_tw__container_bg_color = 2;
public static final int tw__TweetView_tw__primary_text_color = 3;
public static final int tw__TweetView_tw__tweet_actions_enabled = 4;
public static final int tw__TweetView_tw__tweet_id = 5;
public static final int u_layout_height_percent = 0;
public static final int u_layout_margin_bottom_percent = 1;
public static final int u_layout_margin_left_percent = 2;
public static final int u_layout_margin_right_percent = 3;
public static final int u_layout_margin_top_percent = 4;
public static final int u_layout_width_percent = 5;
public static final int[] ActionBar = {R.attr.background, R.attr.backgroundSplit, R.attr.backgroundStacked, R.attr.contentInsetEnd, R.attr.contentInsetEndWithActions, R.attr.contentInsetLeft, R.attr.contentInsetRight, R.attr.contentInsetStart, R.attr.contentInsetStartWithNavigation, R.attr.customNavigationLayout, R.attr.displayOptions, R.attr.divider, R.attr.elevation, R.attr.height, R.attr.hideOnContentScroll, R.attr.homeAsUpIndicator, R.attr.homeLayout, R.attr.icon, R.attr.indeterminateProgressStyle, R.attr.itemPadding, R.attr.logo, R.attr.navigationMode, R.attr.popupTheme, R.attr.progressBarPadding, R.attr.progressBarStyle, R.attr.subtitle, R.attr.subtitleTextStyle, R.attr.title, R.attr.titleTextStyle};
public static final int[] ActionBarLayout = {android.R.attr.layout_gravity};
public static final int[] ActionMenuItemView = {android.R.attr.minWidth};
public static final int[] ActionMenuView = new int[0];
public static final int[] ActionMode = {R.attr.background, R.attr.backgroundSplit, R.attr.closeItemLayout, R.attr.height, R.attr.subtitleTextStyle, R.attr.titleTextStyle};
public static final int[] ActivityChooserView = {R.attr.expandActivityOverflowButtonDrawable, R.attr.initialActivityCount};
public static final int[] AlertDialog = {android.R.attr.layout, R.attr.buttonIconDimen, R.attr.buttonPanelSideLayout, R.attr.listItemLayout, R.attr.listLayout, R.attr.multiChoiceItemLayout, R.attr.showTitle, R.attr.singleChoiceItemLayout};
public static final int[] AnimatedStateListDrawableCompat = {android.R.attr.dither, android.R.attr.visible, android.R.attr.variablePadding, android.R.attr.constantSize, android.R.attr.enterFadeDuration, android.R.attr.exitFadeDuration};
public static final int[] AnimatedStateListDrawableItem = {android.R.attr.id, android.R.attr.drawable};
public static final int[] AnimatedStateListDrawableTransition = {android.R.attr.drawable, android.R.attr.toId, android.R.attr.fromId, android.R.attr.reversible};
public static final int[] AppCompatImageView = {android.R.attr.src, R.attr.srcCompat, R.attr.tint, R.attr.tintMode};
public static final int[] AppCompatSeekBar = {android.R.attr.thumb, R.attr.tickMark, R.attr.tickMarkTint, R.attr.tickMarkTintMode};
public static final int[] AppCompatTextHelper = {android.R.attr.textAppearance, android.R.attr.drawableTop, android.R.attr.drawableBottom, android.R.attr.drawableLeft, android.R.attr.drawableRight, android.R.attr.drawableStart, android.R.attr.drawableEnd};
public static final int[] AppCompatTextView = {android.R.attr.textAppearance, R.attr.autoSizeMaxTextSize, R.attr.autoSizeMinTextSize, R.attr.autoSizePresetSizes, R.attr.autoSizeStepGranularity, R.attr.autoSizeTextType, R.attr.firstBaselineToTopHeight, R.attr.fontFamily, R.attr.lastBaselineToBottomHeight, R.attr.lineHeight, R.attr.textAllCaps};
public static final int[] AppCompatTheme = {android.R.attr.windowIsFloating, android.R.attr.windowAnimationStyle, R.attr.actionBarDivider, R.attr.actionBarItemBackground, R.attr.actionBarPopupTheme, R.attr.actionBarSize, R.attr.actionBarSplitStyle, R.attr.actionBarStyle, R.attr.actionBarTabBarStyle, R.attr.actionBarTabStyle, R.attr.actionBarTabTextStyle, R.attr.actionBarTheme, R.attr.actionBarWidgetTheme, R.attr.actionButtonStyle, R.attr.actionDropDownStyle, R.attr.actionMenuTextAppearance, R.attr.actionMenuTextColor, R.attr.actionModeBackground, R.attr.actionModeCloseButtonStyle, R.attr.actionModeCloseDrawable, R.attr.actionModeCopyDrawable, R.attr.actionModeCutDrawable, R.attr.actionModeFindDrawable, R.attr.actionModePasteDrawable, R.attr.actionModePopupWindowStyle, R.attr.actionModeSelectAllDrawable, R.attr.actionModeShareDrawable, R.attr.actionModeSplitBackground, R.attr.actionModeStyle, R.attr.actionModeWebSearchDrawable, R.attr.actionOverflowButtonStyle, R.attr.actionOverflowMenuStyle, R.attr.activityChooserViewStyle, R.attr.alertDialogButtonGroupStyle, R.attr.alertDialogCenterButtons, R.attr.alertDialogStyle, R.attr.alertDialogTheme, R.attr.autoCompleteTextViewStyle, R.attr.borderlessButtonStyle, R.attr.buttonBarButtonStyle, R.attr.buttonBarNegativeButtonStyle, R.attr.buttonBarNeutralButtonStyle, R.attr.buttonBarPositiveButtonStyle, R.attr.buttonBarStyle, R.attr.buttonStyle, R.attr.buttonStyleSmall, R.attr.checkboxStyle, R.attr.checkedTextViewStyle, R.attr.colorAccent, R.attr.colorBackgroundFloating, R.attr.colorButtonNormal, R.attr.colorControlActivated, R.attr.colorControlHighlight, R.attr.colorControlNormal, R.attr.colorError, R.attr.colorPrimary, R.attr.colorPrimaryDark, R.attr.colorSwitchThumbNormal, R.attr.controlBackground, R.attr.dialogCornerRadius, R.attr.dialogPreferredPadding, R.attr.dialogTheme, R.attr.dividerHorizontal, R.attr.dividerVertical, R.attr.dropDownListViewStyle, R.attr.dropdownListPreferredItemHeight, R.attr.editTextBackground, R.attr.editTextColor, R.attr.editTextStyle, R.attr.homeAsUpIndicator, R.attr.imageButtonStyle, R.attr.listChoiceBackgroundIndicator, R.attr.listDividerAlertDialog, R.attr.listMenuViewStyle, R.attr.listPopupWindowStyle, R.attr.listPreferredItemHeight, R.attr.listPreferredItemHeightLarge, R.attr.listPreferredItemHeightSmall, R.attr.listPreferredItemPaddingLeft, R.attr.listPreferredItemPaddingRight, R.attr.panelBackground, R.attr.panelMenuListTheme, R.attr.panelMenuListWidth, R.attr.popupMenuStyle, R.attr.popupWindowStyle, R.attr.radioButtonStyle, R.attr.ratingBarStyle, R.attr.ratingBarStyleIndicator, R.attr.ratingBarStyleSmall, R.attr.searchViewStyle, R.attr.seekBarStyle, R.attr.selectableItemBackground, R.attr.selectableItemBackgroundBorderless, R.attr.spinnerDropDownItemStyle, R.attr.spinnerStyle, R.attr.switchStyle, R.attr.textAppearanceLargePopupMenu, R.attr.textAppearanceListItem, R.attr.textAppearanceListItemSecondary, R.attr.textAppearanceListItemSmall, R.attr.textAppearancePopupMenuHeader, R.attr.textAppearanceSearchResultSubtitle, R.attr.textAppearanceSearchResultTitle, R.attr.textAppearanceSmallPopupMenu, R.attr.textColorAlertDialogListItem, R.attr.textColorSearchUrl, R.attr.toolbarNavigationButtonStyle, R.attr.toolbarStyle, R.attr.tooltipForegroundColor, R.attr.tooltipFrameBackground, R.attr.viewInflaterClass, R.attr.windowActionBar, R.attr.windowActionBarOverlay, R.attr.windowActionModeOverlay, R.attr.windowFixedHeightMajor, R.attr.windowFixedHeightMinor, R.attr.windowFixedWidthMajor, R.attr.windowFixedWidthMinor, R.attr.windowMinWidthMajor, R.attr.windowMinWidthMinor, R.attr.windowNoTitle};
public static final int[] AspectRatioFrameLayout = {R.attr.tw__frame_layout_aspect_ratio, R.attr.tw__frame_layout_dimension_to_adjust};
public static final int[] ButtonBarLayout = {R.attr.allowStacking};
public static final int[] CardView = {android.R.attr.minWidth, android.R.attr.minHeight, R.attr.cardBackgroundColor, R.attr.cardCornerRadius, R.attr.cardElevation, R.attr.cardMaxElevation, R.attr.cardPreventCornerOverlap, R.attr.cardUseCompatPadding, R.attr.contentPadding, R.attr.contentPaddingBottom, R.attr.contentPaddingLeft, R.attr.contentPaddingRight, R.attr.contentPaddingTop};
public static final int[] ColorStateListItem = {android.R.attr.color, android.R.attr.alpha, R.attr.alpha};
public static final int[] CompoundButton = {android.R.attr.button, R.attr.buttonTint, R.attr.buttonTintMode};
public static final int[] CoordinatorLayout = {R.attr.keylines, R.attr.statusBarBackground};
public static final int[] CoordinatorLayout_Layout = {android.R.attr.layout_gravity, R.attr.layout_anchor, R.attr.layout_anchorGravity, R.attr.layout_behavior, R.attr.layout_dodgeInsetEdges, R.attr.layout_insetEdge, R.attr.layout_keyline};
public static final int[] DrawerArrowToggle = {R.attr.arrowHeadLength, R.attr.arrowShaftLength, R.attr.barLength, R.attr.color, R.attr.drawableSize, R.attr.gapBetweenBars, R.attr.spinBars, R.attr.thickness};
public static final int[] FontFamily = {R.attr.fontProviderAuthority, R.attr.fontProviderCerts, R.attr.fontProviderFetchStrategy, R.attr.fontProviderFetchTimeout, R.attr.fontProviderPackage, R.attr.fontProviderQuery};
public static final int[] FontFamilyFont = {android.R.attr.font, android.R.attr.fontWeight, android.R.attr.fontStyle, android.R.attr.ttcIndex, android.R.attr.fontVariationSettings, R.attr.font, R.attr.fontStyle, R.attr.fontVariationSettings, R.attr.fontWeight, R.attr.ttcIndex};
public static final int[] GradientColor = {android.R.attr.startColor, android.R.attr.endColor, android.R.attr.type, android.R.attr.centerX, android.R.attr.centerY, android.R.attr.gradientRadius, android.R.attr.tileMode, android.R.attr.centerColor, android.R.attr.startX, android.R.attr.startY, android.R.attr.endX, android.R.attr.endY};
public static final int[] GradientColorItem = {android.R.attr.color, android.R.attr.offset};
public static final int[] LinearLayoutCompat = {android.R.attr.gravity, android.R.attr.orientation, android.R.attr.baselineAligned, android.R.attr.baselineAlignedChildIndex, android.R.attr.weightSum, R.attr.divider, R.attr.dividerPadding, R.attr.measureWithLargestChild, R.attr.showDividers};
public static final int[] LinearLayoutCompat_Layout = {android.R.attr.layout_gravity, android.R.attr.layout_width, android.R.attr.layout_height, android.R.attr.layout_weight};
public static final int[] ListPopupWindow = {android.R.attr.dropDownHorizontalOffset, android.R.attr.dropDownVerticalOffset};
public static final int[] LoadingImageView = {R.attr.circleCrop, R.attr.imageAspectRatio, R.attr.imageAspectRatioAdjust};
public static final int[] MenuGroup = {android.R.attr.enabled, android.R.attr.id, android.R.attr.visible, android.R.attr.menuCategory, android.R.attr.orderInCategory, android.R.attr.checkableBehavior};
public static final int[] MenuItem = {android.R.attr.icon, android.R.attr.enabled, android.R.attr.id, android.R.attr.checked, android.R.attr.visible, android.R.attr.menuCategory, android.R.attr.orderInCategory, android.R.attr.title, android.R.attr.titleCondensed, android.R.attr.alphabeticShortcut, android.R.attr.numericShortcut, android.R.attr.checkable, android.R.attr.onClick, R.attr.actionLayout, R.attr.actionProviderClass, R.attr.actionViewClass, R.attr.alphabeticModifiers, R.attr.contentDescription, R.attr.iconTint, R.attr.iconTintMode, R.attr.numericModifiers, R.attr.showAsAction, R.attr.tooltipText};
public static final int[] MenuView = {android.R.attr.windowAnimationStyle, android.R.attr.itemTextAppearance, android.R.attr.horizontalDivider, android.R.attr.verticalDivider, android.R.attr.headerBackground, android.R.attr.itemBackground, android.R.attr.itemIconDisabledAlpha, R.attr.preserveIconSpacing, R.attr.subMenuArrow};
public static final int[] PopupWindow = {android.R.attr.popupBackground, android.R.attr.popupAnimationStyle, R.attr.overlapAnchor};
public static final int[] PopupWindowBackgroundState = {R.attr.state_above_anchor};
public static final int[] RecycleListView = {R.attr.paddingBottomNoButtons, R.attr.paddingTopNoTitle};
public static final int[] SearchView = {android.R.attr.focusable, android.R.attr.maxWidth, android.R.attr.inputType, android.R.attr.imeOptions, R.attr.closeIcon, R.attr.commitIcon, R.attr.defaultQueryHint, R.attr.goIcon, R.attr.iconifiedByDefault, R.attr.layout, R.attr.queryBackground, R.attr.queryHint, R.attr.searchHintIcon, R.attr.searchIcon, R.attr.submitBackground, R.attr.suggestionRowLayout, R.attr.voiceIcon};
public static final int[] SignInButton = {R.attr.buttonSize, R.attr.colorScheme, R.attr.scopeUris};
public static final int[] Spinner = {android.R.attr.entries, android.R.attr.popupBackground, android.R.attr.prompt, android.R.attr.dropDownWidth, R.attr.popupTheme};
public static final int[] StateListDrawable = {android.R.attr.dither, android.R.attr.visible, android.R.attr.variablePadding, android.R.attr.constantSize, android.R.attr.enterFadeDuration, android.R.attr.exitFadeDuration};
public static final int[] StateListDrawableItem = {android.R.attr.drawable};
public static final int[] SwitchCompat = {android.R.attr.textOn, android.R.attr.textOff, android.R.attr.thumb, R.attr.showText, R.attr.splitTrack, R.attr.switchMinWidth, R.attr.switchPadding, R.attr.switchTextAppearance, R.attr.thumbTextPadding, R.attr.thumbTint, R.attr.thumbTintMode, R.attr.track, R.attr.trackTint, R.attr.trackTintMode};
public static final int[] TextAppearance = {android.R.attr.textSize, android.R.attr.typeface, android.R.attr.textStyle, android.R.attr.textColor, android.R.attr.textColorHint, android.R.attr.textColorLink, android.R.attr.shadowColor, android.R.attr.shadowDx, android.R.attr.shadowDy, android.R.attr.shadowRadius, android.R.attr.fontFamily, R.attr.fontFamily, R.attr.textAllCaps};
public static final int[] ToggleImageButton = {R.attr.contentDescriptionOff, R.attr.contentDescriptionOn, R.attr.state_toggled_on, R.attr.toggleOnClick};
public static final int[] Toolbar = {android.R.attr.gravity, android.R.attr.minHeight, R.attr.buttonGravity, R.attr.collapseContentDescription, R.attr.collapseIcon, R.attr.contentInsetEnd, R.attr.contentInsetEndWithActions, R.attr.contentInsetLeft, R.attr.contentInsetRight, R.attr.contentInsetStart, R.attr.contentInsetStartWithNavigation, R.attr.logo, R.attr.logoDescription, R.attr.maxButtonHeight, R.attr.navigationContentDescription, R.attr.navigationIcon, R.attr.popupTheme, R.attr.subtitle, R.attr.subtitleTextAppearance, R.attr.subtitleTextColor, R.attr.title, R.attr.titleMargin, R.attr.titleMarginBottom, R.attr.titleMarginEnd, R.attr.titleMarginStart, R.attr.titleMarginTop, R.attr.titleMargins, R.attr.titleTextAppearance, R.attr.titleTextColor};
public static final int[] View = {android.R.attr.theme, android.R.attr.focusable, R.attr.paddingEnd, R.attr.paddingStart, R.attr.theme};
public static final int[] ViewBackgroundHelper = {android.R.attr.background, R.attr.backgroundTint, R.attr.backgroundTintMode};
public static final int[] ViewStubCompat = {android.R.attr.id, android.R.attr.layout, android.R.attr.inflatedId};
public static final int[] WheelPicker = {R.attr.wheel_atmospheric, R.attr.wheel_curtain, R.attr.wheel_curtain_color, R.attr.wheel_curved, R.attr.wheel_cyclic, R.attr.wheel_data, R.attr.wheel_font_path, R.attr.wheel_indicator, R.attr.wheel_indicator_color, R.attr.wheel_indicator_size, R.attr.wheel_item_align, R.attr.wheel_item_space, R.attr.wheel_item_text_color, R.attr.wheel_item_text_size, R.attr.wheel_maximum_width_text, R.attr.wheel_maximum_width_text_position, R.attr.wheel_same_width, R.attr.wheel_selected_item_position, R.attr.wheel_selected_item_text_color, R.attr.wheel_visible_item_count};
public static final int[] com_facebook_like_view = {R.attr.com_facebook_auxiliary_view_position, R.attr.com_facebook_foreground_color, R.attr.com_facebook_horizontal_alignment, R.attr.com_facebook_object_id, R.attr.com_facebook_object_type, R.attr.com_facebook_style};
public static final int[] com_facebook_login_view = {R.attr.com_facebook_confirm_logout, R.attr.com_facebook_login_text, R.attr.com_facebook_logout_text, R.attr.com_facebook_tooltip_mode};
public static final int[] com_facebook_profile_picture_view = {R.attr.com_facebook_is_cropped, R.attr.com_facebook_preset_size};
public static final int[] tw__AspectRatioImageView = {R.attr.tw__image_aspect_ratio, R.attr.tw__image_dimension_to_adjust};
public static final int[] tw__TweetView = {R.attr.tw__action_color, R.attr.tw__action_highlight_color, R.attr.tw__container_bg_color, R.attr.tw__primary_text_color, R.attr.tw__tweet_actions_enabled, R.attr.tw__tweet_id};
public static final int[] u_layout = {R.attr.height_percent, R.attr.margin_bottom_percent, R.attr.margin_left_percent, R.attr.margin_right_percent, R.attr.margin_top_percent, R.attr.width_percent};
}

View File

@@ -0,0 +1,846 @@
package com.aigestudio.wheelpicker;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Camera;
import android.graphics.Canvas;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.graphics.Rect;
import android.graphics.Region;
import android.graphics.Typeface;
import android.os.Build;
import android.os.Handler;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.util.Log;
import android.view.MotionEvent;
import android.view.VelocityTracker;
import android.view.View;
import android.view.ViewConfiguration;
import android.widget.Scroller;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
/* loaded from: classes.dex */
public class WheelPicker extends View implements IDebug, IWheelPicker, Runnable {
private static final String i0 = WheelPicker.class.getSimpleName();
private static final Handler j0 = new Handler();
private int A;
private int B;
private int C;
private int D;
private int E;
private int F;
private int G;
private int H;
private int I;
private int J;
private int K;
private int L;
private int M;
private int N;
private int O;
private int P;
private int Q;
private int R;
private int S;
private int T;
private int U;
private boolean V;
private boolean W;
private Paint a;
private boolean a0;
private Scroller b;
private boolean b0;
private VelocityTracker c;
private boolean c0;
private boolean d;
private boolean d0;
private OnItemSelectedListener e;
private boolean e0;
private OnWheelChangeListener f;
private boolean f0;
private Rect g;
private String g0;
private Rect h;
private boolean h0;
private Rect i;
private Rect j;
private Camera k;
private Matrix l;
private Matrix m;
private List n;
private String o;
private int p;
private int q;
private int r;
private int s;
private int t;
private int u;
private int v;
private int x;
private int y;
private int z;
public interface OnItemSelectedListener {
void a(WheelPicker wheelPicker, Object obj, int i);
}
public interface OnWheelChangeListener {
void a(int i);
void b(int i);
void c(int i);
}
public WheelPicker(Context context) {
this(context, null);
}
private int a(int i, int i2, int i3) {
return i == 1073741824 ? i2 : i == Integer.MIN_VALUE ? Math.min(i3, i2) : i3;
}
private void b() {
int i = this.C;
if (i == 1) {
this.O = this.g.left;
} else if (i != 2) {
this.O = this.M;
} else {
this.O = this.g.right;
}
this.P = (int) (this.N - ((this.a.ascent() + this.a.descent()) / 2.0f));
}
private void c() {
int i = this.G;
int i2 = this.D;
int i3 = i * i2;
this.I = this.c0 ? Integer.MIN_VALUE : ((-i2) * (this.n.size() - 1)) + i3;
if (this.c0) {
i3 = Integer.MAX_VALUE;
}
this.J = i3;
}
private void d() {
if (this.W) {
int i = this.y / 2;
int i2 = this.N;
int i3 = this.E;
int i4 = i2 + i3;
int i5 = i2 - i3;
Rect rect = this.h;
Rect rect2 = this.g;
rect.set(rect2.left, i4 - i, rect2.right, i4 + i);
Rect rect3 = this.i;
Rect rect4 = this.g;
rect3.set(rect4.left, i5 - i, rect4.right, i5 + i);
}
}
private void e() {
this.t = 0;
this.s = 0;
if (this.V) {
this.s = (int) this.a.measureText(String.valueOf(this.n.get(0)));
} else if (d(this.R)) {
this.s = (int) this.a.measureText(String.valueOf(this.n.get(this.R)));
} else if (TextUtils.isEmpty(this.o)) {
Iterator it = this.n.iterator();
while (it.hasNext()) {
this.s = Math.max(this.s, (int) this.a.measureText(String.valueOf(it.next())));
}
} else {
this.s = (int) this.a.measureText(this.o);
}
Paint.FontMetrics fontMetrics = this.a.getFontMetrics();
this.t = (int) (fontMetrics.bottom - fontMetrics.top);
}
private void f() {
int i = this.C;
if (i == 1) {
this.a.setTextAlign(Paint.Align.LEFT);
} else if (i != 2) {
this.a.setTextAlign(Paint.Align.CENTER);
} else {
this.a.setTextAlign(Paint.Align.RIGHT);
}
}
private void j() {
int i = this.p;
if (i < 2) {
throw new ArithmeticException("Wheel's visible item count can not be less than 2!");
}
if (i % 2 == 0) {
this.p = i + 1;
}
this.q = this.p + 2;
this.r = this.q / 2;
}
public int getCurrentItemPosition() {
return this.H;
}
public int getCurtainColor() {
return this.A;
}
public List getData() {
return this.n;
}
public int getIndicatorColor() {
return this.z;
}
public int getIndicatorSize() {
return this.y;
}
public int getItemAlign() {
return this.C;
}
public int getItemSpace() {
return this.B;
}
public int getItemTextColor() {
return this.u;
}
public int getItemTextSize() {
return this.x;
}
public String getMaximumWidthText() {
return this.o;
}
public int getMaximumWidthTextPosition() {
return this.R;
}
public int getSelectedItemPosition() {
return this.G;
}
public int getSelectedItemTextColor() {
return this.v;
}
public Typeface getTypeface() {
Paint paint = this.a;
if (paint != null) {
return paint.getTypeface();
}
return null;
}
public int getVisibleItemCount() {
return this.p;
}
@Override // android.view.View
protected void onDraw(Canvas canvas) {
String valueOf;
int i;
OnWheelChangeListener onWheelChangeListener = this.f;
if (onWheelChangeListener != null) {
onWheelChangeListener.a(this.Q);
}
int i2 = (-this.Q) / this.D;
int i3 = this.r;
int i4 = i2 - i3;
int i5 = this.G + i4;
int i6 = -i3;
while (i5 < this.G + i4 + this.q) {
if (this.c0) {
int size = i5 % this.n.size();
if (size < 0) {
size += this.n.size();
}
valueOf = String.valueOf(this.n.get(size));
} else {
valueOf = d(i5) ? String.valueOf(this.n.get(i5)) : "";
}
this.a.setColor(this.u);
this.a.setStyle(Paint.Style.FILL);
int i7 = this.P;
int i8 = this.D;
int i9 = (i6 * i8) + i7 + (this.Q % i8);
if (this.d0) {
int abs = i7 - Math.abs(i7 - i9);
int i10 = this.g.top;
int i11 = this.P;
float f = (-(1.0f - (((abs - i10) * 1.0f) / (i11 - i10)))) * 90.0f * (i9 > i11 ? 1 : i9 < i11 ? -1 : 0);
if (f < -90.0f) {
f = -90.0f;
}
if (f > 90.0f) {
f = 90.0f;
}
i = c((int) f);
int i12 = this.M;
int i13 = this.C;
if (i13 == 1) {
i12 = this.g.left;
} else if (i13 == 2) {
i12 = this.g.right;
}
int i14 = this.N - i;
this.k.save();
this.k.rotateX(f);
this.k.getMatrix(this.l);
this.k.restore();
float f2 = -i12;
float f3 = -i14;
this.l.preTranslate(f2, f3);
float f4 = i12;
float f5 = i14;
this.l.postTranslate(f4, f5);
this.k.save();
this.k.translate(0.0f, 0.0f, a(r12));
this.k.getMatrix(this.m);
this.k.restore();
this.m.preTranslate(f2, f3);
this.m.postTranslate(f4, f5);
this.l.postConcat(this.m);
} else {
i = 0;
}
if (this.b0) {
int i15 = this.P;
int abs2 = (int) ((((i15 - Math.abs(i15 - i9)) * 1.0f) / this.P) * 255.0f);
if (abs2 < 0) {
abs2 = 0;
}
this.a.setAlpha(abs2);
}
if (this.d0) {
i9 = this.P - i;
}
if (this.v != -1) {
canvas.save();
if (this.d0) {
canvas.concat(this.l);
}
canvas.clipRect(this.j, Region.Op.DIFFERENCE);
float f6 = i9;
canvas.drawText(valueOf, this.O, f6, this.a);
canvas.restore();
this.a.setColor(this.v);
canvas.save();
if (this.d0) {
canvas.concat(this.l);
}
canvas.clipRect(this.j);
canvas.drawText(valueOf, this.O, f6, this.a);
canvas.restore();
} else {
canvas.save();
canvas.clipRect(this.g);
if (this.d0) {
canvas.concat(this.l);
}
canvas.drawText(valueOf, this.O, i9, this.a);
canvas.restore();
}
if (this.h0) {
canvas.save();
canvas.clipRect(this.g);
this.a.setColor(-1166541);
int i16 = this.N + (this.D * i6);
Rect rect = this.g;
float f7 = i16;
canvas.drawLine(rect.left, f7, rect.right, f7, this.a);
this.a.setColor(-13421586);
this.a.setStyle(Paint.Style.STROKE);
int i17 = i16 - this.E;
Rect rect2 = this.g;
canvas.drawRect(rect2.left, i17, rect2.right, i17 + this.D, this.a);
canvas.restore();
}
i5++;
i6++;
}
if (this.a0) {
this.a.setColor(this.A);
this.a.setStyle(Paint.Style.FILL);
canvas.drawRect(this.j, this.a);
}
if (this.W) {
this.a.setColor(this.z);
this.a.setStyle(Paint.Style.FILL);
canvas.drawRect(this.h, this.a);
canvas.drawRect(this.i, this.a);
}
if (this.h0) {
this.a.setColor(1144254003);
this.a.setStyle(Paint.Style.FILL);
canvas.drawRect(0.0f, 0.0f, getPaddingLeft(), getHeight(), this.a);
canvas.drawRect(0.0f, 0.0f, getWidth(), getPaddingTop(), this.a);
canvas.drawRect(getWidth() - getPaddingRight(), 0.0f, getWidth(), getHeight(), this.a);
canvas.drawRect(0.0f, getHeight() - getPaddingBottom(), getWidth(), getHeight(), this.a);
}
}
@Override // android.view.View
protected void onMeasure(int i, int i2) {
int mode = View.MeasureSpec.getMode(i);
int mode2 = View.MeasureSpec.getMode(i2);
int size = View.MeasureSpec.getSize(i);
int size2 = View.MeasureSpec.getSize(i2);
int i3 = this.s;
int i4 = this.t;
int i5 = this.p;
int i6 = (i4 * i5) + (this.B * (i5 - 1));
if (this.d0) {
i6 = (int) ((i6 * 2) / 3.141592653589793d);
}
if (this.h0) {
Log.i(i0, "Wheel's content size is (" + i3 + ":" + i6 + ")");
}
int paddingLeft = i3 + getPaddingLeft() + getPaddingRight();
int paddingTop = i6 + getPaddingTop() + getPaddingBottom();
if (this.h0) {
Log.i(i0, "Wheel's size is (" + paddingLeft + ":" + paddingTop + ")");
}
setMeasuredDimension(a(mode, size, paddingLeft), a(mode2, size2, paddingTop));
}
@Override // android.view.View
protected void onSizeChanged(int i, int i2, int i3, int i4) {
this.g.set(getPaddingLeft(), getPaddingTop(), getWidth() - getPaddingRight(), getHeight() - getPaddingBottom());
if (this.h0) {
Log.i(i0, "Wheel's drawn rect size is (" + this.g.width() + ":" + this.g.height() + ") and location is (" + this.g.left + ":" + this.g.top + ")");
}
this.M = this.g.centerX();
this.N = this.g.centerY();
b();
this.F = this.g.height() / 2;
this.D = this.g.height() / this.p;
this.E = (this.D * 3) / 5;
c();
d();
a();
}
@Override // android.view.View
public boolean onTouchEvent(MotionEvent motionEvent) {
int action = motionEvent.getAction();
if (action == 0) {
this.d = true;
if (getParent() != null) {
getParent().requestDisallowInterceptTouchEvent(true);
}
VelocityTracker velocityTracker = this.c;
if (velocityTracker == null) {
this.c = VelocityTracker.obtain();
} else {
velocityTracker.clear();
}
this.c.addMovement(motionEvent);
if (!this.b.isFinished()) {
this.b.abortAnimation();
this.f0 = true;
}
int y = (int) motionEvent.getY();
this.S = y;
this.T = y;
} else if (action == 1) {
if (getParent() != null) {
getParent().requestDisallowInterceptTouchEvent(false);
}
if (!this.e0 || this.f0) {
this.c.addMovement(motionEvent);
if (Build.VERSION.SDK_INT >= 4) {
this.c.computeCurrentVelocity(1000, this.L);
} else {
this.c.computeCurrentVelocity(1000);
}
this.f0 = false;
int yVelocity = (int) this.c.getYVelocity();
if (Math.abs(yVelocity) > this.K) {
this.b.fling(0, this.Q, 0, yVelocity, 0, 0, this.I, this.J);
Scroller scroller = this.b;
scroller.setFinalY(scroller.getFinalY() + b(this.b.getFinalY() % this.D));
} else {
Scroller scroller2 = this.b;
int i = this.Q;
scroller2.startScroll(0, i, 0, b(i % this.D));
}
if (!this.c0) {
int finalY = this.b.getFinalY();
int i2 = this.J;
if (finalY > i2) {
this.b.setFinalY(i2);
} else {
int finalY2 = this.b.getFinalY();
int i3 = this.I;
if (finalY2 < i3) {
this.b.setFinalY(i3);
}
}
}
j0.post(this);
VelocityTracker velocityTracker2 = this.c;
if (velocityTracker2 != null) {
velocityTracker2.recycle();
this.c = null;
}
}
} else if (action != 2) {
if (action == 3) {
if (getParent() != null) {
getParent().requestDisallowInterceptTouchEvent(false);
}
VelocityTracker velocityTracker3 = this.c;
if (velocityTracker3 != null) {
velocityTracker3.recycle();
this.c = null;
}
}
} else if (Math.abs(this.T - motionEvent.getY()) < this.U) {
this.e0 = true;
} else {
this.e0 = false;
this.c.addMovement(motionEvent);
OnWheelChangeListener onWheelChangeListener = this.f;
if (onWheelChangeListener != null) {
onWheelChangeListener.b(1);
}
float y2 = motionEvent.getY() - this.S;
if (Math.abs(y2) >= 1.0f) {
this.Q = (int) (this.Q + y2);
this.S = (int) motionEvent.getY();
invalidate();
}
}
return true;
}
@Override // java.lang.Runnable
public void run() {
List list = this.n;
if (list == null || list.size() == 0) {
return;
}
if (this.b.isFinished() && !this.f0) {
int i = this.D;
if (i == 0) {
return;
}
int size = (((-this.Q) / i) + this.G) % this.n.size();
if (size < 0) {
size += this.n.size();
}
if (this.h0) {
Log.i(i0, size + ":" + this.n.get(size) + ":" + this.Q);
}
this.H = size;
OnItemSelectedListener onItemSelectedListener = this.e;
if (onItemSelectedListener != null && this.d) {
onItemSelectedListener.a(this, this.n.get(size), size);
}
OnWheelChangeListener onWheelChangeListener = this.f;
if (onWheelChangeListener != null && this.d) {
onWheelChangeListener.c(size);
this.f.b(0);
}
}
if (this.b.computeScrollOffset()) {
OnWheelChangeListener onWheelChangeListener2 = this.f;
if (onWheelChangeListener2 != null) {
onWheelChangeListener2.b(2);
}
this.Q = this.b.getCurrY();
postInvalidate();
j0.postDelayed(this, 16L);
}
}
public void setAtmospheric(boolean z) {
this.b0 = z;
invalidate();
}
public void setCurtain(boolean z) {
this.a0 = z;
a();
invalidate();
}
public void setCurtainColor(int i) {
this.A = i;
invalidate();
}
public void setCurved(boolean z) {
this.d0 = z;
requestLayout();
invalidate();
}
public void setCyclic(boolean z) {
this.c0 = z;
c();
invalidate();
}
public void setData(List list) {
if (list == null) {
throw new NullPointerException("WheelPicker's data can not be null!");
}
this.n = list;
if (this.G > list.size() - 1 || this.H > list.size() - 1) {
int size = list.size() - 1;
this.H = size;
this.G = size;
} else {
this.G = this.H;
}
this.Q = 0;
e();
c();
requestLayout();
invalidate();
}
public void setDebug(boolean z) {
this.h0 = z;
}
public void setIndicator(boolean z) {
this.W = z;
d();
invalidate();
}
public void setIndicatorColor(int i) {
this.z = i;
invalidate();
}
public void setIndicatorSize(int i) {
this.y = i;
d();
invalidate();
}
public void setItemAlign(int i) {
this.C = i;
f();
b();
invalidate();
}
public void setItemSpace(int i) {
this.B = i;
requestLayout();
invalidate();
}
public void setItemTextColor(int i) {
this.u = i;
invalidate();
}
public void setItemTextSize(int i) {
this.x = i;
this.a.setTextSize(this.x);
e();
requestLayout();
invalidate();
}
public void setMaximumWidthText(String str) {
if (str == null) {
throw new NullPointerException("Maximum width text can not be null!");
}
this.o = str;
e();
requestLayout();
invalidate();
}
public void setMaximumWidthTextPosition(int i) {
if (d(i)) {
this.R = i;
e();
requestLayout();
invalidate();
return;
}
throw new ArrayIndexOutOfBoundsException("Maximum width text Position must in [0, " + this.n.size() + "), but current is " + i);
}
public void setOnItemSelectedListener(OnItemSelectedListener onItemSelectedListener) {
this.e = onItemSelectedListener;
}
public void setOnWheelChangeListener(OnWheelChangeListener onWheelChangeListener) {
this.f = onWheelChangeListener;
}
public void setSameWidth(boolean z) {
this.V = z;
e();
requestLayout();
invalidate();
}
public void setSelectedItemPosition(int i) {
a(i, true);
}
public void setSelectedItemTextColor(int i) {
this.v = i;
a();
invalidate();
}
public void setTypeface(Typeface typeface) {
Paint paint = this.a;
if (paint != null) {
paint.setTypeface(typeface);
}
e();
requestLayout();
invalidate();
}
public void setVisibleItemCount(int i) {
this.p = i;
j();
requestLayout();
}
public WheelPicker(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
this.K = 50;
this.L = 8000;
this.U = 8;
this.W = true;
TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, R$styleable.WheelPicker);
int resourceId = obtainStyledAttributes.getResourceId(R$styleable.WheelPicker_wheel_data, 0);
this.n = Arrays.asList(getResources().getStringArray(resourceId == 0 ? R$array.WheelArrayWeek : resourceId));
this.x = obtainStyledAttributes.getDimensionPixelSize(R$styleable.WheelPicker_wheel_item_text_size, getResources().getDimensionPixelSize(R$dimen.wheel_item_text_size));
this.p = obtainStyledAttributes.getInt(R$styleable.WheelPicker_wheel_visible_item_count, 7);
this.G = obtainStyledAttributes.getInt(R$styleable.WheelPicker_wheel_selected_item_position, 0);
this.V = obtainStyledAttributes.getBoolean(R$styleable.WheelPicker_wheel_same_width, false);
this.R = obtainStyledAttributes.getInt(R$styleable.WheelPicker_wheel_maximum_width_text_position, -1);
this.o = obtainStyledAttributes.getString(R$styleable.WheelPicker_wheel_maximum_width_text);
this.v = obtainStyledAttributes.getColor(R$styleable.WheelPicker_wheel_selected_item_text_color, -1);
this.u = obtainStyledAttributes.getColor(R$styleable.WheelPicker_wheel_item_text_color, -7829368);
this.B = obtainStyledAttributes.getDimensionPixelSize(R$styleable.WheelPicker_wheel_item_space, getResources().getDimensionPixelSize(R$dimen.wheel_item_space));
this.c0 = obtainStyledAttributes.getBoolean(R$styleable.WheelPicker_wheel_cyclic, false);
this.W = obtainStyledAttributes.getBoolean(R$styleable.WheelPicker_wheel_indicator, false);
this.z = obtainStyledAttributes.getColor(R$styleable.WheelPicker_wheel_indicator_color, -1166541);
this.y = obtainStyledAttributes.getDimensionPixelSize(R$styleable.WheelPicker_wheel_indicator_size, getResources().getDimensionPixelSize(R$dimen.wheel_indicator_size));
this.a0 = obtainStyledAttributes.getBoolean(R$styleable.WheelPicker_wheel_curtain, false);
this.A = obtainStyledAttributes.getColor(R$styleable.WheelPicker_wheel_curtain_color, -1996488705);
this.b0 = obtainStyledAttributes.getBoolean(R$styleable.WheelPicker_wheel_atmospheric, false);
this.d0 = obtainStyledAttributes.getBoolean(R$styleable.WheelPicker_wheel_curved, false);
this.C = obtainStyledAttributes.getInt(R$styleable.WheelPicker_wheel_item_align, 0);
this.g0 = obtainStyledAttributes.getString(R$styleable.WheelPicker_wheel_font_path);
obtainStyledAttributes.recycle();
j();
this.a = new Paint(69);
this.a.setTextSize(this.x);
if (this.g0 != null) {
setTypeface(Typeface.createFromAsset(context.getAssets(), this.g0));
}
f();
e();
this.b = new Scroller(getContext());
if (Build.VERSION.SDK_INT >= 4) {
ViewConfiguration viewConfiguration = ViewConfiguration.get(getContext());
this.K = viewConfiguration.getScaledMinimumFlingVelocity();
this.L = viewConfiguration.getScaledMaximumFlingVelocity();
this.U = viewConfiguration.getScaledTouchSlop();
}
this.g = new Rect();
this.h = new Rect();
this.i = new Rect();
this.j = new Rect();
this.k = new Camera();
this.l = new Matrix();
this.m = new Matrix();
}
private void a() {
if (this.a0 || this.v != -1) {
Rect rect = this.j;
Rect rect2 = this.g;
int i = rect2.left;
int i2 = this.N;
int i3 = this.E;
rect.set(i, i2 - i3, rect2.right, i2 + i3);
}
}
private int a(int i) {
return (int) (this.F - (Math.cos(Math.toRadians(i)) * this.F));
}
private int c(int i) {
return (int) (Math.sin(Math.toRadians(i)) * this.F);
}
public void a(int i, boolean z) {
this.d = false;
if (z && this.b.isFinished()) {
int size = getData().size();
int i2 = i - this.H;
if (i2 == 0) {
return;
}
if (this.c0 && Math.abs(i2) > size / 2) {
if (i2 > 0) {
size = -size;
}
i2 += size;
}
Scroller scroller = this.b;
scroller.startScroll(0, scroller.getCurrY(), 0, (-i2) * this.D);
j0.post(this);
return;
}
if (!this.b.isFinished()) {
this.b.abortAnimation();
}
int max = Math.max(Math.min(i, this.n.size() - 1), 0);
this.G = max;
this.H = max;
this.Q = 0;
c();
requestLayout();
invalidate();
}
private int b(int i) {
int i2;
if (Math.abs(i) <= this.E) {
return -i;
}
if (this.Q < 0) {
i2 = -this.D;
} else {
i2 = this.D;
}
return i2 - i;
}
private boolean d(int i) {
return i >= 0 && i < this.n.size();
}
}

View File

@@ -0,0 +1,26 @@
package com.aigestudio.wheelpicker.model;
import java.io.Serializable;
import java.util.List;
/* loaded from: classes.dex */
public class City implements Serializable {
public List<String> area;
public String name;
public List<String> getArea() {
return this.area;
}
public String getName() {
return this.name;
}
public void setArea(List<String> list) {
this.area = list;
}
public void setName(String str) {
this.name = str;
}
}

View File

@@ -0,0 +1,26 @@
package com.aigestudio.wheelpicker.model;
import java.io.Serializable;
import java.util.List;
/* loaded from: classes.dex */
public class Province implements Serializable {
public List<City> city;
public String name;
public List<City> getCity() {
return this.city;
}
public String getName() {
return this.name;
}
public void setCity(List<City> list) {
this.city = list;
}
public void setName(String str) {
this.name = str;
}
}

View File

@@ -0,0 +1,5 @@
package com.aigestudio.wheelpicker.widgets;
/* loaded from: classes.dex */
public interface IWheelDayPicker {
}

View File

@@ -0,0 +1,5 @@
package com.aigestudio.wheelpicker.widgets;
/* loaded from: classes.dex */
public interface IWheelMonthPicker {
}

View File

@@ -0,0 +1,5 @@
package com.aigestudio.wheelpicker.widgets;
/* loaded from: classes.dex */
public interface IWheelYearPicker {
}

View File

@@ -0,0 +1,88 @@
package com.aigestudio.wheelpicker.widgets;
import android.content.Context;
import android.util.AttributeSet;
import com.aigestudio.wheelpicker.WheelPicker;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/* loaded from: classes.dex */
public class WheelDayPicker extends WheelPicker implements IWheelDayPicker {
private static final Map<Integer, List<Integer>> o0 = new HashMap();
private Calendar k0;
private int l0;
private int m0;
private int n0;
public WheelDayPicker(Context context) {
this(context, null);
}
private void a() {
this.k0.set(1, this.l0);
this.k0.set(2, this.m0);
int actualMaximum = this.k0.getActualMaximum(5);
List<Integer> list = o0.get(Integer.valueOf(actualMaximum));
if (list == null) {
list = new ArrayList<>();
for (int i = 1; i <= actualMaximum; i++) {
list.add(Integer.valueOf(i));
}
o0.put(Integer.valueOf(actualMaximum), list);
}
super.setData(list);
}
private void b() {
setSelectedItemPosition(this.n0 - 1);
}
public int getCurrentDay() {
return Integer.parseInt(String.valueOf(getData().get(getCurrentItemPosition())));
}
public int getMonth() {
return this.m0;
}
public int getSelectedDay() {
return this.n0;
}
public int getYear() {
return this.l0;
}
@Override // com.aigestudio.wheelpicker.WheelPicker
public void setData(List list) {
throw new UnsupportedOperationException("You can not invoke setData in WheelDayPicker");
}
public void setMonth(int i) {
this.m0 = i - 1;
a();
}
public void setSelectedDay(int i) {
this.n0 = i;
b();
}
public void setYear(int i) {
this.l0 = i;
a();
}
public WheelDayPicker(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
this.k0 = Calendar.getInstance();
this.l0 = this.k0.get(1);
this.m0 = this.k0.get(2);
a();
this.n0 = this.k0.get(5);
b();
}
}

View File

@@ -0,0 +1,50 @@
package com.aigestudio.wheelpicker.widgets;
import android.content.Context;
import android.util.AttributeSet;
import com.aigestudio.wheelpicker.WheelPicker;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
/* loaded from: classes.dex */
public class WheelMonthPicker extends WheelPicker implements IWheelMonthPicker {
private int k0;
public WheelMonthPicker(Context context) {
this(context, null);
}
private void a() {
setSelectedItemPosition(this.k0 - 1);
}
public int getCurrentMonth() {
return Integer.parseInt(String.valueOf(getData().get(getCurrentItemPosition())));
}
public int getSelectedMonth() {
return this.k0;
}
@Override // com.aigestudio.wheelpicker.WheelPicker
public void setData(List list) {
throw new UnsupportedOperationException("You can not invoke setData in WheelMonthPicker");
}
public void setSelectedMonth(int i) {
this.k0 = i;
a();
}
public WheelMonthPicker(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
ArrayList arrayList = new ArrayList();
for (int i = 1; i <= 12; i++) {
arrayList.add(Integer.valueOf(i));
}
super.setData(arrayList);
this.k0 = Calendar.getInstance().get(2) + 1;
a();
}
}

View File

@@ -0,0 +1,78 @@
package com.aigestudio.wheelpicker.widgets;
import android.content.Context;
import android.util.AttributeSet;
import com.aigestudio.wheelpicker.WheelPicker;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
/* loaded from: classes.dex */
public class WheelYearPicker extends WheelPicker implements IWheelYearPicker {
private int k0;
private int l0;
private int m0;
public WheelYearPicker(Context context) {
this(context, null);
}
private void a() {
setSelectedItemPosition(this.m0 - this.k0);
}
private void b() {
ArrayList arrayList = new ArrayList();
for (int i = this.k0; i <= this.l0; i++) {
arrayList.add(Integer.valueOf(i));
}
super.setData(arrayList);
}
public int getCurrentYear() {
return Integer.parseInt(String.valueOf(getData().get(getCurrentItemPosition())));
}
public int getSelectedYear() {
return this.m0;
}
public int getYearEnd() {
return this.l0;
}
public int getYearStart() {
return this.k0;
}
@Override // com.aigestudio.wheelpicker.WheelPicker
public void setData(List list) {
throw new UnsupportedOperationException("You can not invoke setData in WheelYearPicker");
}
public void setSelectedYear(int i) {
this.m0 = i;
a();
}
public void setYearEnd(int i) {
this.l0 = i;
b();
}
public void setYearStart(int i) {
this.k0 = i;
this.m0 = getCurrentYear();
b();
a();
}
public WheelYearPicker(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
this.k0 = 1000;
this.l0 = 3000;
b();
this.m0 = Calendar.getInstance().get(1);
a();
}
}

View File

@@ -0,0 +1,20 @@
package com.alibaba.android.arouter.base;
import java.util.TreeMap;
/* loaded from: classes.dex */
public class UniqueKeyTreeMap<K, V> extends TreeMap<K, V> {
private String tipText;
public UniqueKeyTreeMap(String str) {
this.tipText = str;
}
@Override // java.util.TreeMap, java.util.AbstractMap, java.util.Map
public V put(K k, V v) {
if (containsKey(k)) {
throw new RuntimeException(String.format(this.tipText, k));
}
return (V) super.put(k, v);
}
}

View File

@@ -0,0 +1,38 @@
package com.alibaba.android.arouter.core;
import android.content.Context;
import android.util.LruCache;
import com.alibaba.android.arouter.facade.service.AutowiredService;
import com.alibaba.android.arouter.facade.template.ISyringe;
import java.util.ArrayList;
import java.util.List;
/* loaded from: classes.dex */
public class AutowiredServiceImpl implements AutowiredService {
private LruCache<String, ISyringe> a;
private List<String> b;
@Override // com.alibaba.android.arouter.facade.service.AutowiredService
public void a(Object obj) {
String name = obj.getClass().getName();
try {
if (this.b.contains(name)) {
return;
}
ISyringe iSyringe = this.a.get(name);
if (iSyringe == null) {
iSyringe = (ISyringe) Class.forName(obj.getClass().getName() + "$$ARouter$$Autowired").getConstructor(new Class[0]).newInstance(new Object[0]);
}
iSyringe.inject(obj);
this.a.put(name, iSyringe);
} catch (Exception unused) {
this.b.add(name);
}
}
@Override // com.alibaba.android.arouter.facade.template.IProvider
public void init(Context context) {
this.a = new LruCache<>(66);
this.b = new ArrayList();
}
}

View File

@@ -0,0 +1,113 @@
package com.alibaba.android.arouter.core;
import android.content.Context;
import com.alibaba.android.arouter.exception.HandlerException;
import com.alibaba.android.arouter.facade.Postcard;
import com.alibaba.android.arouter.facade.callback.InterceptorCallback;
import com.alibaba.android.arouter.facade.service.InterceptorService;
import com.alibaba.android.arouter.facade.template.IInterceptor;
import com.alibaba.android.arouter.launcher.ARouter;
import com.alibaba.android.arouter.thread.CancelableCountDownLatch;
import com.alibaba.android.arouter.utils.MapUtils;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
/* loaded from: classes.dex */
public class InterceptorServiceImpl implements InterceptorService {
private static boolean a;
private static final Object b = new Object();
@Override // com.alibaba.android.arouter.facade.template.IProvider
public void init(final Context context) {
LogisticsCenter.b.execute(new Runnable(this) { // from class: com.alibaba.android.arouter.core.InterceptorServiceImpl.3
@Override // java.lang.Runnable
public void run() {
if (MapUtils.b(Warehouse.e)) {
Iterator<Map.Entry<Integer, Class<? extends IInterceptor>>> it = Warehouse.e.entrySet().iterator();
while (it.hasNext()) {
Class<? extends IInterceptor> value = it.next().getValue();
try {
IInterceptor newInstance = value.getConstructor(new Class[0]).newInstance(new Object[0]);
newInstance.init(context);
Warehouse.f.add(newInstance);
} catch (Exception e) {
throw new HandlerException("ARouter::ARouter init interceptor error! name = [" + value.getName() + "], reason = [" + e.getMessage() + "]");
}
}
boolean unused = InterceptorServiceImpl.a = true;
ARouter.c.d("ARouter::", "ARouter interceptors init over.");
synchronized (InterceptorServiceImpl.b) {
InterceptorServiceImpl.b.notifyAll();
}
}
}
});
}
private static void b() {
synchronized (b) {
while (!a) {
try {
b.wait(10000L);
} catch (InterruptedException e) {
throw new HandlerException("ARouter::Interceptor init cost too much time error! reason = [" + e.getMessage() + "]");
}
}
}
}
@Override // com.alibaba.android.arouter.facade.service.InterceptorService
public void a(final Postcard postcard, final InterceptorCallback interceptorCallback) {
List<IInterceptor> list = Warehouse.f;
if (list != null && list.size() > 0) {
b();
if (!a) {
interceptorCallback.a(new HandlerException("Interceptors initialization takes too much time."));
return;
} else {
LogisticsCenter.b.execute(new Runnable(this) { // from class: com.alibaba.android.arouter.core.InterceptorServiceImpl.1
@Override // java.lang.Runnable
public void run() {
CancelableCountDownLatch cancelableCountDownLatch = new CancelableCountDownLatch(Warehouse.f.size());
try {
InterceptorServiceImpl.a(0, cancelableCountDownLatch, postcard);
cancelableCountDownLatch.await(postcard.p(), TimeUnit.SECONDS);
if (cancelableCountDownLatch.getCount() > 0) {
interceptorCallback.a(new HandlerException("The interceptor processing timed out."));
} else if (postcard.o() != null) {
interceptorCallback.a(new HandlerException(postcard.o().toString()));
} else {
interceptorCallback.a(postcard);
}
} catch (Exception e) {
interceptorCallback.a(e);
}
}
});
return;
}
}
interceptorCallback.a(postcard);
}
/* JADX INFO: Access modifiers changed from: private */
public static void a(final int i, final CancelableCountDownLatch cancelableCountDownLatch, final Postcard postcard) {
if (i < Warehouse.f.size()) {
Warehouse.f.get(i).b(postcard, new InterceptorCallback() { // from class: com.alibaba.android.arouter.core.InterceptorServiceImpl.2
@Override // com.alibaba.android.arouter.facade.callback.InterceptorCallback
public void a(Postcard postcard2) {
CancelableCountDownLatch.this.countDown();
InterceptorServiceImpl.a(i + 1, CancelableCountDownLatch.this, postcard2);
}
@Override // com.alibaba.android.arouter.facade.callback.InterceptorCallback
public void a(Throwable th) {
postcard.a(th == null ? new HandlerException("No message.") : th.getMessage());
CancelableCountDownLatch.this.a();
}
});
}
}
}

View File

@@ -0,0 +1,168 @@
package com.alibaba.android.arouter.core;
import android.content.Context;
import android.net.Uri;
import com.alibaba.android.arouter.exception.HandlerException;
import com.alibaba.android.arouter.exception.NoRouteFoundException;
import com.alibaba.android.arouter.facade.Postcard;
import com.alibaba.android.arouter.facade.enums.RouteType;
import com.alibaba.android.arouter.facade.enums.TypeKind;
import com.alibaba.android.arouter.facade.model.RouteMeta;
import com.alibaba.android.arouter.facade.template.IProvider;
import com.alibaba.android.arouter.facade.template.IRouteGroup;
import com.alibaba.android.arouter.launcher.ARouter;
import com.alibaba.android.arouter.utils.MapUtils;
import com.alibaba.android.arouter.utils.TextUtils;
import java.util.Locale;
import java.util.Map;
import java.util.concurrent.ThreadPoolExecutor;
/* loaded from: classes.dex */
public class LogisticsCenter {
private static Context a;
static ThreadPoolExecutor b;
private static boolean c;
/* renamed from: com.alibaba.android.arouter.core.LogisticsCenter$1, reason: invalid class name */
static /* synthetic */ class AnonymousClass1 {
static final /* synthetic */ int[] a = new int[RouteType.values().length];
static {
try {
a[RouteType.PROVIDER.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
a[RouteType.FRAGMENT.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
}
}
private static void a() {
c = false;
}
/* JADX WARN: Removed duplicated region for block: B:28:0x00b4 A[Catch: Exception -> 0x018f, all -> 0x01b0, TryCatch #1 {Exception -> 0x018f, blocks: (B:6:0x0007, B:8:0x0013, B:9:0x011a, B:11:0x0144, B:12:0x014d, B:14:0x0153, B:19:0x001e, B:21:0x0024, B:24:0x002b, B:25:0x0078, B:26:0x00ae, B:28:0x00b4, B:45:0x00c2, B:31:0x00da, B:42:0x00e2, B:34:0x00fa, B:37:0x0102, B:48:0x004b, B:50:0x0062, B:51:0x0075), top: B:5:0x0007, outer: #0 }] */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct code enable 'Show inconsistent code' option in preferences
*/
public static synchronized void a(android.content.Context r8, java.util.concurrent.ThreadPoolExecutor r9) throws com.alibaba.android.arouter.exception.HandlerException {
/*
Method dump skipped, instructions count: 435
To view this dump change 'Code comments level' option to 'DEBUG'
*/
throw new UnsupportedOperationException("Method not decompiled: com.alibaba.android.arouter.core.LogisticsCenter.a(android.content.Context, java.util.concurrent.ThreadPoolExecutor):void");
}
public static Postcard a(String str) {
RouteMeta routeMeta = Warehouse.d.get(str);
if (routeMeta == null) {
return null;
}
return new Postcard(routeMeta.e(), routeMeta.c());
}
public static synchronized void a(Postcard postcard) {
synchronized (LogisticsCenter.class) {
if (postcard != null) {
RouteMeta routeMeta = Warehouse.b.get(postcard.e());
if (routeMeta == null) {
Class<? extends IRouteGroup> cls = Warehouse.a.get(postcard.c());
if (cls != null) {
try {
if (ARouter.a()) {
ARouter.c.a("ARouter::", String.format(Locale.getDefault(), "The group [%s] starts loading, trigger by [%s]", postcard.c(), postcard.e()));
}
cls.getConstructor(new Class[0]).newInstance(new Object[0]).loadInto(Warehouse.b);
Warehouse.a.remove(postcard.c());
if (ARouter.a()) {
ARouter.c.a("ARouter::", String.format(Locale.getDefault(), "The group [%s] has already been loaded, trigger by [%s]", postcard.c(), postcard.e()));
}
a(postcard);
} catch (Exception e) {
throw new HandlerException("ARouter::Fatal exception when loading group meta. [" + e.getMessage() + "]");
}
} else {
throw new NoRouteFoundException("ARouter::There is no route match the path [" + postcard.e() + "], in group [" + postcard.c() + "]");
}
} else {
postcard.a(routeMeta.a());
postcard.a(routeMeta.g());
postcard.b(routeMeta.f());
postcard.a(routeMeta.b());
Uri q = postcard.q();
if (q != null) {
Map<String, String> a2 = TextUtils.a(q);
Map<String, Integer> d = routeMeta.d();
if (MapUtils.b(d)) {
for (Map.Entry<String, Integer> entry : d.entrySet()) {
a(postcard, entry.getValue(), entry.getKey(), a2.get(entry.getKey()));
}
postcard.k().putStringArray("wmHzgD4lOj5o4241", (String[]) d.keySet().toArray(new String[0]));
}
postcard.a("NTeRQWvye18AkPd6G", q.toString());
}
int i = AnonymousClass1.a[routeMeta.g().ordinal()];
if (i == 1) {
Class<?> a3 = routeMeta.a();
IProvider iProvider = Warehouse.c.get(a3);
if (iProvider == null) {
try {
iProvider = (IProvider) a3.getConstructor(new Class[0]).newInstance(new Object[0]);
iProvider.init(a);
Warehouse.c.put(a3, iProvider);
} catch (Exception e2) {
throw new HandlerException("Init provider failed! " + e2.getMessage());
}
}
postcard.a(iProvider);
postcard.r();
} else if (i == 2) {
postcard.r();
}
}
} else {
throw new NoRouteFoundException("ARouter::No postcard!");
}
}
}
private static void a(Postcard postcard, Integer num, String str, String str2) {
if (TextUtils.a(str) || TextUtils.a(str2)) {
return;
}
try {
if (num != null) {
if (num.intValue() == TypeKind.BOOLEAN.ordinal()) {
postcard.a(str, Boolean.parseBoolean(str2));
} else if (num.intValue() == TypeKind.BYTE.ordinal()) {
postcard.a(str, Byte.valueOf(str2).byteValue());
} else if (num.intValue() == TypeKind.SHORT.ordinal()) {
postcard.a(str, Short.valueOf(str2).shortValue());
} else if (num.intValue() == TypeKind.INT.ordinal()) {
postcard.a(str, Integer.valueOf(str2).intValue());
} else if (num.intValue() == TypeKind.LONG.ordinal()) {
postcard.a(str, Long.valueOf(str2).longValue());
} else if (num.intValue() == TypeKind.FLOAT.ordinal()) {
postcard.a(str, Float.valueOf(str2).floatValue());
} else if (num.intValue() == TypeKind.DOUBLE.ordinal()) {
postcard.a(str, Double.valueOf(str2).doubleValue());
} else if (num.intValue() == TypeKind.STRING.ordinal()) {
postcard.a(str, str2);
} else if (num.intValue() != TypeKind.PARCELABLE.ordinal()) {
if (num.intValue() == TypeKind.OBJECT.ordinal()) {
postcard.a(str, str2);
} else {
postcard.a(str, str2);
}
}
} else {
postcard.a(str, str2);
}
} catch (Throwable th) {
ARouter.c.c("ARouter::", "LogisticsCenter setValue failed! " + th.getMessage());
}
}
}

View File

@@ -0,0 +1,21 @@
package com.alibaba.android.arouter.core;
import com.alibaba.android.arouter.base.UniqueKeyTreeMap;
import com.alibaba.android.arouter.facade.model.RouteMeta;
import com.alibaba.android.arouter.facade.template.IInterceptor;
import com.alibaba.android.arouter.facade.template.IProvider;
import com.alibaba.android.arouter.facade.template.IRouteGroup;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/* loaded from: classes.dex */
class Warehouse {
static Map<String, Class<? extends IRouteGroup>> a = new HashMap();
static Map<String, RouteMeta> b = new HashMap();
static Map<Class, IProvider> c = new HashMap();
static Map<String, RouteMeta> d = new HashMap();
static Map<Integer, Class<? extends IInterceptor>> e = new UniqueKeyTreeMap("More than one interceptors use same priority [%s]");
static List<IInterceptor> f = new ArrayList();
}

View File

@@ -0,0 +1,8 @@
package com.alibaba.android.arouter.exception;
/* loaded from: classes.dex */
public class HandlerException extends RuntimeException {
public HandlerException(String str) {
super(str);
}
}

View File

@@ -0,0 +1,8 @@
package com.alibaba.android.arouter.exception;
/* loaded from: classes.dex */
public class InitException extends RuntimeException {
public InitException(String str) {
super(str);
}
}

View File

@@ -0,0 +1,8 @@
package com.alibaba.android.arouter.exception;
/* loaded from: classes.dex */
public class NoRouteFoundException extends RuntimeException {
public NoRouteFoundException(String str) {
super(str);
}
}

View File

@@ -0,0 +1,191 @@
package com.alibaba.android.arouter.facade;
import android.app.Activity;
import android.content.Context;
import android.net.Uri;
import android.os.Bundle;
import android.os.Parcelable;
import com.alibaba.android.arouter.facade.callback.NavigationCallback;
import com.alibaba.android.arouter.facade.model.RouteMeta;
import com.alibaba.android.arouter.facade.template.IProvider;
import com.alibaba.android.arouter.launcher.ARouter;
import java.io.Serializable;
/* loaded from: classes.dex */
public final class Postcard extends RouteMeta {
private Uri j;
private Object k;
private Bundle l;
private int m;
private int n;
private IProvider o;
private boolean p;
private Bundle q;
private int r;
private int s;
private String t;
public Postcard(String str, String str2) {
this(str, str2, null, null);
}
public Postcard a(IProvider iProvider) {
this.o = iProvider;
return this;
}
public String h() {
return this.t;
}
public int i() {
return this.r;
}
public int j() {
return this.s;
}
public Bundle k() {
return this.l;
}
public int l() {
return this.m;
}
public Bundle m() {
return this.q;
}
public IProvider n() {
return this.o;
}
public Object o() {
return this.k;
}
public int p() {
return this.n;
}
public Uri q() {
return this.j;
}
public Postcard r() {
this.p = true;
return this;
}
public boolean s() {
return this.p;
}
public Object t() {
return a((Context) null);
}
@Override // com.alibaba.android.arouter.facade.model.RouteMeta
public String toString() {
return "Postcard{uri=" + this.j + ", tag=" + this.k + ", mBundle=" + this.l + ", flags=" + this.m + ", timeout=" + this.n + ", provider=" + this.o + ", greenChannel=" + this.p + ", optionsCompat=" + this.q + ", enterAnim=" + this.r + ", exitAnim=" + this.s + "}\n" + super.toString();
}
public Postcard(String str, String str2, Uri uri, Bundle bundle) {
this.m = -1;
this.n = 300;
this.r = -1;
this.s = -1;
b(str);
a(str2);
a(uri);
this.l = bundle == null ? new Bundle() : bundle;
}
public Postcard a(Object obj) {
this.k = obj;
return this;
}
public Postcard a(Uri uri) {
this.j = uri;
return this;
}
public Object a(Context context) {
return a(context, (NavigationCallback) null);
}
public Object a(Context context, NavigationCallback navigationCallback) {
return ARouter.b().a(context, this, -1, navigationCallback);
}
public void a(Activity activity, int i) {
a(activity, i, null);
}
public void a(Activity activity, int i, NavigationCallback navigationCallback) {
ARouter.b().a(activity, this, i, navigationCallback);
}
public Postcard a(String str, String str2) {
this.l.putString(str, str2);
return this;
}
public Postcard a(String str, boolean z) {
this.l.putBoolean(str, z);
return this;
}
public Postcard a(String str, short s) {
this.l.putShort(str, s);
return this;
}
public Postcard a(String str, int i) {
this.l.putInt(str, i);
return this;
}
public Postcard a(String str, long j) {
this.l.putLong(str, j);
return this;
}
public Postcard a(String str, double d) {
this.l.putDouble(str, d);
return this;
}
public Postcard a(String str, byte b) {
this.l.putByte(str, b);
return this;
}
public Postcard a(String str, float f) {
this.l.putFloat(str, f);
return this;
}
public Postcard a(String str, Parcelable parcelable) {
this.l.putParcelable(str, parcelable);
return this;
}
public Postcard a(String str, Serializable serializable) {
this.l.putSerializable(str, serializable);
return this;
}
public Postcard a(String str, byte[] bArr) {
this.l.putByteArray(str, bArr);
return this;
}
public Postcard a(String str, Bundle bundle) {
this.l.putBundle(str, bundle);
return this;
}
}

View File

@@ -0,0 +1,10 @@
package com.alibaba.android.arouter.facade.callback;
import com.alibaba.android.arouter.facade.Postcard;
/* loaded from: classes.dex */
public interface InterceptorCallback {
void a(Postcard postcard);
void a(Throwable th);
}

View File

@@ -0,0 +1,14 @@
package com.alibaba.android.arouter.facade.callback;
import com.alibaba.android.arouter.facade.Postcard;
/* loaded from: classes.dex */
public interface NavigationCallback {
void a(Postcard postcard);
void b(Postcard postcard);
void c(Postcard postcard);
void d(Postcard postcard);
}

View File

@@ -0,0 +1,48 @@
package com.alibaba.android.arouter.facade.enums;
/* loaded from: classes.dex */
public enum RouteType {
ACTIVITY(0, "android.app.Activity"),
SERVICE(1, "android.app.Service"),
PROVIDER(2, "com.alibaba.android.arouter.facade.template.IProvider"),
CONTENT_PROVIDER(-1, "android.app.ContentProvider"),
BOARDCAST(-1, ""),
METHOD(-1, ""),
FRAGMENT(-1, "android.app.Fragment"),
UNKNOWN(-1, "Unknown route type");
String className;
int id;
RouteType(int i, String str) {
this.id = i;
this.className = str;
}
public static RouteType parse(String str) {
for (RouteType routeType : values()) {
if (routeType.getClassName().equals(str)) {
return routeType;
}
}
return UNKNOWN;
}
public String getClassName() {
return this.className;
}
public int getId() {
return this.id;
}
public RouteType setClassName(String str) {
this.className = str;
return this;
}
public RouteType setId(int i) {
this.id = i;
return this;
}
}

View File

@@ -0,0 +1,17 @@
package com.alibaba.android.arouter.facade.enums;
/* loaded from: classes.dex */
public enum TypeKind {
BOOLEAN,
BYTE,
SHORT,
INT,
LONG,
CHAR,
FLOAT,
DOUBLE,
STRING,
SERIALIZABLE,
PARCELABLE,
OBJECT
}

View File

@@ -0,0 +1,101 @@
package com.alibaba.android.arouter.facade.model;
import com.alibaba.android.arouter.facade.enums.RouteType;
import java.util.Map;
import javax.lang.model.element.Element;
/* loaded from: classes.dex */
public class RouteMeta {
private RouteType a;
private Element b;
private Class<?> c;
private String d;
private String e;
private int f;
private int g;
private Map<String, Integer> h;
private String i;
public RouteMeta() {
this.f = -1;
}
public static RouteMeta a(RouteType routeType, Class<?> cls, String str, String str2, Map<String, Integer> map, int i, int i2) {
return new RouteMeta(routeType, null, cls, null, str, str2, map, i, i2);
}
public RouteMeta b(String str) {
this.d = str;
return this;
}
public String c() {
return this.e;
}
public Map<String, Integer> d() {
return this.h;
}
public String e() {
return this.d;
}
public int f() {
return this.f;
}
public RouteType g() {
return this.a;
}
public String toString() {
return "RouteMeta{type=" + this.a + ", rawType=" + this.b + ", destination=" + this.c + ", path='" + this.d + "', group='" + this.e + "', priority=" + this.f + ", extra=" + this.g + ", paramsType=" + this.h + ", name='" + this.i + "'}";
}
public RouteMeta a(RouteType routeType) {
this.a = routeType;
return this;
}
public RouteMeta b(int i) {
this.f = i;
return this;
}
public RouteMeta(RouteType routeType, Element element, Class<?> cls, String str, String str2, String str3, Map<String, Integer> map, int i, int i2) {
this.f = -1;
this.a = routeType;
this.i = str;
this.c = cls;
this.b = element;
this.d = str2;
this.e = str3;
this.h = map;
this.f = i;
this.g = i2;
}
public Class<?> a() {
return this.c;
}
public int b() {
return this.g;
}
public RouteMeta a(Class<?> cls) {
this.c = cls;
return this;
}
public RouteMeta a(String str) {
this.e = str;
return this;
}
public RouteMeta a(int i) {
this.g = i;
return this;
}
}

View File

@@ -0,0 +1,8 @@
package com.alibaba.android.arouter.facade.service;
import com.alibaba.android.arouter.facade.template.IProvider;
/* loaded from: classes.dex */
public interface AutowiredService extends IProvider {
void a(Object obj);
}

View File

@@ -0,0 +1,7 @@
package com.alibaba.android.arouter.facade.service;
import com.alibaba.android.arouter.facade.template.IProvider;
/* loaded from: classes.dex */
public interface ClassLoaderService extends IProvider {
}

View File

@@ -0,0 +1,10 @@
package com.alibaba.android.arouter.facade.service;
import android.content.Context;
import com.alibaba.android.arouter.facade.Postcard;
import com.alibaba.android.arouter.facade.template.IProvider;
/* loaded from: classes.dex */
public interface DegradeService extends IProvider {
void a(Context context, Postcard postcard);
}

View File

@@ -0,0 +1,10 @@
package com.alibaba.android.arouter.facade.service;
import com.alibaba.android.arouter.facade.Postcard;
import com.alibaba.android.arouter.facade.callback.InterceptorCallback;
import com.alibaba.android.arouter.facade.template.IProvider;
/* loaded from: classes.dex */
public interface InterceptorService extends IProvider {
void a(Postcard postcard, InterceptorCallback interceptorCallback);
}

View File

@@ -0,0 +1,11 @@
package com.alibaba.android.arouter.facade.service;
import android.net.Uri;
import com.alibaba.android.arouter.facade.template.IProvider;
/* loaded from: classes.dex */
public interface PathReplaceService extends IProvider {
Uri a(Uri uri);
String a(String str);
}

View File

@@ -0,0 +1,7 @@
package com.alibaba.android.arouter.facade.service;
import com.alibaba.android.arouter.facade.template.IProvider;
/* loaded from: classes.dex */
public interface SerializationService extends IProvider {
}

View File

@@ -0,0 +1,9 @@
package com.alibaba.android.arouter.facade.template;
import com.alibaba.android.arouter.facade.Postcard;
import com.alibaba.android.arouter.facade.callback.InterceptorCallback;
/* loaded from: classes.dex */
public interface IInterceptor extends IProvider {
void b(Postcard postcard, InterceptorCallback interceptorCallback);
}

View File

@@ -0,0 +1,8 @@
package com.alibaba.android.arouter.facade.template;
import java.util.Map;
/* loaded from: classes.dex */
public interface IInterceptorGroup {
void loadInto(Map<Integer, Class<? extends IInterceptor>> map);
}

View File

@@ -0,0 +1,12 @@
package com.alibaba.android.arouter.facade.template;
/* loaded from: classes.dex */
public interface ILogger {
void a(String str, String str2);
void b(String str, String str2);
void c(String str, String str2);
void d(String str, String str2);
}

View File

@@ -0,0 +1,8 @@
package com.alibaba.android.arouter.facade.template;
import android.content.Context;
/* loaded from: classes.dex */
public interface IProvider {
void init(Context context);
}

View File

@@ -0,0 +1,9 @@
package com.alibaba.android.arouter.facade.template;
import com.alibaba.android.arouter.facade.model.RouteMeta;
import java.util.Map;
/* loaded from: classes.dex */
public interface IProviderGroup {
void loadInto(Map<String, RouteMeta> map);
}

View File

@@ -0,0 +1,9 @@
package com.alibaba.android.arouter.facade.template;
import com.alibaba.android.arouter.facade.model.RouteMeta;
import java.util.Map;
/* loaded from: classes.dex */
public interface IRouteGroup {
void loadInto(Map<String, RouteMeta> map);
}

View File

@@ -0,0 +1,8 @@
package com.alibaba.android.arouter.facade.template;
import java.util.Map;
/* loaded from: classes.dex */
public interface IRouteRoot {
void loadInto(Map<String, Class<? extends IRouteGroup>> map);
}

View File

@@ -0,0 +1,6 @@
package com.alibaba.android.arouter.facade.template;
/* loaded from: classes.dex */
public interface ISyringe {
void inject(Object obj);
}

View File

@@ -0,0 +1,71 @@
package com.alibaba.android.arouter.launcher;
import android.app.Application;
import android.content.Context;
import android.net.Uri;
import com.alibaba.android.arouter.exception.InitException;
import com.alibaba.android.arouter.facade.Postcard;
import com.alibaba.android.arouter.facade.callback.NavigationCallback;
import com.alibaba.android.arouter.facade.template.ILogger;
/* loaded from: classes.dex */
public final class ARouter {
private static volatile ARouter a = null;
private static volatile boolean b = false;
public static ILogger c;
private ARouter() {
}
public static void a(Application application) {
if (b) {
return;
}
ILogger iLogger = _ARouter.a;
c = iLogger;
iLogger.d("ARouter::", "ARouter init start.");
b = _ARouter.a(application);
if (b) {
_ARouter.b();
}
_ARouter.a.d("ARouter::", "ARouter init over.");
}
public static ARouter b() {
if (!b) {
throw new InitException("ARouter::Init::Invoke init(context) first!");
}
if (a == null) {
synchronized (ARouter.class) {
if (a == null) {
a = new ARouter();
}
}
}
return a;
}
public static boolean a() {
return _ARouter.c();
}
public void a(Object obj) {
_ARouter.a(obj);
}
public Postcard a(String str) {
return _ARouter.d().a(str);
}
public Postcard a(Uri uri) {
return _ARouter.d().a(uri);
}
public <T> T a(Class<? extends T> cls) {
return (T) _ARouter.d().a((Class) cls);
}
public Object a(Context context, Postcard postcard, int i, NavigationCallback navigationCallback) {
return _ARouter.d().a(context, postcard, i, navigationCallback);
}
}

View File

@@ -0,0 +1,308 @@
package com.alibaba.android.arouter.launcher;
import android.app.Activity;
import android.app.Application;
import android.app.Fragment;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Handler;
import android.os.Looper;
import android.widget.Toast;
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
import com.alibaba.android.arouter.core.LogisticsCenter;
import com.alibaba.android.arouter.exception.HandlerException;
import com.alibaba.android.arouter.exception.InitException;
import com.alibaba.android.arouter.exception.NoRouteFoundException;
import com.alibaba.android.arouter.facade.Postcard;
import com.alibaba.android.arouter.facade.callback.InterceptorCallback;
import com.alibaba.android.arouter.facade.callback.NavigationCallback;
import com.alibaba.android.arouter.facade.enums.RouteType;
import com.alibaba.android.arouter.facade.service.AutowiredService;
import com.alibaba.android.arouter.facade.service.DegradeService;
import com.alibaba.android.arouter.facade.service.InterceptorService;
import com.alibaba.android.arouter.facade.service.PathReplaceService;
import com.alibaba.android.arouter.facade.template.ILogger;
import com.alibaba.android.arouter.thread.DefaultPoolExecutor;
import com.alibaba.android.arouter.utils.DefaultLogger;
import com.alibaba.android.arouter.utils.TextUtils;
import java.util.concurrent.ThreadPoolExecutor;
/* loaded from: classes.dex */
final class _ARouter {
static ILogger a = new DefaultLogger("ARouter::");
private static volatile boolean b = false;
private static volatile _ARouter c = null;
private static volatile boolean d = false;
private static volatile ThreadPoolExecutor e = DefaultPoolExecutor.a();
private static Handler f;
private static Context g;
private static InterceptorService h;
/* renamed from: com.alibaba.android.arouter.launcher._ARouter$4, reason: invalid class name */
static /* synthetic */ class AnonymousClass4 {
static final /* synthetic */ int[] a = new int[RouteType.values().length];
static {
try {
a[RouteType.ACTIVITY.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
a[RouteType.PROVIDER.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
a[RouteType.BOARDCAST.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
try {
a[RouteType.CONTENT_PROVIDER.ordinal()] = 4;
} catch (NoSuchFieldError unused4) {
}
try {
a[RouteType.FRAGMENT.ordinal()] = 5;
} catch (NoSuchFieldError unused5) {
}
try {
a[RouteType.METHOD.ordinal()] = 6;
} catch (NoSuchFieldError unused6) {
}
try {
a[RouteType.SERVICE.ordinal()] = 7;
} catch (NoSuchFieldError unused7) {
}
}
}
private _ARouter() {
}
private String b(String str) {
if (TextUtils.a(str) || !str.startsWith("/")) {
throw new HandlerException("ARouter::Extract the default group failed, the path must be start with '/' and contain more than 2 '/'!");
}
try {
String substring = str.substring(1, str.indexOf("/", 1));
if (TextUtils.a(substring)) {
throw new HandlerException("ARouter::Extract the default group failed! There's nothing between 2 '/'!");
}
return substring;
} catch (Exception e2) {
a.c("ARouter::", "Failed to extract default group! " + e2.getMessage());
return null;
}
}
static boolean c() {
return b;
}
protected static _ARouter d() {
if (!d) {
throw new InitException("ARouterCore::Init::Invoke init(context) first!");
}
if (c == null) {
synchronized (_ARouter.class) {
if (c == null) {
c = new _ARouter();
}
}
}
return c;
}
protected static synchronized boolean a(Application application) {
synchronized (_ARouter.class) {
g = application;
LogisticsCenter.a(g, e);
a.d("ARouter::", "ARouter init success!");
d = true;
f = new Handler(Looper.getMainLooper());
}
return true;
}
static void b() {
h = (InterceptorService) ARouter.b().a("/arouter/service/interceptor").t();
}
/* JADX INFO: Access modifiers changed from: private */
public Object b(Context context, final Postcard postcard, final int i, final NavigationCallback navigationCallback) {
if (context == null) {
context = g;
}
final Context context2 = context;
int i2 = AnonymousClass4.a[postcard.g().ordinal()];
if (i2 == 1) {
final Intent intent = new Intent(context2, postcard.a());
intent.putExtras(postcard.k());
int l = postcard.l();
if (-1 != l) {
intent.setFlags(l);
} else if (!(context2 instanceof Activity)) {
intent.setFlags(268435456);
}
String h2 = postcard.h();
if (!TextUtils.a(h2)) {
intent.setAction(h2);
}
a(new Runnable() { // from class: com.alibaba.android.arouter.launcher._ARouter.3
@Override // java.lang.Runnable
public void run() {
_ARouter.this.a(i, context2, intent, postcard, navigationCallback);
}
});
return null;
}
if (i2 == 2) {
return postcard.n();
}
if (i2 == 3 || i2 == 4 || i2 == 5) {
try {
Object newInstance = postcard.a().getConstructor(new Class[0]).newInstance(new Object[0]);
if (newInstance instanceof Fragment) {
((Fragment) newInstance).setArguments(postcard.k());
} else if (newInstance instanceof androidx.fragment.app.Fragment) {
((androidx.fragment.app.Fragment) newInstance).setArguments(postcard.k());
}
return newInstance;
} catch (Exception e2) {
a.b("ARouter::", "Fetch fragment instance error, " + TextUtils.a(e2.getStackTrace()));
}
}
return null;
}
static void a(Object obj) {
AutowiredService autowiredService = (AutowiredService) ARouter.b().a("/arouter/service/autowired").t();
if (autowiredService != null) {
autowiredService.a(obj);
}
}
protected Postcard a(String str) {
if (!TextUtils.a(str)) {
PathReplaceService pathReplaceService = (PathReplaceService) ARouter.b().a(PathReplaceService.class);
if (pathReplaceService != null) {
str = pathReplaceService.a(str);
}
return a(str, b(str));
}
throw new HandlerException("ARouter::Parameter is invalid!");
}
protected Postcard a(Uri uri) {
if (uri != null && !TextUtils.a(uri.toString())) {
PathReplaceService pathReplaceService = (PathReplaceService) ARouter.b().a(PathReplaceService.class);
if (pathReplaceService != null) {
uri = pathReplaceService.a(uri);
}
return new Postcard(uri.getPath(), b(uri.getPath()), uri, null);
}
throw new HandlerException("ARouter::Parameter invalid!");
}
protected Postcard a(String str, String str2) {
if (!TextUtils.a(str) && !TextUtils.a(str2)) {
PathReplaceService pathReplaceService = (PathReplaceService) ARouter.b().a(PathReplaceService.class);
if (pathReplaceService != null) {
str = pathReplaceService.a(str);
}
return new Postcard(str, str2);
}
throw new HandlerException("ARouter::Parameter is invalid!");
}
protected <T> T a(Class<? extends T> cls) {
try {
Postcard a2 = LogisticsCenter.a(cls.getName());
if (a2 == null) {
a2 = LogisticsCenter.a(cls.getSimpleName());
}
if (a2 == null) {
return null;
}
LogisticsCenter.a(a2);
return (T) a2.n();
} catch (NoRouteFoundException e2) {
a.c("ARouter::", e2.getMessage());
return null;
}
}
protected Object a(final Context context, final Postcard postcard, final int i, final NavigationCallback navigationCallback) {
try {
LogisticsCenter.a(postcard);
if (navigationCallback != null) {
navigationCallback.a(postcard);
}
if (!postcard.s()) {
h.a(postcard, new InterceptorCallback() { // from class: com.alibaba.android.arouter.launcher._ARouter.2
@Override // com.alibaba.android.arouter.facade.callback.InterceptorCallback
public void a(Postcard postcard2) {
_ARouter.this.b(context, postcard2, i, navigationCallback);
}
@Override // com.alibaba.android.arouter.facade.callback.InterceptorCallback
public void a(Throwable th) {
NavigationCallback navigationCallback2 = navigationCallback;
if (navigationCallback2 != null) {
navigationCallback2.c(postcard);
}
_ARouter.a.d("ARouter::", "Navigation failed, termination by interceptor : " + th.getMessage());
}
});
return null;
}
return b(context, postcard, i, navigationCallback);
} catch (NoRouteFoundException e2) {
a.c("ARouter::", e2.getMessage());
if (c()) {
a(new Runnable(this) { // from class: com.alibaba.android.arouter.launcher._ARouter.1
@Override // java.lang.Runnable
public void run() {
Toast.makeText(_ARouter.g, "There's no route matched!\n Path = [" + postcard.e() + "]\n Group = [" + postcard.c() + "]", 1).show();
}
});
}
if (navigationCallback != null) {
navigationCallback.b(postcard);
} else {
DegradeService degradeService = (DegradeService) ARouter.b().a(DegradeService.class);
if (degradeService != null) {
degradeService.a(context, postcard);
}
}
return null;
}
}
private void a(Runnable runnable) {
if (Looper.getMainLooper().getThread() != Thread.currentThread()) {
f.post(runnable);
} else {
runnable.run();
}
}
/* JADX INFO: Access modifiers changed from: private */
public void a(int i, Context context, Intent intent, Postcard postcard, NavigationCallback navigationCallback) {
if (i >= 0) {
if (context instanceof Activity) {
ActivityCompat.a((Activity) context, intent, i, postcard.m());
} else {
a.c("ARouter::", "Must use [navigation(activity, ...)] to support [startActivityForResult]");
}
} else {
ContextCompat.a(context, intent, postcard.m());
}
if (-1 != postcard.i() && -1 != postcard.j() && (context instanceof Activity)) {
((Activity) context).overridePendingTransition(postcard.i(), postcard.j());
}
if (navigationCallback != null) {
navigationCallback.d(postcard);
}
}
}

View File

@@ -0,0 +1,28 @@
package com.alibaba.android.arouter.routes;
import com.alibaba.android.arouter.facade.enums.RouteType;
import com.alibaba.android.arouter.facade.model.RouteMeta;
import com.alibaba.android.arouter.facade.template.IRouteGroup;
import com.ubt.jimu.user.view.CountryCodeActivity;
import com.ubt.jimu.user.view.FindPasswordActivity;
import com.ubt.jimu.user.view.LoginActivity;
import com.ubt.jimu.user.view.RegisterActivity;
import com.ubt.jimu.user.view.VerifyCaptchaActivity;
import java.util.HashMap;
import java.util.Map;
/* loaded from: classes.dex */
public class ARouter$$Group$$account implements IRouteGroup {
@Override // com.alibaba.android.arouter.facade.template.IRouteGroup
public void loadInto(Map<String, RouteMeta> map) {
map.put("/account/captcha", RouteMeta.a(RouteType.ACTIVITY, VerifyCaptchaActivity.class, "/account/captcha", "account", null, -1, Integer.MIN_VALUE));
map.put("/account/countrycode", RouteMeta.a(RouteType.ACTIVITY, CountryCodeActivity.class, "/account/countrycode", "account", null, -1, Integer.MIN_VALUE));
map.put("/account/findpwd", RouteMeta.a(RouteType.ACTIVITY, FindPasswordActivity.class, "/account/findpwd", "account", null, -1, Integer.MIN_VALUE));
map.put("/account/login", RouteMeta.a(RouteType.ACTIVITY, LoginActivity.class, "/account/login", "account", null, -1, Integer.MIN_VALUE));
map.put("/account/register", RouteMeta.a(RouteType.ACTIVITY, RegisterActivity.class, "/account/register", "account", new HashMap<String, Integer>(this) { // from class: com.alibaba.android.arouter.routes.ARouter$$Group$$account.1
{
put("loginType", 3);
}
}, -1, Integer.MIN_VALUE));
}
}

View File

@@ -0,0 +1,15 @@
package com.alibaba.android.arouter.routes;
import com.alibaba.android.arouter.facade.enums.RouteType;
import com.alibaba.android.arouter.facade.model.RouteMeta;
import com.alibaba.android.arouter.facade.template.IRouteGroup;
import com.ubt.jimu.widgets.choosePhotos.AlbumActivity;
import java.util.Map;
/* loaded from: classes.dex */
public class ARouter$$Group$$album implements IRouteGroup {
@Override // com.alibaba.android.arouter.facade.template.IRouteGroup
public void loadInto(Map<String, RouteMeta> map) {
map.put("/album/chooser", RouteMeta.a(RouteType.ACTIVITY, AlbumActivity.class, "/album/chooser", "album", null, -1, Integer.MIN_VALUE));
}
}

View File

@@ -0,0 +1,17 @@
package com.alibaba.android.arouter.routes;
import com.alibaba.android.arouter.core.AutowiredServiceImpl;
import com.alibaba.android.arouter.core.InterceptorServiceImpl;
import com.alibaba.android.arouter.facade.enums.RouteType;
import com.alibaba.android.arouter.facade.model.RouteMeta;
import com.alibaba.android.arouter.facade.template.IRouteGroup;
import java.util.Map;
/* loaded from: classes.dex */
public class ARouter$$Group$$arouter implements IRouteGroup {
@Override // com.alibaba.android.arouter.facade.template.IRouteGroup
public void loadInto(Map<String, RouteMeta> map) {
map.put("/arouter/service/autowired", RouteMeta.a(RouteType.PROVIDER, AutowiredServiceImpl.class, "/arouter/service/autowired", "arouter", null, -1, Integer.MIN_VALUE));
map.put("/arouter/service/interceptor", RouteMeta.a(RouteType.PROVIDER, InterceptorServiceImpl.class, "/arouter/service/interceptor", "arouter", null, -1, Integer.MIN_VALUE));
}
}

View File

@@ -0,0 +1,21 @@
package com.alibaba.android.arouter.routes;
import com.alibaba.android.arouter.facade.enums.RouteType;
import com.alibaba.android.arouter.facade.model.RouteMeta;
import com.alibaba.android.arouter.facade.template.IRouteGroup;
import com.ubt.jimu.community.activity.JimuActListActivity;
import com.ubt.jimu.community.view.HotLaststActivity;
import com.ubt.jimu.community.view.InspireActivity;
import com.ubt.jimu.community.view.MyFavouriteActivity;
import java.util.Map;
/* loaded from: classes.dex */
public class ARouter$$Group$$community implements IRouteGroup {
@Override // com.alibaba.android.arouter.facade.template.IRouteGroup
public void loadInto(Map<String, RouteMeta> map) {
map.put("/community/activity", RouteMeta.a(RouteType.ACTIVITY, JimuActListActivity.class, "/community/activity", "community", null, -1, Integer.MIN_VALUE));
map.put("/community/favorite", RouteMeta.a(RouteType.ACTIVITY, MyFavouriteActivity.class, "/community/favorite", "community", null, -1, Integer.MIN_VALUE));
map.put("/community/hot", RouteMeta.a(RouteType.ACTIVITY, HotLaststActivity.class, "/community/hot", "community", null, -1, Integer.MIN_VALUE));
map.put("/community/inspire", RouteMeta.a(RouteType.ACTIVITY, InspireActivity.class, "/community/inspire", "community", null, -1, Integer.MIN_VALUE));
}
}

View File

@@ -0,0 +1,63 @@
package com.alibaba.android.arouter.routes;
import com.alibaba.android.arouter.facade.enums.RouteType;
import com.alibaba.android.arouter.facade.model.RouteMeta;
import com.alibaba.android.arouter.facade.template.IRouteGroup;
import com.ubt.jimu.controller.AccumulatorSettingActivity;
import com.ubt.jimu.controller.AddDirectionActivity;
import com.ubt.jimu.controller.AngleSettingActivity;
import com.ubt.jimu.controller.ControllerActivity;
import com.ubt.jimu.controller.JockstickSettingActivity;
import com.ubt.jimu.controller.ServoModeSettingNewActivity;
import com.ubt.jimu.controller.VSliderSetActivity;
import com.ubt.jimu.transport.model.TransportFile;
import java.util.HashMap;
import java.util.Map;
/* loaded from: classes.dex */
public class ARouter$$Group$$controller implements IRouteGroup {
@Override // com.alibaba.android.arouter.facade.template.IRouteGroup
public void loadInto(Map<String, RouteMeta> map) {
map.put("/controller/accumulatorsettings", RouteMeta.a(RouteType.ACTIVITY, AccumulatorSettingActivity.class, "/controller/accumulatorsettings", TransportFile.TYPE_CONTROLLER, new HashMap<String, Integer>(this) { // from class: com.alibaba.android.arouter.routes.ARouter$$Group$$controller.1
{
put("robotLite", 10);
put("config_id_key", 8);
}
}, -1, Integer.MIN_VALUE));
map.put("/controller/adddirect", RouteMeta.a(RouteType.ACTIVITY, AddDirectionActivity.class, "/controller/adddirect", TransportFile.TYPE_CONTROLLER, new HashMap<String, Integer>(this) { // from class: com.alibaba.android.arouter.routes.ARouter$$Group$$controller.2
{
put("robotLite", 10);
}
}, -1, Integer.MIN_VALUE));
map.put("/controller/anglesettings", RouteMeta.a(RouteType.ACTIVITY, AngleSettingActivity.class, "/controller/anglesettings", TransportFile.TYPE_CONTROLLER, new HashMap<String, Integer>(this) { // from class: com.alibaba.android.arouter.routes.ARouter$$Group$$controller.3
{
put("robotLite", 10);
put("config_id_key", 8);
}
}, -1, Integer.MIN_VALUE));
map.put("/controller/control", RouteMeta.a(RouteType.ACTIVITY, ControllerActivity.class, "/controller/control", TransportFile.TYPE_CONTROLLER, new HashMap<String, Integer>(this) { // from class: com.alibaba.android.arouter.routes.ARouter$$Group$$controller.4
{
put("robotLite", 10);
}
}, -1, Integer.MIN_VALUE));
map.put("/controller/jocksticksettings", RouteMeta.a(RouteType.ACTIVITY, JockstickSettingActivity.class, "/controller/jocksticksettings", TransportFile.TYPE_CONTROLLER, new HashMap<String, Integer>(this) { // from class: com.alibaba.android.arouter.routes.ARouter$$Group$$controller.5
{
put("jock_type", 3);
put("robotLite", 10);
put("config_id_key", 8);
}
}, -1, Integer.MIN_VALUE));
map.put("/controller/servosettings", RouteMeta.a(RouteType.ACTIVITY, ServoModeSettingNewActivity.class, "/controller/servosettings", TransportFile.TYPE_CONTROLLER, new HashMap<String, Integer>(this) { // from class: com.alibaba.android.arouter.routes.ARouter$$Group$$controller.6
{
put("robotLite", 10);
put("isFromUnity", 0);
}
}, -1, Integer.MIN_VALUE));
map.put("/controller/vslidersettings", RouteMeta.a(RouteType.ACTIVITY, VSliderSetActivity.class, "/controller/vslidersettings", TransportFile.TYPE_CONTROLLER, new HashMap<String, Integer>(this) { // from class: com.alibaba.android.arouter.routes.ARouter$$Group$$controller.7
{
put("robotLite", 10);
put("config_id_key", 8);
}
}, -1, Integer.MIN_VALUE));
}
}

View File

@@ -0,0 +1,21 @@
package com.alibaba.android.arouter.routes;
import com.alibaba.android.arouter.facade.enums.RouteType;
import com.alibaba.android.arouter.facade.model.RouteMeta;
import com.alibaba.android.arouter.facade.template.IRouteGroup;
import com.ubt.jimu.diy.activity.UserDiyActivity;
import com.ubt.jimu.diy.view.DiyCommentListActivity;
import com.ubt.jimu.diy.view.DiyFanActivity;
import com.ubt.jimu.diy.view.OfficialDiyDetailActivity;
import java.util.Map;
/* loaded from: classes.dex */
public class ARouter$$Group$$diy implements IRouteGroup {
@Override // com.alibaba.android.arouter.facade.template.IRouteGroup
public void loadInto(Map<String, RouteMeta> map) {
map.put("/diy/commentlist", RouteMeta.a(RouteType.ACTIVITY, DiyCommentListActivity.class, "/diy/commentlist", "diy", null, -1, Integer.MIN_VALUE));
map.put("/diy/detail", RouteMeta.a(RouteType.ACTIVITY, OfficialDiyDetailActivity.class, "/diy/detail", "diy", null, -1, Integer.MIN_VALUE));
map.put("/diy/fan", RouteMeta.a(RouteType.ACTIVITY, DiyFanActivity.class, "/diy/fan", "diy", null, -1, Integer.MIN_VALUE));
map.put("/diy/usercreatives", RouteMeta.a(RouteType.ACTIVITY, UserDiyActivity.class, "/diy/usercreatives", "diy", null, -1, Integer.MIN_VALUE));
}
}

View File

@@ -0,0 +1,15 @@
package com.alibaba.android.arouter.routes;
import com.alibaba.android.arouter.facade.enums.RouteType;
import com.alibaba.android.arouter.facade.model.RouteMeta;
import com.alibaba.android.arouter.facade.template.IRouteGroup;
import com.ubt.jimu.ar.view.GameListActivity;
import java.util.Map;
/* loaded from: classes.dex */
public class ARouter$$Group$$game implements IRouteGroup {
@Override // com.alibaba.android.arouter.facade.template.IRouteGroup
public void loadInto(Map<String, RouteMeta> map) {
map.put("/game/list", RouteMeta.a(RouteType.ACTIVITY, GameListActivity.class, "/game/list", "game", null, -1, Integer.MIN_VALUE));
}
}

View File

@@ -0,0 +1,15 @@
package com.alibaba.android.arouter.routes;
import com.alibaba.android.arouter.facade.enums.RouteType;
import com.alibaba.android.arouter.facade.model.RouteMeta;
import com.alibaba.android.arouter.facade.template.IRouteGroup;
import com.ubt.jimu.course.view.JimuTaskListActivity;
import java.util.Map;
/* loaded from: classes.dex */
public class ARouter$$Group$$learn implements IRouteGroup {
@Override // com.alibaba.android.arouter.facade.template.IRouteGroup
public void loadInto(Map<String, RouteMeta> map) {
map.put("/learn/lessons", RouteMeta.a(RouteType.ACTIVITY, JimuTaskListActivity.class, "/learn/lessons", "learn", null, -1, Integer.MIN_VALUE));
}
}

View File

@@ -0,0 +1,15 @@
package com.alibaba.android.arouter.routes;
import com.alibaba.android.arouter.facade.enums.RouteType;
import com.alibaba.android.arouter.facade.model.RouteMeta;
import com.alibaba.android.arouter.facade.template.IRouteGroup;
import com.ubt.jimu.pack.view.BarCodeScanActivity;
import java.util.Map;
/* loaded from: classes.dex */
public class ARouter$$Group$$package implements IRouteGroup {
@Override // com.alibaba.android.arouter.facade.template.IRouteGroup
public void loadInto(Map<String, RouteMeta> map) {
map.put("/package/scan", RouteMeta.a(RouteType.ACTIVITY, BarCodeScanActivity.class, "/package/scan", "package", null, -1, Integer.MIN_VALUE));
}
}

View File

@@ -0,0 +1,27 @@
package com.alibaba.android.arouter.routes;
import com.alibaba.android.arouter.facade.enums.RouteType;
import com.alibaba.android.arouter.facade.model.RouteMeta;
import com.alibaba.android.arouter.facade.template.IRouteGroup;
import com.ubt.jimu.discover.DiscoveryActivity;
import com.ubt.jimu.main.activity.MainActivity;
import com.ubt.jimu.message.view.MessageCenterActivity;
import com.ubt.jimu.user.view.UserCenterActivity;
import com.ubt.jimu.user.view.setting.SettingActivity;
import com.ubt.jimu.web.GdprWebActivity;
import com.ubt.jimu.web.WebActivity;
import java.util.Map;
/* loaded from: classes.dex */
public class ARouter$$Group$$page implements IRouteGroup {
@Override // com.alibaba.android.arouter.facade.template.IRouteGroup
public void loadInto(Map<String, RouteMeta> map) {
map.put("/page/discovery", RouteMeta.a(RouteType.ACTIVITY, DiscoveryActivity.class, "/page/discovery", "page", null, -1, Integer.MIN_VALUE));
map.put("/page/gdpr_web", RouteMeta.a(RouteType.ACTIVITY, GdprWebActivity.class, "/page/gdpr_web", "page", null, -1, Integer.MIN_VALUE));
map.put("/page/main", RouteMeta.a(RouteType.ACTIVITY, MainActivity.class, "/page/main", "page", null, -1, Integer.MIN_VALUE));
map.put("/page/message", RouteMeta.a(RouteType.ACTIVITY, MessageCenterActivity.class, "/page/message", "page", null, -1, Integer.MIN_VALUE));
map.put("/page/setting", RouteMeta.a(RouteType.ACTIVITY, SettingActivity.class, "/page/setting", "page", null, -1, Integer.MIN_VALUE));
map.put("/page/user", RouteMeta.a(RouteType.ACTIVITY, UserCenterActivity.class, "/page/user", "page", null, -1, Integer.MIN_VALUE));
map.put("/page/web", RouteMeta.a(RouteType.ACTIVITY, WebActivity.class, "/page/web", "page", null, -1, Integer.MIN_VALUE));
}
}

View File

@@ -0,0 +1,16 @@
package com.alibaba.android.arouter.routes;
import com.alibaba.android.arouter.facade.enums.RouteType;
import com.alibaba.android.arouter.facade.model.RouteMeta;
import com.alibaba.android.arouter.facade.template.IRouteGroup;
import com.ubt.jimu.base.entities.Constant;
import com.ubt.jimu.pack.view.DownloadRobotActivity;
import java.util.Map;
/* loaded from: classes.dex */
public class ARouter$$Group$$robot implements IRouteGroup {
@Override // com.alibaba.android.arouter.facade.template.IRouteGroup
public void loadInto(Map<String, RouteMeta> map) {
map.put("/robot/download", RouteMeta.a(RouteType.ACTIVITY, DownloadRobotActivity.class, "/robot/download", Constant.SelectRobot.DOWNLAOD_ROBOT_DATA_KEY, null, -1, Integer.MIN_VALUE));
}
}

View File

@@ -0,0 +1,12 @@
package com.alibaba.android.arouter.routes;
import com.alibaba.android.arouter.facade.model.RouteMeta;
import com.alibaba.android.arouter.facade.template.IProviderGroup;
import java.util.Map;
/* loaded from: classes.dex */
public class ARouter$$Providers$$app implements IProviderGroup {
@Override // com.alibaba.android.arouter.facade.template.IProviderGroup
public void loadInto(Map<String, RouteMeta> map) {
}
}

View File

@@ -0,0 +1,17 @@
package com.alibaba.android.arouter.routes;
import com.alibaba.android.arouter.core.AutowiredServiceImpl;
import com.alibaba.android.arouter.core.InterceptorServiceImpl;
import com.alibaba.android.arouter.facade.enums.RouteType;
import com.alibaba.android.arouter.facade.model.RouteMeta;
import com.alibaba.android.arouter.facade.template.IProviderGroup;
import java.util.Map;
/* loaded from: classes.dex */
public class ARouter$$Providers$$arouterapi implements IProviderGroup {
@Override // com.alibaba.android.arouter.facade.template.IProviderGroup
public void loadInto(Map<String, RouteMeta> map) {
map.put("com.alibaba.android.arouter.facade.service.AutowiredService", RouteMeta.a(RouteType.PROVIDER, AutowiredServiceImpl.class, "/arouter/service/autowired", "arouter", null, -1, Integer.MIN_VALUE));
map.put("com.alibaba.android.arouter.facade.service.InterceptorService", RouteMeta.a(RouteType.PROVIDER, InterceptorServiceImpl.class, "/arouter/service/interceptor", "arouter", null, -1, Integer.MIN_VALUE));
}
}

View File

@@ -0,0 +1,24 @@
package com.alibaba.android.arouter.routes;
import com.alibaba.android.arouter.facade.template.IRouteGroup;
import com.alibaba.android.arouter.facade.template.IRouteRoot;
import com.ubt.jimu.base.entities.Constant;
import com.ubt.jimu.transport.model.TransportFile;
import java.util.Map;
/* loaded from: classes.dex */
public class ARouter$$Root$$app implements IRouteRoot {
@Override // com.alibaba.android.arouter.facade.template.IRouteRoot
public void loadInto(Map<String, Class<? extends IRouteGroup>> map) {
map.put("account", ARouter$$Group$$account.class);
map.put("album", ARouter$$Group$$album.class);
map.put("community", ARouter$$Group$$community.class);
map.put(TransportFile.TYPE_CONTROLLER, ARouter$$Group$$controller.class);
map.put("diy", ARouter$$Group$$diy.class);
map.put("game", ARouter$$Group$$game.class);
map.put("learn", ARouter$$Group$$learn.class);
map.put("package", ARouter$$Group$$package.class);
map.put("page", ARouter$$Group$$page.class);
map.put(Constant.SelectRobot.DOWNLAOD_ROBOT_DATA_KEY, ARouter$$Group$$robot.class);
}
}

View File

@@ -0,0 +1,13 @@
package com.alibaba.android.arouter.routes;
import com.alibaba.android.arouter.facade.template.IRouteGroup;
import com.alibaba.android.arouter.facade.template.IRouteRoot;
import java.util.Map;
/* loaded from: classes.dex */
public class ARouter$$Root$$arouterapi implements IRouteRoot {
@Override // com.alibaba.android.arouter.facade.template.IRouteRoot
public void loadInto(Map<String, Class<? extends IRouteGroup>> map) {
map.put("arouter", ARouter$$Group$$arouter.class);
}
}

View File

@@ -0,0 +1,16 @@
package com.alibaba.android.arouter.thread;
import java.util.concurrent.CountDownLatch;
/* loaded from: classes.dex */
public class CancelableCountDownLatch extends CountDownLatch {
public CancelableCountDownLatch(int i) {
super(i);
}
public void a() {
while (getCount() > 0) {
countDown();
}
}
}

View File

@@ -0,0 +1,60 @@
package com.alibaba.android.arouter.thread;
import com.alibaba.android.arouter.launcher.ARouter;
import com.alibaba.android.arouter.utils.TextUtils;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.CancellationException;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import java.util.concurrent.RejectedExecutionHandler;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
/* loaded from: classes.dex */
public class DefaultPoolExecutor extends ThreadPoolExecutor {
private static final int a = Runtime.getRuntime().availableProcessors();
private static final int b = a + 1;
private static final int c = b;
private static DefaultPoolExecutor d;
private DefaultPoolExecutor(int i, int i2, long j, TimeUnit timeUnit, BlockingQueue<Runnable> blockingQueue, ThreadFactory threadFactory) {
super(i, i2, j, timeUnit, blockingQueue, threadFactory, new RejectedExecutionHandler() { // from class: com.alibaba.android.arouter.thread.DefaultPoolExecutor.1
@Override // java.util.concurrent.RejectedExecutionHandler
public void rejectedExecution(Runnable runnable, ThreadPoolExecutor threadPoolExecutor) {
ARouter.c.b("ARouter::", "Task rejected, too many task!");
}
});
}
public static DefaultPoolExecutor a() {
if (d == null) {
synchronized (DefaultPoolExecutor.class) {
if (d == null) {
d = new DefaultPoolExecutor(b, c, 30L, TimeUnit.SECONDS, new ArrayBlockingQueue(64), new DefaultThreadFactory());
}
}
}
return d;
}
@Override // java.util.concurrent.ThreadPoolExecutor
protected void afterExecute(Runnable runnable, Throwable th) {
super.afterExecute(runnable, th);
if (th == null && (runnable instanceof Future)) {
try {
((Future) runnable).get();
} catch (InterruptedException unused) {
Thread.currentThread().interrupt();
} catch (CancellationException e) {
th = e;
} catch (ExecutionException e2) {
th = e2.getCause();
}
}
if (th != null) {
ARouter.c.c("ARouter::", "Running task appeared exception! Thread [" + Thread.currentThread().getName() + "], because [" + th.getMessage() + "]\n" + TextUtils.a(th.getStackTrace()));
}
}
}

View File

@@ -0,0 +1,40 @@
package com.alibaba.android.arouter.thread;
import com.alibaba.android.arouter.launcher.ARouter;
import java.lang.Thread;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.atomic.AtomicInteger;
/* loaded from: classes.dex */
public class DefaultThreadFactory implements ThreadFactory {
private static final AtomicInteger d = new AtomicInteger(1);
private final AtomicInteger a = new AtomicInteger(1);
private final ThreadGroup b;
private final String c;
public DefaultThreadFactory() {
SecurityManager securityManager = System.getSecurityManager();
this.b = securityManager != null ? securityManager.getThreadGroup() : Thread.currentThread().getThreadGroup();
this.c = "ARouter task pool No." + d.getAndIncrement() + ", thread No.";
}
@Override // java.util.concurrent.ThreadFactory
public Thread newThread(Runnable runnable) {
String str = this.c + this.a.getAndIncrement();
ARouter.c.d("ARouter::", "Thread production, name is [" + str + "]");
Thread thread = new Thread(this.b, runnable, str, 0L);
if (thread.isDaemon()) {
thread.setDaemon(false);
}
if (thread.getPriority() != 5) {
thread.setPriority(5);
}
thread.setUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler(this) { // from class: com.alibaba.android.arouter.thread.DefaultThreadFactory.1
@Override // java.lang.Thread.UncaughtExceptionHandler
public void uncaughtException(Thread thread2, Throwable th) {
ARouter.c.d("ARouter::", "Running task appeared exception! Thread [" + thread2.getName() + "], because [" + th.getMessage() + "]");
}
});
return thread;
}
}

View File

@@ -0,0 +1,249 @@
package com.alibaba.android.arouter.utils;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.os.Build;
import android.util.Log;
import com.alibaba.android.arouter.launcher.ARouter;
import com.alibaba.android.arouter.thread.DefaultPoolExecutor;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.concurrent.CountDownLatch;
/* loaded from: classes.dex */
public class ClassUtils {
private static final String a = "code_cache" + File.separator + "secondary-dexes";
private static SharedPreferences a(Context context) {
return context.getSharedPreferences("multidex.version", Build.VERSION.SDK_INT < 11 ? 0 : 4);
}
public static List<String> b(Context context) throws PackageManager.NameNotFoundException, IOException {
ApplicationInfo applicationInfo = context.getPackageManager().getApplicationInfo(context.getPackageName(), 0);
File file = new File(applicationInfo.sourceDir);
ArrayList arrayList = new ArrayList();
arrayList.add(applicationInfo.sourceDir);
String str = file.getName() + ".classes";
if (!a()) {
int i = a(context).getInt("dex.number", 1);
File file2 = new File(applicationInfo.dataDir, a);
for (int i2 = 2; i2 <= i; i2++) {
File file3 = new File(file2, str + i2 + ".zip");
if (!file3.isFile()) {
throw new IOException("Missing extracted secondary dex file '" + file3.getPath() + "'");
}
arrayList.add(file3.getAbsolutePath());
}
}
if (ARouter.a()) {
arrayList.addAll(a(applicationInfo));
}
return arrayList;
}
public static Set<String> a(Context context, final String str) throws PackageManager.NameNotFoundException, IOException, InterruptedException {
final HashSet hashSet = new HashSet();
List<String> b = b(context);
final CountDownLatch countDownLatch = new CountDownLatch(b.size());
for (final String str2 : b) {
DefaultPoolExecutor.a().execute(new Runnable() { // from class: com.alibaba.android.arouter.utils.ClassUtils.1
/* JADX WARN: Code restructure failed: missing block: B:30:0x0057, code lost:
if (r0 == null) goto L20;
*/
@Override // java.lang.Runnable
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct code enable 'Show inconsistent code' option in preferences
*/
public void run() {
/*
r4 = this;
r0 = 0
java.lang.String r1 = r1 // Catch: java.lang.Throwable -> L4f
java.lang.String r2 = ".zip"
boolean r1 = r1.endsWith(r2) // Catch: java.lang.Throwable -> L4f
if (r1 == 0) goto L26
java.lang.String r1 = r1 // Catch: java.lang.Throwable -> L4f
java.lang.StringBuilder r2 = new java.lang.StringBuilder // Catch: java.lang.Throwable -> L4f
r2.<init>() // Catch: java.lang.Throwable -> L4f
java.lang.String r3 = r1 // Catch: java.lang.Throwable -> L4f
r2.append(r3) // Catch: java.lang.Throwable -> L4f
java.lang.String r3 = ".tmp"
r2.append(r3) // Catch: java.lang.Throwable -> L4f
java.lang.String r2 = r2.toString() // Catch: java.lang.Throwable -> L4f
r3 = 0
dalvik.system.DexFile r0 = dalvik.system.DexFile.loadDex(r1, r2, r3) // Catch: java.lang.Throwable -> L4f
goto L2e
L26:
dalvik.system.DexFile r1 = new dalvik.system.DexFile // Catch: java.lang.Throwable -> L4f
java.lang.String r2 = r1 // Catch: java.lang.Throwable -> L4f
r1.<init>(r2) // Catch: java.lang.Throwable -> L4f
r0 = r1
L2e:
java.util.Enumeration r1 = r0.entries() // Catch: java.lang.Throwable -> L4f
L32:
boolean r2 = r1.hasMoreElements() // Catch: java.lang.Throwable -> L4f
if (r2 == 0) goto L4c
java.lang.Object r2 = r1.nextElement() // Catch: java.lang.Throwable -> L4f
java.lang.String r2 = (java.lang.String) r2 // Catch: java.lang.Throwable -> L4f
java.lang.String r3 = r2 // Catch: java.lang.Throwable -> L4f
boolean r3 = r2.startsWith(r3) // Catch: java.lang.Throwable -> L4f
if (r3 == 0) goto L32
java.util.Set r3 = r3 // Catch: java.lang.Throwable -> L4f
r3.add(r2) // Catch: java.lang.Throwable -> L4f
goto L32
L4c:
if (r0 == 0) goto L5c
goto L59
L4f:
r1 = move-exception
java.lang.String r2 = "ARouter"
java.lang.String r3 = "Scan map file in dex files made error."
android.util.Log.e(r2, r3, r1) // Catch: java.lang.Throwable -> L62
if (r0 == 0) goto L5c
L59:
r0.close() // Catch: java.lang.Throwable -> L5c
L5c:
java.util.concurrent.CountDownLatch r0 = r4
r0.countDown()
return
L62:
r1 = move-exception
if (r0 == 0) goto L68
r0.close() // Catch: java.lang.Throwable -> L68
L68:
java.util.concurrent.CountDownLatch r0 = r4
r0.countDown()
throw r1
*/
throw new UnsupportedOperationException("Method not decompiled: com.alibaba.android.arouter.utils.ClassUtils.AnonymousClass1.run():void");
}
});
}
countDownLatch.await();
Log.d("ARouter::", "Filter " + hashSet.size() + " classes by packageName <" + str + ">");
return hashSet;
}
private static List<String> a(ApplicationInfo applicationInfo) {
String[] strArr;
ArrayList arrayList = new ArrayList();
if (Build.VERSION.SDK_INT >= 21 && (strArr = applicationInfo.splitSourceDirs) != null) {
arrayList.addAll(Arrays.asList(strArr));
Log.d("ARouter::", "Found InstantRun support");
} else {
try {
File file = new File((String) Class.forName("com.android.tools.fd.runtime.Paths").getMethod("getDexFileDirectory", String.class).invoke(null, applicationInfo.packageName));
if (file.exists() && file.isDirectory()) {
for (File file2 : file.listFiles()) {
if (file2 != null && file2.exists() && file2.isFile() && file2.getName().endsWith(".dex")) {
arrayList.add(file2.getAbsolutePath());
}
}
Log.d("ARouter::", "Found InstantRun support");
}
} catch (Exception e) {
Log.e("ARouter::", "InstantRun support error, " + e.getMessage());
}
}
return arrayList;
}
private static boolean b() {
try {
String property = System.getProperty("ro.yunos.version");
String property2 = System.getProperty("java.vm.name");
if (property2 == null || !property2.toLowerCase().contains("lemur")) {
if (property == null) {
return false;
}
if (property.trim().length() <= 0) {
return false;
}
}
return true;
} catch (Exception unused) {
return false;
}
}
/* JADX WARN: Code restructure failed: missing block: B:24:0x004e, code lost:
if (r2 < 1) goto L24;
*/
/* JADX WARN: Code restructure failed: missing block: B:6:0x001b, code lost:
if (java.lang.Integer.valueOf(java.lang.System.getProperty("ro.build.version.sdk")).intValue() >= 21) goto L7;
*/
/* JADX WARN: Removed duplicated region for block: B:11:0x0061 */
/* JADX WARN: Removed duplicated region for block: B:15:0x0064 */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct code enable 'Show inconsistent code' option in preferences
*/
private static boolean a() {
/*
r0 = 0
r1 = 0
boolean r2 = b() // Catch: java.lang.Throwable -> L51
r3 = 1
if (r2 == 0) goto L1f
java.lang.String r1 = "'YunOS'"
java.lang.String r2 = "ro.build.version.sdk"
java.lang.String r2 = java.lang.System.getProperty(r2) // Catch: java.lang.Throwable -> L51
java.lang.Integer r2 = java.lang.Integer.valueOf(r2) // Catch: java.lang.Throwable -> L51
int r2 = r2.intValue() // Catch: java.lang.Throwable -> L51
r4 = 21
if (r2 < r4) goto L52
L1d:
r0 = 1
goto L52
L1f:
java.lang.String r1 = "'Android'"
java.lang.String r2 = "java.vm.version"
java.lang.String r2 = java.lang.System.getProperty(r2) // Catch: java.lang.Throwable -> L51
if (r2 == 0) goto L52
java.lang.String r4 = "(\\d+)\\.(\\d+)(\\.\\d+)?"
java.util.regex.Pattern r4 = java.util.regex.Pattern.compile(r4) // Catch: java.lang.Throwable -> L51
java.util.regex.Matcher r2 = r4.matcher(r2) // Catch: java.lang.Throwable -> L51
boolean r4 = r2.matches() // Catch: java.lang.Throwable -> L51
if (r4 == 0) goto L52
java.lang.String r4 = r2.group(r3) // Catch: java.lang.Throwable -> L51
int r4 = java.lang.Integer.parseInt(r4) // Catch: java.lang.Throwable -> L51
r5 = 2
java.lang.String r2 = r2.group(r5) // Catch: java.lang.Throwable -> L51
int r2 = java.lang.Integer.parseInt(r2) // Catch: java.lang.Throwable -> L51
if (r4 > r5) goto L1d
if (r4 != r5) goto L52
if (r2 < r3) goto L52
goto L1d
L51:
L52:
java.lang.StringBuilder r2 = new java.lang.StringBuilder
r2.<init>()
java.lang.String r3 = "VM with name "
r2.append(r3)
r2.append(r1)
if (r0 == 0) goto L64
java.lang.String r1 = " has multidex support"
goto L66
L64:
java.lang.String r1 = " does not have multidex support"
L66:
r2.append(r1)
java.lang.String r1 = r2.toString()
java.lang.String r2 = "ARouter::"
android.util.Log.i(r2, r1)
return r0
*/
throw new UnsupportedOperationException("Method not decompiled: com.alibaba.android.arouter.utils.ClassUtils.a():boolean");
}
}

View File

@@ -0,0 +1,95 @@
package com.alibaba.android.arouter.utils;
import android.util.Log;
import com.alibaba.android.arouter.facade.template.ILogger;
/* loaded from: classes.dex */
public class DefaultLogger implements ILogger {
private static boolean b = false;
private static boolean c = false;
private String a;
public DefaultLogger(String str) {
this.a = "ARouter";
this.a = str;
}
@Override // com.alibaba.android.arouter.facade.template.ILogger
public void a(String str, String str2) {
if (b) {
StackTraceElement stackTraceElement = Thread.currentThread().getStackTrace()[3];
if (android.text.TextUtils.isEmpty(str)) {
str = a();
}
Log.d(str, str2 + a(stackTraceElement));
}
}
@Override // com.alibaba.android.arouter.facade.template.ILogger
public void b(String str, String str2) {
if (b) {
StackTraceElement stackTraceElement = Thread.currentThread().getStackTrace()[3];
if (android.text.TextUtils.isEmpty(str)) {
str = a();
}
Log.e(str, str2 + a(stackTraceElement));
}
}
@Override // com.alibaba.android.arouter.facade.template.ILogger
public void c(String str, String str2) {
if (b) {
StackTraceElement stackTraceElement = Thread.currentThread().getStackTrace()[3];
if (android.text.TextUtils.isEmpty(str)) {
str = a();
}
Log.w(str, str2 + a(stackTraceElement));
}
}
@Override // com.alibaba.android.arouter.facade.template.ILogger
public void d(String str, String str2) {
if (b) {
StackTraceElement stackTraceElement = Thread.currentThread().getStackTrace()[3];
if (android.text.TextUtils.isEmpty(str)) {
str = a();
}
Log.i(str, str2 + a(stackTraceElement));
}
}
public String a() {
return this.a;
}
public static String a(StackTraceElement stackTraceElement) {
StringBuilder sb = new StringBuilder("[");
if (c) {
String name = Thread.currentThread().getName();
String fileName = stackTraceElement.getFileName();
String className = stackTraceElement.getClassName();
String methodName = stackTraceElement.getMethodName();
long id = Thread.currentThread().getId();
int lineNumber = stackTraceElement.getLineNumber();
sb.append("ThreadId=");
sb.append(id);
sb.append(" & ");
sb.append("ThreadName=");
sb.append(name);
sb.append(" & ");
sb.append("FileName=");
sb.append(fileName);
sb.append(" & ");
sb.append("ClassName=");
sb.append(className);
sb.append(" & ");
sb.append("MethodName=");
sb.append(methodName);
sb.append(" & ");
sb.append("LineNumber=");
sb.append(lineNumber);
}
sb.append(" ] ");
return sb.toString();
}
}

View File

@@ -0,0 +1,14 @@
package com.alibaba.android.arouter.utils;
import java.util.Map;
/* loaded from: classes.dex */
public class MapUtils {
public static boolean a(Map<?, ?> map) {
return map == null || map.isEmpty();
}
public static boolean b(Map<?, ?> map) {
return !a(map);
}
}

View File

@@ -0,0 +1,43 @@
package com.alibaba.android.arouter.utils;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.pm.PackageInfo;
import com.alibaba.android.arouter.launcher.ARouter;
/* loaded from: classes.dex */
public class PackageUtils {
private static String a;
private static int b;
private static PackageInfo a(Context context) {
try {
return context.getPackageManager().getPackageInfo(context.getPackageName(), 16384);
} catch (Exception unused) {
ARouter.c.b("ARouter::", "Get package info error.");
return null;
}
}
public static boolean b(Context context) {
PackageInfo a2 = a(context);
if (a2 != null) {
String str = a2.versionName;
int i = a2.versionCode;
SharedPreferences sharedPreferences = context.getSharedPreferences("SP_AROUTER_CACHE", 0);
if (str.equals(sharedPreferences.getString("LAST_VERSION_NAME", null)) && i == sharedPreferences.getInt("LAST_VERSION_CODE", -1)) {
return false;
}
a = str;
b = i;
}
return true;
}
public static void c(Context context) {
if (android.text.TextUtils.isEmpty(a) || b == 0) {
return;
}
context.getSharedPreferences("SP_AROUTER_CACHE", 0).edit().putString("LAST_VERSION_NAME", a).putInt("LAST_VERSION_CODE", b).apply();
}
}

Some files were not shown because too many files have changed in this diff Show More