Add Discord community version (64-bit only)

- Added realracing3-community.apk (71.57 MB)
- Removed 32-bit support (armeabi-v7a)
- Only includes arm64-v8a libraries
- Decompiled source code included
- Added README-community.md with analysis
This commit is contained in:
2026-02-18 15:48:36 -08:00
parent c19eb3d7ff
commit c080f0d97f
26930 changed files with 2529574 additions and 0 deletions

View File

@@ -0,0 +1,254 @@
package androidx.fragment.app;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.lifecycle.ViewModel;
import androidx.lifecycle.ViewModelProvider;
import androidx.lifecycle.ViewModelStore;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
/* loaded from: classes.dex */
final class FragmentManagerViewModel extends ViewModel {
private static final ViewModelProvider.Factory FACTORY = new ViewModelProvider.Factory() { // from class: androidx.fragment.app.FragmentManagerViewModel.1
@Override // androidx.lifecycle.ViewModelProvider.Factory
@NonNull
public <T extends ViewModel> T create(@NonNull Class<T> cls) {
return new FragmentManagerViewModel(true);
}
};
private static final String TAG = "FragmentManager";
private final boolean mStateAutomaticallySaved;
private final HashMap<String, Fragment> mRetainedFragments = new HashMap<>();
private final HashMap<String, FragmentManagerViewModel> mChildNonConfigs = new HashMap<>();
private final HashMap<String, ViewModelStore> mViewModelStores = new HashMap<>();
private boolean mHasBeenCleared = false;
private boolean mHasSavedSnapshot = false;
private boolean mIsStateSaved = false;
public boolean isCleared() {
return this.mHasBeenCleared;
}
public void setIsStateSaved(boolean z) {
this.mIsStateSaved = z;
}
@NonNull
public static FragmentManagerViewModel getInstance(ViewModelStore viewModelStore) {
return (FragmentManagerViewModel) new ViewModelProvider(viewModelStore, FACTORY).get(FragmentManagerViewModel.class);
}
public FragmentManagerViewModel(boolean z) {
this.mStateAutomaticallySaved = z;
}
@Override // androidx.lifecycle.ViewModel
public void onCleared() {
if (FragmentManager.isLoggingEnabled(3)) {
StringBuilder sb = new StringBuilder();
sb.append("onCleared called for ");
sb.append(this);
}
this.mHasBeenCleared = true;
}
public void addRetainedFragment(@NonNull Fragment fragment) {
if (this.mIsStateSaved) {
FragmentManager.isLoggingEnabled(2);
return;
}
if (this.mRetainedFragments.containsKey(fragment.mWho)) {
return;
}
this.mRetainedFragments.put(fragment.mWho, fragment);
if (FragmentManager.isLoggingEnabled(2)) {
StringBuilder sb = new StringBuilder();
sb.append("Updating retained Fragments: Added ");
sb.append(fragment);
}
}
@Nullable
public Fragment findRetainedFragmentByWho(String str) {
return this.mRetainedFragments.get(str);
}
@NonNull
public Collection<Fragment> getRetainedFragments() {
return new ArrayList(this.mRetainedFragments.values());
}
public boolean shouldDestroy(@NonNull Fragment fragment) {
if (this.mRetainedFragments.containsKey(fragment.mWho)) {
return this.mStateAutomaticallySaved ? this.mHasBeenCleared : !this.mHasSavedSnapshot;
}
return true;
}
public void removeRetainedFragment(@NonNull Fragment fragment) {
if (this.mIsStateSaved) {
FragmentManager.isLoggingEnabled(2);
} else {
if (this.mRetainedFragments.remove(fragment.mWho) == null || !FragmentManager.isLoggingEnabled(2)) {
return;
}
StringBuilder sb = new StringBuilder();
sb.append("Updating retained Fragments: Removed ");
sb.append(fragment);
}
}
@NonNull
public FragmentManagerViewModel getChildNonConfig(@NonNull Fragment fragment) {
FragmentManagerViewModel fragmentManagerViewModel = this.mChildNonConfigs.get(fragment.mWho);
if (fragmentManagerViewModel != null) {
return fragmentManagerViewModel;
}
FragmentManagerViewModel fragmentManagerViewModel2 = new FragmentManagerViewModel(this.mStateAutomaticallySaved);
this.mChildNonConfigs.put(fragment.mWho, fragmentManagerViewModel2);
return fragmentManagerViewModel2;
}
@NonNull
public ViewModelStore getViewModelStore(@NonNull Fragment fragment) {
ViewModelStore viewModelStore = this.mViewModelStores.get(fragment.mWho);
if (viewModelStore != null) {
return viewModelStore;
}
ViewModelStore viewModelStore2 = new ViewModelStore();
this.mViewModelStores.put(fragment.mWho, viewModelStore2);
return viewModelStore2;
}
public void clearNonConfigState(@NonNull Fragment fragment) {
if (FragmentManager.isLoggingEnabled(3)) {
StringBuilder sb = new StringBuilder();
sb.append("Clearing non-config state for ");
sb.append(fragment);
}
clearNonConfigStateInternal(fragment.mWho);
}
public void clearNonConfigState(@NonNull String str) {
if (FragmentManager.isLoggingEnabled(3)) {
StringBuilder sb = new StringBuilder();
sb.append("Clearing non-config state for saved state of Fragment ");
sb.append(str);
}
clearNonConfigStateInternal(str);
}
private void clearNonConfigStateInternal(@NonNull String str) {
FragmentManagerViewModel fragmentManagerViewModel = this.mChildNonConfigs.get(str);
if (fragmentManagerViewModel != null) {
fragmentManagerViewModel.onCleared();
this.mChildNonConfigs.remove(str);
}
ViewModelStore viewModelStore = this.mViewModelStores.get(str);
if (viewModelStore != null) {
viewModelStore.clear();
this.mViewModelStores.remove(str);
}
}
@Deprecated
public void restoreFromSnapshot(@Nullable FragmentManagerNonConfig fragmentManagerNonConfig) {
this.mRetainedFragments.clear();
this.mChildNonConfigs.clear();
this.mViewModelStores.clear();
if (fragmentManagerNonConfig != null) {
Collection<Fragment> fragments = fragmentManagerNonConfig.getFragments();
if (fragments != null) {
for (Fragment fragment : fragments) {
if (fragment != null) {
this.mRetainedFragments.put(fragment.mWho, fragment);
}
}
}
Map<String, FragmentManagerNonConfig> childNonConfigs = fragmentManagerNonConfig.getChildNonConfigs();
if (childNonConfigs != null) {
for (Map.Entry<String, FragmentManagerNonConfig> entry : childNonConfigs.entrySet()) {
FragmentManagerViewModel fragmentManagerViewModel = new FragmentManagerViewModel(this.mStateAutomaticallySaved);
fragmentManagerViewModel.restoreFromSnapshot(entry.getValue());
this.mChildNonConfigs.put(entry.getKey(), fragmentManagerViewModel);
}
}
Map<String, ViewModelStore> viewModelStores = fragmentManagerNonConfig.getViewModelStores();
if (viewModelStores != null) {
this.mViewModelStores.putAll(viewModelStores);
}
}
this.mHasSavedSnapshot = false;
}
@Nullable
@Deprecated
public FragmentManagerNonConfig getSnapshot() {
if (this.mRetainedFragments.isEmpty() && this.mChildNonConfigs.isEmpty() && this.mViewModelStores.isEmpty()) {
return null;
}
HashMap hashMap = new HashMap();
for (Map.Entry<String, FragmentManagerViewModel> entry : this.mChildNonConfigs.entrySet()) {
FragmentManagerNonConfig snapshot = entry.getValue().getSnapshot();
if (snapshot != null) {
hashMap.put(entry.getKey(), snapshot);
}
}
this.mHasSavedSnapshot = true;
if (this.mRetainedFragments.isEmpty() && hashMap.isEmpty() && this.mViewModelStores.isEmpty()) {
return null;
}
return new FragmentManagerNonConfig(new ArrayList(this.mRetainedFragments.values()), hashMap, new HashMap(this.mViewModelStores));
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null || FragmentManagerViewModel.class != obj.getClass()) {
return false;
}
FragmentManagerViewModel fragmentManagerViewModel = (FragmentManagerViewModel) obj;
return this.mRetainedFragments.equals(fragmentManagerViewModel.mRetainedFragments) && this.mChildNonConfigs.equals(fragmentManagerViewModel.mChildNonConfigs) && this.mViewModelStores.equals(fragmentManagerViewModel.mViewModelStores);
}
public int hashCode() {
return (((this.mRetainedFragments.hashCode() * 31) + this.mChildNonConfigs.hashCode()) * 31) + this.mViewModelStores.hashCode();
}
@NonNull
public String toString() {
StringBuilder sb = new StringBuilder("FragmentManagerViewModel{");
sb.append(Integer.toHexString(System.identityHashCode(this)));
sb.append("} Fragments (");
Iterator<Fragment> it = this.mRetainedFragments.values().iterator();
while (it.hasNext()) {
sb.append(it.next());
if (it.hasNext()) {
sb.append(", ");
}
}
sb.append(") Child Non Config (");
Iterator<String> it2 = this.mChildNonConfigs.keySet().iterator();
while (it2.hasNext()) {
sb.append(it2.next());
if (it2.hasNext()) {
sb.append(", ");
}
}
sb.append(") ViewModelStores (");
Iterator<String> it3 = this.mViewModelStores.keySet().iterator();
while (it3.hasNext()) {
sb.append(it3.next());
if (it3.hasNext()) {
sb.append(", ");
}
}
sb.append(')');
return sb.toString();
}
}