Enable replacing const values in jadx

Tracking changes should be much easier now.
This commit is contained in:
Juby210 2021-08-10 00:51:56 +02:00
parent c204ad7e99
commit 7b1810ed2e
Signed by: Juby210
GPG Key ID: F459CEC5C92E1482
3738 changed files with 28462 additions and 25379 deletions

View File

@ -37,10 +37,10 @@
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE"/>
<uses-permission android:name="com.google.android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE"/>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<application android:theme="@style/res_2131951648_apptheme_dark" android:label="@string/discord" android:icon="@mipmap/ic_logo_square_canary" android:name="com.discord.app.App" android:allowBackup="false" android:largeHeap="true" android:supportsRtl="true" android:networkSecurityConfig="@xml/network_security_config" android:roundIcon="@mipmap/ic_logo_round_canary" android:appCategory="social" android:appComponentFactory="androidx.core.app.CoreComponentFactory">
<activity android:theme="@style/res_2131951669_apptheme_translucent" android:name="com.discord.samsung.SamsungConnectActivity"/>
<activity android:theme="@style/res_2131951648_apptheme_dark" android:name="com.discord.app.AppActivity" android:screenOrientation="fullUser" android:windowSoftInputMode="stateHidden|adjustResize"/>
<activity android:theme="@style/res_2131951659_apptheme_loading" android:name="com.discord.app.AppActivity$Main" android:exported="true" android:launchMode="singleTask" android:screenOrientation="fullUser" android:windowSoftInputMode="stateHidden|adjustResize">
<application android:theme="@style/AppTheme_Dark" android:label="@string/discord" android:icon="@mipmap/ic_logo_square_canary" android:name="com.discord.app.App" android:allowBackup="false" android:largeHeap="true" android:supportsRtl="true" android:networkSecurityConfig="@xml/network_security_config" android:roundIcon="@mipmap/ic_logo_round_canary" android:appCategory="social" android:appComponentFactory="androidx.core.app.CoreComponentFactory">
<activity android:theme="@style/AppTheme_Translucent" android:name="com.discord.samsung.SamsungConnectActivity"/>
<activity android:theme="@style/AppTheme_Dark" android:name="com.discord.app.AppActivity" android:screenOrientation="fullUser" android:windowSoftInputMode="stateHidden|adjustResize"/>
<activity android:theme="@style/AppTheme_Loading" android:name="com.discord.app.AppActivity$Main" android:exported="true" android:launchMode="singleTask" android:screenOrientation="fullUser" android:windowSoftInputMode="stateHidden|adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
@ -122,7 +122,7 @@
</activity>
<activity android:name="com.discord.app.AppActivity$Call" android:excludeFromRecents="true" android:launchMode="singleTask"/>
<activity android:name="com.discord.app.AppActivity$IncomingCall" android:excludeFromRecents="true" android:launchMode="singleTask" android:showOnLockScreen="true" android:showWhenLocked="true" android:turnScreenOn="true"/>
<activity android:theme="@style/res_2131951659_apptheme_loading" android:label="@string/discord" android:name="com.discord.app.AppActivity$AppAction" android:exported="true" android:launchMode="standard" android:windowSoftInputMode="stateHidden|adjustResize">
<activity android:theme="@style/AppTheme_Loading" android:label="@string/discord" android:name="com.discord.app.AppActivity$AppAction" android:exported="true" android:launchMode="standard" android:windowSoftInputMode="stateHidden|adjustResize">
<intent-filter>
<action android:name="com.discord.intent.action.SDK"/>
<category android:name="android.intent.category.DEFAULT"/>

View File

@ -25,6 +25,8 @@ import androidx.annotation.RequiresApi;
import androidx.collection.ArrayMap;
import androidx.core.app.BundleCompat;
import androidx.media.MediaBrowserCompatUtils;
import androidx.media.MediaBrowserProtocol;
import androidx.media.MediaBrowserServiceCompat;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.List;
@ -46,10 +48,10 @@ public final class MediaBrowserCompat {
if (bundle != null) {
bundle = MediaSessionCompat.b(bundle);
}
if (i != 0 || bundle == null || !bundle.containsKey("media_item")) {
if (i != 0 || bundle == null || !bundle.containsKey(MediaBrowserServiceCompat.KEY_MEDIA_ITEM)) {
throw null;
}
Parcelable parcelable = bundle.getParcelable("media_item");
Parcelable parcelable = bundle.getParcelable(MediaBrowserServiceCompat.KEY_MEDIA_ITEM);
if (parcelable == null || (parcelable instanceof MediaItem)) {
MediaItem mediaItem = (MediaItem) parcelable;
throw null;
@ -136,10 +138,10 @@ public final class MediaBrowserCompat {
if (bundle != null) {
bundle = MediaSessionCompat.b(bundle);
}
if (i != 0 || bundle == null || !bundle.containsKey("search_results")) {
if (i != 0 || bundle == null || !bundle.containsKey(MediaBrowserServiceCompat.KEY_SEARCH_RESULTS)) {
throw null;
}
Parcelable[] parcelableArray = bundle.getParcelableArray("search_results");
Parcelable[] parcelableArray = bundle.getParcelableArray(MediaBrowserServiceCompat.KEY_SEARCH_RESULTS);
Objects.requireNonNull(parcelableArray);
ArrayList arrayList = new ArrayList();
for (Parcelable parcelable : parcelableArray) {
@ -172,19 +174,19 @@ public final class MediaBrowserCompat {
try {
int i = message.what;
if (i == 1) {
Bundle bundle = data.getBundle("data_root_hints");
Bundle bundle = data.getBundle(MediaBrowserProtocol.DATA_ROOT_HINTS);
MediaSessionCompat.a(bundle);
gVar.a(messenger, data.getString("data_media_item_id"), (MediaSessionCompat.Token) data.getParcelable("data_media_session_token"), bundle);
gVar.a(messenger, data.getString(MediaBrowserProtocol.DATA_MEDIA_ITEM_ID), (MediaSessionCompat.Token) data.getParcelable(MediaBrowserProtocol.DATA_MEDIA_SESSION_TOKEN), bundle);
} else if (i == 2) {
gVar.c(messenger);
} else if (i != 3) {
Log.w("MediaBrowserCompat", "Unhandled message: " + message + "\n Client version: 1\n Service version: " + message.arg1);
} else {
Bundle bundle2 = data.getBundle("data_options");
Bundle bundle2 = data.getBundle(MediaBrowserProtocol.DATA_OPTIONS);
MediaSessionCompat.a(bundle2);
Bundle bundle3 = data.getBundle("data_notify_children_changed_options");
Bundle bundle3 = data.getBundle(MediaBrowserProtocol.DATA_NOTIFY_CHILDREN_CHANGED_OPTIONS);
MediaSessionCompat.a(bundle3);
gVar.b(messenger, data.getString("data_media_item_id"), data.getParcelableArrayList("data_media_item_list"), bundle2, bundle3);
gVar.b(messenger, data.getString(MediaBrowserProtocol.DATA_MEDIA_ITEM_ID), data.getParcelableArrayList(MediaBrowserProtocol.DATA_MEDIA_ITEM_LIST), bundle2, bundle3);
}
} catch (BadParcelableException unused) {
Log.e("MediaBrowserCompat", "Could not unparcel the data.");
@ -214,8 +216,8 @@ public final class MediaBrowserCompat {
try {
Bundle extras = dVar.b.getExtras();
if (extras != null) {
extras.getInt("extra_service_version", 0);
IBinder binder = BundleCompat.getBinder(extras, "extra_messenger");
extras.getInt(MediaBrowserProtocol.EXTRA_SERVICE_VERSION, 0);
IBinder binder = BundleCompat.getBinder(extras, MediaBrowserProtocol.EXTRA_MESSENGER_BINDER);
if (binder != null) {
dVar.f = new h(binder, dVar.f11c);
Messenger messenger = new Messenger(dVar.d);
@ -227,15 +229,15 @@ public final class MediaBrowserCompat {
Messenger messenger2 = dVar.g;
Objects.requireNonNull(hVar);
Bundle bundle = new Bundle();
bundle.putString("data_package_name", context.getPackageName());
bundle.putInt("data_calling_pid", Process.myPid());
bundle.putBundle("data_root_hints", hVar.b);
bundle.putString(MediaBrowserProtocol.DATA_PACKAGE_NAME, context.getPackageName());
bundle.putInt(MediaBrowserProtocol.DATA_CALLING_PID, Process.myPid());
bundle.putBundle(MediaBrowserProtocol.DATA_ROOT_HINTS, hVar.b);
hVar.a(6, bundle, messenger2);
} catch (RemoteException unused) {
Log.i("MediaBrowserCompat", "Remote error registering client messenger.");
}
}
x.a.b.b.a.b e = b.a.e(BundleCompat.getBinder(extras, "extra_session_binder"));
x.a.b.b.a.b e = b.a.e(BundleCompat.getBinder(extras, MediaBrowserProtocol.EXTRA_SESSION_BINDER));
if (e != null) {
dVar.h = MediaSessionCompat.Token.a(dVar.b.getSessionToken(), e);
}
@ -311,8 +313,8 @@ public final class MediaBrowserCompat {
this.a = context;
Bundle bundle2 = bundle != null ? new Bundle(bundle) : new Bundle();
this.f11c = bundle2;
bundle2.putInt("extra_client_version", 1);
bundle2.putInt("extra_calling_pid", Process.myPid());
bundle2.putInt(MediaBrowserProtocol.EXTRA_CLIENT_VERSION, 1);
bundle2.putInt(MediaBrowserProtocol.EXTRA_CALLING_PID, Process.myPid());
bVar.setInternalConnectionCallback(this);
this.b = new MediaBrowser(context, componentName, bVar.mConnectionCallbackFwk, bundle2);
}

View File

@ -23,6 +23,7 @@ import androidx.activity.result.ActivityResultRegistry;
import androidx.activity.result.ActivityResultRegistryOwner;
import androidx.activity.result.IntentSenderRequest;
import androidx.activity.result.contract.ActivityResultContract;
import androidx.activity.result.contract.ActivityResultContracts;
import androidx.annotation.CallSuper;
import androidx.annotation.ContentView;
import androidx.annotation.LayoutRes;
@ -111,7 +112,7 @@ public class ComponentActivity extends androidx.core.app.ComponentActivity imple
@Override // java.lang.Runnable
public void run() {
AnonymousClass2.this.dispatchResult(this.val$requestCode, 0, new Intent().setAction("androidx.activity.result.contract.action.INTENT_SENDER_REQUEST").putExtra("androidx.activity.result.contract.extra.SEND_INTENT_EXCEPTION", this.val$e));
AnonymousClass2.this.dispatchResult(this.val$requestCode, 0, new Intent().setAction(ActivityResultContracts.StartIntentSenderForResult.ACTION_INTENT_SENDER_REQUEST).putExtra(ActivityResultContracts.StartIntentSenderForResult.EXTRA_SEND_INTENT_EXCEPTION, this.val$e));
}
}
@ -128,14 +129,14 @@ public class ComponentActivity extends androidx.core.app.ComponentActivity imple
}
Intent createIntent = activityResultContract.createIntent(componentActivity, i2);
Bundle bundle = null;
if (createIntent.hasExtra("androidx.activity.result.contract.extra.ACTIVITY_OPTIONS_BUNDLE")) {
bundle = createIntent.getBundleExtra("androidx.activity.result.contract.extra.ACTIVITY_OPTIONS_BUNDLE");
createIntent.removeExtra("androidx.activity.result.contract.extra.ACTIVITY_OPTIONS_BUNDLE");
if (createIntent.hasExtra(ActivityResultContracts.StartActivityForResult.EXTRA_ACTIVITY_OPTIONS_BUNDLE)) {
bundle = createIntent.getBundleExtra(ActivityResultContracts.StartActivityForResult.EXTRA_ACTIVITY_OPTIONS_BUNDLE);
createIntent.removeExtra(ActivityResultContracts.StartActivityForResult.EXTRA_ACTIVITY_OPTIONS_BUNDLE);
} else if (activityOptionsCompat != null) {
bundle = activityOptionsCompat.toBundle();
}
if ("androidx.activity.result.contract.action.REQUEST_PERMISSIONS".equals(createIntent.getAction())) {
String[] stringArrayExtra = createIntent.getStringArrayExtra("androidx.activity.result.contract.extra.PERMISSIONS");
if (ActivityResultContracts.RequestMultiplePermissions.ACTION_REQUEST_PERMISSIONS.equals(createIntent.getAction())) {
String[] stringArrayExtra = createIntent.getStringArrayExtra(ActivityResultContracts.RequestMultiplePermissions.EXTRA_PERMISSIONS);
if (stringArrayExtra != null) {
ArrayList arrayList = new ArrayList();
for (String str : stringArrayExtra) {
@ -147,8 +148,8 @@ public class ComponentActivity extends androidx.core.app.ComponentActivity imple
ActivityCompat.requestPermissions(componentActivity, (String[]) arrayList.toArray(new String[0]), i);
}
}
} else if ("androidx.activity.result.contract.action.INTENT_SENDER_REQUEST".equals(createIntent.getAction())) {
IntentSenderRequest intentSenderRequest = (IntentSenderRequest) createIntent.getParcelableExtra("androidx.activity.result.contract.extra.INTENT_SENDER_REQUEST");
} else if (ActivityResultContracts.StartIntentSenderForResult.ACTION_INTENT_SENDER_REQUEST.equals(createIntent.getAction())) {
IntentSenderRequest intentSenderRequest = (IntentSenderRequest) createIntent.getParcelableExtra(ActivityResultContracts.StartIntentSenderForResult.EXTRA_INTENT_SENDER_REQUEST);
try {
ActivityCompat.startIntentSenderForResult(componentActivity, intentSenderRequest.getIntentSender(), i, intentSenderRequest.getFillInIntent(), intentSenderRequest.getFlagsMask(), intentSenderRequest.getFlagsValues(), 0, bundle);
} catch (IntentSender.SendIntentException e) {
@ -358,7 +359,7 @@ public class ComponentActivity extends androidx.core.app.ComponentActivity imple
@CallSuper
@Deprecated
public void onRequestPermissionsResult(int i, @NonNull String[] strArr, @NonNull int[] iArr) {
if (!this.mActivityResultRegistry.dispatchResult(i, -1, new Intent().putExtra("androidx.activity.result.contract.extra.PERMISSIONS", strArr).putExtra("androidx.activity.result.contract.extra.PERMISSION_GRANT_RESULTS", iArr)) && Build.VERSION.SDK_INT >= 23) {
if (!this.mActivityResultRegistry.dispatchResult(i, -1, new Intent().putExtra(ActivityResultContracts.RequestMultiplePermissions.EXTRA_PERMISSIONS, strArr).putExtra(ActivityResultContracts.RequestMultiplePermissions.EXTRA_PERMISSION_GRANT_RESULTS, iArr)) && Build.VERSION.SDK_INT >= 23) {
super.onRequestPermissionsResult(i, strArr, iArr);
}
}

View File

@ -225,24 +225,24 @@ public abstract class ActivityResultRegistry {
public final void onRestoreInstanceState(@Nullable Bundle bundle) {
if (bundle != null) {
ArrayList<Integer> integerArrayList = bundle.getIntegerArrayList("KEY_COMPONENT_ACTIVITY_REGISTERED_RCS");
ArrayList<String> stringArrayList = bundle.getStringArrayList("KEY_COMPONENT_ACTIVITY_REGISTERED_KEYS");
ArrayList<Integer> integerArrayList = bundle.getIntegerArrayList(KEY_COMPONENT_ACTIVITY_REGISTERED_RCS);
ArrayList<String> stringArrayList = bundle.getStringArrayList(KEY_COMPONENT_ACTIVITY_REGISTERED_KEYS);
if (!(stringArrayList == null || integerArrayList == null)) {
int size = stringArrayList.size();
for (int i = 0; i < size; i++) {
bindRcKey(integerArrayList.get(i).intValue(), stringArrayList.get(i));
}
this.mRandom = (Random) bundle.getSerializable("KEY_COMPONENT_ACTIVITY_RANDOM_OBJECT");
this.mPendingResults.putAll(bundle.getBundle("KEY_COMPONENT_ACTIVITY_PENDING_RESULT"));
this.mRandom = (Random) bundle.getSerializable(KEY_COMPONENT_ACTIVITY_RANDOM_OBJECT);
this.mPendingResults.putAll(bundle.getBundle(KEY_COMPONENT_ACTIVITY_PENDING_RESULTS));
}
}
}
public final void onSaveInstanceState(@NonNull Bundle bundle) {
bundle.putIntegerArrayList("KEY_COMPONENT_ACTIVITY_REGISTERED_RCS", new ArrayList<>(this.mRcToKey.keySet()));
bundle.putStringArrayList("KEY_COMPONENT_ACTIVITY_REGISTERED_KEYS", new ArrayList<>(this.mRcToKey.values()));
bundle.putBundle("KEY_COMPONENT_ACTIVITY_PENDING_RESULT", (Bundle) this.mPendingResults.clone());
bundle.putSerializable("KEY_COMPONENT_ACTIVITY_RANDOM_OBJECT", this.mRandom);
bundle.putIntegerArrayList(KEY_COMPONENT_ACTIVITY_REGISTERED_RCS, new ArrayList<>(this.mRcToKey.keySet()));
bundle.putStringArrayList(KEY_COMPONENT_ACTIVITY_REGISTERED_KEYS, new ArrayList<>(this.mRcToKey.values()));
bundle.putBundle(KEY_COMPONENT_ACTIVITY_PENDING_RESULTS, (Bundle) this.mPendingResults.clone());
bundle.putSerializable(KEY_COMPONENT_ACTIVITY_RANDOM_OBJECT, this.mRandom);
}
/* JADX DEBUG: Multi-variable search result rejected for r6v0, resolved type: androidx.activity.result.ActivityResultCallback<O> */
@ -290,13 +290,13 @@ public abstract class ActivityResultRegistry {
if (this.mParsedPendingResults.containsKey(str)) {
StringBuilder P = a.P("Dropping pending result for request ", str, ": ");
P.append(this.mParsedPendingResults.get(str));
Log.w("ActivityResultRegistry", P.toString());
Log.w(LOG_TAG, P.toString());
this.mParsedPendingResults.remove(str);
}
if (this.mPendingResults.containsKey(str)) {
StringBuilder P2 = a.P("Dropping pending result for request ", str, ": ");
P2.append(this.mPendingResults.getParcelable(str));
Log.w("ActivityResultRegistry", P2.toString());
Log.w(LOG_TAG, P2.toString());
this.mPendingResults.remove(str);
}
LifecycleContainer lifecycleContainer = this.mKeyToLifecycleContainers.get(str);

View File

@ -202,7 +202,7 @@ public final class ActivityResultContracts {
@NonNull
public static Intent createIntent(@NonNull String[] strArr) {
return new Intent("androidx.activity.result.contract.action.REQUEST_PERMISSIONS").putExtra("androidx.activity.result.contract.extra.PERMISSIONS", strArr);
return new Intent(ACTION_REQUEST_PERMISSIONS).putExtra(EXTRA_PERMISSIONS, strArr);
}
@NonNull
@ -239,8 +239,8 @@ public final class ActivityResultContracts {
if (intent == null) {
return Collections.emptyMap();
}
String[] stringArrayExtra = intent.getStringArrayExtra("androidx.activity.result.contract.extra.PERMISSIONS");
int[] intArrayExtra = intent.getIntArrayExtra("androidx.activity.result.contract.extra.PERMISSION_GRANT_RESULTS");
String[] stringArrayExtra = intent.getStringArrayExtra(EXTRA_PERMISSIONS);
int[] intArrayExtra = intent.getIntArrayExtra(EXTRA_PERMISSION_GRANT_RESULTS);
if (intArrayExtra == null || stringArrayExtra == null) {
return Collections.emptyMap();
}
@ -276,7 +276,7 @@ public final class ActivityResultContracts {
if (intent == null || i != -1) {
return Boolean.FALSE;
}
int[] intArrayExtra = intent.getIntArrayExtra("androidx.activity.result.contract.extra.PERMISSION_GRANT_RESULTS");
int[] intArrayExtra = intent.getIntArrayExtra(RequestMultiplePermissions.EXTRA_PERMISSION_GRANT_RESULTS);
if (intArrayExtra == null || intArrayExtra.length == 0) {
return Boolean.FALSE;
}
@ -310,7 +310,7 @@ public final class ActivityResultContracts {
@NonNull
public Intent createIntent(@NonNull Context context, @NonNull IntentSenderRequest intentSenderRequest) {
return new Intent("androidx.activity.result.contract.action.INTENT_SENDER_REQUEST").putExtra("androidx.activity.result.contract.extra.INTENT_SENDER_REQUEST", intentSenderRequest);
return new Intent(ACTION_INTENT_SENDER_REQUEST).putExtra(EXTRA_INTENT_SENDER_REQUEST, intentSenderRequest);
}
@Override // androidx.activity.result.contract.ActivityResultContract

View File

@ -15,6 +15,7 @@ import androidx.annotation.StringRes;
import androidx.appcompat.app.ActionBarDrawerToggleHoneycomb;
import androidx.appcompat.graphics.drawable.DrawerArrowDrawable;
import androidx.appcompat.widget.Toolbar;
import androidx.core.view.GravityCompat;
import androidx.drawerlayout.widget.DrawerLayout;
public class ActionBarDrawerToggle implements DrawerLayout.DrawerListener {
private final Delegate mActivityImpl;
@ -278,7 +279,7 @@ public class ActionBarDrawerToggle implements DrawerLayout.DrawerListener {
public void setDrawerIndicatorEnabled(boolean z2) {
if (z2 != this.mDrawerIndicatorEnabled) {
if (z2) {
setActionBarUpIndicator(this.mSlider, this.mDrawerLayout.isDrawerOpen(8388611) ? this.mCloseDrawerContentDescRes : this.mOpenDrawerContentDescRes);
setActionBarUpIndicator(this.mSlider, this.mDrawerLayout.isDrawerOpen(GravityCompat.START) ? this.mCloseDrawerContentDescRes : this.mOpenDrawerContentDescRes);
} else {
setActionBarUpIndicator(this.mHomeAsUpIndicator, 0);
}
@ -315,22 +316,22 @@ public class ActionBarDrawerToggle implements DrawerLayout.DrawerListener {
}
public void syncState() {
if (this.mDrawerLayout.isDrawerOpen(8388611)) {
if (this.mDrawerLayout.isDrawerOpen(GravityCompat.START)) {
setPosition(1.0f);
} else {
setPosition(0.0f);
}
if (this.mDrawerIndicatorEnabled) {
setActionBarUpIndicator(this.mSlider, this.mDrawerLayout.isDrawerOpen(8388611) ? this.mCloseDrawerContentDescRes : this.mOpenDrawerContentDescRes);
setActionBarUpIndicator(this.mSlider, this.mDrawerLayout.isDrawerOpen(GravityCompat.START) ? this.mCloseDrawerContentDescRes : this.mOpenDrawerContentDescRes);
}
}
public void toggle() {
int drawerLockMode = this.mDrawerLayout.getDrawerLockMode(8388611);
if (this.mDrawerLayout.isDrawerVisible(8388611) && drawerLockMode != 2) {
this.mDrawerLayout.closeDrawer(8388611);
int drawerLockMode = this.mDrawerLayout.getDrawerLockMode(GravityCompat.START);
if (this.mDrawerLayout.isDrawerVisible(GravityCompat.START) && drawerLockMode != 2) {
this.mDrawerLayout.closeDrawer(GravityCompat.START);
} else if (drawerLockMode != 1) {
this.mDrawerLayout.openDrawer(8388611);
this.mDrawerLayout.openDrawer(GravityCompat.START);
}
}
}

View File

@ -56,7 +56,7 @@ public class ActionBarDrawerToggleHoneycomb {
try {
setIndicatorInfo.setHomeActionContentDescription.invoke(activity.getActionBar(), Integer.valueOf(i));
} catch (Exception e) {
Log.w("ActionBarDrawerToggleHC", "Couldn't set content description via JB-MR2 API", e);
Log.w(TAG, "Couldn't set content description via JB-MR2 API", e);
}
}
return setIndicatorInfo;
@ -70,14 +70,14 @@ public class ActionBarDrawerToggleHoneycomb {
setIndicatorInfo.setHomeAsUpIndicator.invoke(actionBar, drawable);
setIndicatorInfo.setHomeActionContentDescription.invoke(actionBar, Integer.valueOf(i));
} catch (Exception e) {
Log.w("ActionBarDrawerToggleHC", "Couldn't set home-as-up indicator via JB-MR2 API", e);
Log.w(TAG, "Couldn't set home-as-up indicator via JB-MR2 API", e);
}
} else {
ImageView imageView = setIndicatorInfo.upIndicatorView;
if (imageView != null) {
imageView.setImageDrawable(drawable);
} else {
Log.w("ActionBarDrawerToggleHC", "Couldn't set home-as-up indicator");
Log.w(TAG, "Couldn't set home-as-up indicator");
}
}
return setIndicatorInfo;

View File

@ -123,7 +123,7 @@ public abstract class AppCompatDelegate {
public static void setDefaultNightMode(int i) {
if (i != -1 && i != 0 && i != 1 && i != 2 && i != 3) {
Log.d("AppCompatDelegate", "setDefaultNightMode() called with an unknown mode");
Log.d(TAG, "setDefaultNightMode() called with an unknown mode");
} else if (sDefaultNightMode != i) {
sDefaultNightMode = i;
applyDayNightToActiveDelegates();

View File

@ -87,6 +87,7 @@ import androidx.core.util.ObjectsCompat;
import androidx.core.view.KeyEventDispatcher;
import androidx.core.view.LayoutInflaterCompat;
import androidx.core.view.OnApplyWindowInsetsListener;
import androidx.core.view.PointerIconCompat;
import androidx.core.view.ViewCompat;
import androidx.core.view.ViewPropertyAnimatorCompat;
import androidx.core.view.ViewPropertyAnimatorListenerAdapter;
@ -97,6 +98,7 @@ import androidx.lifecycle.LifecycleOwner;
import c.d.b.a.a;
import java.lang.Thread;
import java.util.List;
import org.webrtc.MediaStreamTrack;
import org.xmlpull.v1.XmlPullParser;
@RestrictTo({RestrictTo.Scope.LIBRARY})
public class AppCompatDelegateImpl extends AppCompatDelegate implements MenuBuilder.Callback, LayoutInflater.Factory2 {
@ -176,7 +178,7 @@ public class AppCompatDelegateImpl extends AppCompatDelegate implements MenuBuil
@Override // java.lang.Thread.UncaughtExceptionHandler
public void uncaughtException(@NonNull Thread thread, @NonNull Throwable th) {
if (shouldWrapException(th)) {
Resources.NotFoundException notFoundException = new Resources.NotFoundException(th.getMessage() + ". If the resource you are trying to use is a vector resource, you may be referencing it in an unsupported way. See AppCompatDelegate.setCompatVectorFromResourcesEnabled() for more info.");
Resources.NotFoundException notFoundException = new Resources.NotFoundException(th.getMessage() + AppCompatDelegateImpl.EXCEPTION_HANDLER_MESSAGE_SUFFIX);
notFoundException.initCause(th.getCause());
notFoundException.setStackTrace(th.getStackTrace());
this.val$defHandler.uncaughtException(thread, notFoundException);
@ -1437,7 +1439,7 @@ public class AppCompatDelegateImpl extends AppCompatDelegate implements MenuBuil
ActivityInfo activityInfo = packageManager.getActivityInfo(new ComponentName(this.mContext, this.mHost.getClass()), i >= 29 ? 269221888 : i >= 24 ? 786432 : 0);
this.mActivityHandlesUiMode = (activityInfo == null || (activityInfo.configChanges & 512) == 0) ? false : true;
} catch (PackageManager.NameNotFoundException e) {
Log.d("AppCompatDelegate", "Exception while getting ActivityInfo", e);
Log.d(AppCompatDelegate.TAG, "Exception while getting ActivityInfo", e);
this.mActivityHandlesUiMode = false;
}
}
@ -1471,11 +1473,11 @@ public class AppCompatDelegateImpl extends AppCompatDelegate implements MenuBuil
closePanel(panelState, true);
z3 = z4;
if (z3) {
AudioManager audioManager = (AudioManager) this.mContext.getApplicationContext().getSystemService("audio");
AudioManager audioManager = (AudioManager) this.mContext.getApplicationContext().getSystemService(MediaStreamTrack.AUDIO_TRACK_KIND);
if (audioManager != null) {
audioManager.playSoundEffect(0);
} else {
Log.w("AppCompatDelegate", "Couldn't get audio manager");
Log.w(AppCompatDelegate.TAG, "Couldn't get audio manager");
}
}
return z3;
@ -1553,7 +1555,7 @@ public class AppCompatDelegateImpl extends AppCompatDelegate implements MenuBuil
if (!(view == null || (layoutParams = view.getLayoutParams()) == null || layoutParams.width != -1)) {
i = -1;
panelFeatureState.isHandled = false;
WindowManager.LayoutParams layoutParams3 = new WindowManager.LayoutParams(i, -2, panelFeatureState.f14x, panelFeatureState.f15y, 1002, 8519680, -3);
WindowManager.LayoutParams layoutParams3 = new WindowManager.LayoutParams(i, -2, panelFeatureState.f14x, panelFeatureState.f15y, PointerIconCompat.TYPE_HAND, 8519680, -3);
layoutParams3.gravity = panelFeatureState.gravity;
layoutParams3.windowAnimations = panelFeatureState.windowAnimations;
windowManager.addView(panelFeatureState.decorView, layoutParams3);
@ -1563,7 +1565,7 @@ public class AppCompatDelegateImpl extends AppCompatDelegate implements MenuBuil
}
i = -2;
panelFeatureState.isHandled = false;
WindowManager.LayoutParams layoutParams3 = new WindowManager.LayoutParams(i, -2, panelFeatureState.f14x, panelFeatureState.f15y, 1002, 8519680, -3);
WindowManager.LayoutParams layoutParams3 = new WindowManager.LayoutParams(i, -2, panelFeatureState.f14x, panelFeatureState.f15y, PointerIconCompat.TYPE_HAND, 8519680, -3);
layoutParams3.gravity = panelFeatureState.gravity;
layoutParams3.windowAnimations = panelFeatureState.windowAnimations;
windowManager.addView(panelFeatureState.decorView, layoutParams3);
@ -1691,12 +1693,12 @@ public class AppCompatDelegateImpl extends AppCompatDelegate implements MenuBuil
private int sanitizeWindowFeatureId(int i) {
if (i == 8) {
Log.i("AppCompatDelegate", "You should now use the AppCompatDelegate.FEATURE_SUPPORT_ACTION_BAR id when requesting this feature.");
Log.i(AppCompatDelegate.TAG, "You should now use the AppCompatDelegate.FEATURE_SUPPORT_ACTION_BAR id when requesting this feature.");
return 108;
} else if (i != 9) {
return i;
} else {
Log.i("AppCompatDelegate", "You should now use the AppCompatDelegate.FEATURE_SUPPORT_ACTION_BAR_OVERLAY id when requesting this feature.");
Log.i(AppCompatDelegate.TAG, "You should now use the AppCompatDelegate.FEATURE_SUPPORT_ACTION_BAR_OVERLAY id when requesting this feature.");
return 109;
}
}
@ -1941,7 +1943,7 @@ public class AppCompatDelegateImpl extends AppCompatDelegate implements MenuBuil
try {
this.mAppCompatViewInflater = (AppCompatViewInflater) Class.forName(string).getDeclaredConstructor(new Class[0]).newInstance(new Object[0]);
} catch (Throwable th) {
Log.i("AppCompatDelegate", "Failed to instantiate custom view inflater " + string + ". Falling back to default.", th);
Log.i(AppCompatDelegate.TAG, "Failed to instantiate custom view inflater " + string + ". Falling back to default.", th);
this.mAppCompatViewInflater = new AppCompatViewInflater();
}
}
@ -2129,7 +2131,7 @@ public class AppCompatDelegateImpl extends AppCompatDelegate implements MenuBuil
if (from.getFactory() == null) {
LayoutInflaterCompat.setFactory2(from, this);
} else if (!(from.getFactory2() instanceof AppCompatDelegateImpl)) {
Log.i("AppCompatDelegate", "The Activity's LayoutInflater already has a Factory installed so we can not install AppCompat's");
Log.i(AppCompatDelegate.TAG, "The Activity's LayoutInflater already has a Factory installed so we can not install AppCompat's");
}
}

View File

@ -178,7 +178,7 @@ public class AppCompatViewInflater {
TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, R.styleable.View, 0, 0);
int resourceId = z2 ? obtainStyledAttributes.getResourceId(R.styleable.View_android_theme, 0) : 0;
if (z3 && resourceId == 0 && (resourceId = obtainStyledAttributes.getResourceId(R.styleable.View_theme, 0)) != 0) {
Log.i("AppCompatViewInflater", "app:theme is now deprecated. Please move to using android:theme instead.");
Log.i(LOG_TAG, "app:theme is now deprecated. Please move to using android:theme instead.");
}
obtainStyledAttributes.recycle();
return resourceId != 0 ? (!(context instanceof ContextThemeWrapper) || ((ContextThemeWrapper) context).getThemeResId() != resourceId) ? new ContextThemeWrapper(context, resourceId) : context : context;

View File

@ -43,7 +43,7 @@ public class ResourcesFlusher {
sDrawableCacheField = declaredField;
declaredField.setAccessible(true);
} catch (NoSuchFieldException e) {
Log.e("ResourcesFlusher", "Could not retrieve Resources#mDrawableCache field", e);
Log.e(TAG, "Could not retrieve Resources#mDrawableCache field", e);
}
sDrawableCacheFieldFetched = true;
}
@ -53,7 +53,7 @@ public class ResourcesFlusher {
try {
map = (Map) field.get(resources);
} catch (IllegalAccessException e2) {
Log.e("ResourcesFlusher", "Could not retrieve value from Resources#mDrawableCache", e2);
Log.e(TAG, "Could not retrieve value from Resources#mDrawableCache", e2);
}
if (map != null) {
map.clear();
@ -69,7 +69,7 @@ public class ResourcesFlusher {
sDrawableCacheField = declaredField;
declaredField.setAccessible(true);
} catch (NoSuchFieldException e) {
Log.e("ResourcesFlusher", "Could not retrieve Resources#mDrawableCache field", e);
Log.e(TAG, "Could not retrieve Resources#mDrawableCache field", e);
}
sDrawableCacheFieldFetched = true;
}
@ -79,7 +79,7 @@ public class ResourcesFlusher {
try {
obj = field.get(resources);
} catch (IllegalAccessException e2) {
Log.e("ResourcesFlusher", "Could not retrieve value from Resources#mDrawableCache", e2);
Log.e(TAG, "Could not retrieve value from Resources#mDrawableCache", e2);
}
}
if (obj != null) {
@ -96,7 +96,7 @@ public class ResourcesFlusher {
sResourcesImplField = declaredField;
declaredField.setAccessible(true);
} catch (NoSuchFieldException e) {
Log.e("ResourcesFlusher", "Could not retrieve Resources#mResourcesImpl field", e);
Log.e(TAG, "Could not retrieve Resources#mResourcesImpl field", e);
}
sResourcesImplFieldFetched = true;
}
@ -106,7 +106,7 @@ public class ResourcesFlusher {
try {
obj = field.get(resources);
} catch (IllegalAccessException e2) {
Log.e("ResourcesFlusher", "Could not retrieve value from Resources#mResourcesImpl", e2);
Log.e(TAG, "Could not retrieve value from Resources#mResourcesImpl", e2);
obj = null;
}
if (obj != null) {
@ -116,7 +116,7 @@ public class ResourcesFlusher {
sDrawableCacheField = declaredField2;
declaredField2.setAccessible(true);
} catch (NoSuchFieldException e3) {
Log.e("ResourcesFlusher", "Could not retrieve ResourcesImpl#mDrawableCache field", e3);
Log.e(TAG, "Could not retrieve ResourcesImpl#mDrawableCache field", e3);
}
sDrawableCacheFieldFetched = true;
}
@ -125,7 +125,7 @@ public class ResourcesFlusher {
try {
obj2 = field2.get(obj);
} catch (IllegalAccessException e4) {
Log.e("ResourcesFlusher", "Could not retrieve value from ResourcesImpl#mDrawableCache", e4);
Log.e(TAG, "Could not retrieve value from ResourcesImpl#mDrawableCache", e4);
}
}
if (obj2 != null) {
@ -141,7 +141,7 @@ public class ResourcesFlusher {
try {
sThemedResourceCacheClazz = Class.forName("android.content.res.ThemedResourceCache");
} catch (ClassNotFoundException e) {
Log.e("ResourcesFlusher", "Could not find ThemedResourceCache class", e);
Log.e(TAG, "Could not find ThemedResourceCache class", e);
}
sThemedResourceCacheClazzFetched = true;
}
@ -153,7 +153,7 @@ public class ResourcesFlusher {
sThemedResourceCache_mUnthemedEntriesField = declaredField;
declaredField.setAccessible(true);
} catch (NoSuchFieldException e2) {
Log.e("ResourcesFlusher", "Could not retrieve ThemedResourceCache#mUnthemedEntries field", e2);
Log.e(TAG, "Could not retrieve ThemedResourceCache#mUnthemedEntries field", e2);
}
sThemedResourceCache_mUnthemedEntriesFieldFetched = true;
}
@ -163,7 +163,7 @@ public class ResourcesFlusher {
try {
longSparseArray = (LongSparseArray) field.get(obj);
} catch (IllegalAccessException e3) {
Log.e("ResourcesFlusher", "Could not retrieve value from ThemedResourceCache#mUnthemedEntries", e3);
Log.e(TAG, "Could not retrieve value from ThemedResourceCache#mUnthemedEntries", e3);
}
if (longSparseArray != null) {
longSparseArray.clear();

View File

@ -23,12 +23,12 @@ public class TwilightCalculator {
}
public void calculateTwilight(long j, double d, double d2) {
float f = ((float) (j - 946728000000L)) / 8.64E7f;
float f = ((float) (j - UTC_2000)) / 8.64E7f;
float f2 = (0.01720197f * f) + 6.24006f;
double d3 = (double) f2;
double sin = (Math.sin((double) (f2 * 3.0f)) * 5.236000106378924E-6d) + (Math.sin((double) (2.0f * f2)) * 3.4906598739326E-4d) + (Math.sin(d3) * 0.03341960161924362d) + d3 + 1.796593063d + 3.141592653589793d;
double d4 = (-d2) / 360.0d;
double sin2 = (Math.sin(2.0d * sin) * -0.0069d) + (Math.sin(d3) * 0.0053d) + ((double) (((float) Math.round(((double) (f - 9.0E-4f)) - d4)) + 9.0E-4f)) + d4;
double sin2 = (Math.sin(2.0d * sin) * -0.0069d) + (Math.sin(d3) * 0.0053d) + ((double) (((float) Math.round(((double) (f - J0)) - d4)) + J0)) + d4;
double asin = Math.asin(Math.sin(0.4092797040939331d) * Math.sin(sin));
double d5 = 0.01745329238474369d * d;
double sin3 = (Math.sin(-0.10471975803375244d) - (Math.sin(asin) * Math.sin(d5))) / (Math.cos(asin) * Math.cos(d5));
@ -42,8 +42,8 @@ public class TwilightCalculator {
this.sunrise = -1;
} else {
double acos = (double) ((float) (Math.acos(sin3) / 6.283185307179586d));
this.sunset = Math.round((sin2 + acos) * 8.64E7d) + 946728000000L;
long round = Math.round((sin2 - acos) * 8.64E7d) + 946728000000L;
this.sunset = Math.round((sin2 + acos) * 8.64E7d) + UTC_2000;
long round = Math.round((sin2 - acos) * 8.64E7d) + UTC_2000;
this.sunrise = round;
if (round >= j || this.sunset <= j) {
this.state = 1;

View File

@ -60,7 +60,7 @@ public class TwilightManager {
}
return null;
} catch (Exception e) {
Log.d("TwilightManager", "Failed to get last known location", e);
Log.d(TAG, "Failed to get last known location", e);
return null;
}
}
@ -110,7 +110,7 @@ public class TwilightManager {
updateState(lastKnownLocation);
return twilightState.isNight;
}
Log.i("TwilightManager", "Could not get last known location. This is probably because the app does not have any location permissions. Falling back to hardcoded sunrise/sunset values.");
Log.i(TAG, "Could not get last known location. This is probably because the app does not have any location permissions. Falling back to hardcoded sunrise/sunset values.");
int i = Calendar.getInstance().get(11);
return i < 6 || i >= 22;
}

View File

@ -662,9 +662,9 @@ public class WindowDecorActionBar extends ActionBar implements ActionBarOverlayL
if (shouldAnimateContextView()) {
if (z2) {
viewPropertyAnimatorCompat = this.mDecorToolbar.setupAnimatorToVisibility(4, 100);
viewPropertyAnimatorCompat2 = this.mContextView.setupAnimatorToVisibility(0, 200);
viewPropertyAnimatorCompat2 = this.mContextView.setupAnimatorToVisibility(0, FADE_IN_DURATION_MS);
} else {
viewPropertyAnimatorCompat2 = this.mDecorToolbar.setupAnimatorToVisibility(0, 200);
viewPropertyAnimatorCompat2 = this.mDecorToolbar.setupAnimatorToVisibility(0, FADE_IN_DURATION_MS);
viewPropertyAnimatorCompat = this.mContextView.setupAnimatorToVisibility(8, 100);
}
ViewPropertyAnimatorCompatSet viewPropertyAnimatorCompatSet = new ViewPropertyAnimatorCompatSet();

View File

@ -107,7 +107,7 @@ public final class AppCompatResources {
try {
return ColorStateListInflaterCompat.createFromXml(resources, resources.getXml(i), context.getTheme());
} catch (Exception e) {
Log.e("AppCompatResources", "Failed to inflate ColorStateList, leaving it to the framework", e);
Log.e(LOG_TAG, "Failed to inflate ColorStateList, leaving it to the framework", e);
return null;
}
}

View File

@ -331,9 +331,9 @@ public class AnimatedStateListDrawableCompat extends StateListDrawable implement
return;
}
if (next == 2 && depth2 <= depth) {
if (xmlPullParser.getName().equals("item")) {
if (xmlPullParser.getName().equals(ELEMENT_ITEM)) {
parseItem(context, resources, xmlPullParser, attributeSet, theme);
} else if (xmlPullParser.getName().equals("transition")) {
} else if (xmlPullParser.getName().equals(ELEMENT_TRANSITION)) {
parseTransition(context, resources, xmlPullParser, attributeSet, theme);
}
}
@ -362,13 +362,13 @@ public class AnimatedStateListDrawableCompat extends StateListDrawable implement
if (next == 2) {
drawable = xmlPullParser.getName().equals("vector") ? VectorDrawableCompat.createFromXmlInner(resources, xmlPullParser, attributeSet, theme) : Drawable.createFromXmlInner(resources, xmlPullParser, attributeSet, theme);
} else {
throw new XmlPullParserException(xmlPullParser.getPositionDescription() + ": <item> tag requires a 'drawable' attribute or child tag defining a drawable");
throw new XmlPullParserException(xmlPullParser.getPositionDescription() + ITEM_MISSING_DRAWABLE_ERROR);
}
}
if (drawable != null) {
return this.mState.addStateSet(extractStateSet, drawable, resourceId);
}
throw new XmlPullParserException(xmlPullParser.getPositionDescription() + ": <item> tag requires a 'drawable' attribute or child tag defining a drawable");
throw new XmlPullParserException(xmlPullParser.getPositionDescription() + ITEM_MISSING_DRAWABLE_ERROR);
}
private int parseTransition(@NonNull Context context, @NonNull Resources resources, @NonNull XmlPullParser xmlPullParser, @NonNull AttributeSet attributeSet, @Nullable Resources.Theme theme) throws XmlPullParserException, IOException {
@ -387,15 +387,15 @@ public class AnimatedStateListDrawableCompat extends StateListDrawable implement
if (next == 2) {
drawable = xmlPullParser.getName().equals("animated-vector") ? AnimatedVectorDrawableCompat.createFromXmlInner(context, resources, xmlPullParser, attributeSet, theme) : Drawable.createFromXmlInner(resources, xmlPullParser, attributeSet, theme);
} else {
throw new XmlPullParserException(xmlPullParser.getPositionDescription() + ": <transition> tag requires a 'drawable' attribute or child tag defining a drawable");
throw new XmlPullParserException(xmlPullParser.getPositionDescription() + TRANSITION_MISSING_DRAWABLE_ERROR);
}
}
if (drawable == null) {
throw new XmlPullParserException(xmlPullParser.getPositionDescription() + ": <transition> tag requires a 'drawable' attribute or child tag defining a drawable");
throw new XmlPullParserException(xmlPullParser.getPositionDescription() + TRANSITION_MISSING_DRAWABLE_ERROR);
} else if (resourceId != -1 && resourceId2 != -1) {
return this.mState.addTransition(resourceId, resourceId2, drawable, z2);
} else {
throw new XmlPullParserException(xmlPullParser.getPositionDescription() + ": <transition> tag requires 'fromId' & 'toId' attributes");
throw new XmlPullParserException(xmlPullParser.getPositionDescription() + TRANSITION_MISSING_FROM_TO_ID);
}
}

View File

@ -14,6 +14,7 @@ import androidx.annotation.RestrictTo;
import androidx.appcompat.R;
import androidx.core.graphics.drawable.DrawableCompat;
import c.d.b.a.a;
import com.google.android.material.shadow.ShadowDrawableWrapper;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
public class DrawerArrowDrawable extends Drawable {
@ -153,7 +154,7 @@ public class DrawerArrowDrawable extends Drawable {
return this.mPaint;
}
@FloatRange(from = 0.0d, to = 1.0d)
@FloatRange(from = ShadowDrawableWrapper.COS_45, to = 1.0d)
public float getProgress() {
return this.mProgress;
}

View File

@ -138,7 +138,7 @@ public class SupportMenuInflater extends MenuInflater {
constructor.setAccessible(true);
return (T) constructor.newInstance(objArr);
} catch (Exception e) {
Log.w("SupportMenuInflater", "Cannot instantiate class: " + str, e);
Log.w(SupportMenuInflater.LOG_TAG, "Cannot instantiate class: " + str, e);
return null;
}
}
@ -174,7 +174,7 @@ public class SupportMenuInflater extends MenuInflater {
if (!z2) {
menuItem.setActionView(i2);
} else {
Log.w("SupportMenuInflater", "Ignoring attribute 'itemActionViewLayout'. Action view already specified.");
Log.w(SupportMenuInflater.LOG_TAG, "Ignoring attribute 'itemActionViewLayout'. Action view already specified.");
}
}
ActionProvider actionProvider = this.itemActionProvider;
@ -225,7 +225,7 @@ public class SupportMenuInflater extends MenuInflater {
public void readItem(AttributeSet attributeSet) {
TintTypedArray obtainStyledAttributes = TintTypedArray.obtainStyledAttributes(SupportMenuInflater.this.mContext, attributeSet, R.styleable.MenuItem);
this.itemId = obtainStyledAttributes.getResourceId(R.styleable.MenuItem_android_id, 0);
this.itemCategoryOrder = (obtainStyledAttributes.getInt(R.styleable.MenuItem_android_menuCategory, this.groupCategory) & -65536) | (obtainStyledAttributes.getInt(R.styleable.MenuItem_android_orderInCategory, this.groupOrder) & 65535);
this.itemCategoryOrder = (obtainStyledAttributes.getInt(R.styleable.MenuItem_android_menuCategory, this.groupCategory) & SupportMenu.CATEGORY_MASK) | (obtainStyledAttributes.getInt(R.styleable.MenuItem_android_orderInCategory, this.groupOrder) & 65535);
this.itemTitle = obtainStyledAttributes.getText(R.styleable.MenuItem_android_title);
this.itemTitleCondensed = obtainStyledAttributes.getText(R.styleable.MenuItem_android_titleCondensed);
this.itemIconResId = obtainStyledAttributes.getResourceId(R.styleable.MenuItem_android_icon, 0);
@ -253,7 +253,7 @@ public class SupportMenuInflater extends MenuInflater {
this.itemActionProvider = (ActionProvider) newInstance(string, SupportMenuInflater.ACTION_PROVIDER_CONSTRUCTOR_SIGNATURE, SupportMenuInflater.this.mActionProviderConstructorArguments);
} else {
if (z2) {
Log.w("SupportMenuInflater", "Ignoring attribute 'actionProviderClass'. Action view already specified.");
Log.w(SupportMenuInflater.LOG_TAG, "Ignoring attribute 'actionProviderClass'. Action view already specified.");
}
this.itemActionProvider = null;
}
@ -314,7 +314,7 @@ public class SupportMenuInflater extends MenuInflater {
}
} else {
String name = xmlPullParser.getName();
if (name.equals("menu")) {
if (name.equals(XML_MENU)) {
eventType = xmlPullParser.next();
} else {
throw new RuntimeException(a.s("Expecting menu, got ", name));
@ -332,9 +332,9 @@ public class SupportMenuInflater extends MenuInflater {
if (z3 && name2.equals(str)) {
str = null;
z3 = false;
} else if (name2.equals("group")) {
} else if (name2.equals(XML_GROUP)) {
menuState.resetGroup();
} else if (name2.equals("item")) {
} else if (name2.equals(XML_ITEM)) {
if (!menuState.hasAddedItem()) {
ActionProvider actionProvider = menuState.itemActionProvider;
if (actionProvider == null || !actionProvider.hasSubMenu()) {
@ -343,17 +343,17 @@ public class SupportMenuInflater extends MenuInflater {
menuState.addSubMenuItem();
}
}
} else if (name2.equals("menu")) {
} else if (name2.equals(XML_MENU)) {
z2 = true;
}
}
} else if (!z3) {
String name3 = xmlPullParser.getName();
if (name3.equals("group")) {
if (name3.equals(XML_GROUP)) {
menuState.readGroup(attributeSet);
} else if (name3.equals("item")) {
} else if (name3.equals(XML_ITEM)) {
menuState.readItem(attributeSet);
} else if (name3.equals("menu")) {
} else if (name3.equals(XML_MENU)) {
parseMenu(xmlPullParser, attributeSet, menuState.addSubMenuItem());
} else {
z3 = true;

View File

@ -18,6 +18,7 @@ import androidx.appcompat.widget.ActionMenuView;
import androidx.appcompat.widget.AppCompatTextView;
import androidx.appcompat.widget.ForwardingListener;
import androidx.appcompat.widget.TooltipCompat;
import androidx.constraintlayout.solver.widgets.analyzer.BasicMeasure;
@RestrictTo({RestrictTo.Scope.LIBRARY_GROUP_PREFIX})
public class ActionMenuItemView extends AppCompatTextView implements MenuView.ItemView, View.OnClickListener, ActionMenuView.ActionMenuChildView {
private static final int MAX_ICON_SIZE = 32;
@ -174,7 +175,7 @@ public class ActionMenuItemView extends AppCompatTextView implements MenuView.It
int measuredWidth = getMeasuredWidth();
int min = mode == Integer.MIN_VALUE ? Math.min(size, this.mMinWidth) : this.mMinWidth;
if (mode != 1073741824 && this.mMinWidth > 0 && measuredWidth < min) {
super.onMeasure(View.MeasureSpec.makeMeasureSpec(min, 1073741824), i2);
super.onMeasure(View.MeasureSpec.makeMeasureSpec(min, BasicMeasure.EXACTLY), i2);
}
if (!hasText && this.mIcon != null) {
super.setPadding((getMeasuredWidth() - this.mIcon.getBounds().width()) / 2, getPaddingTop(), getPaddingRight(), getPaddingBottom());

View File

@ -209,7 +209,7 @@ public class ListMenuPresenter implements MenuPresenter, AdapterView.OnItemClick
}
public void restoreHierarchyState(Bundle bundle) {
SparseArray<Parcelable> sparseParcelableArray = bundle.getSparseParcelableArray("android:menu:list");
SparseArray<Parcelable> sparseParcelableArray = bundle.getSparseParcelableArray(VIEWS_TAG);
if (sparseParcelableArray != null) {
this.mMenuView.restoreHierarchyState(sparseParcelableArray);
}
@ -221,7 +221,7 @@ public class ListMenuPresenter implements MenuPresenter, AdapterView.OnItemClick
if (expandedMenuView != null) {
expandedMenuView.saveHierarchyState(sparseArray);
}
bundle.putSparseParcelableArray("android:menu:list", sparseArray);
bundle.putSparseParcelableArray(VIEWS_TAG, sparseArray);
}
@Override // androidx.appcompat.view.menu.MenuPresenter

View File

@ -110,7 +110,7 @@ public class MenuBuilder implements SupportMenu {
private void dispatchRestoreInstanceState(Bundle bundle) {
Parcelable parcelable;
SparseArray sparseParcelableArray = bundle.getSparseParcelableArray("android:menu:presenters");
SparseArray sparseParcelableArray = bundle.getSparseParcelableArray(PRESENTER_KEY);
if (sparseParcelableArray != null && !this.mPresenters.isEmpty()) {
Iterator<WeakReference<MenuPresenter>> it = this.mPresenters.iterator();
while (it.hasNext()) {
@ -145,7 +145,7 @@ public class MenuBuilder implements SupportMenu {
}
}
}
bundle.putSparseParcelableArray("android:menu:presenters", sparseArray);
bundle.putSparseParcelableArray(PRESENTER_KEY, sparseArray);
}
}
@ -513,7 +513,7 @@ public class MenuBuilder implements SupportMenu {
((MenuBuilder) menuItemImpl.getSubMenu()).findItemsWithShortcutForKey(list, i, keyEvent);
}
char alphabeticShortcut = isQwertyMode ? menuItemImpl.getAlphabeticShortcut() : menuItemImpl.getNumericShortcut();
if (((modifiers & 69647) == ((isQwertyMode ? menuItemImpl.getAlphabeticModifiers() : menuItemImpl.getNumericModifiers()) & 69647)) && alphabeticShortcut != 0) {
if (((modifiers & SupportMenu.SUPPORTED_MODIFIERS_MASK) == ((isQwertyMode ? menuItemImpl.getAlphabeticModifiers() : menuItemImpl.getNumericModifiers()) & SupportMenu.SUPPORTED_MODIFIERS_MASK)) && alphabeticShortcut != 0) {
char[] cArr = keyData.meta;
if ((alphabeticShortcut == cArr[0] || alphabeticShortcut == cArr[2] || (isQwertyMode && alphabeticShortcut == '\b' && i == 67)) && menuItemImpl.isEnabled()) {
list.add(menuItemImpl);
@ -564,7 +564,7 @@ public class MenuBuilder implements SupportMenu {
}
public String getActionViewStatesKey() {
return "android:menu:actionviewstates";
return ACTION_VIEW_STATES_KEY;
}
public Context getContext() {
@ -789,7 +789,7 @@ public class MenuBuilder implements SupportMenu {
((SubMenuBuilder) item.getSubMenu()).restoreActionViewStates(bundle);
}
}
int i2 = bundle.getInt("android:menu:expandedactionview");
int i2 = bundle.getInt(EXPANDED_ACTION_VIEW_ID);
if (i2 > 0 && (findItem = findItem(i2)) != null) {
findItem.expandActionView();
}
@ -812,7 +812,7 @@ public class MenuBuilder implements SupportMenu {
}
actionView.saveHierarchyState(sparseArray);
if (item.isActionViewExpanded()) {
bundle.putInt("android:menu:expandedactionview", item.getItemId());
bundle.putInt(EXPANDED_ACTION_VIEW_ID, item.getItemId());
}
}
if (item.hasSubMenu()) {

View File

@ -10,6 +10,7 @@ import androidx.annotation.NonNull;
import androidx.appcompat.R;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.view.menu.MenuPresenter;
import androidx.core.view.PointerIconCompat;
public class MenuDialogHelper implements DialogInterface.OnKeyListener, DialogInterface.OnClickListener, DialogInterface.OnDismissListener, MenuPresenter.Callback {
private AlertDialog mDialog;
private MenuBuilder mMenu;
@ -103,7 +104,7 @@ public class MenuDialogHelper implements DialogInterface.OnKeyListener, DialogIn
this.mDialog = create;
create.setOnDismissListener(this);
WindowManager.LayoutParams attributes = this.mDialog.getWindow().getAttributes();
attributes.type = 1003;
attributes.type = PointerIconCompat.TYPE_HELP;
if (iBinder != null) {
attributes.token = iBinder;
}

View File

@ -345,7 +345,7 @@ public final class MenuItemImpl implements SupportMenuItem {
this.mMenu.getContext().startActivity(this.mIntent);
return true;
} catch (ActivityNotFoundException e) {
Log.e("MenuItemImpl", "Can't find activity to handle intent; ignoring", e);
Log.e(TAG, "Can't find activity to handle intent; ignoring", e);
}
}
ActionProvider actionProvider = this.mActionProvider;

View File

@ -373,7 +373,7 @@ public class MenuItemWrapperICS extends BaseMenuWrapper implements MenuItem {
}
this.mSetExclusiveCheckableMethod.invoke(this.mWrappedObject, Boolean.valueOf(z2));
} catch (Exception e) {
Log.w("MenuItemWrapper", "Error while calling setExclusiveCheckable", e);
Log.w(LOG_TAG, "Error while calling setExclusiveCheckable", e);
}
}

View File

@ -57,7 +57,7 @@ public class MenuPopupHelper implements MenuHelper {
}
public MenuPopupHelper(@NonNull Context context, @NonNull MenuBuilder menuBuilder, @NonNull View view, boolean z2, @AttrRes int i, @StyleRes int i2) {
this.mDropDownGravity = 8388611;
this.mDropDownGravity = GravityCompat.START;
this.mInternalOnDismissListener = new AnonymousClass1();
this.mContext = context;
this.mMenu = menuBuilder;

View File

@ -16,6 +16,7 @@ import androidx.annotation.RestrictTo;
import androidx.appcompat.R;
import androidx.appcompat.view.ActionMode;
import androidx.appcompat.view.menu.MenuBuilder;
import androidx.constraintlayout.solver.widgets.analyzer.BasicMeasure;
import androidx.core.view.ViewCompat;
import androidx.core.view.ViewPropertyAnimatorCompat;
@RestrictTo({RestrictTo.Scope.LIBRARY_GROUP_PREFIX})
@ -267,8 +268,9 @@ public class ActionBarContextView extends AbsActionBarView {
@Override // android.view.View
public void onMeasure(int i, int i2) {
int i3 = 1073741824;
if (View.MeasureSpec.getMode(i) != 1073741824) {
int mode = View.MeasureSpec.getMode(i);
int i3 = BasicMeasure.EXACTLY;
if (mode != 1073741824) {
throw new IllegalStateException(getClass().getSimpleName() + " can only be used with android:layout_width=\"match_parent\" (or fill_parent)");
} else if (View.MeasureSpec.getMode(i2) != 0) {
int size = View.MeasureSpec.getSize(i);
@ -308,7 +310,7 @@ public class ActionBarContextView extends AbsActionBarView {
if (view2 != null) {
ViewGroup.LayoutParams layoutParams = view2.getLayoutParams();
int i6 = layoutParams.width;
int i7 = i6 != -2 ? 1073741824 : Integer.MIN_VALUE;
int i7 = i6 != -2 ? BasicMeasure.EXACTLY : Integer.MIN_VALUE;
if (i6 >= 0) {
paddingLeft = Math.min(i6, paddingLeft);
}

View File

@ -27,6 +27,7 @@ import androidx.appcompat.view.menu.SubMenuBuilder;
import androidx.appcompat.widget.ActionMenuView;
import androidx.core.graphics.drawable.DrawableCompat;
import androidx.core.view.ActionProvider;
import androidx.core.view.GravityCompat;
import java.util.ArrayList;
public class ActionMenuPresenter extends BaseMenuPresenter implements ActionProvider.SubUiVisibilityListener {
private static final String TAG = "ActionMenuPresenter";
@ -192,7 +193,7 @@ public class ActionMenuPresenter extends BaseMenuPresenter implements ActionProv
public class OverflowPopup extends MenuPopupHelper {
public OverflowPopup(Context context, MenuBuilder menuBuilder, View view, boolean z2) {
super(context, menuBuilder, view, z2, R.attr.actionOverflowMenuStyle);
setGravity(8388613);
setGravity(GravityCompat.END);
setPresenterCallback(ActionMenuPresenter.this.mPopupPresenterCallback);
}

View File

@ -21,6 +21,7 @@ import androidx.appcompat.view.menu.MenuItemImpl;
import androidx.appcompat.view.menu.MenuPresenter;
import androidx.appcompat.view.menu.MenuView;
import androidx.appcompat.widget.LinearLayoutCompat;
import androidx.constraintlayout.solver.widgets.analyzer.BasicMeasure;
public class ActionMenuView extends LinearLayoutCompat implements MenuBuilder.ItemInvoker, MenuView {
public static final int GENERATED_ITEM_PADDING = 4;
public static final int MIN_CELL_SIZE = 56;
@ -155,7 +156,7 @@ public class ActionMenuView extends LinearLayoutCompat implements MenuBuilder.It
}
layoutParams.expandable = z2;
layoutParams.cellsUsed = i5;
view.measure(View.MeasureSpec.makeMeasureSpec(i * i5, 1073741824), makeMeasureSpec);
view.measure(View.MeasureSpec.makeMeasureSpec(i * i5, BasicMeasure.EXACTLY), makeMeasureSpec);
return i5;
}
@ -362,7 +363,7 @@ public class ActionMenuView extends LinearLayoutCompat implements MenuBuilder.It
View childAt4 = getChildAt(i33);
LayoutParams layoutParams5 = (LayoutParams) childAt4.getLayoutParams();
if (layoutParams5.expanded) {
childAt4.measure(View.MeasureSpec.makeMeasureSpec((layoutParams5.cellsUsed * i12) + layoutParams5.extraPixels, 1073741824), childMeasureSpec);
childAt4.measure(View.MeasureSpec.makeMeasureSpec((layoutParams5.cellsUsed * i12) + layoutParams5.extraPixels, BasicMeasure.EXACTLY), childMeasureSpec);
}
}
}

View File

@ -11,6 +11,7 @@ import android.text.TextUtils;
import android.util.Log;
import android.util.Xml;
import c.d.b.a.a;
import com.adjust.sdk.Constants;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
@ -119,7 +120,7 @@ public class ActivityChooserModel extends DataSetObservable {
ActivityResolveInfo activityResolveInfo2 = map.get(historicalRecord.activity);
if (activityResolveInfo2 != null) {
activityResolveInfo2.weight = (historicalRecord.weight * f) + activityResolveInfo2.weight;
f *= 0.95f;
f *= WEIGHT_DECAY_COEFFICIENT;
}
}
Collections.sort(list);
@ -211,18 +212,18 @@ public class ActivityChooserModel extends DataSetObservable {
XmlSerializer newSerializer = Xml.newSerializer();
try {
newSerializer.setOutput(openFileOutput, null);
newSerializer.startDocument("UTF-8", Boolean.TRUE);
newSerializer.startTag(null, "historical-records");
newSerializer.startDocument(Constants.ENCODING, Boolean.TRUE);
newSerializer.startTag(null, ActivityChooserModel.TAG_HISTORICAL_RECORDS);
int size = list.size();
for (int i = 0; i < size; i++) {
HistoricalRecord historicalRecord = (HistoricalRecord) list.remove(0);
newSerializer.startTag(null, "historical-record");
newSerializer.attribute(null, "activity", historicalRecord.activity.flattenToString());
newSerializer.startTag(null, ActivityChooserModel.TAG_HISTORICAL_RECORD);
newSerializer.attribute(null, ActivityChooserModel.ATTRIBUTE_ACTIVITY, historicalRecord.activity.flattenToString());
newSerializer.attribute(null, "time", String.valueOf(historicalRecord.time));
newSerializer.attribute(null, "weight", String.valueOf(historicalRecord.weight));
newSerializer.endTag(null, "historical-record");
newSerializer.attribute(null, ActivityChooserModel.ATTRIBUTE_WEIGHT, String.valueOf(historicalRecord.weight));
newSerializer.endTag(null, ActivityChooserModel.TAG_HISTORICAL_RECORD);
}
newSerializer.endTag(null, "historical-records");
newSerializer.endTag(null, ActivityChooserModel.TAG_HISTORICAL_RECORDS);
newSerializer.endDocument();
ActivityChooserModel.this.mCanReadHistoricalData = true;
} catch (IllegalArgumentException e) {
@ -258,10 +259,10 @@ public class ActivityChooserModel extends DataSetObservable {
private ActivityChooserModel(Context context, String str) {
this.mContext = context.getApplicationContext();
if (TextUtils.isEmpty(str) || str.endsWith(".xml")) {
if (TextUtils.isEmpty(str) || str.endsWith(HISTORY_FILE_EXTENSION)) {
this.mHistoryFileName = str;
} else {
this.mHistoryFileName = a.s(str, ".xml");
this.mHistoryFileName = a.s(str, HISTORY_FILE_EXTENSION);
}
}
@ -349,12 +350,12 @@ public class ActivityChooserModel extends DataSetObservable {
FileInputStream openFileInput = this.mContext.openFileInput(this.mHistoryFileName);
try {
XmlPullParser newPullParser = Xml.newPullParser();
newPullParser.setInput(openFileInput, "UTF-8");
newPullParser.setInput(openFileInput, Constants.ENCODING);
int i = 0;
while (i != 1 && i != 2) {
i = newPullParser.next();
}
if ("historical-records".equals(newPullParser.getName())) {
if (TAG_HISTORICAL_RECORDS.equals(newPullParser.getName())) {
List<HistoricalRecord> list = this.mHistoricalRecords;
list.clear();
while (true) {
@ -364,8 +365,8 @@ public class ActivityChooserModel extends DataSetObservable {
return;
}
} else if (!(next == 3 || next == 4)) {
if ("historical-record".equals(newPullParser.getName())) {
list.add(new HistoricalRecord(newPullParser.getAttributeValue(null, "activity"), Long.parseLong(newPullParser.getAttributeValue(null, "time")), Float.parseFloat(newPullParser.getAttributeValue(null, "weight"))));
if (TAG_HISTORICAL_RECORD.equals(newPullParser.getName())) {
list.add(new HistoricalRecord(newPullParser.getAttributeValue(null, ATTRIBUTE_ACTIVITY), Long.parseLong(newPullParser.getAttributeValue(null, "time")), Float.parseFloat(newPullParser.getAttributeValue(null, ATTRIBUTE_WEIGHT))));
} else {
throw new XmlPullParserException("Share records file not well-formed.");
}

View File

@ -28,6 +28,7 @@ import androidx.annotation.RestrictTo;
import androidx.appcompat.R;
import androidx.appcompat.view.menu.ShowableListMenu;
import androidx.appcompat.widget.ActivityChooserModel;
import androidx.constraintlayout.solver.widgets.analyzer.BasicMeasure;
import androidx.core.view.ActionProvider;
import androidx.core.view.ViewCompat;
import androidx.core.view.accessibility.AccessibilityNodeInfoCompat;
@ -505,7 +506,7 @@ public class ActivityChooserView extends ViewGroup implements ActivityChooserMod
public void onMeasure(int i, int i2) {
View view = this.mActivityChooserContent;
if (this.mDefaultActivityButton.getVisibility() != 0) {
i2 = View.MeasureSpec.makeMeasureSpec(View.MeasureSpec.getSize(i2), 1073741824);
i2 = View.MeasureSpec.makeMeasureSpec(View.MeasureSpec.getSize(i2), BasicMeasure.EXACTLY);
}
measureChild(view, i, i2);
setMeasuredDimension(view.getMeasuredWidth(), view.getMeasuredHeight());

View File

@ -9,6 +9,7 @@ import androidx.annotation.Nullable;
import androidx.annotation.RestrictTo;
import androidx.appcompat.R;
import androidx.appcompat.widget.LinearLayoutCompat;
import androidx.constraintlayout.solver.widgets.analyzer.BasicMeasure;
import androidx.core.view.GravityCompat;
import androidx.core.view.ViewCompat;
@RestrictTo({RestrictTo.Scope.LIBRARY_GROUP_PREFIX})
@ -22,7 +23,7 @@ public class AlertDialogLayout extends LinearLayoutCompat {
}
private void forceUniformWidth(int i, int i2) {
int makeMeasureSpec = View.MeasureSpec.makeMeasureSpec(getMeasuredWidth(), 1073741824);
int makeMeasureSpec = View.MeasureSpec.makeMeasureSpec(getMeasuredWidth(), BasicMeasure.EXACTLY);
for (int i3 = 0; i3 < i; i3++) {
View childAt = getChildAt(i3);
if (childAt.getVisibility() != 8) {
@ -116,7 +117,7 @@ public class AlertDialogLayout extends LinearLayoutCompat {
i8 -= min;
i5 += min;
}
view2.measure(i, View.MeasureSpec.makeMeasureSpec(i5, 1073741824));
view2.measure(i, View.MeasureSpec.makeMeasureSpec(i5, BasicMeasure.EXACTLY));
paddingBottom = i9 + view2.getMeasuredHeight();
i3 = View.combineMeasuredStates(i3, view2.getMeasuredState());
}
@ -154,7 +155,7 @@ public class AlertDialogLayout extends LinearLayoutCompat {
int childCount = getChildCount();
int gravity = getGravity();
int i9 = gravity & 112;
int i10 = gravity & 8388615;
int i10 = gravity & GravityCompat.RELATIVE_HORIZONTAL_GRAVITY_MASK;
int paddingTop = i9 != 16 ? i9 != 80 ? getPaddingTop() : ((getPaddingTop() + i4) - i2) - measuredHeight : (((i4 - i2) - measuredHeight) / 2) + getPaddingTop();
Drawable dividerDrawable = getDividerDrawable();
int intrinsicHeight = dividerDrawable == null ? 0 : dividerDrawable.getIntrinsicHeight();

View File

@ -167,17 +167,17 @@ public class AppCompatSpinner extends Spinner implements TintableBackgroundView
@Override // androidx.appcompat.widget.AppCompatSpinner.SpinnerPopup
public void setBackgroundDrawable(Drawable drawable) {
Log.e("AppCompatSpinner", "Cannot set popup background for MODE_DIALOG, ignoring");
Log.e(AppCompatSpinner.TAG, "Cannot set popup background for MODE_DIALOG, ignoring");
}
@Override // androidx.appcompat.widget.AppCompatSpinner.SpinnerPopup
public void setHorizontalOffset(int i) {
Log.e("AppCompatSpinner", "Cannot set horizontal offset for MODE_DIALOG, ignoring");
Log.e(AppCompatSpinner.TAG, "Cannot set horizontal offset for MODE_DIALOG, ignoring");
}
@Override // androidx.appcompat.widget.AppCompatSpinner.SpinnerPopup
public void setHorizontalOriginalOffset(int i) {
Log.e("AppCompatSpinner", "Cannot set horizontal (original) offset for MODE_DIALOG, ignoring");
Log.e(AppCompatSpinner.TAG, "Cannot set horizontal (original) offset for MODE_DIALOG, ignoring");
}
@Override // androidx.appcompat.widget.AppCompatSpinner.SpinnerPopup
@ -187,7 +187,7 @@ public class AppCompatSpinner extends Spinner implements TintableBackgroundView
@Override // androidx.appcompat.widget.AppCompatSpinner.SpinnerPopup
public void setVerticalOffset(int i) {
Log.e("AppCompatSpinner", "Cannot set vertical offset for MODE_DIALOG, ignoring");
Log.e(AppCompatSpinner.TAG, "Cannot set vertical offset for MODE_DIALOG, ignoring");
}
@Override // androidx.appcompat.widget.AppCompatSpinner.SpinnerPopup
@ -603,7 +603,7 @@ public class AppCompatSpinner extends Spinner implements TintableBackgroundView
} catch (Exception e2) {
e = e2;
try {
Log.i("AppCompatSpinner", "Could not read android:spinnerMode", e);
Log.i(TAG, "Could not read android:spinnerMode", e);
} catch (Throwable th2) {
th = th2;
typedArray2 = typedArray;
@ -616,7 +616,7 @@ public class AppCompatSpinner extends Spinner implements TintableBackgroundView
} catch (Exception e3) {
e = e3;
typedArray = null;
Log.i("AppCompatSpinner", "Could not read android:spinnerMode", e);
Log.i(TAG, "Could not read android:spinnerMode", e);
} catch (Throwable th3) {
th = th3;
if (typedArray2 != null) {

View File

@ -101,7 +101,7 @@ public class AppCompatTextViewAutoSizeHelper {
Field textViewField = getTextViewField(str);
return textViewField == null ? t : (T) textViewField.get(obj);
} catch (IllegalAccessException e) {
Log.w("ACTVAutoSizeHelper", "Failed to access TextView#" + str + " member", e);
Log.w(TAG, "Failed to access TextView#" + str + " member", e);
return t;
}
}
@ -149,7 +149,7 @@ public class AppCompatTextViewAutoSizeHelper {
try {
this.mImpl.computeAndSetTextDirection(obtain, this.mTextView);
} catch (ClassCastException unused) {
Log.w("ACTVAutoSizeHelper", "Failed to obtain TextDirectionHeuristic, auto size may be incorrect");
Log.w(TAG, "Failed to obtain TextDirectionHeuristic, auto size may be incorrect");
}
return obtain.build();
}
@ -195,7 +195,7 @@ public class AppCompatTextViewAutoSizeHelper {
}
return field;
} catch (NoSuchFieldException e) {
Log.w("ACTVAutoSizeHelper", "Failed to access TextView#" + str + " member", e);
Log.w(TAG, "Failed to access TextView#" + str + " member", e);
return null;
}
}
@ -210,7 +210,7 @@ public class AppCompatTextViewAutoSizeHelper {
}
return method;
} catch (Exception e) {
Log.w("ACTVAutoSizeHelper", "Failed to retrieve TextView#" + str + "() method", e);
Log.w(TAG, "Failed to retrieve TextView#" + str + "() method", e);
return null;
}
}
@ -219,7 +219,7 @@ public class AppCompatTextViewAutoSizeHelper {
try {
return (T) getTextViewMethod(str).invoke(obj, new Object[0]);
} catch (Exception e) {
Log.w("ACTVAutoSizeHelper", "Failed to invoke TextView#" + str + "() method", e);
Log.w(TAG, "Failed to invoke TextView#" + str + "() method", e);
return t;
}
}
@ -236,7 +236,7 @@ public class AppCompatTextViewAutoSizeHelper {
textViewMethod.invoke(this.mTextView, new Object[0]);
}
} catch (Exception e) {
Log.w("ACTVAutoSizeHelper", "Failed to invoke TextView#nullLayouts() method", e);
Log.w(TAG, "Failed to invoke TextView#nullLayouts() method", e);
}
if (!isInLayout) {
this.mTextView.requestLayout();

View File

@ -79,7 +79,7 @@ public class ButtonBarLayout extends LinearLayout {
}
super.onMeasure(i3, i2);
if (this.mAllowStacking && !isStacked()) {
if ((getMeasuredWidthAndState() & -16777216) == 16777216) {
if ((getMeasuredWidthAndState() & ViewCompat.MEASURED_STATE_MASK) == 16777216) {
setStacked(true);
z2 = true;
}

View File

@ -10,6 +10,7 @@ import android.widget.FrameLayout;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.RestrictTo;
import androidx.constraintlayout.solver.widgets.analyzer.BasicMeasure;
import androidx.core.view.ViewCompat;
@RestrictTo({RestrictTo.Scope.LIBRARY})
public class ContentFrameLayout extends FrameLayout {
@ -147,7 +148,7 @@ public class ContentFrameLayout extends FrameLayout {
i8 = 0;
if (i8 > 0) {
Rect rect = this.mDecorPadding;
i = View.MeasureSpec.makeMeasureSpec(Math.min(i8 - (rect.left + rect.right), View.MeasureSpec.getSize(i)), 1073741824);
i = View.MeasureSpec.makeMeasureSpec(Math.min(i8 - (rect.left + rect.right), View.MeasureSpec.getSize(i)), BasicMeasure.EXACTLY);
z2 = true;
if (mode2 == Integer.MIN_VALUE) {
TypedValue typedValue2 = z4 ? this.mFixedHeightMajor : this.mFixedHeightMinor;
@ -161,7 +162,7 @@ public class ContentFrameLayout extends FrameLayout {
i6 = 0;
if (i6 > 0) {
Rect rect2 = this.mDecorPadding;
i2 = View.MeasureSpec.makeMeasureSpec(Math.min(i6 - (rect2.top + rect2.bottom), View.MeasureSpec.getSize(i2)), 1073741824);
i2 = View.MeasureSpec.makeMeasureSpec(Math.min(i6 - (rect2.top + rect2.bottom), View.MeasureSpec.getSize(i2)), BasicMeasure.EXACTLY);
}
}
i6 = (int) fraction2;
@ -171,7 +172,7 @@ public class ContentFrameLayout extends FrameLayout {
}
super.onMeasure(i, i2);
measuredWidth = getMeasuredWidth();
int makeMeasureSpec = View.MeasureSpec.makeMeasureSpec(measuredWidth, 1073741824);
int makeMeasureSpec = View.MeasureSpec.makeMeasureSpec(measuredWidth, BasicMeasure.EXACTLY);
if (!z2 && mode == Integer.MIN_VALUE) {
TypedValue typedValue3 = !z4 ? this.mMinWidthMinor : this.mMinWidthMajor;
if (!(typedValue3 == null || (i3 = typedValue3.type) == 0)) {
@ -187,7 +188,7 @@ public class ContentFrameLayout extends FrameLayout {
i4 -= rect3.left + rect3.right;
}
if (measuredWidth < i4) {
makeMeasureSpec = View.MeasureSpec.makeMeasureSpec(i4, 1073741824);
makeMeasureSpec = View.MeasureSpec.makeMeasureSpec(i4, BasicMeasure.EXACTLY);
if (z3) {
super.onMeasure(makeMeasureSpec, i2);
return;
@ -217,7 +218,7 @@ public class ContentFrameLayout extends FrameLayout {
}
super.onMeasure(i, i2);
measuredWidth = getMeasuredWidth();
int makeMeasureSpec = View.MeasureSpec.makeMeasureSpec(measuredWidth, 1073741824);
int makeMeasureSpec = View.MeasureSpec.makeMeasureSpec(measuredWidth, BasicMeasure.EXACTLY);
if (!z4) {
}
if (i3 != 5) {

View File

@ -61,7 +61,7 @@ public class DrawableUtils {
}
public static void fixDrawable(@NonNull Drawable drawable) {
if (Build.VERSION.SDK_INT == 21 && "android.graphics.drawable.VectorDrawable".equals(drawable.getClass().getName())) {
if (Build.VERSION.SDK_INT == 21 && VECTOR_DRAWABLE_CLAZZ_NAME.equals(drawable.getClass().getName())) {
fixVectorDrawableTinting(drawable);
}
}
@ -135,7 +135,7 @@ public class DrawableUtils {
return rect2;
}
} catch (Exception unused) {
Log.e("DrawableUtils", "Couldn't obtain the optical insets. Ignoring.");
Log.e(TAG, "Couldn't obtain the optical insets. Ignoring.");
}
}
return INSETS_NONE;

View File

@ -14,6 +14,7 @@ import android.widget.ListView;
import androidx.annotation.NonNull;
import androidx.appcompat.R;
import androidx.appcompat.graphics.drawable.DrawableWrapper;
import androidx.constraintlayout.solver.widgets.analyzer.BasicMeasure;
import androidx.core.graphics.drawable.DrawableCompat;
import androidx.core.view.ViewPropertyAnimatorCompat;
import androidx.core.widget.ListViewAutoScrollHelper;
@ -329,7 +330,7 @@ public class DropDownListView extends ListView {
view.setLayoutParams(layoutParams);
}
int i10 = layoutParams.height;
view.measure(i, i10 > 0 ? View.MeasureSpec.makeMeasureSpec(i10, 1073741824) : View.MeasureSpec.makeMeasureSpec(0, 0));
view.measure(i, i10 > 0 ? View.MeasureSpec.makeMeasureSpec(i10, BasicMeasure.EXACTLY) : View.MeasureSpec.makeMeasureSpec(0, 0));
view.forceLayout();
if (i7 > 0) {
i6 += dividerHeight;

View File

@ -13,9 +13,12 @@ import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.RestrictTo;
import androidx.appcompat.R;
import androidx.constraintlayout.solver.widgets.analyzer.BasicMeasure;
import androidx.core.view.GravityCompat;
import androidx.core.view.InputDeviceCompat;
import androidx.core.view.ViewCompat;
import c.d.b.a.a;
import com.google.android.material.badge.BadgeDrawable;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
public class LinearLayoutCompat extends ViewGroup {
@ -113,7 +116,7 @@ public class LinearLayoutCompat extends ViewGroup {
this.mBaselineAligned = true;
this.mBaselineAlignedChildIndex = -1;
this.mBaselineChildTop = 0;
this.mGravity = 8388659;
this.mGravity = BadgeDrawable.TOP_START;
int[] iArr = R.styleable.LinearLayoutCompat;
TintTypedArray obtainStyledAttributes = TintTypedArray.obtainStyledAttributes(context, attributeSet, iArr, i, 0);
ViewCompat.saveAttributeDataForStyleable(this, context, iArr, attributeSet, obtainStyledAttributes.getWrappedTypeArray(), i, 0);
@ -139,7 +142,7 @@ public class LinearLayoutCompat extends ViewGroup {
}
private void forceUniformHeight(int i, int i2) {
int makeMeasureSpec = View.MeasureSpec.makeMeasureSpec(getMeasuredHeight(), 1073741824);
int makeMeasureSpec = View.MeasureSpec.makeMeasureSpec(getMeasuredHeight(), BasicMeasure.EXACTLY);
for (int i3 = 0; i3 < i; i3++) {
View virtualChildAt = getVirtualChildAt(i3);
if (virtualChildAt.getVisibility() != 8) {
@ -155,7 +158,7 @@ public class LinearLayoutCompat extends ViewGroup {
}
private void forceUniformWidth(int i, int i2) {
int makeMeasureSpec = View.MeasureSpec.makeMeasureSpec(getMeasuredWidth(), 1073741824);
int makeMeasureSpec = View.MeasureSpec.makeMeasureSpec(getMeasuredWidth(), BasicMeasure.EXACTLY);
for (int i3 = 0; i3 < i; i3++) {
View virtualChildAt = getVirtualChildAt(i3);
if (virtualChildAt.getVisibility() != 8) {
@ -499,7 +502,7 @@ public class LinearLayoutCompat extends ViewGroup {
int virtualChildCount = getVirtualChildCount();
int i9 = this.mGravity;
int i10 = i9 & 112;
int i11 = i9 & 8388615;
int i11 = i9 & GravityCompat.RELATIVE_HORIZONTAL_GRAVITY_MASK;
int paddingTop = i10 != 16 ? i10 != 80 ? getPaddingTop() : ((getPaddingTop() + i4) - i2) - this.mTotalLength : getPaddingTop() + (((i4 - i2) - this.mTotalLength) / 2);
int i12 = 0;
while (i12 < virtualChildCount) {
@ -598,7 +601,7 @@ public class LinearLayoutCompat extends ViewGroup {
iArr2[0] = -1;
boolean z6 = this.mBaselineAligned;
boolean z7 = this.mUseLargestChild;
int i20 = 1073741824;
int i20 = BasicMeasure.EXACTLY;
boolean z8 = mode == 1073741824;
float f2 = 0.0f;
int i21 = 0;
@ -642,7 +645,7 @@ public class LinearLayoutCompat extends ViewGroup {
z4 = z7;
z3 = z6;
view = virtualChildAt;
i17 = 1073741824;
i17 = BasicMeasure.EXACTLY;
z9 = true;
if (mode2 == i17 && ((ViewGroup.MarginLayoutParams) layoutParams).height == -1) {
z5 = true;
@ -682,7 +685,7 @@ public class LinearLayoutCompat extends ViewGroup {
iArr2 = iArr2;
z7 = z4;
z6 = z3;
i20 = 1073741824;
i20 = BasicMeasure.EXACTLY;
}
} else {
if (((ViewGroup.MarginLayoutParams) layoutParams).width != 0 || f3 <= 0.0f) {
@ -711,7 +714,7 @@ public class LinearLayoutCompat extends ViewGroup {
i22 = Math.max(measuredWidth, i22);
}
}
i17 = 1073741824;
i17 = BasicMeasure.EXACTLY;
if (mode2 == i17) {
}
z5 = false;
@ -735,7 +738,7 @@ public class LinearLayoutCompat extends ViewGroup {
iArr2 = iArr2;
z7 = z4;
z6 = z3;
i20 = 1073741824;
i20 = BasicMeasure.EXACTLY;
}
i15 = i21;
z4 = z7;
@ -744,7 +747,7 @@ public class LinearLayoutCompat extends ViewGroup {
iArr2 = iArr2;
z7 = z4;
z6 = z3;
i20 = 1073741824;
i20 = BasicMeasure.EXACTLY;
}
if (this.mTotalLength > 0 && hasDividerBeforeChildAt(virtualChildCount)) {
this.mTotalLength += this.mDividerWidth;
@ -819,25 +822,25 @@ public class LinearLayoutCompat extends ViewGroup {
i9 = virtualChildCount;
int childMeasureSpec = ViewGroup.getChildMeasureSpec(i2, getPaddingBottom() + getPaddingTop() + ((ViewGroup.MarginLayoutParams) layoutParams3).topMargin + ((ViewGroup.MarginLayoutParams) layoutParams3).bottomMargin, ((ViewGroup.MarginLayoutParams) layoutParams3).height);
if (((ViewGroup.MarginLayoutParams) layoutParams3).width == 0) {
i13 = 1073741824;
i13 = BasicMeasure.EXACTLY;
if (mode == 1073741824) {
if (i38 <= 0) {
i38 = 0;
}
virtualChildAt3.measure(View.MeasureSpec.makeMeasureSpec(i38, 1073741824), childMeasureSpec);
i35 = View.combineMeasuredStates(i35, virtualChildAt3.getMeasuredState() & -16777216);
virtualChildAt3.measure(View.MeasureSpec.makeMeasureSpec(i38, BasicMeasure.EXACTLY), childMeasureSpec);
i35 = View.combineMeasuredStates(i35, virtualChildAt3.getMeasuredState() & ViewCompat.MEASURED_STATE_MASK);
f2 = f7;
i10 = i39;
}
} else {
i13 = 1073741824;
i13 = BasicMeasure.EXACTLY;
}
int measuredWidth2 = virtualChildAt3.getMeasuredWidth() + i38;
if (measuredWidth2 < 0) {
measuredWidth2 = 0;
}
virtualChildAt3.measure(View.MeasureSpec.makeMeasureSpec(measuredWidth2, i13), childMeasureSpec);
i35 = View.combineMeasuredStates(i35, virtualChildAt3.getMeasuredState() & -16777216);
i35 = View.combineMeasuredStates(i35, virtualChildAt3.getMeasuredState() & ViewCompat.MEASURED_STATE_MASK);
f2 = f7;
i10 = i39;
} else {
@ -907,7 +910,7 @@ public class LinearLayoutCompat extends ViewGroup {
for (int i43 = 0; i43 < virtualChildCount; i43++) {
View virtualChildAt4 = getVirtualChildAt(i43);
if (!(virtualChildAt4 == null || virtualChildAt4.getVisibility() == 8 || ((LayoutParams) virtualChildAt4.getLayoutParams()).weight <= 0.0f)) {
virtualChildAt4.measure(View.MeasureSpec.makeMeasureSpec(i22, 1073741824), View.MeasureSpec.makeMeasureSpec(virtualChildAt4.getMeasuredHeight(), 1073741824));
virtualChildAt4.measure(View.MeasureSpec.makeMeasureSpec(i22, BasicMeasure.EXACTLY), View.MeasureSpec.makeMeasureSpec(virtualChildAt4.getMeasuredHeight(), BasicMeasure.EXACTLY));
}
}
}
@ -918,7 +921,7 @@ public class LinearLayoutCompat extends ViewGroup {
if (z10 || mode2 == 1073741824) {
i8 = i6;
}
setMeasuredDimension(resolveSizeAndState | (i3 & -16777216), View.resolveSizeAndState(Math.max(getPaddingBottom() + getPaddingTop() + i8, getSuggestedMinimumHeight()), i7, i3 << 16));
setMeasuredDimension(resolveSizeAndState | (i3 & ViewCompat.MEASURED_STATE_MASK), View.resolveSizeAndState(Math.max(getPaddingBottom() + getPaddingTop() + i8, getSuggestedMinimumHeight()), i7, i3 << 16));
if (z11) {
forceUniformHeight(i5, i);
}
@ -1122,24 +1125,24 @@ public class LinearLayoutCompat extends ViewGroup {
i7 = i36 - i39;
int childMeasureSpec = ViewGroup.getChildMeasureSpec(i, getPaddingRight() + getPaddingLeft() + ((ViewGroup.MarginLayoutParams) layoutParams3).leftMargin + ((ViewGroup.MarginLayoutParams) layoutParams3).rightMargin, ((ViewGroup.MarginLayoutParams) layoutParams3).width);
if (((ViewGroup.MarginLayoutParams) layoutParams3).height == 0) {
i10 = 1073741824;
i10 = BasicMeasure.EXACTLY;
if (mode2 == 1073741824) {
if (i39 <= 0) {
i39 = 0;
}
virtualChildAt3.measure(childMeasureSpec, View.MeasureSpec.makeMeasureSpec(i39, 1073741824));
i5 = View.combineMeasuredStates(i5, virtualChildAt3.getMeasuredState() & -256);
virtualChildAt3.measure(childMeasureSpec, View.MeasureSpec.makeMeasureSpec(i39, BasicMeasure.EXACTLY));
i5 = View.combineMeasuredStates(i5, virtualChildAt3.getMeasuredState() & InputDeviceCompat.SOURCE_ANY);
f = f6;
}
} else {
i10 = 1073741824;
i10 = BasicMeasure.EXACTLY;
}
int measuredHeight2 = virtualChildAt3.getMeasuredHeight() + i39;
if (measuredHeight2 < 0) {
measuredHeight2 = 0;
}
virtualChildAt3.measure(childMeasureSpec, View.MeasureSpec.makeMeasureSpec(measuredHeight2, i10));
i5 = View.combineMeasuredStates(i5, virtualChildAt3.getMeasuredState() & -256);
i5 = View.combineMeasuredStates(i5, virtualChildAt3.getMeasuredState() & InputDeviceCompat.SOURCE_ANY);
f = f6;
} else {
i7 = i36;
@ -1193,7 +1196,7 @@ public class LinearLayoutCompat extends ViewGroup {
for (int i42 = 0; i42 < i3; i42++) {
View virtualChildAt4 = getVirtualChildAt(i42);
if (!(virtualChildAt4 == null || virtualChildAt4.getVisibility() == 8 || ((LayoutParams) virtualChildAt4.getLayoutParams()).weight <= 0.0f)) {
virtualChildAt4.measure(View.MeasureSpec.makeMeasureSpec(virtualChildAt4.getMeasuredWidth(), 1073741824), View.MeasureSpec.makeMeasureSpec(i24, 1073741824));
virtualChildAt4.measure(View.MeasureSpec.makeMeasureSpec(virtualChildAt4.getMeasuredWidth(), BasicMeasure.EXACTLY), View.MeasureSpec.makeMeasureSpec(i24, BasicMeasure.EXACTLY));
}
}
}
@ -1227,13 +1230,13 @@ public class LinearLayoutCompat extends ViewGroup {
@Override // android.view.View
public void onInitializeAccessibilityEvent(AccessibilityEvent accessibilityEvent) {
super.onInitializeAccessibilityEvent(accessibilityEvent);
accessibilityEvent.setClassName("androidx.appcompat.widget.LinearLayoutCompat");
accessibilityEvent.setClassName(ACCESSIBILITY_CLASS_NAME);
}
@Override // android.view.View
public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo accessibilityNodeInfo) {
super.onInitializeAccessibilityNodeInfo(accessibilityNodeInfo);
accessibilityNodeInfo.setClassName("androidx.appcompat.widget.LinearLayoutCompat");
accessibilityNodeInfo.setClassName(ACCESSIBILITY_CLASS_NAME);
}
@Override // android.view.ViewGroup, android.view.View
@ -1294,7 +1297,7 @@ public class LinearLayoutCompat extends ViewGroup {
public void setGravity(int i) {
if (this.mGravity != i) {
if ((8388615 & i) == 0) {
i |= 8388611;
i |= GravityCompat.START;
}
if ((i & 112) == 0) {
i |= 48;
@ -1305,7 +1308,7 @@ public class LinearLayoutCompat extends ViewGroup {
}
public void setHorizontalGravity(int i) {
int i2 = i & 8388615;
int i2 = i & GravityCompat.RELATIVE_HORIZONTAL_GRAVITY_MASK;
int i3 = this.mGravity;
if ((8388615 & i3) != i2) {
this.mGravity = i2 | (-8388616 & i3);

View File

@ -27,6 +27,8 @@ import androidx.annotation.RestrictTo;
import androidx.annotation.StyleRes;
import androidx.appcompat.R;
import androidx.appcompat.view.menu.ShowableListMenu;
import androidx.constraintlayout.solver.widgets.analyzer.BasicMeasure;
import androidx.core.view.PointerIconCompat;
import androidx.core.view.ViewCompat;
import androidx.core.widget.PopupWindowCompat;
import c.d.b.a.a;
@ -214,19 +216,19 @@ public class ListPopupWindow implements ShowableListMenu {
try {
sSetClipToWindowEnabledMethod = PopupWindow.class.getDeclaredMethod("setClipToScreenEnabled", Boolean.TYPE);
} catch (NoSuchMethodException unused) {
Log.i("ListPopupWindow", "Could not find method setClipToScreenEnabled() on PopupWindow. Oh well.");
Log.i(TAG, "Could not find method setClipToScreenEnabled() on PopupWindow. Oh well.");
}
try {
sSetEpicenterBoundsMethod = PopupWindow.class.getDeclaredMethod("setEpicenterBounds", Rect.class);
} catch (NoSuchMethodException unused2) {
Log.i("ListPopupWindow", "Could not find method setEpicenterBounds(Rect) on PopupWindow. Oh well.");
Log.i(TAG, "Could not find method setEpicenterBounds(Rect) on PopupWindow. Oh well.");
}
}
if (Build.VERSION.SDK_INT <= 23) {
try {
sGetMaxAvailableHeightMethod = PopupWindow.class.getDeclaredMethod("getMaxAvailableHeight", View.class, Integer.TYPE, Boolean.TYPE);
} catch (NoSuchMethodException unused3) {
Log.i("ListPopupWindow", "Could not find method getMaxAvailableHeight(View, int, boolean) on PopupWindow. Oh well.");
Log.i(TAG, "Could not find method getMaxAvailableHeight(View, int, boolean) on PopupWindow. Oh well.");
}
}
}
@ -246,7 +248,7 @@ public class ListPopupWindow implements ShowableListMenu {
public ListPopupWindow(@NonNull Context context, @Nullable AttributeSet attributeSet, @AttrRes int i, @StyleRes int i2) {
this.mDropDownHeight = -2;
this.mDropDownWidth = -2;
this.mDropDownWindowLayoutType = 1002;
this.mDropDownWindowLayoutType = PointerIconCompat.TYPE_HAND;
this.mDropDownGravity = 0;
this.mDropDownAlwaysVisible = false;
this.mForceIgnoreOutsideTouch = false;
@ -312,7 +314,7 @@ public class ListPopupWindow implements ShowableListMenu {
} else if (i5 != 1) {
StringBuilder K = a.K("Invalid hint position ");
K.append(this.mPromptPosition);
Log.e("ListPopupWindow", K.toString());
Log.e(TAG, K.toString());
} else {
linearLayout.addView(dropDownListView, layoutParams);
linearLayout.addView(view);
@ -368,11 +370,11 @@ public class ListPopupWindow implements ShowableListMenu {
Rect rect2 = this.mTempRect;
i3 = View.MeasureSpec.makeMeasureSpec(i9 - (rect2.left + rect2.right), Integer.MIN_VALUE);
} else if (i8 != -1) {
i3 = View.MeasureSpec.makeMeasureSpec(i8, 1073741824);
i3 = View.MeasureSpec.makeMeasureSpec(i8, BasicMeasure.EXACTLY);
} else {
int i10 = this.mContext.getResources().getDisplayMetrics().widthPixels;
Rect rect3 = this.mTempRect;
i3 = View.MeasureSpec.makeMeasureSpec(i10 - (rect3.left + rect3.right), 1073741824);
i3 = View.MeasureSpec.makeMeasureSpec(i10 - (rect3.left + rect3.right), BasicMeasure.EXACTLY);
}
int measureHeightOfChildrenCompat = this.mDropDownList.measureHeightOfChildrenCompat(i3, 0, -1, maxAvailableHeight - i, -1);
if (measureHeightOfChildrenCompat > 0) {
@ -390,7 +392,7 @@ public class ListPopupWindow implements ShowableListMenu {
try {
return ((Integer) method.invoke(this.mPopup, view, Integer.valueOf(i), Boolean.valueOf(z2))).intValue();
} catch (Exception unused) {
Log.i("ListPopupWindow", "Could not call getMaxAvailableHeightMethod(View, int, boolean) on PopupWindow. Using the public version.");
Log.i(TAG, "Could not call getMaxAvailableHeightMethod(View, int, boolean) on PopupWindow. Using the public version.");
}
}
return this.mPopup.getMaxAvailableHeight(view, i);
@ -417,7 +419,7 @@ public class ListPopupWindow implements ShowableListMenu {
try {
method.invoke(this.mPopup, Boolean.valueOf(z2));
} catch (Exception unused) {
Log.i("ListPopupWindow", "Could not call setClipToScreenEnabled() on PopupWindow. Oh well.");
Log.i(TAG, "Could not call setClipToScreenEnabled() on PopupWindow. Oh well.");
}
}
} else {
@ -837,7 +839,7 @@ public class ListPopupWindow implements ShowableListMenu {
try {
method.invoke(this.mPopup, this.mEpicenterBounds);
} catch (Exception e) {
Log.e("ListPopupWindow", "Could not invoke setEpicenterBounds on PopupWindow", e);
Log.e(TAG, "Could not invoke setEpicenterBounds on PopupWindow", e);
}
}
} else {

View File

@ -156,7 +156,7 @@ public class MenuPopupWindow extends ListPopupWindow implements MenuItemHoverLis
sSetTouchModalMethod = PopupWindow.class.getDeclaredMethod("setTouchModal", Boolean.TYPE);
}
} catch (NoSuchMethodException unused) {
Log.i("MenuPopupWindow", "Could not find method setTouchModal() on PopupWindow. Oh well.");
Log.i(TAG, "Could not find method setTouchModal() on PopupWindow. Oh well.");
}
}
@ -211,7 +211,7 @@ public class MenuPopupWindow extends ListPopupWindow implements MenuItemHoverLis
try {
method.invoke(this.mPopup, Boolean.valueOf(z2));
} catch (Exception unused) {
Log.i("MenuPopupWindow", "Could not invoke setTouchModal() on PopupWindow. Oh well.");
Log.i(TAG, "Could not invoke setTouchModal() on PopupWindow. Oh well.");
}
}
} else {

View File

@ -255,7 +255,7 @@ public final class ResourceManagerInternal {
}
private static boolean isVectorDrawable(@NonNull Drawable drawable) {
return (drawable instanceof VectorDrawableCompat) || "android.graphics.drawable.VectorDrawable".equals(drawable.getClass().getName());
return (drawable instanceof VectorDrawableCompat) || PLATFORM_VD_CLAZZ.equals(drawable.getClass().getName());
}
private Drawable loadDrawableFromDelegates(@NonNull Context context, @DrawableRes int i) {
@ -268,7 +268,7 @@ public final class ResourceManagerInternal {
SparseArrayCompat<String> sparseArrayCompat = this.mKnownDrawableIdTags;
if (sparseArrayCompat != null) {
String str = sparseArrayCompat.get(i);
if ("appcompat_skip_skip".equals(str) || (str != null && this.mDelegates.get(str) == null)) {
if (SKIP_DRAWABLE_TAG.equals(str) || (str != null && this.mDelegates.get(str) == null)) {
return null;
}
} else {
@ -305,7 +305,7 @@ public final class ResourceManagerInternal {
throw new XmlPullParserException("No start tag found");
}
} catch (Exception e) {
Log.e("ResourceManagerInternal", "Exception while inflating drawable", e);
Log.e(TAG, "Exception while inflating drawable", e);
}
while (true) {
next = xml.next();
@ -315,7 +315,7 @@ public final class ResourceManagerInternal {
}
}
if (cachedDrawable == null) {
this.mKnownDrawableIdTags.append(i, "appcompat_skip_skip");
this.mKnownDrawableIdTags.append(i, SKIP_DRAWABLE_TAG);
}
return cachedDrawable;
}
@ -356,7 +356,7 @@ public final class ResourceManagerInternal {
}
return;
}
Log.d("ResourceManagerInternal", "Mutated drawable is not the same instance as the input.");
Log.d(TAG, "Mutated drawable is not the same instance as the input.");
}
public synchronized Drawable getDrawable(@NonNull Context context, @DrawableRes int i) {

View File

@ -29,6 +29,7 @@ import androidx.appcompat.R;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.view.ActionBarPolicy;
import androidx.appcompat.widget.LinearLayoutCompat;
import androidx.constraintlayout.solver.widgets.analyzer.BasicMeasure;
@RestrictTo({RestrictTo.Scope.LIBRARY_GROUP_PREFIX})
public class ScrollingTabContainerView extends HorizontalScrollView implements AdapterView.OnItemSelectedListener {
private static final int FADE_DURATION = 200;
@ -143,13 +144,13 @@ public class ScrollingTabContainerView extends HorizontalScrollView implements A
@Override // android.view.View
public void onInitializeAccessibilityEvent(AccessibilityEvent accessibilityEvent) {
super.onInitializeAccessibilityEvent(accessibilityEvent);
accessibilityEvent.setClassName("androidx.appcompat.app.ActionBar$Tab");
accessibilityEvent.setClassName(ACCESSIBILITY_CLASS_NAME);
}
@Override // android.view.View
public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo accessibilityNodeInfo) {
super.onInitializeAccessibilityNodeInfo(accessibilityNodeInfo);
accessibilityNodeInfo.setClassName("androidx.appcompat.app.ActionBar$Tab");
accessibilityNodeInfo.setClassName(ACCESSIBILITY_CLASS_NAME);
}
@Override // android.widget.LinearLayout, android.view.View
@ -157,7 +158,7 @@ public class ScrollingTabContainerView extends HorizontalScrollView implements A
int i3;
super.onMeasure(i, i2);
if (ScrollingTabContainerView.this.mMaxTabWidth > 0 && getMeasuredWidth() > (i3 = ScrollingTabContainerView.this.mMaxTabWidth)) {
super.onMeasure(View.MeasureSpec.makeMeasureSpec(i3, 1073741824), i2);
super.onMeasure(View.MeasureSpec.makeMeasureSpec(i3, BasicMeasure.EXACTLY), i2);
}
}
@ -472,7 +473,7 @@ public class ScrollingTabContainerView extends HorizontalScrollView implements A
}
this.mMaxTabWidth = Math.min(this.mMaxTabWidth, this.mStackedTabMaxWidth);
}
int makeMeasureSpec = View.MeasureSpec.makeMeasureSpec(this.mContentHeight, 1073741824);
int makeMeasureSpec = View.MeasureSpec.makeMeasureSpec(this.mContentHeight, BasicMeasure.EXACTLY);
if (z3 || !this.mAllowCollapse) {
z2 = false;
}

View File

@ -44,10 +44,12 @@ import androidx.annotation.Nullable;
import androidx.annotation.RestrictTo;
import androidx.appcompat.R;
import androidx.appcompat.view.CollapsibleActionView;
import androidx.constraintlayout.solver.widgets.analyzer.BasicMeasure;
import androidx.core.view.ViewCompat;
import androidx.cursoradapter.widget.CursorAdapter;
import androidx.customview.view.AbsSavedState;
import c.d.b.a.a;
import com.discord.widgets.chat.input.autocomplete.AutocompleteViewModel;
import java.lang.reflect.Method;
import java.util.WeakHashMap;
public class SearchView extends LinearLayoutCompat implements CollapsibleActionView {
@ -775,7 +777,7 @@ public class SearchView extends LinearLayoutCompat implements CollapsibleActionV
columnString3 = this.mSearchable.getSuggestIntentData();
}
if (!(columnString3 == null || (columnString = SuggestionsAdapter.getColumnString(cursor, "suggest_intent_data_id")) == null)) {
columnString3 = columnString3 + "/" + Uri.encode(columnString);
columnString3 = columnString3 + AutocompleteViewModel.COMMAND_DISCOVER_TOKEN + Uri.encode(columnString);
}
return createIntent(columnString2, columnString3 == null ? null : Uri.parse(columnString3), SuggestionsAdapter.getColumnString(cursor, "suggest_intent_extra_data"), SuggestionsAdapter.getColumnString(cursor, "suggest_intent_query"), i, str);
} catch (RuntimeException e) {
@ -784,7 +786,7 @@ public class SearchView extends LinearLayoutCompat implements CollapsibleActionV
} catch (RuntimeException unused) {
i2 = -1;
}
Log.w("SearchView", "Search suggestions cursor at row " + i2 + " returned exception.", e);
Log.w(LOG_TAG, "Search suggestions cursor at row " + i2 + " returned exception.", e);
return null;
}
}
@ -793,7 +795,7 @@ public class SearchView extends LinearLayoutCompat implements CollapsibleActionV
ComponentName searchActivity = searchableInfo.getSearchActivity();
Intent intent2 = new Intent("android.intent.action.SEARCH");
intent2.setComponent(searchActivity);
PendingIntent activity = PendingIntent.getActivity(getContext(), 0, intent2, 1073741824);
PendingIntent activity = PendingIntent.getActivity(getContext(), 0, intent2, BasicMeasure.EXACTLY);
Bundle bundle = new Bundle();
Bundle bundle2 = this.mAppSearchData;
if (bundle2 != null) {
@ -891,7 +893,7 @@ public class SearchView extends LinearLayoutCompat implements CollapsibleActionV
try {
getContext().startActivity(intent);
} catch (RuntimeException e) {
Log.e("SearchView", "Failed launch activity: " + intent, e);
Log.e(LOG_TAG, "Failed launch activity: " + intent, e);
}
}
}
@ -1218,7 +1220,7 @@ public class SearchView extends LinearLayoutCompat implements CollapsibleActionV
} else if (mode2 == 0) {
size2 = getPreferredHeight();
}
super.onMeasure(View.MeasureSpec.makeMeasureSpec(size, 1073741824), View.MeasureSpec.makeMeasureSpec(size2, 1073741824));
super.onMeasure(View.MeasureSpec.makeMeasureSpec(size, BasicMeasure.EXACTLY), View.MeasureSpec.makeMeasureSpec(size2, BasicMeasure.EXACTLY));
}
public void onQueryRefine(CharSequence charSequence) {
@ -1318,7 +1320,7 @@ public class SearchView extends LinearLayoutCompat implements CollapsibleActionV
getContext().startActivity(createVoiceAppSearchIntent(this.mVoiceAppSearchIntent, searchableInfo));
}
} catch (ActivityNotFoundException unused) {
Log.w("SearchView", "Could not find voice search activity");
Log.w(LOG_TAG, "Could not find voice search activity");
}
}
}
@ -1432,7 +1434,7 @@ public class SearchView extends LinearLayoutCompat implements CollapsibleActionV
boolean hasVoiceSearch = hasVoiceSearch();
this.mVoiceButtonEnabled = hasVoiceSearch;
if (hasVoiceSearch) {
this.mSearchSrcTextView.setPrivateImeOptions("nm");
this.mSearchSrcTextView.setPrivateImeOptions(IME_OPTION_NO_MICROPHONE);
}
updateViewsVisibility(isIconified());
}

View File

@ -20,7 +20,7 @@ public class ShareActionProvider extends ActionProvider {
private ActivityChooserModel.OnChooseActivityListener mOnChooseActivityListener;
private final ShareMenuItemOnMenuItemClickListener mOnMenuItemClickListener = new ShareMenuItemOnMenuItemClickListener();
public OnShareTargetSelectedListener mOnShareTargetSelectedListener;
public String mShareHistoryFileName = "share_history.xml";
public String mShareHistoryFileName = DEFAULT_SHARE_HISTORY_FILE_NAME;
public interface OnShareTargetSelectedListener {
boolean onShareTargetSelected(ShareActionProvider shareActionProvider, Intent intent);

View File

@ -25,6 +25,7 @@ import androidx.appcompat.R;
import androidx.core.content.ContextCompat;
import androidx.cursoradapter.widget.ResourceCursorAdapter;
import c.d.b.a.a;
import com.discord.widgets.chat.input.autocomplete.AutocompleteViewModel;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
@ -112,10 +113,10 @@ public class SuggestionsAdapter extends ResourceCursorAdapter implements View.On
}
StringBuilder L = a.L("Invalid icon resource ", iconResource, " for ");
L.append(componentName.flattenToShortString());
Log.w("SuggestionsAdapter", L.toString());
Log.w(LOG_TAG, L.toString());
return null;
} catch (PackageManager.NameNotFoundException e) {
Log.w("SuggestionsAdapter", e.toString());
Log.w(LOG_TAG, e.toString());
return null;
}
}
@ -162,14 +163,14 @@ public class SuggestionsAdapter extends ResourceCursorAdapter implements View.On
Drawable createFromStream = Drawable.createFromStream(openInputStream, null);
try {
} catch (IOException e) {
Log.e("SuggestionsAdapter", "Error closing icon stream for " + uri, e);
Log.e(LOG_TAG, "Error closing icon stream for " + uri, e);
}
return createFromStream;
} finally {
try {
openInputStream.close();
} catch (IOException e2) {
Log.e("SuggestionsAdapter", "Error closing icon stream for " + uri, e2);
Log.e(LOG_TAG, "Error closing icon stream for " + uri, e2);
}
}
} else {
@ -177,7 +178,7 @@ public class SuggestionsAdapter extends ResourceCursorAdapter implements View.On
}
}
} catch (FileNotFoundException e3) {
Log.w("SuggestionsAdapter", "Icon not found: " + uri + ", " + e3.getMessage());
Log.w(LOG_TAG, "Icon not found: " + uri + ", " + e3.getMessage());
return null;
}
}
@ -188,7 +189,7 @@ public class SuggestionsAdapter extends ResourceCursorAdapter implements View.On
}
try {
int parseInt = Integer.parseInt(str);
String str2 = "android.resource://" + this.mProviderContext.getPackageName() + "/" + parseInt;
String str2 = "android.resource://" + this.mProviderContext.getPackageName() + AutocompleteViewModel.COMMAND_DISCOVER_TOKEN + parseInt;
Drawable checkIconCache = checkIconCache(str2);
if (checkIconCache != null) {
return checkIconCache;
@ -205,7 +206,7 @@ public class SuggestionsAdapter extends ResourceCursorAdapter implements View.On
storeInIconCache(str, drawable2);
return drawable2;
} catch (Resources.NotFoundException unused2) {
a.g0("Icon resource not found: ", str, "SuggestionsAdapter");
a.g0("Icon resource not found: ", str, LOG_TAG);
return null;
}
}
@ -234,7 +235,7 @@ public class SuggestionsAdapter extends ResourceCursorAdapter implements View.On
try {
return cursor.getString(i);
} catch (Exception e) {
Log.e("SuggestionsAdapter", "unexpected error retrieving valid column from cursor, did the remote process die?", e);
Log.e(LOG_TAG, "unexpected error retrieving valid column from cursor, did the remote process die?", e);
return null;
}
}
@ -318,7 +319,7 @@ public class SuggestionsAdapter extends ResourceCursorAdapter implements View.On
@Override // androidx.cursoradapter.widget.CursorAdapter, androidx.cursoradapter.widget.CursorFilter.CursorFilterClient
public void changeCursor(Cursor cursor) {
if (this.mClosed) {
Log.w("SuggestionsAdapter", "Tried to change cursor after adapter was closed.");
Log.w(LOG_TAG, "Tried to change cursor after adapter was closed.");
if (cursor != null) {
cursor.close();
return;
@ -336,7 +337,7 @@ public class SuggestionsAdapter extends ResourceCursorAdapter implements View.On
this.mFlagsCol = cursor.getColumnIndex("suggest_flags");
}
} catch (Exception e) {
Log.e("SuggestionsAdapter", "error changing cursor and caching columns", e);
Log.e(LOG_TAG, "error changing cursor and caching columns", e);
}
}
@ -404,7 +405,7 @@ public class SuggestionsAdapter extends ResourceCursorAdapter implements View.On
try {
return super.getDropDownView(i, view, viewGroup);
} catch (RuntimeException e) {
Log.w("SuggestionsAdapter", "Search suggestions cursor threw exception.", e);
Log.w(LOG_TAG, "Search suggestions cursor threw exception.", e);
View newDropDownView = newDropDownView(this.mContext, this.mCursor, viewGroup);
if (newDropDownView != null) {
((ChildViewCache) newDropDownView.getTag()).mText1.setText(e.toString());
@ -446,7 +447,7 @@ public class SuggestionsAdapter extends ResourceCursorAdapter implements View.On
try {
return super.getView(i, view, viewGroup);
} catch (RuntimeException e) {
Log.w("SuggestionsAdapter", "Search suggestions cursor threw exception.", e);
Log.w(LOG_TAG, "Search suggestions cursor threw exception.", e);
View newView = newView(this.mContext, this.mCursor, viewGroup);
if (newView != null) {
((ChildViewCache) newView.getTag()).mText1.setText(e.toString());
@ -499,7 +500,7 @@ public class SuggestionsAdapter extends ResourceCursorAdapter implements View.On
return searchManagerSuggestions;
}
} catch (RuntimeException e) {
Log.w("SuggestionsAdapter", "Search suggestions query threw an exception.", e);
Log.w(LOG_TAG, "Search suggestions query threw an exception.", e);
}
}
return null;

View File

@ -563,13 +563,13 @@ public class SwitchCompat extends CompoundButton {
@Override // android.view.View
public void onInitializeAccessibilityEvent(AccessibilityEvent accessibilityEvent) {
super.onInitializeAccessibilityEvent(accessibilityEvent);
accessibilityEvent.setClassName("android.widget.Switch");
accessibilityEvent.setClassName(ACCESSIBILITY_EVENT_CLASS_NAME);
}
@Override // android.view.View
public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo accessibilityNodeInfo) {
super.onInitializeAccessibilityNodeInfo(accessibilityNodeInfo);
accessibilityNodeInfo.setClassName("android.widget.Switch");
accessibilityNodeInfo.setClassName(ACCESSIBILITY_EVENT_CLASS_NAME);
CharSequence charSequence = isChecked() ? this.mTextOn : this.mTextOff;
if (!TextUtils.isEmpty(charSequence)) {
CharSequence text = accessibilityNodeInfo.getText();

View File

@ -34,7 +34,7 @@ public class ThemeUtils {
TypedArray obtainStyledAttributes = context.obtainStyledAttributes(R.styleable.AppCompatTheme);
try {
if (!obtainStyledAttributes.hasValue(R.styleable.AppCompatTheme_windowActionBar)) {
Log.e("ThemeUtils", "View " + view.getClass() + " is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant).");
Log.e(TAG, "View " + view.getClass() + " is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant).");
}
} finally {
obtainStyledAttributes.recycle();

View File

@ -38,6 +38,7 @@ import androidx.appcompat.view.menu.MenuPresenter;
import androidx.appcompat.view.menu.MenuView;
import androidx.appcompat.view.menu.SubMenuBuilder;
import androidx.appcompat.widget.ActionMenuView;
import androidx.constraintlayout.solver.widgets.analyzer.BasicMeasure;
import androidx.core.view.GravityCompat;
import androidx.core.view.MarginLayoutParamsCompat;
import androidx.core.view.ViewCompat;
@ -675,7 +676,7 @@ public class Toolbar extends ViewGroup {
if (mode != 0) {
i5 = Math.min(View.MeasureSpec.getSize(childMeasureSpec2), i5);
}
childMeasureSpec2 = View.MeasureSpec.makeMeasureSpec(i5, 1073741824);
childMeasureSpec2 = View.MeasureSpec.makeMeasureSpec(i5, BasicMeasure.EXACTLY);
}
view.measure(childMeasureSpec, childMeasureSpec2);
}

View File

@ -25,6 +25,7 @@ import androidx.core.view.ViewCompat;
import androidx.core.view.ViewPropertyAnimatorCompat;
import androidx.core.view.ViewPropertyAnimatorListenerAdapter;
import c.d.b.a.a;
import com.google.android.material.badge.BadgeDrawable;
@RestrictTo({RestrictTo.Scope.LIBRARY_GROUP_PREFIX})
public class ToolbarWidgetWrapper implements DecorToolbar {
private static final int AFFECTS_LOGO_MASK = 3;
@ -233,7 +234,7 @@ public class ToolbarWidgetWrapper implements DecorToolbar {
@Override // androidx.appcompat.widget.DecorToolbar
public void animateToVisibility(int i) {
ViewPropertyAnimatorCompat viewPropertyAnimatorCompat = setupAnimatorToVisibility(i, 200);
ViewPropertyAnimatorCompat viewPropertyAnimatorCompat = setupAnimatorToVisibility(i, DEFAULT_FADE_DURATION_MS);
if (viewPropertyAnimatorCompat != null) {
viewPropertyAnimatorCompat.start();
}
@ -349,12 +350,12 @@ public class ToolbarWidgetWrapper implements DecorToolbar {
@Override // androidx.appcompat.widget.DecorToolbar
public void initIndeterminateProgress() {
Log.i("ToolbarWidgetWrapper", "Progress display unsupported");
Log.i(TAG, "Progress display unsupported");
}
@Override // androidx.appcompat.widget.DecorToolbar
public void initProgress() {
Log.i("ToolbarWidgetWrapper", "Progress display unsupported");
Log.i(TAG, "Progress display unsupported");
}
@Override // androidx.appcompat.widget.DecorToolbar
@ -486,7 +487,7 @@ public class ToolbarWidgetWrapper implements DecorToolbar {
Toolbar.LayoutParams layoutParams = (Toolbar.LayoutParams) this.mTabView.getLayoutParams();
((ViewGroup.MarginLayoutParams) layoutParams).width = -2;
((ViewGroup.MarginLayoutParams) layoutParams).height = -2;
layoutParams.gravity = 8388691;
layoutParams.gravity = BadgeDrawable.BOTTOM_START;
scrollingTabContainerView.setAllowCollapse(true);
}
}
@ -589,7 +590,7 @@ public class ToolbarWidgetWrapper implements DecorToolbar {
Toolbar.LayoutParams layoutParams = (Toolbar.LayoutParams) this.mTabView.getLayoutParams();
((ViewGroup.MarginLayoutParams) layoutParams).width = -2;
((ViewGroup.MarginLayoutParams) layoutParams).height = -2;
layoutParams.gravity = 8388691;
layoutParams.gravity = BadgeDrawable.BOTTOM_START;
}
} else {
throw new IllegalArgumentException(a.j("Invalid navigation mode ", i));

View File

@ -121,7 +121,7 @@ public class TooltipCompatHandler implements View.OnLongClickListener, View.OnHo
clearAnchorPos();
this.mAnchor.removeOnAttachStateChangeListener(this);
} else {
Log.e("TooltipCompatHandler", "sActiveHandler.mPopup == null");
Log.e(TAG, "sActiveHandler.mPopup == null");
}
}
if (sPendingHandler == this) {
@ -185,13 +185,13 @@ public class TooltipCompatHandler implements View.OnLongClickListener, View.OnHo
tooltipPopup.show(this.mAnchor, this.mAnchorX, this.mAnchorY, this.mFromTouch, this.mTooltipText);
this.mAnchor.addOnAttachStateChangeListener(this);
if (this.mFromTouch) {
j = 2500;
j = LONG_CLICK_HIDE_TIMEOUT_MS;
} else {
if ((ViewCompat.getWindowSystemUiVisibility(this.mAnchor) & 1) == 1) {
j2 = 3000;
j2 = HOVER_HIDE_TIMEOUT_SHORT_MS;
i = ViewConfiguration.getLongPressTimeout();
} else {
j2 = 15000;
j2 = HOVER_HIDE_TIMEOUT_MS;
i = ViewConfiguration.getLongPressTimeout();
}
j = j2 - ((long) i);

View File

@ -15,6 +15,7 @@ import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.RestrictTo;
import androidx.appcompat.R;
import androidx.core.view.PointerIconCompat;
@RestrictTo({RestrictTo.Scope.LIBRARY_GROUP_PREFIX})
public class TooltipPopup {
private static final String TAG = "TooltipPopup";
@ -35,7 +36,7 @@ public class TooltipPopup {
this.mMessageView = (TextView) inflate.findViewById(R.id.message);
layoutParams.setTitle(getClass().getSimpleName());
layoutParams.packageName = context.getPackageName();
layoutParams.type = 1002;
layoutParams.type = PointerIconCompat.TYPE_HAND;
layoutParams.width = -2;
layoutParams.height = -2;
layoutParams.format = -3;
@ -63,7 +64,7 @@ public class TooltipPopup {
int dimensionPixelOffset3 = this.mContext.getResources().getDimensionPixelOffset(z2 ? R.dimen.tooltip_y_offset_touch : R.dimen.tooltip_y_offset_non_touch);
View appRootView = getAppRootView(view);
if (appRootView == null) {
Log.e("TooltipPopup", "Cannot find app view");
Log.e(TAG, "Cannot find app view");
return;
}
appRootView.getWindowVisibleDisplayFrame(this.mTmpDisplayFrame);

View File

@ -20,7 +20,7 @@ public class ViewUtils {
sComputeFitSystemWindowsMethod.setAccessible(true);
}
} catch (NoSuchMethodException unused) {
Log.d("ViewUtils", "Could not find method computeFitSystemWindows. Oh well.");
Log.d(TAG, "Could not find method computeFitSystemWindows. Oh well.");
}
}
@ -33,7 +33,7 @@ public class ViewUtils {
try {
method.invoke(view, rect, rect2);
} catch (Exception e) {
Log.d("ViewUtils", "Could not invoke computeFitSystemWindows", e);
Log.d(TAG, "Could not invoke computeFitSystemWindows", e);
}
}
}
@ -50,11 +50,11 @@ public class ViewUtils {
}
method.invoke(view, new Object[0]);
} catch (NoSuchMethodException unused) {
Log.d("ViewUtils", "Could not find method makeOptionalFitsSystemWindows. Oh well...");
Log.d(TAG, "Could not find method makeOptionalFitsSystemWindows. Oh well...");
} catch (InvocationTargetException e) {
Log.d("ViewUtils", "Could not invoke makeOptionalFitsSystemWindows", e);
Log.d(TAG, "Could not invoke makeOptionalFitsSystemWindows", e);
} catch (IllegalAccessException e2) {
Log.d("ViewUtils", "Could not invoke makeOptionalFitsSystemWindows", e2);
Log.d(TAG, "Could not invoke makeOptionalFitsSystemWindows", e2);
}
}
}

View File

@ -29,7 +29,7 @@ public class DefaultTaskExecutor extends TaskExecutor {
@Override // java.util.concurrent.ThreadFactory
public Thread newThread(Runnable runnable) {
Thread thread = new Thread(runnable);
thread.setName(String.format("arch_disk_io_%d", Integer.valueOf(this.mThreadId.getAndIncrement())));
thread.setName(String.format(THREAD_NAME_STEM, Integer.valueOf(this.mThreadId.getAndIncrement())));
return thread;
}
}

View File

@ -127,11 +127,11 @@ public final class AsyncLayoutInflater {
try {
take.view = take.inflater.mInflater.inflate(take.resid, take.parent, false);
} catch (RuntimeException e) {
Log.w("AsyncLayoutInflater", "Failed to inflate resource in the background! Retrying on the UI thread", e);
Log.w(AsyncLayoutInflater.TAG, "Failed to inflate resource in the background! Retrying on the UI thread", e);
}
Message.obtain(take.inflater.mHandler, 0, take).sendToTarget();
} catch (InterruptedException e2) {
Log.w("AsyncLayoutInflater", e2);
Log.w(AsyncLayoutInflater.TAG, e2);
}
}
}

View File

@ -45,7 +45,7 @@ public class BrowserActionsFallbackMenuDialog extends Dialog {
if (z2) {
f = 1.0f;
}
long j = z2 ? 250 : 150;
long j = z2 ? ENTER_ANIMATION_DURATION_MS : 150;
this.mContentView.setScaleX(f2);
this.mContentView.setScaleY(f2);
this.mContentView.animate().scaleX(f).scaleY(f).setDuration(j).setInterpolator(new LinearOutSlowInInterpolator()).setListener(new AnonymousClass1(z2)).start();

View File

@ -23,6 +23,7 @@ import androidx.annotation.RestrictTo;
import androidx.annotation.VisibleForTesting;
import androidx.browser.R;
import androidx.core.widget.TextViewCompat;
import com.discord.restapi.RestAPIBuilder;
import java.util.ArrayList;
import java.util.List;
@Deprecated
@ -60,7 +61,7 @@ public class BrowserActionsFallbackMenuUi implements AdapterView.OnItemClickList
public void onShow(DialogInterface dialogInterface) {
BrowserActionsFallMenuUiListener browserActionsFallMenuUiListener = BrowserActionsFallbackMenuUi.this.mMenuUiListener;
if (browserActionsFallMenuUiListener == null) {
Log.e("BrowserActionskMenuUi", "Cannot trigger menu item listener, it is null");
Log.e(BrowserActionsFallbackMenuUi.TAG, "Cannot trigger menu item listener, it is null");
} else {
browserActionsFallMenuUiListener.onMenuShown(this.val$view);
}
@ -120,7 +121,7 @@ public class BrowserActionsFallbackMenuUi implements AdapterView.OnItemClickList
private PendingIntent buildShareAction() {
Intent intent = new Intent("android.intent.action.SEND");
intent.putExtra("android.intent.extra.TEXT", this.mUri.toString());
intent.setType("text/plain");
intent.setType(RestAPIBuilder.CONTENT_TYPE_TEXT);
return PendingIntent.getActivity(this.mContext, 0, intent, 0);
}
@ -153,14 +154,14 @@ public class BrowserActionsFallbackMenuUi implements AdapterView.OnItemClickList
try {
browserActionItem.getAction().send();
} catch (PendingIntent.CanceledException e) {
Log.e("BrowserActionskMenuUi", "Failed to send custom item action", e);
Log.e(TAG, "Failed to send custom item action", e);
}
} else if (browserActionItem.getRunnableAction() != null) {
browserActionItem.getRunnableAction().run();
}
BrowserActionsFallbackMenuDialog browserActionsFallbackMenuDialog = this.mBrowserActionsDialog;
if (browserActionsFallbackMenuDialog == null) {
Log.e("BrowserActionskMenuUi", "Cannot dismiss dialog, it has already been dismissed.");
Log.e(TAG, "Cannot dismiss dialog, it has already been dismissed.");
} else {
browserActionsFallbackMenuDialog.dismiss();
}

View File

@ -7,6 +7,7 @@ import android.widget.LinearLayout;
import androidx.annotation.NonNull;
import androidx.annotation.RestrictTo;
import androidx.browser.R;
import androidx.constraintlayout.solver.widgets.analyzer.BasicMeasure;
@RestrictTo({RestrictTo.Scope.LIBRARY_GROUP_PREFIX})
@Deprecated
public class BrowserActionsFallbackMenuView extends LinearLayout {
@ -19,6 +20,6 @@ public class BrowserActionsFallbackMenuView extends LinearLayout {
@Override // android.widget.LinearLayout, android.view.View
public void onMeasure(int i, int i2) {
super.onMeasure(View.MeasureSpec.makeMeasureSpec(Math.min(getResources().getDisplayMetrics().widthPixels - (this.mBrowserActionsMenuMinPaddingPx * 2), this.mBrowserActionsMenuMaxWidthPx), 1073741824), i2);
super.onMeasure(View.MeasureSpec.makeMeasureSpec(Math.min(getResources().getDisplayMetrics().widthPixels - (this.mBrowserActionsMenuMinPaddingPx * 2), this.mBrowserActionsMenuMaxWidthPx), BasicMeasure.EXACTLY), i2);
}
}

View File

@ -69,7 +69,7 @@ public class BrowserActionsIntent {
public static final class Builder {
private Context mContext;
private List<Uri> mImageUris = new ArrayList();
private final Intent mIntent = new Intent("androidx.browser.browseractions.browser_action_open");
private final Intent mIntent = new Intent(BrowserActionsIntent.ACTION_BROWSER_ACTIONS_OPEN);
private ArrayList<Bundle> mMenuItems = new ArrayList<>();
@Nullable
private PendingIntent mOnItemSelectedPendingIntent = null;
@ -84,13 +84,13 @@ public class BrowserActionsIntent {
@NonNull
private Bundle getBundleFromItem(@NonNull BrowserActionItem browserActionItem) {
Bundle bundle = new Bundle();
bundle.putString("androidx.browser.browseractions.TITLE", browserActionItem.getTitle());
bundle.putParcelable("androidx.browser.browseractions.ACTION", browserActionItem.getAction());
bundle.putString(BrowserActionsIntent.KEY_TITLE, browserActionItem.getTitle());
bundle.putParcelable(BrowserActionsIntent.KEY_ACTION, browserActionItem.getAction());
if (browserActionItem.getIconId() != 0) {
bundle.putInt("androidx.browser.browseractions.ICON_ID", browserActionItem.getIconId());
bundle.putInt(BrowserActionsIntent.KEY_ICON_ID, browserActionItem.getIconId());
}
if (browserActionItem.getIconUri() != null) {
bundle.putParcelable("androidx.browser.browseractions.ICON_URI", browserActionItem.getIconUri());
bundle.putParcelable(BrowserActionsIntent.KEY_ICON_URI, browserActionItem.getIconUri());
}
return bundle;
}
@ -98,12 +98,12 @@ public class BrowserActionsIntent {
@NonNull
public BrowserActionsIntent build() {
this.mIntent.setData(this.mUri);
this.mIntent.putExtra("androidx.browser.browseractions.extra.TYPE", this.mType);
this.mIntent.putParcelableArrayListExtra("androidx.browser.browseractions.extra.MENU_ITEMS", this.mMenuItems);
this.mIntent.putExtra("androidx.browser.browseractions.APP_ID", PendingIntent.getActivity(this.mContext, 0, new Intent(), 0));
this.mIntent.putExtra(BrowserActionsIntent.EXTRA_TYPE, this.mType);
this.mIntent.putParcelableArrayListExtra(BrowserActionsIntent.EXTRA_MENU_ITEMS, this.mMenuItems);
this.mIntent.putExtra(BrowserActionsIntent.EXTRA_APP_ID, PendingIntent.getActivity(this.mContext, 0, new Intent(), 0));
PendingIntent pendingIntent = this.mOnItemSelectedPendingIntent;
if (pendingIntent != null) {
this.mIntent.putExtra("androidx.browser.browseractions.extra.SELECTED_ACTION_PENDING_INTENT", pendingIntent);
this.mIntent.putExtra(BrowserActionsIntent.EXTRA_SELECTED_ACTION_PENDING_INTENT, pendingIntent);
}
BrowserServiceFileProvider.grantReadPermission(this.mIntent, this.mImageUris, this.mContext);
return new BrowserActionsIntent(this.mIntent);
@ -151,7 +151,7 @@ public class BrowserActionsIntent {
@NonNull
@RestrictTo({RestrictTo.Scope.LIBRARY})
public static List<ResolveInfo> getBrowserActionsIntentHandlers(@NonNull Context context) {
return context.getPackageManager().queryIntentActivities(new Intent("androidx.browser.browseractions.browser_action_open", Uri.parse("https://www.example.com")), 131072);
return context.getPackageManager().queryIntentActivities(new Intent(ACTION_BROWSER_ACTIONS_OPEN, Uri.parse(TEST_URL)), 131072);
}
@Nullable
@ -162,7 +162,7 @@ public class BrowserActionsIntent {
@Nullable
public static String getUntrustedCreatorPackageName(@NonNull Intent intent) {
PendingIntent pendingIntent = (PendingIntent) intent.getParcelableExtra("androidx.browser.browseractions.APP_ID");
PendingIntent pendingIntent = (PendingIntent) intent.getParcelableExtra(EXTRA_APP_ID);
if (pendingIntent != null) {
return pendingIntent.getCreatorPackage();
}
@ -184,7 +184,7 @@ public class BrowserActionsIntent {
if (list.size() == 1) {
intent.setPackage(list.get(0).activityInfo.packageName);
} else {
ResolveInfo resolveActivity = context.getPackageManager().resolveActivity(new Intent("android.intent.action.VIEW", Uri.parse("https://www.example.com")), 65536);
ResolveInfo resolveActivity = context.getPackageManager().resolveActivity(new Intent("android.intent.action.VIEW", Uri.parse(TEST_URL)), 65536);
if (resolveActivity != null) {
String str = resolveActivity.activityInfo.packageName;
while (true) {
@ -212,7 +212,7 @@ public class BrowserActionsIntent {
private static void openFallbackBrowserActionsMenu(Context context, Intent intent) {
Uri data = intent.getData();
ArrayList parcelableArrayListExtra = intent.getParcelableArrayListExtra("androidx.browser.browseractions.extra.MENU_ITEMS");
ArrayList parcelableArrayListExtra = intent.getParcelableArrayListExtra(EXTRA_MENU_ITEMS);
openFallbackBrowserActionsMenu(context, data, parcelableArrayListExtra != null ? parseBrowserActionItems(parcelableArrayListExtra) : null);
}
@ -229,10 +229,10 @@ public class BrowserActionsIntent {
ArrayList arrayList2 = new ArrayList();
for (int i = 0; i < arrayList.size(); i++) {
Bundle bundle = arrayList.get(i);
String string = bundle.getString("androidx.browser.browseractions.TITLE");
PendingIntent pendingIntent = (PendingIntent) bundle.getParcelable("androidx.browser.browseractions.ACTION");
int i2 = bundle.getInt("androidx.browser.browseractions.ICON_ID");
Uri uri = (Uri) bundle.getParcelable("androidx.browser.browseractions.ICON_URI");
String string = bundle.getString(KEY_TITLE);
PendingIntent pendingIntent = (PendingIntent) bundle.getParcelable(KEY_ACTION);
int i2 = bundle.getInt(KEY_ICON_ID);
Uri uri = (Uri) bundle.getParcelable(KEY_ICON_URI);
if (TextUtils.isEmpty(string) || pendingIntent == null) {
throw new IllegalArgumentException("Custom item should contain a non-empty title and non-null intent.");
}

View File

@ -94,16 +94,16 @@ public final class BrowserServiceFileProvider extends FileProvider {
}
private static boolean shouldCleanUp(SharedPreferences sharedPreferences) {
return System.currentTimeMillis() > sharedPreferences.getLong("last_cleanup_time", System.currentTimeMillis()) + CLEANUP_REQUIRED_TIME_SPAN;
return System.currentTimeMillis() > sharedPreferences.getLong(BrowserServiceFileProvider.LAST_CLEANUP_TIME_KEY, System.currentTimeMillis()) + CLEANUP_REQUIRED_TIME_SPAN;
}
public Void doInBackground(Void... voidArr) {
SharedPreferences sharedPreferences = this.mAppContext.getSharedPreferences(this.mAppContext.getPackageName() + ".image_provider", 0);
SharedPreferences sharedPreferences = this.mAppContext.getSharedPreferences(this.mAppContext.getPackageName() + BrowserServiceFileProvider.AUTHORITY_SUFFIX, 0);
if (!shouldCleanUp(sharedPreferences)) {
return null;
}
synchronized (BrowserServiceFileProvider.sFileCleanupLock) {
File file = new File(this.mAppContext.getFilesDir(), "image_provider");
File file = new File(this.mAppContext.getFilesDir(), BrowserServiceFileProvider.FILE_SUB_DIR);
if (!file.exists()) {
return null;
}
@ -113,14 +113,14 @@ public final class BrowserServiceFileProvider extends FileProvider {
for (File file2 : listFiles) {
if (isImageFile(file2)) {
if (file2.lastModified() < currentTimeMillis && !file2.delete()) {
Log.e("BrowserServiceFP", "Fail to delete image: " + file2.getAbsoluteFile());
Log.e(BrowserServiceFileProvider.TAG, "Fail to delete image: " + file2.getAbsoluteFile());
z2 = false;
}
}
}
long currentTimeMillis2 = z2 ? System.currentTimeMillis() : (System.currentTimeMillis() - CLEANUP_REQUIRED_TIME_SPAN) + DELETION_FAILED_REATTEMPT_DURATION;
SharedPreferences.Editor edit = sharedPreferences.edit();
edit.putLong("last_cleanup_time", currentTimeMillis2);
edit.putLong(BrowserServiceFileProvider.LAST_CLEANUP_TIME_KEY, currentTimeMillis2);
edit.apply();
return null;
}
@ -176,10 +176,10 @@ public final class BrowserServiceFileProvider extends FileProvider {
}
private void saveFileIfNeededBlocking() {
File file = new File(this.mAppContext.getFilesDir(), "image_provider");
File file = new File(this.mAppContext.getFilesDir(), BrowserServiceFileProvider.FILE_SUB_DIR);
synchronized (BrowserServiceFileProvider.sFileCleanupLock) {
if (file.exists() || file.mkdir()) {
File file2 = new File(file, this.mFilename + ".png");
File file2 = new File(file, this.mFilename + BrowserServiceFileProvider.FILE_EXTENSION);
if (file2.exists()) {
this.mResultFuture.set(this.mFileUri);
} else {
@ -203,16 +203,16 @@ public final class BrowserServiceFileProvider extends FileProvider {
}
private static Uri generateUri(Context context, String str) {
String t = a.t("image_provider_images/", str, ".png");
Uri.Builder scheme = new Uri.Builder().scheme("content");
return scheme.authority(context.getPackageName() + ".image_provider").path(t).build();
String t = a.t(FILE_SUB_DIR_NAME, str, FILE_EXTENSION);
Uri.Builder scheme = new Uri.Builder().scheme(CONTENT_SCHEME);
return scheme.authority(context.getPackageName() + AUTHORITY_SUFFIX).path(t).build();
}
public static void grantReadPermission(@NonNull Intent intent, @Nullable List<Uri> list, @NonNull Context context) {
if (!(list == null || list.size() == 0)) {
ContentResolver contentResolver = context.getContentResolver();
intent.addFlags(1);
ClipData newUri = ClipData.newUri(contentResolver, "image_provider_uris", list.get(0));
ClipData newUri = ClipData.newUri(contentResolver, CLIP_DATA_LABEL, list.get(0));
for (int i = 1; i < list.size(); i++) {
newUri.addItem(new ClipData.Item(list.get(i)));
}

View File

@ -4,6 +4,7 @@ import android.os.Bundle;
import androidx.annotation.ColorInt;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.core.view.ViewCompat;
public final class CustomTabColorSchemeParams {
@Nullable
@ColorInt
@ -39,7 +40,7 @@ public final class CustomTabColorSchemeParams {
@NonNull
public Builder setNavigationBarColor(@ColorInt int i) {
this.mNavigationBarColor = Integer.valueOf(i | -16777216);
this.mNavigationBarColor = Integer.valueOf(i | ViewCompat.MEASURED_STATE_MASK);
return this;
}
@ -57,7 +58,7 @@ public final class CustomTabColorSchemeParams {
@NonNull
public Builder setToolbarColor(@ColorInt int i) {
this.mToolbarColor = Integer.valueOf(i | -16777216);
this.mToolbarColor = Integer.valueOf(i | ViewCompat.MEASURED_STATE_MASK);
return this;
}
}
@ -74,7 +75,7 @@ public final class CustomTabColorSchemeParams {
if (bundle == null) {
bundle = new Bundle(0);
}
return new CustomTabColorSchemeParams((Integer) bundle.get("android.support.customtabs.extra.TOOLBAR_COLOR"), (Integer) bundle.get("android.support.customtabs.extra.SECONDARY_TOOLBAR_COLOR"), (Integer) bundle.get("androidx.browser.customtabs.extra.NAVIGATION_BAR_COLOR"), (Integer) bundle.get("androidx.browser.customtabs.extra.NAVIGATION_BAR_DIVIDER_COLOR"));
return new CustomTabColorSchemeParams((Integer) bundle.get(CustomTabsIntent.EXTRA_TOOLBAR_COLOR), (Integer) bundle.get(CustomTabsIntent.EXTRA_SECONDARY_TOOLBAR_COLOR), (Integer) bundle.get(CustomTabsIntent.EXTRA_NAVIGATION_BAR_COLOR), (Integer) bundle.get(CustomTabsIntent.EXTRA_NAVIGATION_BAR_DIVIDER_COLOR));
}
@NonNull
@ -82,19 +83,19 @@ public final class CustomTabColorSchemeParams {
Bundle bundle = new Bundle();
Integer num = this.toolbarColor;
if (num != null) {
bundle.putInt("android.support.customtabs.extra.TOOLBAR_COLOR", num.intValue());
bundle.putInt(CustomTabsIntent.EXTRA_TOOLBAR_COLOR, num.intValue());
}
Integer num2 = this.secondaryToolbarColor;
if (num2 != null) {
bundle.putInt("android.support.customtabs.extra.SECONDARY_TOOLBAR_COLOR", num2.intValue());
bundle.putInt(CustomTabsIntent.EXTRA_SECONDARY_TOOLBAR_COLOR, num2.intValue());
}
Integer num3 = this.navigationBarColor;
if (num3 != null) {
bundle.putInt("androidx.browser.customtabs.extra.NAVIGATION_BAR_COLOR", num3.intValue());
bundle.putInt(CustomTabsIntent.EXTRA_NAVIGATION_BAR_COLOR, num3.intValue());
}
Integer num4 = this.navigationBarDividerColor;
if (num4 != null) {
bundle.putInt("androidx.browser.customtabs.extra.NAVIGATION_BAR_DIVIDER_COLOR", num4.intValue());
bundle.putInt(CustomTabsIntent.EXTRA_NAVIGATION_BAR_DIVIDER_COLOR, num4.intValue());
}
return bundle;
}

View File

@ -191,7 +191,7 @@ public class CustomTabsClient {
public static boolean bindCustomTabsService(@NonNull Context context, @Nullable String str, @NonNull CustomTabsServiceConnection customTabsServiceConnection) {
customTabsServiceConnection.setApplicationContext(context.getApplicationContext());
Intent intent = new Intent("android.support.customtabs.action.CustomTabsService");
Intent intent = new Intent(CustomTabsService.ACTION_CUSTOM_TABS_CONNECTION);
if (!TextUtils.isEmpty(str)) {
intent.setPackage(str);
}
@ -200,7 +200,7 @@ public class CustomTabsClient {
public static boolean bindCustomTabsServicePreservePriority(@NonNull Context context, @Nullable String str, @NonNull CustomTabsServiceConnection customTabsServiceConnection) {
customTabsServiceConnection.setApplicationContext(context.getApplicationContext());
Intent intent = new Intent("android.support.customtabs.action.CustomTabsService");
Intent intent = new Intent(CustomTabsService.ACTION_CUSTOM_TABS_CONNECTION);
if (!TextUtils.isEmpty(str)) {
intent.setPackage(str);
}
@ -247,7 +247,7 @@ public class CustomTabsClient {
}
arrayList = arrayList2;
}
Intent intent2 = new Intent("android.support.customtabs.action.CustomTabsService");
Intent intent2 = new Intent(CustomTabsService.ACTION_CUSTOM_TABS_CONNECTION);
for (String str2 : arrayList) {
intent2.setPackage(str2);
if (packageManager.resolveService(intent2, 0) != null) {
@ -257,7 +257,7 @@ public class CustomTabsClient {
if (Build.VERSION.SDK_INT < 30) {
return null;
}
Log.w("CustomTabsClient", "Unable to find any Custom Tabs packages, you may need to add a <queries> element to your manifest. See the docs for CustomTabsClient#getPackageName.");
Log.w(TAG, "Unable to find any Custom Tabs packages, you may need to add a <queries> element to your manifest. See the docs for CustomTabsClient#getPackageName.");
return null;
}
@ -274,7 +274,7 @@ public class CustomTabsClient {
if (pendingIntent != null) {
try {
Bundle bundle = new Bundle();
bundle.putParcelable("android.support.customtabs.extra.SESSION_ID", pendingIntent);
bundle.putParcelable(CustomTabsIntent.EXTRA_SESSION_ID, pendingIntent);
z2 = this.mService.newSessionWithExtras(createCallbackWrapper, bundle);
} catch (RemoteException unused) {
return null;

View File

@ -99,9 +99,9 @@ public final class CustomTabsIntent {
private void setSessionParameters(@Nullable IBinder iBinder, @Nullable PendingIntent pendingIntent) {
Bundle bundle = new Bundle();
BundleCompat.putBinder(bundle, "android.support.customtabs.extra.SESSION", iBinder);
BundleCompat.putBinder(bundle, CustomTabsIntent.EXTRA_SESSION, iBinder);
if (pendingIntent != null) {
bundle.putParcelable("android.support.customtabs.extra.SESSION_ID", pendingIntent);
bundle.putParcelable(CustomTabsIntent.EXTRA_SESSION_ID, pendingIntent);
}
this.mIntent.putExtras(bundle);
}
@ -119,8 +119,8 @@ public final class CustomTabsIntent {
this.mMenuItems = new ArrayList<>();
}
Bundle bundle = new Bundle();
bundle.putString("android.support.customtabs.customaction.MENU_ITEM_TITLE", str);
bundle.putParcelable("android.support.customtabs.customaction.PENDING_INTENT", pendingIntent);
bundle.putString(CustomTabsIntent.KEY_MENU_ITEM_TITLE, str);
bundle.putParcelable(CustomTabsIntent.KEY_PENDING_INTENT, pendingIntent);
this.mMenuItems.add(bundle);
return this;
}
@ -133,10 +133,10 @@ public final class CustomTabsIntent {
}
if (this.mActionButtons.size() < 5) {
Bundle bundle = new Bundle();
bundle.putInt("android.support.customtabs.customaction.ID", i);
bundle.putParcelable("android.support.customtabs.customaction.ICON", bitmap);
bundle.putString("android.support.customtabs.customaction.DESCRIPTION", str);
bundle.putParcelable("android.support.customtabs.customaction.PENDING_INTENT", pendingIntent);
bundle.putInt(CustomTabsIntent.KEY_ID, i);
bundle.putParcelable(CustomTabsIntent.KEY_ICON, bitmap);
bundle.putString(CustomTabsIntent.KEY_DESCRIPTION, str);
bundle.putParcelable(CustomTabsIntent.KEY_PENDING_INTENT, pendingIntent);
this.mActionButtons.add(bundle);
return this;
}
@ -145,18 +145,18 @@ public final class CustomTabsIntent {
@NonNull
public CustomTabsIntent build() {
if (!this.mIntent.hasExtra("android.support.customtabs.extra.SESSION")) {
if (!this.mIntent.hasExtra(CustomTabsIntent.EXTRA_SESSION)) {
setSessionParameters(null, null);
}
ArrayList<Bundle> arrayList = this.mMenuItems;
if (arrayList != null) {
this.mIntent.putParcelableArrayListExtra("android.support.customtabs.extra.MENU_ITEMS", arrayList);
this.mIntent.putParcelableArrayListExtra(CustomTabsIntent.EXTRA_MENU_ITEMS, arrayList);
}
ArrayList<Bundle> arrayList2 = this.mActionButtons;
if (arrayList2 != null) {
this.mIntent.putParcelableArrayListExtra("android.support.customtabs.extra.TOOLBAR_ITEMS", arrayList2);
this.mIntent.putParcelableArrayListExtra(CustomTabsIntent.EXTRA_TOOLBAR_ITEMS, arrayList2);
}
this.mIntent.putExtra("android.support.customtabs.extra.EXTRA_ENABLE_INSTANT_APPS", this.mInstantAppsEnabled);
this.mIntent.putExtra(CustomTabsIntent.EXTRA_ENABLE_INSTANT_APPS, this.mInstantAppsEnabled);
this.mIntent.putExtras(this.mDefaultColorSchemeBuilder.build().toBundle());
Bundle bundle = this.mDefaultColorSchemeBundle;
if (bundle != null) {
@ -164,17 +164,17 @@ public final class CustomTabsIntent {
}
if (this.mColorSchemeParamBundles != null) {
Bundle bundle2 = new Bundle();
bundle2.putSparseParcelableArray("androidx.browser.customtabs.extra.COLOR_SCHEME_PARAMS", this.mColorSchemeParamBundles);
bundle2.putSparseParcelableArray(CustomTabsIntent.EXTRA_COLOR_SCHEME_PARAMS, this.mColorSchemeParamBundles);
this.mIntent.putExtras(bundle2);
}
this.mIntent.putExtra("androidx.browser.customtabs.extra.SHARE_STATE", this.mShareState);
this.mIntent.putExtra(CustomTabsIntent.EXTRA_SHARE_STATE, this.mShareState);
return new CustomTabsIntent(this.mIntent, this.mStartAnimationBundle);
}
@NonNull
@Deprecated
public Builder enableUrlBarHiding() {
this.mIntent.putExtra("android.support.customtabs.extra.ENABLE_URLBAR_HIDING", true);
this.mIntent.putExtra(CustomTabsIntent.EXTRA_ENABLE_URLBAR_HIDING, true);
return this;
}
@ -186,18 +186,18 @@ public final class CustomTabsIntent {
@NonNull
public Builder setActionButton(@NonNull Bitmap bitmap, @NonNull String str, @NonNull PendingIntent pendingIntent, boolean z2) {
Bundle bundle = new Bundle();
bundle.putInt("android.support.customtabs.customaction.ID", 0);
bundle.putParcelable("android.support.customtabs.customaction.ICON", bitmap);
bundle.putString("android.support.customtabs.customaction.DESCRIPTION", str);
bundle.putParcelable("android.support.customtabs.customaction.PENDING_INTENT", pendingIntent);
this.mIntent.putExtra("android.support.customtabs.extra.ACTION_BUTTON_BUNDLE", bundle);
this.mIntent.putExtra("android.support.customtabs.extra.TINT_ACTION_BUTTON", z2);
bundle.putInt(CustomTabsIntent.KEY_ID, 0);
bundle.putParcelable(CustomTabsIntent.KEY_ICON, bitmap);
bundle.putString(CustomTabsIntent.KEY_DESCRIPTION, str);
bundle.putParcelable(CustomTabsIntent.KEY_PENDING_INTENT, pendingIntent);
this.mIntent.putExtra(CustomTabsIntent.EXTRA_ACTION_BUTTON_BUNDLE, bundle);
this.mIntent.putExtra(CustomTabsIntent.EXTRA_TINT_ACTION_BUTTON, z2);
return this;
}
@NonNull
public Builder setCloseButtonIcon(@NonNull Bitmap bitmap) {
this.mIntent.putExtra("android.support.customtabs.extra.CLOSE_BUTTON_ICON", bitmap);
this.mIntent.putExtra(CustomTabsIntent.EXTRA_CLOSE_BUTTON_ICON, bitmap);
return this;
}
@ -206,7 +206,7 @@ public final class CustomTabsIntent {
if (i < 0 || i > 2) {
throw new IllegalArgumentException("Invalid value for the colorScheme argument");
}
this.mIntent.putExtra("androidx.browser.customtabs.extra.COLOR_SCHEME", i);
this.mIntent.putExtra(CustomTabsIntent.EXTRA_COLOR_SCHEME, i);
return this;
}
@ -241,7 +241,7 @@ public final class CustomTabsIntent {
@NonNull
public Builder setExitAnimations(@NonNull Context context, @AnimRes int i, @AnimRes int i2) {
this.mIntent.putExtra("android.support.customtabs.extra.EXIT_ANIMATION_BUNDLE", ActivityOptionsCompat.makeCustomAnimation(context, i, i2).toBundle());
this.mIntent.putExtra(CustomTabsIntent.EXTRA_EXIT_ANIMATION_BUNDLE, ActivityOptionsCompat.makeCustomAnimation(context, i, i2).toBundle());
return this;
}
@ -281,9 +281,9 @@ public final class CustomTabsIntent {
@NonNull
public Builder setSecondaryToolbarViews(@NonNull RemoteViews remoteViews, @Nullable int[] iArr, @Nullable PendingIntent pendingIntent) {
this.mIntent.putExtra("android.support.customtabs.extra.EXTRA_REMOTEVIEWS", remoteViews);
this.mIntent.putExtra("android.support.customtabs.extra.EXTRA_REMOTEVIEWS_VIEW_IDS", iArr);
this.mIntent.putExtra("android.support.customtabs.extra.EXTRA_REMOTEVIEWS_PENDINGINTENT", pendingIntent);
this.mIntent.putExtra(CustomTabsIntent.EXTRA_REMOTEVIEWS, remoteViews);
this.mIntent.putExtra(CustomTabsIntent.EXTRA_REMOTEVIEWS_VIEW_IDS, iArr);
this.mIntent.putExtra(CustomTabsIntent.EXTRA_REMOTEVIEWS_PENDINGINTENT, pendingIntent);
return this;
}
@ -301,18 +301,18 @@ public final class CustomTabsIntent {
}
this.mShareState = i;
if (i == 1) {
this.mIntent.putExtra("android.support.customtabs.extra.SHARE_MENU_ITEM", true);
this.mIntent.putExtra(CustomTabsIntent.EXTRA_DEFAULT_SHARE_MENU_ITEM, true);
} else if (i == 2) {
this.mIntent.putExtra("android.support.customtabs.extra.SHARE_MENU_ITEM", false);
this.mIntent.putExtra(CustomTabsIntent.EXTRA_DEFAULT_SHARE_MENU_ITEM, false);
} else {
this.mIntent.removeExtra("android.support.customtabs.extra.SHARE_MENU_ITEM");
this.mIntent.removeExtra(CustomTabsIntent.EXTRA_DEFAULT_SHARE_MENU_ITEM);
}
return this;
}
@NonNull
public Builder setShowTitle(boolean z2) {
this.mIntent.putExtra("android.support.customtabs.extra.TITLE_VISIBILITY", z2 ? 1 : 0);
this.mIntent.putExtra(CustomTabsIntent.EXTRA_TITLE_VISIBILITY_STATE, z2 ? 1 : 0);
return this;
}
@ -331,7 +331,7 @@ public final class CustomTabsIntent {
@NonNull
public Builder setUrlBarHidingEnabled(boolean z2) {
this.mIntent.putExtra("android.support.customtabs.extra.ENABLE_URLBAR_HIDING", z2);
this.mIntent.putExtra(CustomTabsIntent.EXTRA_ENABLE_URLBAR_HIDING, z2);
return this;
}
}
@ -362,7 +362,7 @@ public final class CustomTabsIntent {
return CustomTabColorSchemeParams.fromBundle(null);
}
CustomTabColorSchemeParams fromBundle = CustomTabColorSchemeParams.fromBundle(extras);
SparseArray sparseParcelableArray = extras.getSparseParcelableArray("androidx.browser.customtabs.extra.COLOR_SCHEME_PARAMS");
SparseArray sparseParcelableArray = extras.getSparseParcelableArray(EXTRA_COLOR_SCHEME_PARAMS);
return (sparseParcelableArray == null || (bundle = (Bundle) sparseParcelableArray.get(i)) == null) ? fromBundle : CustomTabColorSchemeParams.fromBundle(bundle).withDefaults(fromBundle);
}
@ -376,12 +376,12 @@ public final class CustomTabsIntent {
intent = new Intent("android.intent.action.VIEW");
}
intent.addFlags(268435456);
intent.putExtra("android.support.customtabs.extra.user_opt_out", true);
intent.putExtra(EXTRA_USER_OPT_OUT_FROM_CUSTOM_TABS, true);
return intent;
}
public static boolean shouldAlwaysUseBrowserUI(@NonNull Intent intent) {
return intent.getBooleanExtra("android.support.customtabs.extra.user_opt_out", false) && (intent.getFlags() & 268435456) != 0;
return intent.getBooleanExtra(EXTRA_USER_OPT_OUT_FROM_CUSTOM_TABS, false) && (intent.getFlags() & 268435456) != 0;
}
public void launchUrl(@NonNull Context context, @NonNull Uri uri) {

View File

@ -46,8 +46,8 @@ public abstract class CustomTabsService extends Service {
if (bundle == null) {
return null;
}
PendingIntent pendingIntent = (PendingIntent) bundle.getParcelable("android.support.customtabs.extra.SESSION_ID");
bundle.remove("android.support.customtabs.extra.SESSION_ID");
PendingIntent pendingIntent = (PendingIntent) bundle.getParcelable(CustomTabsIntent.EXTRA_SESSION_ID);
bundle.remove(CustomTabsIntent.EXTRA_SESSION_ID);
return pendingIntent;
}

View File

@ -115,7 +115,7 @@ public final class CustomTabsSession {
private void addIdToBundle(Bundle bundle) {
PendingIntent pendingIntent = this.mId;
if (pendingIntent != null) {
bundle.putParcelable("android.support.customtabs.extra.SESSION_ID", pendingIntent);
bundle.putParcelable(CustomTabsIntent.EXTRA_SESSION_ID, pendingIntent);
}
}
@ -188,10 +188,10 @@ public final class CustomTabsSession {
public boolean setActionButton(@NonNull Bitmap bitmap, @NonNull String str) {
Bundle bundle = new Bundle();
bundle.putParcelable("android.support.customtabs.customaction.ICON", bitmap);
bundle.putString("android.support.customtabs.customaction.DESCRIPTION", str);
bundle.putParcelable(CustomTabsIntent.KEY_ICON, bitmap);
bundle.putString(CustomTabsIntent.KEY_DESCRIPTION, str);
Bundle bundle2 = new Bundle();
bundle2.putBundle("android.support.customtabs.extra.ACTION_BUTTON_BUNDLE", bundle);
bundle2.putBundle(CustomTabsIntent.EXTRA_ACTION_BUTTON_BUNDLE, bundle);
addIdToBundle(bundle);
try {
return this.mService.updateVisuals(this.mCallback, bundle2);
@ -202,9 +202,9 @@ public final class CustomTabsSession {
public boolean setSecondaryToolbarViews(@Nullable RemoteViews remoteViews, @Nullable int[] iArr, @Nullable PendingIntent pendingIntent) {
Bundle bundle = new Bundle();
bundle.putParcelable("android.support.customtabs.extra.EXTRA_REMOTEVIEWS", remoteViews);
bundle.putIntArray("android.support.customtabs.extra.EXTRA_REMOTEVIEWS_VIEW_IDS", iArr);
bundle.putParcelable("android.support.customtabs.extra.EXTRA_REMOTEVIEWS_PENDINGINTENT", pendingIntent);
bundle.putParcelable(CustomTabsIntent.EXTRA_REMOTEVIEWS, remoteViews);
bundle.putIntArray(CustomTabsIntent.EXTRA_REMOTEVIEWS_VIEW_IDS, iArr);
bundle.putParcelable(CustomTabsIntent.EXTRA_REMOTEVIEWS_PENDINGINTENT, pendingIntent);
addIdToBundle(bundle);
try {
return this.mService.updateVisuals(this.mCallback, bundle);
@ -216,11 +216,11 @@ public final class CustomTabsSession {
@Deprecated
public boolean setToolbarItem(int i, @NonNull Bitmap bitmap, @NonNull String str) {
Bundle bundle = new Bundle();
bundle.putInt("android.support.customtabs.customaction.ID", i);
bundle.putParcelable("android.support.customtabs.customaction.ICON", bitmap);
bundle.putString("android.support.customtabs.customaction.DESCRIPTION", str);
bundle.putInt(CustomTabsIntent.KEY_ID, i);
bundle.putParcelable(CustomTabsIntent.KEY_ICON, bitmap);
bundle.putString(CustomTabsIntent.KEY_DESCRIPTION, str);
Bundle bundle2 = new Bundle();
bundle2.putBundle("android.support.customtabs.extra.ACTION_BUTTON_BUNDLE", bundle);
bundle2.putBundle(CustomTabsIntent.EXTRA_ACTION_BUTTON_BUNDLE, bundle);
addIdToBundle(bundle2);
try {
return this.mService.updateVisuals(this.mCallback, bundle2);

View File

@ -31,7 +31,7 @@ public class CustomTabsSessionToken {
try {
CustomTabsSessionToken.this.mCallbackBinder.extraCallback(str, bundle);
} catch (RemoteException unused) {
Log.e("CustomTabsSessionToken", "RemoteException during ICustomTabsCallback transaction");
Log.e(CustomTabsSessionToken.TAG, "RemoteException during ICustomTabsCallback transaction");
}
}
@ -41,7 +41,7 @@ public class CustomTabsSessionToken {
try {
return CustomTabsSessionToken.this.mCallbackBinder.extraCallbackWithResult(str, bundle);
} catch (RemoteException unused) {
Log.e("CustomTabsSessionToken", "RemoteException during ICustomTabsCallback transaction");
Log.e(CustomTabsSessionToken.TAG, "RemoteException during ICustomTabsCallback transaction");
return null;
}
}
@ -51,7 +51,7 @@ public class CustomTabsSessionToken {
try {
CustomTabsSessionToken.this.mCallbackBinder.onMessageChannelReady(bundle);
} catch (RemoteException unused) {
Log.e("CustomTabsSessionToken", "RemoteException during ICustomTabsCallback transaction");
Log.e(CustomTabsSessionToken.TAG, "RemoteException during ICustomTabsCallback transaction");
}
}
@ -60,7 +60,7 @@ public class CustomTabsSessionToken {
try {
CustomTabsSessionToken.this.mCallbackBinder.onNavigationEvent(i, bundle);
} catch (RemoteException unused) {
Log.e("CustomTabsSessionToken", "RemoteException during ICustomTabsCallback transaction");
Log.e(CustomTabsSessionToken.TAG, "RemoteException during ICustomTabsCallback transaction");
}
}
@ -69,7 +69,7 @@ public class CustomTabsSessionToken {
try {
CustomTabsSessionToken.this.mCallbackBinder.onPostMessage(str, bundle);
} catch (RemoteException unused) {
Log.e("CustomTabsSessionToken", "RemoteException during ICustomTabsCallback transaction");
Log.e(CustomTabsSessionToken.TAG, "RemoteException during ICustomTabsCallback transaction");
}
}
@ -78,7 +78,7 @@ public class CustomTabsSessionToken {
try {
CustomTabsSessionToken.this.mCallbackBinder.onRelationshipValidationResult(i, uri, z2, bundle);
} catch (RemoteException unused) {
Log.e("CustomTabsSessionToken", "RemoteException during ICustomTabsCallback transaction");
Log.e(CustomTabsSessionToken.TAG, "RemoteException during ICustomTabsCallback transaction");
}
}
}
@ -144,8 +144,8 @@ public class CustomTabsSessionToken {
if (extras == null) {
return null;
}
IBinder binder = BundleCompat.getBinder(extras, "android.support.customtabs.extra.SESSION");
PendingIntent pendingIntent = (PendingIntent) intent.getParcelableExtra("android.support.customtabs.extra.SESSION_ID");
IBinder binder = BundleCompat.getBinder(extras, CustomTabsIntent.EXTRA_SESSION);
PendingIntent pendingIntent = (PendingIntent) intent.getParcelableExtra(CustomTabsIntent.EXTRA_SESSION_ID);
if (binder == null && pendingIntent == null) {
return null;
}

View File

@ -66,7 +66,7 @@ public abstract class PostMessageServiceConnection implements PostMessageBackend
intent.setClassName(str, PostMessageService.class.getName());
boolean bindService = context.bindService(intent, this, 1);
if (!bindService) {
Log.w("PostMessageServConn", "Could not bind to PostMessageService in client.");
Log.w(TAG, "Could not bind to PostMessageService in client.");
}
return bindService;
}

View File

@ -23,7 +23,7 @@ public class TrustedWebUtils {
public static boolean areSplashScreensSupported(@NonNull Context context, @NonNull String str, @NonNull String str2) {
IntentFilter intentFilter;
ResolveInfo resolveService = context.getPackageManager().resolveService(new Intent().setAction("android.support.customtabs.action.CustomTabsService").setPackage(str), 64);
ResolveInfo resolveService = context.getPackageManager().resolveService(new Intent().setAction(CustomTabsService.ACTION_CUSTOM_TABS_CONNECTION).setPackage(str), 64);
if (resolveService == null || (intentFilter = resolveService.filter) == null) {
return false;
}
@ -32,8 +32,8 @@ public class TrustedWebUtils {
@Deprecated
public static void launchAsTrustedWebActivity(@NonNull Context context, @NonNull CustomTabsIntent customTabsIntent, @NonNull Uri uri) {
if (BundleCompat.getBinder(customTabsIntent.intent.getExtras(), "android.support.customtabs.extra.SESSION") != null) {
customTabsIntent.intent.putExtra("android.support.customtabs.extra.LAUNCH_AS_TRUSTED_WEB_ACTIVITY", true);
if (BundleCompat.getBinder(customTabsIntent.intent.getExtras(), CustomTabsIntent.EXTRA_SESSION) != null) {
customTabsIntent.intent.putExtra(EXTRA_LAUNCH_AS_TRUSTED_WEB_ACTIVITY, true);
customTabsIntent.launchUrl(context, uri);
return;
}
@ -42,15 +42,15 @@ public class TrustedWebUtils {
@RestrictTo({RestrictTo.Scope.LIBRARY})
public static void launchBrowserSiteSettings(@NonNull Context context, @NonNull CustomTabsSession customTabsSession, @NonNull Uri uri) {
Intent intent = new Intent("android.support.customtabs.action.ACTION_MANAGE_TRUSTED_WEB_ACTIVITY_DATA");
Intent intent = new Intent(ACTION_MANAGE_TRUSTED_WEB_ACTIVITY_DATA);
intent.setPackage(customTabsSession.getComponentName().getPackageName());
intent.setData(uri);
Bundle bundle = new Bundle();
BundleCompat.putBinder(bundle, "android.support.customtabs.extra.SESSION", customTabsSession.getBinder());
BundleCompat.putBinder(bundle, CustomTabsIntent.EXTRA_SESSION, customTabsSession.getBinder());
intent.putExtras(bundle);
PendingIntent id2 = customTabsSession.getId();
if (id2 != null) {
intent.putExtra("android.support.customtabs.extra.SESSION_ID", id2);
intent.putExtra(CustomTabsIntent.EXTRA_SESSION_ID, id2);
}
context.startActivity(intent);
}

View File

@ -96,7 +96,7 @@ public class PackageIdentityUtils {
try {
return getImpl().getFingerprintsForPackage(str, packageManager);
} catch (PackageManager.NameNotFoundException e) {
Log.e("PackageIdentity", "Could not get fingerprint for package.", e);
Log.e(TAG, "Could not get fingerprint for package.", e);
return null;
}
}
@ -109,7 +109,7 @@ public class PackageIdentityUtils {
try {
return getImpl().packageMatchesToken(str, packageManager, tokenContents);
} catch (PackageManager.NameNotFoundException | IOException e) {
Log.e("PackageIdentity", "Could not check if package matches token.", e);
Log.e(TAG, "Could not check if package matches token.", e);
return false;
}
}

View File

@ -24,7 +24,7 @@ public final class Token {
try {
return new Token(TokenContents.create(str, fingerprintsForPackage));
} catch (IOException e) {
Log.e("Token", "Exception when creating token.", e);
Log.e(TAG, "Exception when creating token.", e);
return null;
}
}

View File

@ -12,7 +12,7 @@ public interface TrustedWebActivityDisplayMode {
@NonNull
public Bundle toBundle() {
Bundle bundle = new Bundle();
bundle.putInt("androidx.browser.trusted.displaymode.KEY_ID", 0);
bundle.putInt(TrustedWebActivityDisplayMode.KEY_ID, 0);
return bundle;
}
}
@ -31,7 +31,7 @@ public interface TrustedWebActivityDisplayMode {
@NonNull
public static TrustedWebActivityDisplayMode fromBundle(@NonNull Bundle bundle) {
return new ImmersiveMode(bundle.getBoolean("androidx.browser.trusted.displaymode.KEY_STICKY"), bundle.getInt("androidx.browser.trusted.displaymode.KEY_CUTOUT_MODE"));
return new ImmersiveMode(bundle.getBoolean(KEY_STICKY), bundle.getInt(KEY_CUTOUT_MODE));
}
public boolean isSticky() {
@ -46,9 +46,9 @@ public interface TrustedWebActivityDisplayMode {
@NonNull
public Bundle toBundle() {
Bundle bundle = new Bundle();
bundle.putInt("androidx.browser.trusted.displaymode.KEY_ID", 1);
bundle.putBoolean("androidx.browser.trusted.displaymode.KEY_STICKY", this.mIsSticky);
bundle.putInt("androidx.browser.trusted.displaymode.KEY_CUTOUT_MODE", this.mLayoutInDisplayCutoutMode);
bundle.putInt(TrustedWebActivityDisplayMode.KEY_ID, 1);
bundle.putBoolean(KEY_STICKY, this.mIsSticky);
bundle.putInt(KEY_CUTOUT_MODE, this.mLayoutInDisplayCutoutMode);
return bundle;
}
}

View File

@ -10,6 +10,7 @@ import androidx.annotation.Nullable;
import androidx.browser.customtabs.CustomTabColorSchemeParams;
import androidx.browser.customtabs.CustomTabsIntent;
import androidx.browser.customtabs.CustomTabsSession;
import androidx.browser.customtabs.TrustedWebUtils;
import androidx.browser.trusted.TrustedWebActivityDisplayMode;
import androidx.browser.trusted.sharing.ShareData;
import androidx.browser.trusted.sharing.ShareTarget;
@ -52,26 +53,26 @@ public class TrustedWebActivityIntentBuilder {
this.mIntentBuilder.setSession(customTabsSession);
Intent intent = this.mIntentBuilder.build().intent;
intent.setData(this.mUri);
intent.putExtra("android.support.customtabs.extra.LAUNCH_AS_TRUSTED_WEB_ACTIVITY", true);
intent.putExtra(TrustedWebUtils.EXTRA_LAUNCH_AS_TRUSTED_WEB_ACTIVITY, true);
if (this.mAdditionalTrustedOrigins != null) {
intent.putExtra("android.support.customtabs.extra.ADDITIONAL_TRUSTED_ORIGINS", new ArrayList(this.mAdditionalTrustedOrigins));
intent.putExtra(EXTRA_ADDITIONAL_TRUSTED_ORIGINS, new ArrayList(this.mAdditionalTrustedOrigins));
}
Bundle bundle = this.mSplashScreenParams;
if (bundle != null) {
intent.putExtra("androidx.browser.trusted.EXTRA_SPLASH_SCREEN_PARAMS", bundle);
intent.putExtra(EXTRA_SPLASH_SCREEN_PARAMS, bundle);
}
List<Uri> emptyList = Collections.emptyList();
ShareTarget shareTarget = this.mShareTarget;
if (!(shareTarget == null || this.mShareData == null)) {
intent.putExtra("androidx.browser.trusted.extra.SHARE_TARGET", shareTarget.toBundle());
intent.putExtra("androidx.browser.trusted.extra.SHARE_DATA", this.mShareData.toBundle());
intent.putExtra(EXTRA_SHARE_TARGET, shareTarget.toBundle());
intent.putExtra(EXTRA_SHARE_DATA, this.mShareData.toBundle());
List<Uri> list = this.mShareData.uris;
if (list != null) {
emptyList = list;
}
}
intent.putExtra("androidx.browser.trusted.extra.DISPLAY_MODE", this.mDisplayMode.toBundle());
intent.putExtra("androidx.browser.trusted.extra.SCREEN_ORIENTATION", this.mScreenOrientation);
intent.putExtra(EXTRA_DISPLAY_MODE, this.mDisplayMode.toBundle());
intent.putExtra(EXTRA_SCREEN_ORIENTATION, this.mScreenOrientation);
return new TrustedWebActivityIntent(intent, emptyList);
}

View File

@ -185,7 +185,7 @@ public abstract class TrustedWebActivityService extends Service {
if (onGetSmallIconId == -1) {
return bundle;
}
bundle.putParcelable("android.support.customtabs.trusted.SMALL_ICON_BITMAP", BitmapFactory.decodeResource(getResources(), onGetSmallIconId));
bundle.putParcelable(KEY_SMALL_ICON_BITMAP, BitmapFactory.decodeResource(getResources(), onGetSmallIconId));
return bundle;
}
@ -196,7 +196,7 @@ public abstract class TrustedWebActivityService extends Service {
if (bundle == null) {
return -1;
}
return bundle.getInt("android.support.customtabs.trusted.SMALL_ICON", -1);
return bundle.getInt(META_DATA_NAME_SMALL_ICON, -1);
} catch (PackageManager.NameNotFoundException unused) {
return -1;
}

View File

@ -44,13 +44,13 @@ public final class TrustedWebActivityServiceConnection {
}
public static ActiveNotificationsArgs fromBundle(Bundle bundle) {
TrustedWebActivityServiceConnection.ensureBundleContains(bundle, "android.support.customtabs.trusted.ACTIVE_NOTIFICATIONS");
return new ActiveNotificationsArgs(bundle.getParcelableArray("android.support.customtabs.trusted.ACTIVE_NOTIFICATIONS"));
TrustedWebActivityServiceConnection.ensureBundleContains(bundle, TrustedWebActivityServiceConnection.KEY_ACTIVE_NOTIFICATIONS);
return new ActiveNotificationsArgs(bundle.getParcelableArray(TrustedWebActivityServiceConnection.KEY_ACTIVE_NOTIFICATIONS));
}
public Bundle toBundle() {
Bundle bundle = new Bundle();
bundle.putParcelableArray("android.support.customtabs.trusted.ACTIVE_NOTIFICATIONS", this.notifications);
bundle.putParcelableArray(TrustedWebActivityServiceConnection.KEY_ACTIVE_NOTIFICATIONS, this.notifications);
return bundle;
}
}
@ -65,15 +65,15 @@ public final class TrustedWebActivityServiceConnection {
}
public static CancelNotificationArgs fromBundle(Bundle bundle) {
TrustedWebActivityServiceConnection.ensureBundleContains(bundle, "android.support.customtabs.trusted.PLATFORM_TAG");
TrustedWebActivityServiceConnection.ensureBundleContains(bundle, "android.support.customtabs.trusted.PLATFORM_ID");
return new CancelNotificationArgs(bundle.getString("android.support.customtabs.trusted.PLATFORM_TAG"), bundle.getInt("android.support.customtabs.trusted.PLATFORM_ID"));
TrustedWebActivityServiceConnection.ensureBundleContains(bundle, TrustedWebActivityServiceConnection.KEY_PLATFORM_TAG);
TrustedWebActivityServiceConnection.ensureBundleContains(bundle, TrustedWebActivityServiceConnection.KEY_PLATFORM_ID);
return new CancelNotificationArgs(bundle.getString(TrustedWebActivityServiceConnection.KEY_PLATFORM_TAG), bundle.getInt(TrustedWebActivityServiceConnection.KEY_PLATFORM_ID));
}
public Bundle toBundle() {
Bundle bundle = new Bundle();
bundle.putString("android.support.customtabs.trusted.PLATFORM_TAG", this.platformTag);
bundle.putInt("android.support.customtabs.trusted.PLATFORM_ID", this.platformId);
bundle.putString(TrustedWebActivityServiceConnection.KEY_PLATFORM_TAG, this.platformTag);
bundle.putInt(TrustedWebActivityServiceConnection.KEY_PLATFORM_ID, this.platformId);
return bundle;
}
}
@ -86,13 +86,13 @@ public final class TrustedWebActivityServiceConnection {
}
public static NotificationsEnabledArgs fromBundle(Bundle bundle) {
TrustedWebActivityServiceConnection.ensureBundleContains(bundle, "android.support.customtabs.trusted.CHANNEL_NAME");
return new NotificationsEnabledArgs(bundle.getString("android.support.customtabs.trusted.CHANNEL_NAME"));
TrustedWebActivityServiceConnection.ensureBundleContains(bundle, TrustedWebActivityServiceConnection.KEY_CHANNEL_NAME);
return new NotificationsEnabledArgs(bundle.getString(TrustedWebActivityServiceConnection.KEY_CHANNEL_NAME));
}
public Bundle toBundle() {
Bundle bundle = new Bundle();
bundle.putString("android.support.customtabs.trusted.CHANNEL_NAME", this.channelName);
bundle.putString(TrustedWebActivityServiceConnection.KEY_CHANNEL_NAME, this.channelName);
return bundle;
}
}
@ -111,19 +111,19 @@ public final class TrustedWebActivityServiceConnection {
}
public static NotifyNotificationArgs fromBundle(Bundle bundle) {
TrustedWebActivityServiceConnection.ensureBundleContains(bundle, "android.support.customtabs.trusted.PLATFORM_TAG");
TrustedWebActivityServiceConnection.ensureBundleContains(bundle, "android.support.customtabs.trusted.PLATFORM_ID");
TrustedWebActivityServiceConnection.ensureBundleContains(bundle, "android.support.customtabs.trusted.NOTIFICATION");
TrustedWebActivityServiceConnection.ensureBundleContains(bundle, "android.support.customtabs.trusted.CHANNEL_NAME");
return new NotifyNotificationArgs(bundle.getString("android.support.customtabs.trusted.PLATFORM_TAG"), bundle.getInt("android.support.customtabs.trusted.PLATFORM_ID"), (Notification) bundle.getParcelable("android.support.customtabs.trusted.NOTIFICATION"), bundle.getString("android.support.customtabs.trusted.CHANNEL_NAME"));
TrustedWebActivityServiceConnection.ensureBundleContains(bundle, TrustedWebActivityServiceConnection.KEY_PLATFORM_TAG);
TrustedWebActivityServiceConnection.ensureBundleContains(bundle, TrustedWebActivityServiceConnection.KEY_PLATFORM_ID);
TrustedWebActivityServiceConnection.ensureBundleContains(bundle, TrustedWebActivityServiceConnection.KEY_NOTIFICATION);
TrustedWebActivityServiceConnection.ensureBundleContains(bundle, TrustedWebActivityServiceConnection.KEY_CHANNEL_NAME);
return new NotifyNotificationArgs(bundle.getString(TrustedWebActivityServiceConnection.KEY_PLATFORM_TAG), bundle.getInt(TrustedWebActivityServiceConnection.KEY_PLATFORM_ID), (Notification) bundle.getParcelable(TrustedWebActivityServiceConnection.KEY_NOTIFICATION), bundle.getString(TrustedWebActivityServiceConnection.KEY_CHANNEL_NAME));
}
public Bundle toBundle() {
Bundle bundle = new Bundle();
bundle.putString("android.support.customtabs.trusted.PLATFORM_TAG", this.platformTag);
bundle.putInt("android.support.customtabs.trusted.PLATFORM_ID", this.platformId);
bundle.putParcelable("android.support.customtabs.trusted.NOTIFICATION", this.notification);
bundle.putString("android.support.customtabs.trusted.CHANNEL_NAME", this.channelName);
bundle.putString(TrustedWebActivityServiceConnection.KEY_PLATFORM_TAG, this.platformTag);
bundle.putInt(TrustedWebActivityServiceConnection.KEY_PLATFORM_ID, this.platformId);
bundle.putParcelable(TrustedWebActivityServiceConnection.KEY_NOTIFICATION, this.notification);
bundle.putString(TrustedWebActivityServiceConnection.KEY_CHANNEL_NAME, this.channelName);
return bundle;
}
}
@ -136,13 +136,13 @@ public final class TrustedWebActivityServiceConnection {
}
public static ResultArgs fromBundle(Bundle bundle) {
TrustedWebActivityServiceConnection.ensureBundleContains(bundle, "android.support.customtabs.trusted.NOTIFICATION_SUCCESS");
return new ResultArgs(bundle.getBoolean("android.support.customtabs.trusted.NOTIFICATION_SUCCESS"));
TrustedWebActivityServiceConnection.ensureBundleContains(bundle, TrustedWebActivityServiceConnection.KEY_NOTIFICATION_SUCCESS);
return new ResultArgs(bundle.getBoolean(TrustedWebActivityServiceConnection.KEY_NOTIFICATION_SUCCESS));
}
public Bundle toBundle() {
Bundle bundle = new Bundle();
bundle.putBoolean("android.support.customtabs.trusted.NOTIFICATION_SUCCESS", this.success);
bundle.putBoolean(TrustedWebActivityServiceConnection.KEY_NOTIFICATION_SUCCESS, this.success);
return bundle;
}
}
@ -188,7 +188,7 @@ public final class TrustedWebActivityServiceConnection {
@Nullable
public Bitmap getSmallIconBitmap() throws RemoteException {
return (Bitmap) this.mService.getSmallIconBitmap().getParcelable("android.support.customtabs.trusted.SMALL_ICON_BITMAP");
return (Bitmap) this.mService.getSmallIconBitmap().getParcelable(TrustedWebActivityService.KEY_SMALL_ICON_BITMAP);
}
public int getSmallIconId() throws RemoteException {

View File

@ -10,6 +10,7 @@ import android.util.Log;
import androidx.annotation.MainThread;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.FragmentTransaction;
import c.d.b.a.a;
import java.util.HashMap;
import java.util.Iterator;
@ -36,13 +37,13 @@ public final class TrustedWebActivityServiceConnectionPool {
@Nullable
public Exception doInBackground(Void... voidArr) {
try {
if (this.mAppContext.bindService(this.mIntent, this.mConnection, 4097)) {
if (this.mAppContext.bindService(this.mIntent, this.mConnection, FragmentTransaction.TRANSIT_FRAGMENT_OPEN)) {
return null;
}
this.mAppContext.unbindService(this.mConnection);
return new IllegalStateException("Could not bind to the service");
} catch (SecurityException e) {
Log.w("TWAConnectionPool", "SecurityException while binding.", e);
Log.w(TrustedWebActivityServiceConnectionPool.TAG, "SecurityException while binding.", e);
return e;
}
}
@ -88,17 +89,17 @@ public final class TrustedWebActivityServiceConnectionPool {
}
if (str == null) {
if (z2) {
Log.w("TWAConnectionPool", "No TWA candidates for " + uri + " have been registered.");
Log.w(TAG, "No TWA candidates for " + uri + " have been registered.");
}
return null;
}
Intent intent2 = new Intent();
intent2.setPackage(str);
intent2.setAction("android.support.customtabs.trusted.TRUSTED_WEB_ACTIVITY_SERVICE");
intent2.setAction(TrustedWebActivityService.ACTION_TRUSTED_WEB_ACTIVITY_SERVICE);
ResolveInfo resolveService = context.getPackageManager().resolveService(intent2, 131072);
if (resolveService == null) {
if (z2) {
a.g0("Could not find TWAService for ", str, "TWAConnectionPool");
a.g0("Could not find TWAService for ", str, TAG);
}
return null;
}
@ -107,7 +108,7 @@ public final class TrustedWebActivityServiceConnectionPool {
K.append(resolveService.serviceInfo.name);
K.append(" to handle request for ");
K.append(uri);
Log.i("TWAConnectionPool", K.toString());
Log.i(TAG, K.toString());
}
Intent intent3 = new Intent();
intent3.setComponent(new ComponentName(str, resolveService.serviceInfo.name));

View File

@ -25,7 +25,7 @@ public final class ShareData {
@NonNull
public static ShareData fromBundle(@NonNull Bundle bundle) {
return new ShareData(bundle.getString("androidx.browser.trusted.sharing.KEY_TITLE"), bundle.getString("androidx.browser.trusted.sharing.KEY_TEXT"), bundle.getParcelableArrayList("androidx.browser.trusted.sharing.KEY_URIS"));
return new ShareData(bundle.getString("androidx.browser.trusted.sharing.KEY_TITLE"), bundle.getString("androidx.browser.trusted.sharing.KEY_TEXT"), bundle.getParcelableArrayList(KEY_URIS));
}
@NonNull
@ -34,7 +34,7 @@ public final class ShareData {
bundle.putString("androidx.browser.trusted.sharing.KEY_TITLE", this.title);
bundle.putString("androidx.browser.trusted.sharing.KEY_TEXT", this.text);
if (this.uris != null) {
bundle.putParcelableArrayList("androidx.browser.trusted.sharing.KEY_URIS", new ArrayList<>(this.uris));
bundle.putParcelableArrayList(KEY_URIS, new ArrayList<>(this.uris));
}
return bundle;
}

View File

@ -53,8 +53,8 @@ public final class ShareTarget {
if (bundle == null) {
return null;
}
String string = bundle.getString("androidx.browser.trusted.sharing.KEY_FILE_NAME");
ArrayList<String> stringArrayList = bundle.getStringArrayList("androidx.browser.trusted.sharing.KEY_ACCEPTED_TYPES");
String string = bundle.getString(KEY_NAME);
ArrayList<String> stringArrayList = bundle.getStringArrayList(KEY_ACCEPTED_TYPES);
if (string == null || stringArrayList == null) {
return null;
}
@ -64,8 +64,8 @@ public final class ShareTarget {
@NonNull
public Bundle toBundle() {
Bundle bundle = new Bundle();
bundle.putString("androidx.browser.trusted.sharing.KEY_FILE_NAME", this.name);
bundle.putStringArrayList("androidx.browser.trusted.sharing.KEY_ACCEPTED_TYPES", new ArrayList<>(this.acceptedTypes));
bundle.putString(KEY_NAME, this.name);
bundle.putStringArrayList(KEY_ACCEPTED_TYPES, new ArrayList<>(this.acceptedTypes));
return bundle;
}
}
@ -93,7 +93,7 @@ public final class ShareTarget {
if (bundle == null) {
return null;
}
ArrayList<Bundle> parcelableArrayList = bundle.getParcelableArrayList("androidx.browser.trusted.sharing.KEY_FILES");
ArrayList<Bundle> parcelableArrayList = bundle.getParcelableArrayList(KEY_FILES);
if (parcelableArrayList != null) {
arrayList = new ArrayList();
for (Bundle bundle2 : parcelableArrayList) {
@ -113,7 +113,7 @@ public final class ShareTarget {
for (FileFormField fileFormField : this.files) {
arrayList.add(fileFormField.toBundle());
}
bundle.putParcelableArrayList("androidx.browser.trusted.sharing.KEY_FILES", arrayList);
bundle.putParcelableArrayList(KEY_FILES, arrayList);
}
return bundle;
}
@ -133,10 +133,10 @@ public final class ShareTarget {
@Nullable
public static ShareTarget fromBundle(@NonNull Bundle bundle) {
String string = bundle.getString("androidx.browser.trusted.sharing.KEY_ACTION");
String string2 = bundle.getString("androidx.browser.trusted.sharing.KEY_METHOD");
String string3 = bundle.getString("androidx.browser.trusted.sharing.KEY_ENCTYPE");
Params fromBundle = Params.fromBundle(bundle.getBundle("androidx.browser.trusted.sharing.KEY_PARAMS"));
String string = bundle.getString(KEY_ACTION);
String string2 = bundle.getString(KEY_METHOD);
String string3 = bundle.getString(KEY_ENCTYPE);
Params fromBundle = Params.fromBundle(bundle.getBundle(KEY_PARAMS));
if (string == null || fromBundle == null) {
return null;
}
@ -146,10 +146,10 @@ public final class ShareTarget {
@NonNull
public Bundle toBundle() {
Bundle bundle = new Bundle();
bundle.putString("androidx.browser.trusted.sharing.KEY_ACTION", this.action);
bundle.putString("androidx.browser.trusted.sharing.KEY_METHOD", this.method);
bundle.putString("androidx.browser.trusted.sharing.KEY_ENCTYPE", this.encodingType);
bundle.putBundle("androidx.browser.trusted.sharing.KEY_PARAMS", this.params.toBundle());
bundle.putString(KEY_ACTION, this.action);
bundle.putString(KEY_METHOD, this.method);
bundle.putString(KEY_ENCTYPE, this.encodingType);
bundle.putBundle(KEY_PARAMS, this.params.toBundle());
return bundle;
}
}

View File

@ -8,6 +8,7 @@ import androidx.constraintlayout.solver.widgets.ConstraintWidget;
import androidx.constraintlayout.widget.ConstraintHelper;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.constraintlayout.widget.R;
import com.google.android.material.shadow.ShadowDrawableWrapper;
public class Layer extends ConstraintHelper {
private static final String TAG = "Layer";
private boolean mApplyElevationOnAttach;
@ -60,7 +61,7 @@ public class Layer extends ConstraintHelper {
reCacheViews();
}
calcCenters();
double radians = Float.isNaN(this.mGroupRotateAngle) ? 0.0d : Math.toRadians((double) this.mGroupRotateAngle);
double radians = Float.isNaN(this.mGroupRotateAngle) ? ShadowDrawableWrapper.COS_45 : Math.toRadians((double) this.mGroupRotateAngle);
float sin = (float) Math.sin(radians);
float cos = (float) Math.cos(radians);
float f = this.mScaleX;

View File

@ -1,5 +1,6 @@
package androidx.constraintlayout.motion.utils;
import com.google.android.material.shadow.ShadowDrawableWrapper;
import java.util.Arrays;
public class ArcCurveFit extends CurveFit {
public static final int ARC_START_FLIP = 3;
@ -47,7 +48,7 @@ public class ArcCurveFit extends CurveFit {
}
double d7 = d5 - d3;
double d8 = d6 - d4;
if (this.linear || Math.abs(d7) < 0.001d || Math.abs(d8) < 0.001d) {
if (this.linear || Math.abs(d7) < EPSILON || Math.abs(d8) < EPSILON) {
this.linear = true;
this.mX1 = d3;
this.mX2 = d5;
@ -77,9 +78,9 @@ public class ArcCurveFit extends CurveFit {
double d6 = d3 - d;
double d7 = d2 - d4;
int i = 0;
double d8 = 0.0d;
double d9 = 0.0d;
double d10 = 0.0d;
double d8 = ShadowDrawableWrapper.COS_45;
double d9 = ShadowDrawableWrapper.COS_45;
double d10 = ShadowDrawableWrapper.COS_45;
while (true) {
double[] dArr = ourPercent;
if (i >= dArr.length) {
@ -177,8 +178,8 @@ public class ArcCurveFit extends CurveFit {
}
public double lookup(double d) {
if (d <= 0.0d) {
return 0.0d;
if (d <= ShadowDrawableWrapper.COS_45) {
return ShadowDrawableWrapper.COS_45;
}
if (d >= 1.0d) {
return 1.0d;

View File

@ -1,4 +1,6 @@
package androidx.constraintlayout.motion.utils;
import com.google.android.material.shadow.ShadowDrawableWrapper;
public abstract class CurveFit {
public static final int CONSTANT = 2;
public static final int LINEAR = 1;
@ -40,7 +42,7 @@ public abstract class CurveFit {
@Override // androidx.constraintlayout.motion.utils.CurveFit
public double getSlope(double d, int i) {
return 0.0d;
return ShadowDrawableWrapper.COS_45;
}
@Override // androidx.constraintlayout.motion.utils.CurveFit

View File

@ -2,6 +2,7 @@ package androidx.constraintlayout.motion.utils;
import android.util.Log;
import c.d.b.a.a;
import com.google.android.material.shadow.ShadowDrawableWrapper;
import java.util.Arrays;
public class Easing {
private static final String ACCELERATE = "cubic(0.4, 0.05, 0.8, 0.7)";
@ -77,8 +78,8 @@ public class Easing {
@Override // androidx.constraintlayout.motion.utils.Easing
public double get(double d) {
if (d <= 0.0d) {
return 0.0d;
if (d <= ShadowDrawableWrapper.COS_45) {
return ShadowDrawableWrapper.COS_45;
}
if (d >= 1.0d) {
return 1.0d;
@ -119,7 +120,7 @@ public class Easing {
}
static {
NAMED_EASING = new String[]{"standard", "accelerate", "decelerate", "linear"};
NAMED_EASING = new String[]{STANDARD_NAME, ACCELERATE_NAME, DECELERATE_NAME, LINEAR_NAME};
}
public static Easing getInterpolator(String str) {
@ -133,25 +134,25 @@ public class Easing {
char c2 = 65535;
switch (str.hashCode()) {
case -1354466595:
if (str.equals("accelerate")) {
if (str.equals(ACCELERATE_NAME)) {
c2 = 0;
break;
}
break;
case -1263948740:
if (str.equals("decelerate")) {
if (str.equals(DECELERATE_NAME)) {
c2 = 1;
break;
}
break;
case -1102672091:
if (str.equals("linear")) {
if (str.equals(LINEAR_NAME)) {
c2 = 2;
break;
}
break;
case 1312628413:
if (str.equals("standard")) {
if (str.equals(STANDARD_NAME)) {
c2 = 3;
break;
}
@ -159,13 +160,13 @@ public class Easing {
}
switch (c2) {
case 0:
return new CubicEasing("cubic(0.4, 0.05, 0.8, 0.7)");
return new CubicEasing(ACCELERATE);
case 1:
return new CubicEasing("cubic(0.0, 0.0, 0.2, 0.95)");
return new CubicEasing(DECELERATE);
case 2:
return new CubicEasing("cubic(1, 1, 0, 0)");
return new CubicEasing(LINEAR);
case 3:
return new CubicEasing("cubic(0.4, 0.0, 0.2, 1)");
return new CubicEasing(STANDARD);
default:
StringBuilder K = a.K("transitionEasing syntax error syntax:transitionEasing=\"cubic(1.0,0.5,0.0,0.6)\" or ");
K.append(Arrays.toString(NAMED_EASING));

View File

@ -1,5 +1,6 @@
package androidx.constraintlayout.motion.utils;
import com.google.android.material.shadow.ShadowDrawableWrapper;
import java.lang.reflect.Array;
public class HyperSpline {
public double[][] mCtl;
@ -79,7 +80,7 @@ public class HyperSpline {
int i;
int length = cubicArr.length;
double[] dArr = new double[cubicArr.length];
double d = 0.0d;
double d = ShadowDrawableWrapper.COS_45;
double d2 = 0.0d;
double d3 = 0.0d;
while (true) {
@ -96,7 +97,7 @@ public class HyperSpline {
d4 += d6 * d6;
i++;
}
if (d2 > 0.0d) {
if (d2 > ShadowDrawableWrapper.COS_45) {
d3 += Math.sqrt(d4);
}
d2 += 0.1d;
@ -203,7 +204,7 @@ public class HyperSpline {
i4++;
}
this.mCurveLength = new double[(this.mPoints - 1)];
this.mTotalLength = 0.0d;
this.mTotalLength = ShadowDrawableWrapper.COS_45;
Cubic[] cubicArr2 = new Cubic[i];
for (int i5 = 0; i5 < this.mCurveLength.length; i5++) {
for (int i6 = 0; i6 < this.mDimensionality; i6++) {

View File

@ -1,4 +1,6 @@
package androidx.constraintlayout.motion.utils;
import com.google.android.material.shadow.ShadowDrawableWrapper;
public class LinearCurveFit extends CurveFit {
private static final String TAG = "LinearCurveFit";
private double[] mT;
@ -24,18 +26,18 @@ public class LinearCurveFit extends CurveFit {
d = d3;
d2 = d4;
}
this.mTotalLength = 0.0d;
this.mTotalLength = ShadowDrawableWrapper.COS_45;
}
}
private double getLength2D(double d) {
if (Double.isNaN(this.mTotalLength)) {
return 0.0d;
return ShadowDrawableWrapper.COS_45;
}
double[] dArr = this.mT;
int length = dArr.length;
if (d <= dArr[0]) {
return 0.0d;
return ShadowDrawableWrapper.COS_45;
}
int i = length - 1;
if (d >= dArr[i]) {
@ -69,7 +71,7 @@ public class LinearCurveFit extends CurveFit {
d3 = d5;
d4 = d6;
}
return 0.0d;
return ShadowDrawableWrapper.COS_45;
}
@Override // androidx.constraintlayout.motion.utils.CurveFit
@ -97,7 +99,7 @@ public class LinearCurveFit extends CurveFit {
}
i2 = i4;
}
return 0.0d;
return ShadowDrawableWrapper.COS_45;
}
@Override // androidx.constraintlayout.motion.utils.CurveFit
@ -208,7 +210,7 @@ public class LinearCurveFit extends CurveFit {
}
i2 = i4;
}
return 0.0d;
return ShadowDrawableWrapper.COS_45;
}
@Override // androidx.constraintlayout.motion.utils.CurveFit

View File

@ -1,5 +1,6 @@
package androidx.constraintlayout.motion.utils;
import com.google.android.material.shadow.ShadowDrawableWrapper;
import java.lang.reflect.Array;
public class MonotonicCurveFit extends CurveFit {
private static final String TAG = "MonotonicCurveFit";
@ -35,7 +36,7 @@ public class MonotonicCurveFit extends CurveFit {
}
for (int i5 = 0; i5 < i; i5++) {
for (int i6 = 0; i6 < length2; i6++) {
if (dArr3[i5][i6] == 0.0d) {
if (dArr3[i5][i6] == ShadowDrawableWrapper.COS_45) {
dArr4[i5][i6] = 0.0d;
dArr4[i5 + 1][i6] = 0.0d;
} else {
@ -105,7 +106,7 @@ public class MonotonicCurveFit extends CurveFit {
}
i2 = i4;
}
return 0.0d;
return ShadowDrawableWrapper.COS_45;
}
@Override // androidx.constraintlayout.motion.utils.CurveFit
@ -225,7 +226,7 @@ public class MonotonicCurveFit extends CurveFit {
}
i2 = i4;
}
return 0.0d;
return ShadowDrawableWrapper.COS_45;
}
@Override // androidx.constraintlayout.motion.utils.CurveFit

View File

@ -1,6 +1,7 @@
package androidx.constraintlayout.motion.utils;
import c.d.b.a.a;
import com.google.android.material.shadow.ShadowDrawableWrapper;
import java.util.Arrays;
public class Oscillator {
public static final int BOUNCE = 6;
@ -35,14 +36,14 @@ public class Oscillator {
}
public double getDP(double d) {
if (d <= 0.0d) {
if (d <= ShadowDrawableWrapper.COS_45) {
d = 1.0E-5d;
} else if (d >= 1.0d) {
d = 0.999999d;
}
int binarySearch = Arrays.binarySearch(this.mPosition, d);
if (binarySearch > 0 || binarySearch == 0) {
return 0.0d;
return ShadowDrawableWrapper.COS_45;
}
int i = (-binarySearch) - 1;
float[] fArr = this.mPeriod;
@ -54,7 +55,7 @@ public class Oscillator {
}
public double getP(double d) {
if (d < 0.0d) {
if (d < ShadowDrawableWrapper.COS_45) {
d = 0.0d;
} else if (d > 1.0d) {
d = 1.0d;
@ -64,7 +65,7 @@ public class Oscillator {
return 1.0d;
}
if (binarySearch == 0) {
return 0.0d;
return ShadowDrawableWrapper.COS_45;
}
int i = (-binarySearch) - 1;
float[] fArr = this.mPeriod;
@ -78,7 +79,7 @@ public class Oscillator {
public double getSlope(double d) {
switch (this.mType) {
case 1:
return 0.0d;
return ShadowDrawableWrapper.COS_45;
case 2:
return Math.signum((((getP(d) * 4.0d) + 3.0d) % 4.0d) - 2.0d) * getDP(d) * 4.0d;
case 3:

View File

@ -317,7 +317,7 @@ public class KeyAttributes extends Key {
/* JADX INFO: Can't fix incorrect switch cases order, some code will duplicate */
/* JADX WARNING: Code restructure failed: missing block: B:30:0x009c, code lost:
if (r1.equals("scaleY") == false) goto L_0x0041;
if (r1.equals(androidx.constraintlayout.motion.widget.Key.SCALE_Y) == false) goto L_0x0041;
*/
@Override // androidx.constraintlayout.motion.widget.Key
public void addValues(HashMap<String, SplineSet> hashMap) {
@ -326,7 +326,7 @@ public class KeyAttributes extends Key {
String next = it.next();
SplineSet splineSet = hashMap.get(next);
char c2 = 7;
if (next.startsWith("CUSTOM")) {
if (next.startsWith(Key.CUSTOM)) {
ConstraintAttribute constraintAttribute = this.mCustomConstraints.get(next.substring(7));
if (constraintAttribute != null) {
((SplineSet.CustomSet) splineSet).setPoint(this.mFramePosition, constraintAttribute);
@ -334,35 +334,35 @@ public class KeyAttributes extends Key {
} else {
switch (next.hashCode()) {
case -1249320806:
if (next.equals("rotationX")) {
if (next.equals(Key.ROTATION_X)) {
c2 = 0;
break;
}
c2 = 65535;
break;
case -1249320805:
if (next.equals("rotationY")) {
if (next.equals(Key.ROTATION_Y)) {
c2 = 1;
break;
}
c2 = 65535;
break;
case -1225497657:
if (next.equals("translationX")) {
if (next.equals(Key.TRANSLATION_X)) {
c2 = 2;
break;
}
c2 = 65535;
break;
case -1225497656:
if (next.equals("translationY")) {
if (next.equals(Key.TRANSLATION_Y)) {
c2 = 3;
break;
}
c2 = 65535;
break;
case -1225497655:
if (next.equals("translationZ")) {
if (next.equals(Key.TRANSLATION_Z)) {
c2 = 4;
break;
}
@ -376,7 +376,7 @@ public class KeyAttributes extends Key {
c2 = 65535;
break;
case -908189618:
if (next.equals("scaleX")) {
if (next.equals(Key.SCALE_X)) {
c2 = 6;
break;
}
@ -385,42 +385,42 @@ public class KeyAttributes extends Key {
case -908189617:
break;
case -760884510:
if (next.equals("transformPivotX")) {
if (next.equals(Key.PIVOT_X)) {
c2 = '\b';
break;
}
c2 = 65535;
break;
case -760884509:
if (next.equals("transformPivotY")) {
if (next.equals(Key.PIVOT_Y)) {
c2 = '\t';
break;
}
c2 = 65535;
break;
case -40300674:
if (next.equals("rotation")) {
if (next.equals(Key.ROTATION)) {
c2 = '\n';
break;
}
c2 = 65535;
break;
case -4379043:
if (next.equals("elevation")) {
if (next.equals(Key.ELEVATION)) {
c2 = 11;
break;
}
c2 = 65535;
break;
case 37232917:
if (next.equals("transitionPathRotate")) {
if (next.equals(Key.TRANSITION_PATH_ROTATE)) {
c2 = '\f';
break;
}
c2 = 65535;
break;
case 92909918:
if (next.equals("alpha")) {
if (next.equals(Key.ALPHA)) {
c2 = '\r';
break;
}
@ -540,43 +540,43 @@ public class KeyAttributes extends Key {
@Override // androidx.constraintlayout.motion.widget.Key
public void getAttributeNames(HashSet<String> hashSet) {
if (!Float.isNaN(this.mAlpha)) {
hashSet.add("alpha");
hashSet.add(Key.ALPHA);
}
if (!Float.isNaN(this.mElevation)) {
hashSet.add("elevation");
hashSet.add(Key.ELEVATION);
}
if (!Float.isNaN(this.mRotation)) {
hashSet.add("rotation");
hashSet.add(Key.ROTATION);
}
if (!Float.isNaN(this.mRotationX)) {
hashSet.add("rotationX");
hashSet.add(Key.ROTATION_X);
}
if (!Float.isNaN(this.mRotationY)) {
hashSet.add("rotationY");
hashSet.add(Key.ROTATION_Y);
}
if (!Float.isNaN(this.mPivotX)) {
hashSet.add("transformPivotX");
hashSet.add(Key.PIVOT_X);
}
if (!Float.isNaN(this.mPivotY)) {
hashSet.add("transformPivotY");
hashSet.add(Key.PIVOT_Y);
}
if (!Float.isNaN(this.mTranslationX)) {
hashSet.add("translationX");
hashSet.add(Key.TRANSLATION_X);
}
if (!Float.isNaN(this.mTranslationY)) {
hashSet.add("translationY");
hashSet.add(Key.TRANSLATION_Y);
}
if (!Float.isNaN(this.mTranslationZ)) {
hashSet.add("translationZ");
hashSet.add(Key.TRANSLATION_Z);
}
if (!Float.isNaN(this.mTransitionPathRotate)) {
hashSet.add("transitionPathRotate");
hashSet.add(Key.TRANSITION_PATH_ROTATE);
}
if (!Float.isNaN(this.mScaleX)) {
hashSet.add("scaleX");
hashSet.add(Key.SCALE_X);
}
if (!Float.isNaN(this.mScaleY)) {
hashSet.add("scaleY");
hashSet.add(Key.SCALE_Y);
}
if (!Float.isNaN(this.mProgress)) {
hashSet.add("progress");
@ -602,43 +602,43 @@ public class KeyAttributes extends Key {
public void setInterpolation(HashMap<String, Integer> hashMap) {
if (this.mCurveFit != -1) {
if (!Float.isNaN(this.mAlpha)) {
hashMap.put("alpha", Integer.valueOf(this.mCurveFit));
hashMap.put(Key.ALPHA, Integer.valueOf(this.mCurveFit));
}
if (!Float.isNaN(this.mElevation)) {
hashMap.put("elevation", Integer.valueOf(this.mCurveFit));
hashMap.put(Key.ELEVATION, Integer.valueOf(this.mCurveFit));
}
if (!Float.isNaN(this.mRotation)) {
hashMap.put("rotation", Integer.valueOf(this.mCurveFit));
hashMap.put(Key.ROTATION, Integer.valueOf(this.mCurveFit));
}
if (!Float.isNaN(this.mRotationX)) {
hashMap.put("rotationX", Integer.valueOf(this.mCurveFit));
hashMap.put(Key.ROTATION_X, Integer.valueOf(this.mCurveFit));
}
if (!Float.isNaN(this.mRotationY)) {
hashMap.put("rotationY", Integer.valueOf(this.mCurveFit));
hashMap.put(Key.ROTATION_Y, Integer.valueOf(this.mCurveFit));
}
if (!Float.isNaN(this.mPivotX)) {
hashMap.put("transformPivotX", Integer.valueOf(this.mCurveFit));
hashMap.put(Key.PIVOT_X, Integer.valueOf(this.mCurveFit));
}
if (!Float.isNaN(this.mPivotY)) {
hashMap.put("transformPivotY", Integer.valueOf(this.mCurveFit));
hashMap.put(Key.PIVOT_Y, Integer.valueOf(this.mCurveFit));
}
if (!Float.isNaN(this.mTranslationX)) {
hashMap.put("translationX", Integer.valueOf(this.mCurveFit));
hashMap.put(Key.TRANSLATION_X, Integer.valueOf(this.mCurveFit));
}
if (!Float.isNaN(this.mTranslationY)) {
hashMap.put("translationY", Integer.valueOf(this.mCurveFit));
hashMap.put(Key.TRANSLATION_Y, Integer.valueOf(this.mCurveFit));
}
if (!Float.isNaN(this.mTranslationZ)) {
hashMap.put("translationZ", Integer.valueOf(this.mCurveFit));
hashMap.put(Key.TRANSLATION_Z, Integer.valueOf(this.mCurveFit));
}
if (!Float.isNaN(this.mTransitionPathRotate)) {
hashMap.put("transitionPathRotate", Integer.valueOf(this.mCurveFit));
hashMap.put(Key.TRANSITION_PATH_ROTATE, Integer.valueOf(this.mCurveFit));
}
if (!Float.isNaN(this.mScaleX)) {
hashMap.put("scaleX", Integer.valueOf(this.mCurveFit));
hashMap.put(Key.SCALE_X, Integer.valueOf(this.mCurveFit));
}
if (!Float.isNaN(this.mScaleY)) {
hashMap.put("scaleY", Integer.valueOf(this.mCurveFit));
hashMap.put(Key.SCALE_Y, Integer.valueOf(this.mCurveFit));
}
if (!Float.isNaN(this.mProgress)) {
hashMap.put("progress", Integer.valueOf(this.mCurveFit));
@ -669,25 +669,25 @@ public class KeyAttributes extends Key {
}
break;
case -1249320806:
if (str.equals("rotationX")) {
if (str.equals(Key.ROTATION_X)) {
c2 = 2;
break;
}
break;
case -1249320805:
if (str.equals("rotationY")) {
if (str.equals(Key.ROTATION_Y)) {
c2 = 3;
break;
}
break;
case -1225497657:
if (str.equals("translationX")) {
if (str.equals(Key.TRANSLATION_X)) {
c2 = 4;
break;
}
break;
case -1225497656:
if (str.equals("translationY")) {
if (str.equals(Key.TRANSLATION_Y)) {
c2 = 5;
break;
}
@ -705,37 +705,37 @@ public class KeyAttributes extends Key {
}
break;
case -908189618:
if (str.equals("scaleX")) {
if (str.equals(Key.SCALE_X)) {
c2 = '\b';
break;
}
break;
case -908189617:
if (str.equals("scaleY")) {
if (str.equals(Key.SCALE_Y)) {
c2 = '\t';
break;
}
break;
case -40300674:
if (str.equals("rotation")) {
if (str.equals(Key.ROTATION)) {
c2 = '\n';
break;
}
break;
case -4379043:
if (str.equals("elevation")) {
if (str.equals(Key.ELEVATION)) {
c2 = 11;
break;
}
break;
case 37232917:
if (str.equals("transitionPathRotate")) {
if (str.equals(Key.TRANSITION_PATH_ROTATE)) {
c2 = '\f';
break;
}
break;
case 92909918:
if (str.equals("alpha")) {
if (str.equals(Key.ALPHA)) {
c2 = '\r';
break;
}

View File

@ -352,7 +352,7 @@ public class KeyCycle extends Key {
public void addCycleValues(HashMap<String, KeyCycleOscillator> hashMap) {
for (String str : hashMap.keySet()) {
if (str.startsWith("CUSTOM")) {
if (str.startsWith(Key.CUSTOM)) {
ConstraintAttribute constraintAttribute = this.mCustomConstraints.get(str.substring(7));
if (constraintAttribute != null && constraintAttribute.getType() == ConstraintAttribute.AttributeType.FLOAT_TYPE) {
hashMap.get(str).setPoint(this.mFramePosition, this.mWaveShape, this.mWaveVariesBy, this.mWavePeriod, this.mWaveOffset, constraintAttribute.getValueToInterpolate(), constraintAttribute);
@ -379,31 +379,31 @@ public class KeyCycle extends Key {
char c2 = 65535;
switch (str.hashCode()) {
case -1249320806:
if (str.equals("rotationX")) {
if (str.equals(Key.ROTATION_X)) {
c2 = 0;
break;
}
break;
case -1249320805:
if (str.equals("rotationY")) {
if (str.equals(Key.ROTATION_Y)) {
c2 = 1;
break;
}
break;
case -1225497657:
if (str.equals("translationX")) {
if (str.equals(Key.TRANSLATION_X)) {
c2 = 2;
break;
}
break;
case -1225497656:
if (str.equals("translationY")) {
if (str.equals(Key.TRANSLATION_Y)) {
c2 = 3;
break;
}
break;
case -1225497655:
if (str.equals("translationZ")) {
if (str.equals(Key.TRANSLATION_Z)) {
c2 = 4;
break;
}
@ -415,43 +415,43 @@ public class KeyCycle extends Key {
}
break;
case -908189618:
if (str.equals("scaleX")) {
if (str.equals(Key.SCALE_X)) {
c2 = 6;
break;
}
break;
case -908189617:
if (str.equals("scaleY")) {
if (str.equals(Key.SCALE_Y)) {
c2 = 7;
break;
}
break;
case -40300674:
if (str.equals("rotation")) {
if (str.equals(Key.ROTATION)) {
c2 = '\b';
break;
}
break;
case -4379043:
if (str.equals("elevation")) {
if (str.equals(Key.ELEVATION)) {
c2 = '\t';
break;
}
break;
case 37232917:
if (str.equals("transitionPathRotate")) {
if (str.equals(Key.TRANSITION_PATH_ROTATE)) {
c2 = '\n';
break;
}
break;
case 92909918:
if (str.equals("alpha")) {
if (str.equals(Key.ALPHA)) {
c2 = 11;
break;
}
break;
case 156108012:
if (str.equals("waveOffset")) {
if (str.equals(Key.WAVE_OFFSET)) {
c2 = '\f';
break;
}
@ -507,37 +507,37 @@ public class KeyCycle extends Key {
@Override // androidx.constraintlayout.motion.widget.Key
public void getAttributeNames(HashSet<String> hashSet) {
if (!Float.isNaN(this.mAlpha)) {
hashSet.add("alpha");
hashSet.add(Key.ALPHA);
}
if (!Float.isNaN(this.mElevation)) {
hashSet.add("elevation");
hashSet.add(Key.ELEVATION);
}
if (!Float.isNaN(this.mRotation)) {
hashSet.add("rotation");
hashSet.add(Key.ROTATION);
}
if (!Float.isNaN(this.mRotationX)) {
hashSet.add("rotationX");
hashSet.add(Key.ROTATION_X);
}
if (!Float.isNaN(this.mRotationY)) {
hashSet.add("rotationY");
hashSet.add(Key.ROTATION_Y);
}
if (!Float.isNaN(this.mScaleX)) {
hashSet.add("scaleX");
hashSet.add(Key.SCALE_X);
}
if (!Float.isNaN(this.mScaleY)) {
hashSet.add("scaleY");
hashSet.add(Key.SCALE_Y);
}
if (!Float.isNaN(this.mTransitionPathRotate)) {
hashSet.add("transitionPathRotate");
hashSet.add(Key.TRANSITION_PATH_ROTATE);
}
if (!Float.isNaN(this.mTranslationX)) {
hashSet.add("translationX");
hashSet.add(Key.TRANSLATION_X);
}
if (!Float.isNaN(this.mTranslationY)) {
hashSet.add("translationY");
hashSet.add(Key.TRANSLATION_Y);
}
if (!Float.isNaN(this.mTranslationZ)) {
hashSet.add("translationZ");
hashSet.add(Key.TRANSLATION_Z);
}
if (this.mCustomConstraints.size() > 0) {
Iterator<String> it = this.mCustomConstraints.keySet().iterator();
@ -552,31 +552,31 @@ public class KeyCycle extends Key {
char c2 = 65535;
switch (str.hashCode()) {
case -1249320806:
if (str.equals("rotationX")) {
if (str.equals(Key.ROTATION_X)) {
c2 = 0;
break;
}
break;
case -1249320805:
if (str.equals("rotationY")) {
if (str.equals(Key.ROTATION_Y)) {
c2 = 1;
break;
}
break;
case -1225497657:
if (str.equals("translationX")) {
if (str.equals(Key.TRANSLATION_X)) {
c2 = 2;
break;
}
break;
case -1225497656:
if (str.equals("translationY")) {
if (str.equals(Key.TRANSLATION_Y)) {
c2 = 3;
break;
}
break;
case -1225497655:
if (str.equals("translationZ")) {
if (str.equals(Key.TRANSLATION_Z)) {
c2 = 4;
break;
}
@ -588,43 +588,43 @@ public class KeyCycle extends Key {
}
break;
case -908189618:
if (str.equals("scaleX")) {
if (str.equals(Key.SCALE_X)) {
c2 = 6;
break;
}
break;
case -908189617:
if (str.equals("scaleY")) {
if (str.equals(Key.SCALE_Y)) {
c2 = 7;
break;
}
break;
case -40300674:
if (str.equals("rotation")) {
if (str.equals(Key.ROTATION)) {
c2 = '\b';
break;
}
break;
case -4379043:
if (str.equals("elevation")) {
if (str.equals(Key.ELEVATION)) {
c2 = '\t';
break;
}
break;
case 37232917:
if (str.equals("transitionPathRotate")) {
if (str.equals(Key.TRANSITION_PATH_ROTATE)) {
c2 = '\n';
break;
}
break;
case 92909918:
if (str.equals("alpha")) {
if (str.equals(Key.ALPHA)) {
c2 = 11;
break;
}
break;
case 156108012:
if (str.equals("waveOffset")) {
if (str.equals(Key.WAVE_OFFSET)) {
c2 = '\f';
break;
}
@ -680,25 +680,25 @@ public class KeyCycle extends Key {
}
break;
case -1249320806:
if (str.equals("rotationX")) {
if (str.equals(Key.ROTATION_X)) {
c2 = 1;
break;
}
break;
case -1249320805:
if (str.equals("rotationY")) {
if (str.equals(Key.ROTATION_Y)) {
c2 = 2;
break;
}
break;
case -1225497657:
if (str.equals("translationX")) {
if (str.equals(Key.TRANSLATION_X)) {
c2 = 3;
break;
}
break;
case -1225497656:
if (str.equals("translationY")) {
if (str.equals(Key.TRANSLATION_Y)) {
c2 = 4;
break;
}
@ -710,49 +710,49 @@ public class KeyCycle extends Key {
}
break;
case -908189618:
if (str.equals("scaleX")) {
if (str.equals(Key.SCALE_X)) {
c2 = 6;
break;
}
break;
case -908189617:
if (str.equals("scaleY")) {
if (str.equals(Key.SCALE_Y)) {
c2 = 7;
break;
}
break;
case -40300674:
if (str.equals("rotation")) {
if (str.equals(Key.ROTATION)) {
c2 = '\b';
break;
}
break;
case -4379043:
if (str.equals("elevation")) {
if (str.equals(Key.ELEVATION)) {
c2 = '\t';
break;
}
break;
case 37232917:
if (str.equals("transitionPathRotate")) {
if (str.equals(Key.TRANSITION_PATH_ROTATE)) {
c2 = '\n';
break;
}
break;
case 92909918:
if (str.equals("alpha")) {
if (str.equals(Key.ALPHA)) {
c2 = 11;
break;
}
break;
case 156108012:
if (str.equals("waveOffset")) {
if (str.equals(Key.WAVE_OFFSET)) {
c2 = '\f';
break;
}
break;
case 184161818:
if (str.equals("wavePeriod")) {
if (str.equals(Key.WAVE_PERIOD)) {
c2 = '\r';
break;
}

View File

@ -7,6 +7,7 @@ import androidx.constraintlayout.motion.utils.CurveFit;
import androidx.constraintlayout.motion.utils.Oscillator;
import androidx.constraintlayout.widget.ConstraintAttribute;
import c.d.b.a.a;
import com.google.android.material.shadow.ShadowDrawableWrapper;
import java.lang.reflect.Array;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
@ -143,8 +144,8 @@ public abstract class KeyCycleOscillator {
float[] fArr = this.mValues;
this.mSplineValueCache = new double[(fArr.length + 1)];
this.mSplineSlopeCache = new double[(fArr.length + 1)];
if (this.mPosition[0] > 0.0d) {
this.mOscillator.addPoint(0.0d, this.mPeriod[0]);
if (this.mPosition[0] > ShadowDrawableWrapper.COS_45) {
this.mOscillator.addPoint(ShadowDrawableWrapper.COS_45, this.mPeriod[0]);
}
double[] dArr2 = this.mPosition;
int length2 = dArr2.length - 1;
@ -316,9 +317,9 @@ public abstract class KeyCycleOscillator {
try {
method.invoke(view, Float.valueOf(get(f)));
} catch (IllegalAccessException e) {
Log.e("KeyCycleOscillator", "unable to setProgress", e);
Log.e(KeyCycleOscillator.TAG, "unable to setProgress", e);
} catch (InvocationTargetException e2) {
Log.e("KeyCycleOscillator", "unable to setProgress", e2);
Log.e(KeyCycleOscillator.TAG, "unable to setProgress", e2);
}
}
}
@ -396,37 +397,37 @@ public abstract class KeyCycleOscillator {
}
public static KeyCycleOscillator makeSpline(String str) {
if (str.startsWith("CUSTOM")) {
if (str.startsWith(Key.CUSTOM)) {
return new CustomSet();
}
char c2 = 65535;
switch (str.hashCode()) {
case -1249320806:
if (str.equals("rotationX")) {
if (str.equals(Key.ROTATION_X)) {
c2 = 0;
break;
}
break;
case -1249320805:
if (str.equals("rotationY")) {
if (str.equals(Key.ROTATION_Y)) {
c2 = 1;
break;
}
break;
case -1225497657:
if (str.equals("translationX")) {
if (str.equals(Key.TRANSLATION_X)) {
c2 = 2;
break;
}
break;
case -1225497656:
if (str.equals("translationY")) {
if (str.equals(Key.TRANSLATION_Y)) {
c2 = 3;
break;
}
break;
case -1225497655:
if (str.equals("translationZ")) {
if (str.equals(Key.TRANSLATION_Z)) {
c2 = 4;
break;
}
@ -438,49 +439,49 @@ public abstract class KeyCycleOscillator {
}
break;
case -908189618:
if (str.equals("scaleX")) {
if (str.equals(Key.SCALE_X)) {
c2 = 6;
break;
}
break;
case -908189617:
if (str.equals("scaleY")) {
if (str.equals(Key.SCALE_Y)) {
c2 = 7;
break;
}
break;
case -797520672:
if (str.equals("waveVariesBy")) {
if (str.equals(Key.WAVE_VARIES_BY)) {
c2 = '\b';
break;
}
break;
case -40300674:
if (str.equals("rotation")) {
if (str.equals(Key.ROTATION)) {
c2 = '\t';
break;
}
break;
case -4379043:
if (str.equals("elevation")) {
if (str.equals(Key.ELEVATION)) {
c2 = '\n';
break;
}
break;
case 37232917:
if (str.equals("transitionPathRotate")) {
if (str.equals(Key.TRANSITION_PATH_ROTATE)) {
c2 = 11;
break;
}
break;
case 92909918:
if (str.equals("alpha")) {
if (str.equals(Key.ALPHA)) {
c2 = '\f';
break;
}
break;
case 156108012:
if (str.equals("waveOffset")) {
if (str.equals(Key.WAVE_OFFSET)) {
c2 = '\r';
break;
}

View File

@ -23,13 +23,13 @@ public class KeyFrames {
HashMap<String, Constructor<? extends Key>> hashMap = new HashMap<>();
sKeyMakers = hashMap;
try {
hashMap.put("KeyAttribute", KeyAttributes.class.getConstructor(new Class[0]));
sKeyMakers.put("KeyPosition", KeyPosition.class.getConstructor(new Class[0]));
sKeyMakers.put("KeyCycle", KeyCycle.class.getConstructor(new Class[0]));
sKeyMakers.put("KeyTimeCycle", KeyTimeCycle.class.getConstructor(new Class[0]));
sKeyMakers.put("KeyTrigger", KeyTrigger.class.getConstructor(new Class[0]));
hashMap.put(KeyAttributes.NAME, KeyAttributes.class.getConstructor(new Class[0]));
sKeyMakers.put(KeyPosition.NAME, KeyPosition.class.getConstructor(new Class[0]));
sKeyMakers.put(KeyCycle.NAME, KeyCycle.class.getConstructor(new Class[0]));
sKeyMakers.put(KeyTimeCycle.NAME, KeyTimeCycle.class.getConstructor(new Class[0]));
sKeyMakers.put(KeyTrigger.NAME, KeyTrigger.class.getConstructor(new Class[0]));
} catch (NoSuchMethodException e) {
Log.e("KeyFrames", "unable to load", e);
Log.e(TAG, "unable to load", e);
}
}
@ -55,7 +55,7 @@ public class KeyFrames {
} catch (Exception e3) {
key = key2;
e = e3;
Log.e("KeyFrames", "unable to create ", e);
Log.e(TAG, "unable to create ", e);
key2 = key;
eventType = xmlPullParser.next();
}

View File

@ -242,11 +242,11 @@ public class KeyPosition extends KeyPositionBase {
float centerX2 = rectF2.centerX() - centerX;
float centerY2 = rectF2.centerY() - centerY;
if (strArr[0] == null) {
strArr[0] = "percentX";
strArr[0] = PERCENT_X;
fArr[0] = (f - centerX) / centerX2;
strArr[1] = "percentY";
strArr[1] = PERCENT_Y;
fArr[1] = (f2 - centerY) / centerY2;
} else if ("percentX".equals(strArr[0])) {
} else if (PERCENT_X.equals(strArr[0])) {
fArr[0] = (f - centerX) / centerX2;
fArr[1] = (f2 - centerY) / centerY2;
} else {
@ -274,11 +274,11 @@ public class KeyPosition extends KeyPositionBase {
float f7 = ((f3 * f5) - (f6 * f4)) / hypot;
float f8 = ((f4 * f5) + (f3 * f6)) / hypot;
if (strArr[0] == null) {
strArr[0] = "percentX";
strArr[1] = "percentY";
strArr[0] = PERCENT_X;
strArr[1] = PERCENT_Y;
fArr[0] = f8;
fArr[1] = f7;
} else if ("percentX".equals(strArr[0])) {
} else if (PERCENT_X.equals(strArr[0])) {
fArr[0] = f8;
fArr[1] = f7;
}
@ -293,11 +293,11 @@ public class KeyPosition extends KeyPositionBase {
int width = viewGroup.getWidth();
int height = viewGroup.getHeight();
if (strArr[0] == null) {
strArr[0] = "percentX";
strArr[0] = PERCENT_X;
fArr[0] = f / ((float) width);
strArr[1] = "percentY";
strArr[1] = PERCENT_Y;
fArr[1] = f2 / ((float) height);
} else if ("percentX".equals(strArr[0])) {
} else if (PERCENT_X.equals(strArr[0])) {
fArr[0] = f / ((float) width);
fArr[1] = f2 / ((float) height);
} else {
@ -342,13 +342,13 @@ public class KeyPosition extends KeyPositionBase {
}
break;
case 428090547:
if (str.equals("percentX")) {
if (str.equals(PERCENT_X)) {
c2 = 5;
break;
}
break;
case 428090548:
if (str.equals("percentY")) {
if (str.equals(PERCENT_Y)) {
c2 = 6;
break;
}

View File

@ -336,7 +336,7 @@ public class KeyTimeCycle extends Key {
/* JADX INFO: Can't fix incorrect switch cases order, some code will duplicate */
/* JADX WARNING: Code restructure failed: missing block: B:24:0x0089, code lost:
if (r1.equals("scaleY") == false) goto L_0x004a;
if (r1.equals(androidx.constraintlayout.motion.widget.Key.SCALE_Y) == false) goto L_0x004a;
*/
public void addTimeValues(HashMap<String, TimeCycleSplineSet> hashMap) {
Iterator<String> it = hashMap.keySet().iterator();
@ -344,7 +344,7 @@ public class KeyTimeCycle extends Key {
String next = it.next();
TimeCycleSplineSet timeCycleSplineSet = hashMap.get(next);
char c2 = 7;
if (next.startsWith("CUSTOM")) {
if (next.startsWith(Key.CUSTOM)) {
ConstraintAttribute constraintAttribute = this.mCustomConstraints.get(next.substring(7));
if (constraintAttribute != null) {
((TimeCycleSplineSet.CustomSet) timeCycleSplineSet).setPoint(this.mFramePosition, constraintAttribute, this.mWavePeriod, this.mWaveShape, this.mWaveOffset);
@ -352,35 +352,35 @@ public class KeyTimeCycle extends Key {
} else {
switch (next.hashCode()) {
case -1249320806:
if (next.equals("rotationX")) {
if (next.equals(Key.ROTATION_X)) {
c2 = 0;
break;
}
c2 = 65535;
break;
case -1249320805:
if (next.equals("rotationY")) {
if (next.equals(Key.ROTATION_Y)) {
c2 = 1;
break;
}
c2 = 65535;
break;
case -1225497657:
if (next.equals("translationX")) {
if (next.equals(Key.TRANSLATION_X)) {
c2 = 2;
break;
}
c2 = 65535;
break;
case -1225497656:
if (next.equals("translationY")) {
if (next.equals(Key.TRANSLATION_Y)) {
c2 = 3;
break;
}
c2 = 65535;
break;
case -1225497655:
if (next.equals("translationZ")) {
if (next.equals(Key.TRANSLATION_Z)) {
c2 = 4;
break;
}
@ -394,7 +394,7 @@ public class KeyTimeCycle extends Key {
c2 = 65535;
break;
case -908189618:
if (next.equals("scaleX")) {
if (next.equals(Key.SCALE_X)) {
c2 = 6;
break;
}
@ -403,28 +403,28 @@ public class KeyTimeCycle extends Key {
case -908189617:
break;
case -40300674:
if (next.equals("rotation")) {
if (next.equals(Key.ROTATION)) {
c2 = '\b';
break;
}
c2 = 65535;
break;
case -4379043:
if (next.equals("elevation")) {
if (next.equals(Key.ELEVATION)) {
c2 = '\t';
break;
}
c2 = 65535;
break;
case 37232917:
if (next.equals("transitionPathRotate")) {
if (next.equals(Key.TRANSITION_PATH_ROTATE)) {
c2 = '\n';
break;
}
c2 = 65535;
break;
case 92909918:
if (next.equals("alpha")) {
if (next.equals(Key.ALPHA)) {
c2 = 11;
break;
}
@ -535,37 +535,37 @@ public class KeyTimeCycle extends Key {
@Override // androidx.constraintlayout.motion.widget.Key
public void getAttributeNames(HashSet<String> hashSet) {
if (!Float.isNaN(this.mAlpha)) {
hashSet.add("alpha");
hashSet.add(Key.ALPHA);
}
if (!Float.isNaN(this.mElevation)) {
hashSet.add("elevation");
hashSet.add(Key.ELEVATION);
}
if (!Float.isNaN(this.mRotation)) {
hashSet.add("rotation");
hashSet.add(Key.ROTATION);
}
if (!Float.isNaN(this.mRotationX)) {
hashSet.add("rotationX");
hashSet.add(Key.ROTATION_X);
}
if (!Float.isNaN(this.mRotationY)) {
hashSet.add("rotationY");
hashSet.add(Key.ROTATION_Y);
}
if (!Float.isNaN(this.mTranslationX)) {
hashSet.add("translationX");
hashSet.add(Key.TRANSLATION_X);
}
if (!Float.isNaN(this.mTranslationY)) {
hashSet.add("translationY");
hashSet.add(Key.TRANSLATION_Y);
}
if (!Float.isNaN(this.mTranslationZ)) {
hashSet.add("translationZ");
hashSet.add(Key.TRANSLATION_Z);
}
if (!Float.isNaN(this.mTransitionPathRotate)) {
hashSet.add("transitionPathRotate");
hashSet.add(Key.TRANSITION_PATH_ROTATE);
}
if (!Float.isNaN(this.mScaleX)) {
hashSet.add("scaleX");
hashSet.add(Key.SCALE_X);
}
if (!Float.isNaN(this.mScaleY)) {
hashSet.add("scaleY");
hashSet.add(Key.SCALE_Y);
}
if (!Float.isNaN(this.mProgress)) {
hashSet.add("progress");
@ -587,37 +587,37 @@ public class KeyTimeCycle extends Key {
public void setInterpolation(HashMap<String, Integer> hashMap) {
if (this.mCurveFit != -1) {
if (!Float.isNaN(this.mAlpha)) {
hashMap.put("alpha", Integer.valueOf(this.mCurveFit));
hashMap.put(Key.ALPHA, Integer.valueOf(this.mCurveFit));
}
if (!Float.isNaN(this.mElevation)) {
hashMap.put("elevation", Integer.valueOf(this.mCurveFit));
hashMap.put(Key.ELEVATION, Integer.valueOf(this.mCurveFit));
}
if (!Float.isNaN(this.mRotation)) {
hashMap.put("rotation", Integer.valueOf(this.mCurveFit));
hashMap.put(Key.ROTATION, Integer.valueOf(this.mCurveFit));
}
if (!Float.isNaN(this.mRotationX)) {
hashMap.put("rotationX", Integer.valueOf(this.mCurveFit));
hashMap.put(Key.ROTATION_X, Integer.valueOf(this.mCurveFit));
}
if (!Float.isNaN(this.mRotationY)) {
hashMap.put("rotationY", Integer.valueOf(this.mCurveFit));
hashMap.put(Key.ROTATION_Y, Integer.valueOf(this.mCurveFit));
}
if (!Float.isNaN(this.mTranslationX)) {
hashMap.put("translationX", Integer.valueOf(this.mCurveFit));
hashMap.put(Key.TRANSLATION_X, Integer.valueOf(this.mCurveFit));
}
if (!Float.isNaN(this.mTranslationY)) {
hashMap.put("translationY", Integer.valueOf(this.mCurveFit));
hashMap.put(Key.TRANSLATION_Y, Integer.valueOf(this.mCurveFit));
}
if (!Float.isNaN(this.mTranslationZ)) {
hashMap.put("translationZ", Integer.valueOf(this.mCurveFit));
hashMap.put(Key.TRANSLATION_Z, Integer.valueOf(this.mCurveFit));
}
if (!Float.isNaN(this.mTransitionPathRotate)) {
hashMap.put("transitionPathRotate", Integer.valueOf(this.mCurveFit));
hashMap.put(Key.TRANSITION_PATH_ROTATE, Integer.valueOf(this.mCurveFit));
}
if (!Float.isNaN(this.mScaleX)) {
hashMap.put("scaleX", Integer.valueOf(this.mCurveFit));
hashMap.put(Key.SCALE_X, Integer.valueOf(this.mCurveFit));
}
if (!Float.isNaN(this.mScaleX)) {
hashMap.put("scaleY", Integer.valueOf(this.mCurveFit));
hashMap.put(Key.SCALE_Y, Integer.valueOf(this.mCurveFit));
}
if (!Float.isNaN(this.mProgress)) {
hashMap.put("progress", Integer.valueOf(this.mCurveFit));
@ -642,25 +642,25 @@ public class KeyTimeCycle extends Key {
}
break;
case -1249320806:
if (str.equals("rotationX")) {
if (str.equals(Key.ROTATION_X)) {
c2 = 1;
break;
}
break;
case -1249320805:
if (str.equals("rotationY")) {
if (str.equals(Key.ROTATION_Y)) {
c2 = 2;
break;
}
break;
case -1225497657:
if (str.equals("translationX")) {
if (str.equals(Key.TRANSLATION_X)) {
c2 = 3;
break;
}
break;
case -1225497656:
if (str.equals("translationY")) {
if (str.equals(Key.TRANSLATION_Y)) {
c2 = 4;
break;
}
@ -672,37 +672,37 @@ public class KeyTimeCycle extends Key {
}
break;
case -908189618:
if (str.equals("scaleX")) {
if (str.equals(Key.SCALE_X)) {
c2 = 6;
break;
}
break;
case -908189617:
if (str.equals("scaleY")) {
if (str.equals(Key.SCALE_Y)) {
c2 = 7;
break;
}
break;
case -40300674:
if (str.equals("rotation")) {
if (str.equals(Key.ROTATION)) {
c2 = '\b';
break;
}
break;
case -4379043:
if (str.equals("elevation")) {
if (str.equals(Key.ELEVATION)) {
c2 = '\t';
break;
}
break;
case 37232917:
if (str.equals("transitionPathRotate")) {
if (str.equals(Key.TRANSITION_PATH_ROTATE)) {
c2 = '\n';
break;
}
break;
case 92909918:
if (str.equals("alpha")) {
if (str.equals(Key.ALPHA)) {
c2 = 11;
break;
}

View File

@ -7,6 +7,7 @@ import androidx.constraintlayout.motion.widget.SplineSet;
import androidx.constraintlayout.solver.widgets.ConstraintWidget;
import androidx.constraintlayout.widget.ConstraintAttribute;
import androidx.constraintlayout.widget.ConstraintSet;
import com.discord.models.domain.ModelAuditLogEntry;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashMap;
@ -15,7 +16,7 @@ public class MotionConstrainedPoint implements Comparable<MotionConstrainedPoint
public static final boolean DEBUG = false;
public static final int PERPENDICULAR = 1;
public static final String TAG = "MotionPaths";
public static String[] names = {"position", "x", "y", "width", "height", "pathRotate"};
public static String[] names = {ModelAuditLogEntry.CHANGE_KEY_POSITION, "x", "y", "width", "height", "pathRotate"};
private float alpha = 1.0f;
private boolean applyElevation = false;
public LinkedHashMap<String, ConstraintAttribute> attributes = new LinkedHashMap<>();
@ -60,31 +61,31 @@ public class MotionConstrainedPoint implements Comparable<MotionConstrainedPoint
char c2 = 65535;
switch (str.hashCode()) {
case -1249320806:
if (str.equals("rotationX")) {
if (str.equals(Key.ROTATION_X)) {
c2 = 0;
break;
}
break;
case -1249320805:
if (str.equals("rotationY")) {
if (str.equals(Key.ROTATION_Y)) {
c2 = 1;
break;
}
break;
case -1225497657:
if (str.equals("translationX")) {
if (str.equals(Key.TRANSLATION_X)) {
c2 = 2;
break;
}
break;
case -1225497656:
if (str.equals("translationY")) {
if (str.equals(Key.TRANSLATION_Y)) {
c2 = 3;
break;
}
break;
case -1225497655:
if (str.equals("translationZ")) {
if (str.equals(Key.TRANSLATION_Z)) {
c2 = 4;
break;
}
@ -96,49 +97,49 @@ public class MotionConstrainedPoint implements Comparable<MotionConstrainedPoint
}
break;
case -908189618:
if (str.equals("scaleX")) {
if (str.equals(Key.SCALE_X)) {
c2 = 6;
break;
}
break;
case -908189617:
if (str.equals("scaleY")) {
if (str.equals(Key.SCALE_Y)) {
c2 = 7;
break;
}
break;
case -760884510:
if (str.equals("transformPivotX")) {
if (str.equals(Key.PIVOT_X)) {
c2 = '\b';
break;
}
break;
case -760884509:
if (str.equals("transformPivotY")) {
if (str.equals(Key.PIVOT_Y)) {
c2 = '\t';
break;
}
break;
case -40300674:
if (str.equals("rotation")) {
if (str.equals(Key.ROTATION)) {
c2 = '\n';
break;
}
break;
case -4379043:
if (str.equals("elevation")) {
if (str.equals(Key.ELEVATION)) {
c2 = 11;
break;
}
break;
case 37232917:
if (str.equals("transitionPathRotate")) {
if (str.equals(Key.TRANSITION_PATH_ROTATE)) {
c2 = '\f';
break;
}
break;
case 92909918:
if (str.equals("alpha")) {
if (str.equals(Key.ALPHA)) {
c2 = '\r';
break;
}
@ -232,7 +233,7 @@ public class MotionConstrainedPoint implements Comparable<MotionConstrainedPoint
splineSet.setPoint(i, f);
break;
default:
if (str.startsWith("CUSTOM")) {
if (str.startsWith(Key.CUSTOM)) {
String str2 = str.split(",")[1];
if (this.attributes.containsKey(str2)) {
ConstraintAttribute constraintAttribute = this.attributes.get(str2);
@ -311,51 +312,51 @@ public class MotionConstrainedPoint implements Comparable<MotionConstrainedPoint
public void different(MotionConstrainedPoint motionConstrainedPoint, HashSet<String> hashSet) {
if (diff(this.alpha, motionConstrainedPoint.alpha)) {
hashSet.add("alpha");
hashSet.add(Key.ALPHA);
}
if (diff(this.elevation, motionConstrainedPoint.elevation)) {
hashSet.add("elevation");
hashSet.add(Key.ELEVATION);
}
int i = this.visibility;
int i2 = motionConstrainedPoint.visibility;
if (i != i2 && this.mVisibilityMode == 0 && (i == 0 || i2 == 0)) {
hashSet.add("alpha");
hashSet.add(Key.ALPHA);
}
if (diff(this.rotation, motionConstrainedPoint.rotation)) {
hashSet.add("rotation");
hashSet.add(Key.ROTATION);
}
if (!Float.isNaN(this.mPathRotate) || !Float.isNaN(motionConstrainedPoint.mPathRotate)) {
hashSet.add("transitionPathRotate");
hashSet.add(Key.TRANSITION_PATH_ROTATE);
}
if (!Float.isNaN(this.mProgress) || !Float.isNaN(motionConstrainedPoint.mProgress)) {
hashSet.add("progress");
}
if (diff(this.rotationX, motionConstrainedPoint.rotationX)) {
hashSet.add("rotationX");
hashSet.add(Key.ROTATION_X);
}
if (diff(this.rotationY, motionConstrainedPoint.rotationY)) {
hashSet.add("rotationY");
hashSet.add(Key.ROTATION_Y);
}
if (diff(this.mPivotX, motionConstrainedPoint.mPivotX)) {
hashSet.add("transformPivotX");
hashSet.add(Key.PIVOT_X);
}
if (diff(this.mPivotY, motionConstrainedPoint.mPivotY)) {
hashSet.add("transformPivotY");
hashSet.add(Key.PIVOT_Y);
}
if (diff(this.scaleX, motionConstrainedPoint.scaleX)) {
hashSet.add("scaleX");
hashSet.add(Key.SCALE_X);
}
if (diff(this.scaleY, motionConstrainedPoint.scaleY)) {
hashSet.add("scaleY");
hashSet.add(Key.SCALE_Y);
}
if (diff(this.translationX, motionConstrainedPoint.translationX)) {
hashSet.add("translationX");
hashSet.add(Key.TRANSLATION_X);
}
if (diff(this.translationY, motionConstrainedPoint.translationY)) {
hashSet.add("translationY");
hashSet.add(Key.TRANSLATION_Y);
}
if (diff(this.translationZ, motionConstrainedPoint.translationZ)) {
hashSet.add("translationZ");
hashSet.add(Key.TRANSLATION_Z);
}
}

View File

@ -12,10 +12,12 @@ import androidx.constraintlayout.motion.widget.KeyCycleOscillator;
import androidx.constraintlayout.motion.widget.SplineSet;
import androidx.constraintlayout.motion.widget.TimeCycleSplineSet;
import androidx.constraintlayout.solver.widgets.ConstraintWidget;
import androidx.constraintlayout.solver.widgets.analyzer.BasicMeasure;
import androidx.constraintlayout.widget.ConstraintAttribute;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.constraintlayout.widget.ConstraintSet;
import c.d.b.a.a;
import com.google.android.material.shadow.ShadowDrawableWrapper;
import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.Arrays;
@ -124,7 +126,7 @@ public class MotionController {
private float getPreCycleDistance() {
float[] fArr = new float[2];
float f = 1.0f / ((float) 99);
double d = 0.0d;
double d = ShadowDrawableWrapper.COS_45;
double d2 = 0.0d;
int i = 0;
float f2 = 0.0f;
@ -175,7 +177,7 @@ public class MotionController {
StringBuilder K = a.K(" KeyPath positon \"");
K.append(motionPaths.position);
K.append("\" outside of range");
Log.e("MotionController", K.toString());
Log.e(TAG, K.toString());
}
this.mMotionPaths.add((-binarySearch) - 1, motionPaths);
}
@ -196,19 +198,19 @@ public class MotionController {
float f = 1.0f / ((float) (i - 1));
HashMap<String, SplineSet> hashMap = this.mAttributesMap;
if (hashMap != null) {
hashMap.get("translationX");
hashMap.get(Key.TRANSLATION_X);
}
HashMap<String, SplineSet> hashMap2 = this.mAttributesMap;
if (hashMap2 != null) {
hashMap2.get("translationY");
hashMap2.get(Key.TRANSLATION_Y);
}
HashMap<String, KeyCycleOscillator> hashMap3 = this.mCycleMap;
if (hashMap3 != null) {
hashMap3.get("translationX");
hashMap3.get(Key.TRANSLATION_X);
}
HashMap<String, KeyCycleOscillator> hashMap4 = this.mCycleMap;
if (hashMap4 != null) {
hashMap4.get("translationY");
hashMap4.get(Key.TRANSLATION_Y);
}
for (int i2 = 0; i2 < i; i2++) {
float f2 = ((float) i2) * f;
@ -320,14 +322,14 @@ public class MotionController {
float f2 = 1.0f / ((float) (i2 - 1));
HashMap<String, SplineSet> hashMap = this.mAttributesMap;
KeyCycleOscillator keyCycleOscillator = null;
SplineSet splineSet2 = hashMap == null ? null : hashMap.get("translationX");
SplineSet splineSet2 = hashMap == null ? null : hashMap.get(Key.TRANSLATION_X);
HashMap<String, SplineSet> hashMap2 = this.mAttributesMap;
SplineSet splineSet3 = hashMap2 == null ? null : hashMap2.get("translationY");
SplineSet splineSet3 = hashMap2 == null ? null : hashMap2.get(Key.TRANSLATION_Y);
HashMap<String, KeyCycleOscillator> hashMap3 = this.mCycleMap;
KeyCycleOscillator keyCycleOscillator2 = hashMap3 == null ? null : hashMap3.get("translationX");
KeyCycleOscillator keyCycleOscillator2 = hashMap3 == null ? null : hashMap3.get(Key.TRANSLATION_X);
HashMap<String, KeyCycleOscillator> hashMap4 = this.mCycleMap;
if (hashMap4 != null) {
keyCycleOscillator = hashMap4.get("translationY");
keyCycleOscillator = hashMap4.get(Key.TRANSLATION_Y);
}
int i3 = 0;
while (i3 < i2) {
@ -630,26 +632,26 @@ public class MotionController {
float adjustedPosition = getAdjustedPosition(f, this.mVelocity);
HashMap<String, SplineSet> hashMap = this.mAttributesMap;
KeyCycleOscillator keyCycleOscillator = null;
SplineSet splineSet = hashMap == null ? null : hashMap.get("translationX");
SplineSet splineSet = hashMap == null ? null : hashMap.get(Key.TRANSLATION_X);
HashMap<String, SplineSet> hashMap2 = this.mAttributesMap;
SplineSet splineSet2 = hashMap2 == null ? null : hashMap2.get("translationY");
SplineSet splineSet2 = hashMap2 == null ? null : hashMap2.get(Key.TRANSLATION_Y);
HashMap<String, SplineSet> hashMap3 = this.mAttributesMap;
SplineSet splineSet3 = hashMap3 == null ? null : hashMap3.get("rotation");
SplineSet splineSet3 = hashMap3 == null ? null : hashMap3.get(Key.ROTATION);
HashMap<String, SplineSet> hashMap4 = this.mAttributesMap;
SplineSet splineSet4 = hashMap4 == null ? null : hashMap4.get("scaleX");
SplineSet splineSet4 = hashMap4 == null ? null : hashMap4.get(Key.SCALE_X);
HashMap<String, SplineSet> hashMap5 = this.mAttributesMap;
SplineSet splineSet5 = hashMap5 == null ? null : hashMap5.get("scaleY");
SplineSet splineSet5 = hashMap5 == null ? null : hashMap5.get(Key.SCALE_Y);
HashMap<String, KeyCycleOscillator> hashMap6 = this.mCycleMap;
KeyCycleOscillator keyCycleOscillator2 = hashMap6 == null ? null : hashMap6.get("translationX");
KeyCycleOscillator keyCycleOscillator2 = hashMap6 == null ? null : hashMap6.get(Key.TRANSLATION_X);
HashMap<String, KeyCycleOscillator> hashMap7 = this.mCycleMap;
KeyCycleOscillator keyCycleOscillator3 = hashMap7 == null ? null : hashMap7.get("translationY");
KeyCycleOscillator keyCycleOscillator3 = hashMap7 == null ? null : hashMap7.get(Key.TRANSLATION_Y);
HashMap<String, KeyCycleOscillator> hashMap8 = this.mCycleMap;
KeyCycleOscillator keyCycleOscillator4 = hashMap8 == null ? null : hashMap8.get("rotation");
KeyCycleOscillator keyCycleOscillator4 = hashMap8 == null ? null : hashMap8.get(Key.ROTATION);
HashMap<String, KeyCycleOscillator> hashMap9 = this.mCycleMap;
KeyCycleOscillator keyCycleOscillator5 = hashMap9 == null ? null : hashMap9.get("scaleX");
KeyCycleOscillator keyCycleOscillator5 = hashMap9 == null ? null : hashMap9.get(Key.SCALE_X);
HashMap<String, KeyCycleOscillator> hashMap10 = this.mCycleMap;
if (hashMap10 != null) {
keyCycleOscillator = hashMap10.get("scaleY");
keyCycleOscillator = hashMap10.get(Key.SCALE_Y);
}
VelocityMatrix velocityMatrix = new VelocityMatrix();
velocityMatrix.clear();
@ -840,7 +842,7 @@ public class MotionController {
int i6 = i5 - i3;
int i7 = a4 - i4;
if (!(f5 == f4 && f7 == f6)) {
view.measure(View.MeasureSpec.makeMeasureSpec(i6, 1073741824), View.MeasureSpec.makeMeasureSpec(i7, 1073741824));
view.measure(View.MeasureSpec.makeMeasureSpec(i6, BasicMeasure.EXACTLY), View.MeasureSpec.makeMeasureSpec(i7, BasicMeasure.EXACTLY));
}
view.layout(i3, i4, i5, a4);
}

View File

@ -39,8 +39,12 @@ import androidx.constraintlayout.widget.ConstraintSet;
import androidx.constraintlayout.widget.Constraints;
import androidx.constraintlayout.widget.R;
import androidx.constraintlayout.widget.StateSet;
import androidx.core.internal.view.SupportMenu;
import androidx.core.view.NestedScrollingParent3;
import androidx.core.view.ViewCompat;
import androidx.exifinterface.media.ExifInterface;
import c.d.b.a.a;
import com.google.android.material.shadow.ShadowDrawableWrapper;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
@ -397,7 +401,7 @@ public class MotionLayout extends ConstraintLayout implements NestedScrollingPar
canvas.translate(2.0f, 2.0f);
canvas.drawPath(this.mPath, this.mPaint);
canvas.translate(-2.0f, -2.0f);
this.mPaint.setColor(-65536);
this.mPaint.setColor(SupportMenu.CATEGORY_MASK);
canvas.drawPath(this.mPath, this.mPaint);
}
@ -557,14 +561,14 @@ public class MotionLayout extends ConstraintLayout implements NestedScrollingPar
StringBuilder O = a.O(str, " ");
O.append(Debug.getName((View) constraintWidgetContainer.getCompanionWidget()));
String sb = O.toString();
Log.v("MotionLayout", sb + " ========= " + constraintWidgetContainer);
Log.v(MotionLayout.TAG, sb + " ========= " + constraintWidgetContainer);
int size = constraintWidgetContainer.getChildren().size();
for (int i = 0; i < size; i++) {
String str2 = sb + "[" + i + "] ";
ConstraintWidget constraintWidget = constraintWidgetContainer.getChildren().get(i);
StringBuilder K = a.K("");
String str3 = "_";
K.append(constraintWidget.mTop.mTarget != null ? "T" : str3);
K.append(constraintWidget.mTop.mTarget != null ? ExifInterface.GPS_DIRECTION_TRUE : str3);
StringBuilder K2 = a.K(K.toString());
K2.append(constraintWidget.mBottom.mTarget != null ? "B" : str3);
StringBuilder K3 = a.K(K2.toString());
@ -583,9 +587,9 @@ public class MotionLayout extends ConstraintLayout implements NestedScrollingPar
O2.append(")");
name = O2.toString();
}
Log.v("MotionLayout", str2 + " " + name + " " + constraintWidget + " " + sb2);
Log.v(MotionLayout.TAG, str2 + " " + name + " " + constraintWidget + " " + sb2);
}
Log.v("MotionLayout", sb + " done. ");
Log.v(MotionLayout.TAG, sb + " done. ");
}
private void debugLayoutParam(String str, ConstraintLayout.LayoutParams layoutParams) {
@ -618,7 +622,7 @@ public class MotionLayout extends ConstraintLayout implements NestedScrollingPar
}
K12.append(str2);
String sb = K12.toString();
Log.v("MotionLayout", str + sb);
Log.v(MotionLayout.TAG, str + sb);
}
private void debugWidget(String str, ConstraintWidget constraintWidget) {
@ -629,8 +633,8 @@ public class MotionLayout extends ConstraintLayout implements NestedScrollingPar
String str5 = "B";
String str6 = "__";
if (constraintWidget.mTop.mTarget != null) {
StringBuilder K2 = a.K("T");
K2.append(constraintWidget.mTop.mTarget.mType == ConstraintAnchor.Type.TOP ? "T" : str5);
StringBuilder K2 = a.K(ExifInterface.GPS_DIRECTION_TRUE);
K2.append(constraintWidget.mTop.mTarget.mType == ConstraintAnchor.Type.TOP ? ExifInterface.GPS_DIRECTION_TRUE : str5);
str2 = K2.toString();
} else {
str2 = str6;
@ -640,7 +644,7 @@ public class MotionLayout extends ConstraintLayout implements NestedScrollingPar
if (constraintWidget.mBottom.mTarget != null) {
StringBuilder K4 = a.K(str5);
if (constraintWidget.mBottom.mTarget.mType == ConstraintAnchor.Type.TOP) {
str5 = "T";
str5 = ExifInterface.GPS_DIRECTION_TRUE;
}
K4.append(str5);
str3 = K4.toString();
@ -669,7 +673,7 @@ public class MotionLayout extends ConstraintLayout implements NestedScrollingPar
}
K7.append(str6);
String sb = K7.toString();
Log.v("MotionLayout", str + sb + " --- " + constraintWidget);
Log.v(MotionLayout.TAG, str + sb + " --- " + constraintWidget);
}
private void setupConstraintWidget(ConstraintWidgetContainer constraintWidgetContainer, ConstraintSet constraintSet) {
@ -731,7 +735,7 @@ public class MotionLayout extends ConstraintLayout implements NestedScrollingPar
if (widget != null) {
motionController.setStartState(widget, this.mStart);
} else if (MotionLayout.this.mDebugPath != 0) {
Log.e("MotionLayout", Debug.getLocation() + "no widget for " + Debug.getName(childAt2) + " (" + childAt2.getClass().getName() + ")");
Log.e(MotionLayout.TAG, Debug.getLocation() + "no widget for " + Debug.getName(childAt2) + " (" + childAt2.getClass().getName() + ")");
}
}
if (this.mEnd != null) {
@ -739,7 +743,7 @@ public class MotionLayout extends ConstraintLayout implements NestedScrollingPar
if (widget2 != null) {
motionController.setEndState(widget2, this.mEnd);
} else if (MotionLayout.this.mDebugPath != 0) {
Log.e("MotionLayout", Debug.getLocation() + "no widget for " + Debug.getName(childAt2) + " (" + childAt2.getClass().getName() + ")");
Log.e(MotionLayout.TAG, Debug.getLocation() + "no widget for " + Debug.getName(childAt2) + " (" + childAt2.getClass().getName() + ")");
}
}
}
@ -1208,7 +1212,7 @@ public class MotionLayout extends ConstraintLayout implements NestedScrollingPar
private void checkStructure() {
MotionScene motionScene = this.mScene;
if (motionScene == null) {
Log.e("MotionLayout", "CHECK: motion scene not set! set \"app:layoutDescription=\"@xml/file\"");
Log.e(TAG, "CHECK: motion scene not set! set \"app:layoutDescription=\"@xml/file\"");
return;
}
int startId = motionScene.getStartId();
@ -1220,7 +1224,7 @@ public class MotionLayout extends ConstraintLayout implements NestedScrollingPar
while (it.hasNext()) {
MotionScene.Transition next = it.next();
if (next == this.mScene.mCurrentTransition) {
Log.v("MotionLayout", "CHECK: CURRENT");
Log.v(TAG, "CHECK: CURRENT");
}
checkStructure(next);
int startConstraintSetId = next.getStartConstraintSetId();
@ -1228,18 +1232,18 @@ public class MotionLayout extends ConstraintLayout implements NestedScrollingPar
String name = Debug.getName(getContext(), startConstraintSetId);
String name2 = Debug.getName(getContext(), endConstraintSetId);
if (sparseIntArray.get(startConstraintSetId) == endConstraintSetId) {
Log.e("MotionLayout", "CHECK: two transitions with the same start and end " + name + "->" + name2);
Log.e(TAG, "CHECK: two transitions with the same start and end " + name + "->" + name2);
}
if (sparseIntArray2.get(endConstraintSetId) == startConstraintSetId) {
Log.e("MotionLayout", "CHECK: you can't have reverse transitions" + name + "->" + name2);
Log.e(TAG, "CHECK: you can't have reverse transitions" + name + "->" + name2);
}
sparseIntArray.put(startConstraintSetId, endConstraintSetId);
sparseIntArray2.put(endConstraintSetId, startConstraintSetId);
if (this.mScene.getConstraintSet(startConstraintSetId) == null) {
Log.e("MotionLayout", " no such constraintSetStart " + name);
Log.e(TAG, " no such constraintSetStart " + name);
}
if (this.mScene.getConstraintSet(endConstraintSetId) == null) {
Log.e("MotionLayout", " no such constraintSetEnd " + name);
Log.e(TAG, " no such constraintSetEnd " + name);
}
}
}
@ -1254,12 +1258,12 @@ public class MotionLayout extends ConstraintLayout implements NestedScrollingPar
StringBuilder P = a.P("CHECK: ", name, " ALL VIEWS SHOULD HAVE ID's ");
P.append(childAt.getClass().getName());
P.append(" does not!");
Log.w("MotionLayout", P.toString());
Log.w(TAG, P.toString());
}
if (constraintSet.getConstraint(id2) == null) {
StringBuilder P2 = a.P("CHECK: ", name, " NO CONSTRAINTS for ");
P2.append(Debug.getName(childAt));
Log.w("MotionLayout", P2.toString());
Log.w(TAG, P2.toString());
}
}
int[] knownIds = constraintSet.getKnownIds();
@ -1267,13 +1271,13 @@ public class MotionLayout extends ConstraintLayout implements NestedScrollingPar
int i4 = knownIds[i3];
String name2 = Debug.getName(getContext(), i4);
if (findViewById(knownIds[i3]) == null) {
Log.w("MotionLayout", "CHECK: " + name + " NO View matches id " + name2);
Log.w(TAG, "CHECK: " + name + " NO View matches id " + name2);
}
if (constraintSet.getHeight(i4) == -1) {
Log.w("MotionLayout", "CHECK: " + name + "(" + name2 + ") no LAYOUT_HEIGHT");
Log.w(TAG, "CHECK: " + name + "(" + name2 + ") no LAYOUT_HEIGHT");
}
if (constraintSet.getWidth(i4) == -1) {
Log.w("MotionLayout", "CHECK: " + name + "(" + name2 + ") no LAYOUT_HEIGHT");
Log.w(TAG, "CHECK: " + name + "(" + name2 + ") no LAYOUT_HEIGHT");
}
}
}
@ -1281,10 +1285,10 @@ public class MotionLayout extends ConstraintLayout implements NestedScrollingPar
private void checkStructure(MotionScene.Transition transition) {
StringBuilder K = a.K("CHECK: transition = ");
K.append(transition.debugString(getContext()));
Log.v("MotionLayout", K.toString());
Log.v("MotionLayout", "CHECK: transition.setDuration = " + transition.getDuration());
Log.v(TAG, K.toString());
Log.v(TAG, "CHECK: transition.setDuration = " + transition.getDuration());
if (transition.getStartConstraintSetId() == transition.getEndConstraintSetId()) {
Log.e("MotionLayout", "CHECK: start and end constraint set should not be the same!");
Log.e(TAG, "CHECK: start and end constraint set should not be the same!");
}
}
@ -1313,7 +1317,7 @@ public class MotionLayout extends ConstraintLayout implements NestedScrollingPar
K.append(childAt.getLeft());
K.append(" ");
K.append(childAt.getTop());
Log.v("MotionLayout", K.toString());
Log.v(TAG, K.toString());
}
}
@ -1452,7 +1456,7 @@ public class MotionLayout extends ConstraintLayout implements NestedScrollingPar
}
obtainStyledAttributes.recycle();
if (this.mScene == null) {
Log.e("MotionLayout", "WARNING NO app:layoutDescription tag");
Log.e(TAG, "WARNING NO app:layoutDescription tag");
}
if (!z2) {
this.mScene = null;
@ -1517,7 +1521,7 @@ public class MotionLayout extends ConstraintLayout implements NestedScrollingPar
}
float staggered = this.mScene.getStaggered();
if (staggered != 0.0f) {
boolean z3 = ((double) staggered) < 0.0d;
boolean z3 = ((double) staggered) < ShadowDrawableWrapper.COS_45;
float abs = Math.abs(staggered);
float f = -3.4028235E38f;
float f2 = Float.MAX_VALUE;
@ -1651,7 +1655,7 @@ public class MotionLayout extends ConstraintLayout implements NestedScrollingPar
int i = this.mCurrentState;
K.append(i == -1 ? "undefined" : Debug.getState(this, i));
String sb = K.toString();
paint.setColor(-16777216);
paint.setColor(ViewCompat.MEASURED_STATE_MASK);
canvas.drawText(sb, 11.0f, (float) (getHeight() - 29), paint);
paint.setColor(-7864184);
canvas.drawText(sb, 10.0f, (float) (getHeight() - 30), paint);
@ -1737,7 +1741,7 @@ public class MotionLayout extends ConstraintLayout implements NestedScrollingPar
if (interpolator2 instanceof MotionInterpolator) {
float velocity = ((MotionInterpolator) interpolator2).getVelocity();
this.mLastVelocity = velocity;
if (Math.abs(velocity) * this.mTransitionDuration <= 1.0E-5f) {
if (Math.abs(velocity) * this.mTransitionDuration <= EPSILON) {
this.mInTransition = false;
}
if (velocity > 0.0f && f2 >= 1.0f) {
@ -1762,7 +1766,7 @@ public class MotionLayout extends ConstraintLayout implements NestedScrollingPar
}
f4 = f2;
}
if (Math.abs(this.mLastVelocity) > 1.0E-5f) {
if (Math.abs(this.mLastVelocity) > EPSILON) {
setState(TransitionState.MOVING);
}
if ((i3 > 0 && f4 >= this.mTransitionGoalPosition) || (signum <= 0.0f && f4 <= this.mTransitionGoalPosition)) {
@ -1887,7 +1891,7 @@ public class MotionLayout extends ConstraintLayout implements NestedScrollingPar
this.lastY = y2;
return;
}
a.g0("WARNING could not find view id ", viewById == null ? a.j("", i) : viewById.getContext().getResources().getResourceName(i), "MotionLayout");
a.g0("WARNING could not find view id ", viewById == null ? a.j("", i) : viewById.getContext().getResources().getResourceName(i), TAG);
}
public ConstraintSet getConstraintSet(int i) {
@ -1988,9 +1992,9 @@ public class MotionLayout extends ConstraintLayout implements NestedScrollingPar
float f5 = this.mTransitionLastPosition;
if (this.mInterpolator != null) {
float signum = Math.signum(this.mTransitionGoalPosition - f5);
float interpolation = this.mInterpolator.getInterpolation(this.mTransitionLastPosition + 1.0E-5f);
float interpolation = this.mInterpolator.getInterpolation(this.mTransitionLastPosition + EPSILON);
float interpolation2 = this.mInterpolator.getInterpolation(this.mTransitionLastPosition);
f4 = (((interpolation - interpolation2) / 1.0E-5f) * signum) / this.mTransitionDuration;
f4 = (((interpolation - interpolation2) / EPSILON) * signum) / this.mTransitionDuration;
f3 = interpolation2;
} else {
f3 = f5;
@ -2350,7 +2354,7 @@ public class MotionLayout extends ConstraintLayout implements NestedScrollingPar
@Deprecated
public void rebuildMotion() {
Log.e("MotionLayout", "This method is deprecated. Please call rebuildScene() instead.");
Log.e(TAG, "This method is deprecated. Please call rebuildScene() instead.");
rebuildScene();
}
@ -2420,7 +2424,7 @@ public class MotionLayout extends ConstraintLayout implements NestedScrollingPar
public void setProgress(float f) {
int i = (f > 0.0f ? 1 : (f == 0.0f ? 0 : -1));
if (i < 0 || f > 1.0f) {
Log.w("MotionLayout", "Warning! Progress is defined for values between 0.0 and 1.0 inclusive");
Log.w(TAG, "Warning! Progress is defined for values between 0.0 and 1.0 inclusive");
}
if (!isAttachedToWindow()) {
if (this.mStateCache == null) {
@ -2545,7 +2549,7 @@ public class MotionLayout extends ConstraintLayout implements NestedScrollingPar
}
this.mTransitionLastPosition = f2;
if (Float.isNaN(f)) {
Log.v("MotionLayout", Debug.getLocation() + " transitionToStart ");
Log.v(TAG, Debug.getLocation() + " transitionToStart ");
transitionToStart();
return;
}
@ -2603,7 +2607,7 @@ public class MotionLayout extends ConstraintLayout implements NestedScrollingPar
public void setTransitionDuration(int i) {
MotionScene motionScene = this.mScene;
if (motionScene == null) {
Log.e("MotionLayout", "MotionScene not defined");
Log.e(TAG, "MotionScene not defined");
} else {
motionScene.setDuration(i);
}

View File

@ -3,8 +3,11 @@ package androidx.constraintlayout.motion.widget;
import android.view.View;
import androidx.annotation.NonNull;
import androidx.constraintlayout.motion.utils.Easing;
import androidx.constraintlayout.solver.widgets.analyzer.BasicMeasure;
import androidx.constraintlayout.widget.ConstraintAttribute;
import androidx.constraintlayout.widget.ConstraintSet;
import com.discord.models.domain.ModelAuditLogEntry;
import com.google.android.material.shadow.ShadowDrawableWrapper;
import java.util.Arrays;
import java.util.LinkedHashMap;
public class MotionPaths implements Comparable<MotionPaths> {
@ -20,7 +23,7 @@ public class MotionPaths implements Comparable<MotionPaths> {
public static final int PERPENDICULAR = 1;
public static final int SCREEN = 3;
public static final String TAG = "MotionPaths";
public static String[] names = {"position", "x", "y", "width", "height", "pathRotate"};
public static String[] names = {ModelAuditLogEntry.CHANGE_KEY_POSITION, "x", "y", "width", "height", "pathRotate"};
public LinkedHashMap<String, ConstraintAttribute> attributes;
public float height;
public int mDrawPath;
@ -398,8 +401,9 @@ public class MotionPaths implements Comparable<MotionPaths> {
if (i3 >= dArr4.length) {
break;
}
double d = 0.0d;
if (!Double.isNaN(dArr4[i3]) || !(dArr3 == null || dArr3[i3] == 0.0d)) {
boolean isNaN = Double.isNaN(dArr4[i3]);
double d = ShadowDrawableWrapper.COS_45;
if (!isNaN || !(dArr3 == null || dArr3[i3] == ShadowDrawableWrapper.COS_45)) {
if (dArr3 != null) {
d = dArr3[i3];
}
@ -450,7 +454,7 @@ public class MotionPaths implements Comparable<MotionPaths> {
int i8 = i6 - i4;
int i9 = i7 - i5;
if ((i8 == view.getMeasuredWidth() && i9 == view.getMeasuredHeight()) ? false : true) {
view.measure(View.MeasureSpec.makeMeasureSpec(i8, 1073741824), View.MeasureSpec.makeMeasureSpec(i9, 1073741824));
view.measure(View.MeasureSpec.makeMeasureSpec(i8, BasicMeasure.EXACTLY), View.MeasureSpec.makeMeasureSpec(i9, BasicMeasure.EXACTLY));
}
view.layout(i4, i5, i6, i7);
}

View File

@ -24,6 +24,9 @@ import androidx.constraintlayout.widget.ConstraintSet;
import androidx.constraintlayout.widget.R;
import androidx.constraintlayout.widget.StateSet;
import c.d.b.a.a;
import com.discord.models.domain.ModelAuditLogEntry;
import com.discord.widgets.chat.input.autocomplete.AutocompleteViewModel;
import com.google.android.material.shadow.ShadowDrawableWrapper;
import java.io.IOException;
import java.io.PrintStream;
import java.util.ArrayList;
@ -146,7 +149,7 @@ public class MotionScene {
if (motionLayout2 == null) {
StringBuilder K = a.K("OnClick could not find id ");
K.append(this.mTargetId);
Log.e("MotionScene", K.toString());
Log.e(MotionScene.TAG, K.toString());
return;
}
int access$100 = Transition.access$100(transition);
@ -241,7 +244,7 @@ public class MotionScene {
if (findViewById == null) {
StringBuilder K = a.K(" (*) could not find id ");
K.append(this.mTargetId);
Log.e("MotionScene", K.toString());
Log.e(MotionScene.TAG, K.toString());
return;
}
findViewById.setOnClickListener(null);
@ -387,7 +390,7 @@ public class MotionScene {
} else if (i2 == 3) {
String string = typedArray.getString(index);
this.mDefaultInterpolatorString = string;
if (string.indexOf("/") > 0) {
if (string.indexOf(AutocompleteViewModel.COMMAND_DISCOVER_TOKEN) > 0) {
this.mDefaultInterpolatorID = typedArray.getResourceId(index, -1);
this.mDefaultInterpolator = -2;
} else {
@ -543,8 +546,8 @@ public class MotionScene {
private int getId(Context context, String str) {
int i;
if (str.contains("/")) {
i = context.getResources().getIdentifier(str.substring(str.indexOf(47) + 1), "id", context.getPackageName());
if (str.contains(AutocompleteViewModel.COMMAND_DISCOVER_TOKEN)) {
i = context.getResources().getIdentifier(str.substring(str.indexOf(47) + 1), ModelAuditLogEntry.CHANGE_KEY_ID, context.getPackageName());
if (this.DEBUG_DESKTOP) {
PrintStream printStream = System.out;
printStream.println("id getMap res = " + i);
@ -558,7 +561,7 @@ public class MotionScene {
if (str.length() > 1) {
return Integer.parseInt(str.substring(1));
}
Log.e("MotionScene", "error in parsing id");
Log.e(TAG, "error in parsing id");
return i;
}
@ -654,7 +657,7 @@ public class MotionScene {
c2 = 65535;
break;
case 793277014:
if (name.equals("MotionScene")) {
if (name.equals(TAG)) {
c2 = 0;
break;
}
@ -699,7 +702,7 @@ public class MotionScene {
if (transition == null) {
String resourceEntryName = context.getResources().getResourceEntryName(i);
int lineNumber = xml.getLineNumber();
Log.v("MotionScene", " OnSwipe (" + resourceEntryName + ".xml:" + lineNumber + ")");
Log.v(TAG, " OnSwipe (" + resourceEntryName + ".xml:" + lineNumber + ")");
}
Transition.access$202(transition, new TouchResponse(context, this.mMotionLayout, xml));
continue;
@ -716,7 +719,7 @@ public class MotionScene {
Transition.access$1300(transition).add(new KeyFrames(context, xml));
continue;
default:
Log.v("MotionScene", "WARNING UNKNOWN ATTRIBUTE " + name);
Log.v(TAG, "WARNING UNKNOWN ATTRIBUTE " + name);
continue;
}
}
@ -748,7 +751,7 @@ public class MotionScene {
attributeName.hashCode();
if (attributeName.equals("deriveConstraintsFrom")) {
i2 = getId(context, attributeValue);
} else if (attributeName.equals("id")) {
} else if (attributeName.equals(ModelAuditLogEntry.CHANGE_KEY_ID)) {
i = getId(context, attributeValue);
this.mConstraintSetIdMap.put(stripID(attributeValue), Integer.valueOf(i));
}
@ -788,7 +791,7 @@ public class MotionScene {
if (constraintSet2 == null) {
StringBuilder K = a.K("ERROR! invalid deriveConstraintsFrom: @id/");
K.append(Debug.getName(this.mMotionLayout.getContext(), i2));
Log.e("MotionScene", K.toString());
Log.e(TAG, K.toString());
return;
}
constraintSet.readFallback(constraintSet2);
@ -967,7 +970,7 @@ public class MotionScene {
StringBuilder K2 = a.K("Warning could not find ConstraintSet id/");
K2.append(Debug.getName(this.mMotionLayout.getContext(), i));
K2.append(" In MotionScene");
Log.e("MotionScene", K2.toString());
Log.e(TAG, K2.toString());
SparseArray<ConstraintSet> sparseArray = this.mConstraintSetMap;
return sparseArray.get(sparseArray.keyAt(0));
}
@ -1265,7 +1268,7 @@ public class MotionScene {
} else if (action == 2 && !this.mIgnoreTouch) {
float rawY = motionEvent.getRawY() - this.mLastTouchY;
float rawX = motionEvent.getRawX() - this.mLastTouchX;
if ((((double) rawX) != 0.0d || ((double) rawY) != 0.0d) && (motionEvent2 = this.mLastTouchDown) != null) {
if ((((double) rawX) != ShadowDrawableWrapper.COS_45 || ((double) rawY) != ShadowDrawableWrapper.COS_45) && (motionEvent2 = this.mLastTouchDown) != null) {
Transition bestTransitionFor = bestTransitionFor(i, rawX, rawY, motionEvent2);
if (bestTransitionFor != null) {
motionLayout.setTransition(bestTransitionFor);
@ -1303,7 +1306,7 @@ public class MotionScene {
for (int i = 0; i < this.mConstraintSetMap.size(); i++) {
int keyAt = this.mConstraintSetMap.keyAt(i);
if (hasCycleDependency(keyAt)) {
Log.e("MotionScene", "Cannot be derived from yourself");
Log.e(TAG, "Cannot be derived from yourself");
return;
} else {
readConstraintChain(keyAt);

View File

@ -127,9 +127,9 @@ public abstract class SplineSet {
try {
method.invoke(view, Float.valueOf(get(f)));
} catch (IllegalAccessException e) {
Log.e("SplineSet", "unable to setProgress", e);
Log.e(SplineSet.TAG, "unable to setProgress", e);
} catch (InvocationTargetException e2) {
Log.e("SplineSet", "unable to setProgress", e2);
Log.e(SplineSet.TAG, "unable to setProgress", e2);
}
}
}
@ -253,31 +253,31 @@ public abstract class SplineSet {
char c2 = 65535;
switch (str.hashCode()) {
case -1249320806:
if (str.equals("rotationX")) {
if (str.equals(Key.ROTATION_X)) {
c2 = 0;
break;
}
break;
case -1249320805:
if (str.equals("rotationY")) {
if (str.equals(Key.ROTATION_Y)) {
c2 = 1;
break;
}
break;
case -1225497657:
if (str.equals("translationX")) {
if (str.equals(Key.TRANSLATION_X)) {
c2 = 2;
break;
}
break;
case -1225497656:
if (str.equals("translationY")) {
if (str.equals(Key.TRANSLATION_Y)) {
c2 = 3;
break;
}
break;
case -1225497655:
if (str.equals("translationZ")) {
if (str.equals(Key.TRANSLATION_Z)) {
c2 = 4;
break;
}
@ -289,61 +289,61 @@ public abstract class SplineSet {
}
break;
case -908189618:
if (str.equals("scaleX")) {
if (str.equals(Key.SCALE_X)) {
c2 = 6;
break;
}
break;
case -908189617:
if (str.equals("scaleY")) {
if (str.equals(Key.SCALE_Y)) {
c2 = 7;
break;
}
break;
case -797520672:
if (str.equals("waveVariesBy")) {
if (str.equals(Key.WAVE_VARIES_BY)) {
c2 = '\b';
break;
}
break;
case -760884510:
if (str.equals("transformPivotX")) {
if (str.equals(Key.PIVOT_X)) {
c2 = '\t';
break;
}
break;
case -760884509:
if (str.equals("transformPivotY")) {
if (str.equals(Key.PIVOT_Y)) {
c2 = '\n';
break;
}
break;
case -40300674:
if (str.equals("rotation")) {
if (str.equals(Key.ROTATION)) {
c2 = 11;
break;
}
break;
case -4379043:
if (str.equals("elevation")) {
if (str.equals(Key.ELEVATION)) {
c2 = '\f';
break;
}
break;
case 37232917:
if (str.equals("transitionPathRotate")) {
if (str.equals(Key.TRANSITION_PATH_ROTATE)) {
c2 = '\r';
break;
}
break;
case 92909918:
if (str.equals("alpha")) {
if (str.equals(Key.ALPHA)) {
c2 = 14;
break;
}
break;
case 156108012:
if (str.equals("waveOffset")) {
if (str.equals(Key.WAVE_OFFSET)) {
c2 = 15;
break;
}

View File

@ -6,6 +6,7 @@ import android.view.View;
import androidx.constraintlayout.motion.utils.CurveFit;
import androidx.constraintlayout.widget.ConstraintAttribute;
import c.d.b.a.a;
import com.google.android.material.shadow.ShadowDrawableWrapper;
import java.lang.reflect.Array;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
@ -85,7 +86,7 @@ public abstract class TimeCycleSplineSet {
}
boolean z2 = this.mContinue;
float[] fArr3 = this.mTempValues;
this.mContinue = z2 | (((double) fArr3[i]) != 0.0d);
this.mContinue = z2 | (((double) fArr3[i]) != ShadowDrawableWrapper.COS_45);
fArr2[i] = (fArr3[i] * calcWave) + f3;
i++;
}
@ -169,9 +170,9 @@ public abstract class TimeCycleSplineSet {
try {
method.invoke(view, Float.valueOf(get(f, j, view, keyCache)));
} catch (IllegalAccessException e) {
Log.e("SplineSet", "unable to setProgress", e);
Log.e(TimeCycleSplineSet.TAG, "unable to setProgress", e);
} catch (InvocationTargetException e2) {
Log.e("SplineSet", "unable to setProgress", e2);
Log.e(TimeCycleSplineSet.TAG, "unable to setProgress", e2);
}
}
}
@ -305,31 +306,31 @@ public abstract class TimeCycleSplineSet {
char c2 = 65535;
switch (str.hashCode()) {
case -1249320806:
if (str.equals("rotationX")) {
if (str.equals(Key.ROTATION_X)) {
c2 = 0;
break;
}
break;
case -1249320805:
if (str.equals("rotationY")) {
if (str.equals(Key.ROTATION_Y)) {
c2 = 1;
break;
}
break;
case -1225497657:
if (str.equals("translationX")) {
if (str.equals(Key.TRANSLATION_X)) {
c2 = 2;
break;
}
break;
case -1225497656:
if (str.equals("translationY")) {
if (str.equals(Key.TRANSLATION_Y)) {
c2 = 3;
break;
}
break;
case -1225497655:
if (str.equals("translationZ")) {
if (str.equals(Key.TRANSLATION_Z)) {
c2 = 4;
break;
}
@ -341,37 +342,37 @@ public abstract class TimeCycleSplineSet {
}
break;
case -908189618:
if (str.equals("scaleX")) {
if (str.equals(Key.SCALE_X)) {
c2 = 6;
break;
}
break;
case -908189617:
if (str.equals("scaleY")) {
if (str.equals(Key.SCALE_Y)) {
c2 = 7;
break;
}
break;
case -40300674:
if (str.equals("rotation")) {
if (str.equals(Key.ROTATION)) {
c2 = '\b';
break;
}
break;
case -4379043:
if (str.equals("elevation")) {
if (str.equals(Key.ELEVATION)) {
c2 = '\t';
break;
}
break;
case 37232917:
if (str.equals("transitionPathRotate")) {
if (str.equals(Key.TRANSITION_PATH_ROTATE)) {
c2 = '\n';
break;
}
break;
case 92909918:
if (str.equals("alpha")) {
if (str.equals(Key.ALPHA)) {
c2 = 11;
break;
}
@ -503,7 +504,7 @@ public abstract class TimeCycleSplineSet {
if (i2 == 0) {
StringBuilder K = a.K("Error no points added to ");
K.append(this.mType);
Log.e("SplineSet", K.toString());
Log.e(TAG, K.toString());
return;
}
Sort.doubleQuickSort(this.mTimePoints, this.mValues, 0, i2 - 1);

View File

@ -387,7 +387,7 @@ public class TouchResponse {
if (view == null) {
StringBuilder K = a.K("cannot find TouchAnchorId @id/");
K.append(Debug.getName(this.mMotionLayout.getContext(), this.mTouchAnchorId));
Log.e("TouchResponse", K.toString());
Log.e(TAG, K.toString());
}
} else {
view = null;

View File

@ -4,6 +4,7 @@ import androidx.constraintlayout.solver.SolverVariable;
import androidx.constraintlayout.solver.widgets.ConstraintAnchor;
import androidx.constraintlayout.solver.widgets.ConstraintWidget;
import c.d.b.a.a;
import com.discord.widgets.chat.input.autocomplete.AutocompleteViewModel;
import java.io.PrintStream;
import java.util.Arrays;
import java.util.HashMap;
@ -868,11 +869,11 @@ public class LinearSystem {
K.append(getDisplaySize(i3));
K.append(" rows: ");
K.append(this.mNumRows);
K.append("/");
K.append(AutocompleteViewModel.COMMAND_DISCOVER_TOKEN);
K.append(this.mMaxRows);
K.append(" cols: ");
K.append(this.mNumColumns);
K.append("/");
K.append(AutocompleteViewModel.COMMAND_DISCOVER_TOKEN);
K.append(this.mMaxColumns);
K.append(" ");
K.append(0);

View File

@ -1,5 +1,7 @@
package androidx.constraintlayout.solver;
import androidx.exifinterface.media.ExifInterface;
import c.a.r.n0.c.e;
import c.d.b.a.a;
import java.util.Arrays;
import java.util.HashSet;
@ -135,19 +137,19 @@ public class SolverVariable {
K3.append(i2);
return K3.toString();
} else if (ordinal == 2) {
StringBuilder K4 = a.K("S");
StringBuilder K4 = a.K(ExifInterface.LATITUDE_SOUTH);
int i3 = uniqueSlackId + 1;
uniqueSlackId = i3;
K4.append(i3);
return K4.toString();
} else if (ordinal == 3) {
StringBuilder K5 = a.K("e");
StringBuilder K5 = a.K(e.a);
int i4 = uniqueErrorId + 1;
uniqueErrorId = i4;
K5.append(i4);
return K5.toString();
} else if (ordinal == 4) {
StringBuilder K6 = a.K("V");
StringBuilder K6 = a.K(ExifInterface.GPS_MEASUREMENT_INTERRUPTED);
int i5 = uniqueId + 1;
uniqueId = i5;
K6.append(i5);

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