Promandai Movies v1.0版本的 MD5 值为:f2221e4d815efd1a22bf82a42afa3663
以下内容为反编译后的 ProfileActivity.java 源代码,内容仅作参考
package com.nc.lofiz;
import android.content.Intent;
import android.graphics.Color;
import android.graphics.drawable.GradientDrawable;
import android.net.Uri;
import android.os.Bundle;
import android.util.SparseBooleanArray;
import android.util.TypedValue;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.ProgressBar;
import android.widget.TextView;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
import com.bumptech.glide.Glide;
import com.google.android.gms.tasks.Continuation;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.OnFailureListener;
import com.google.android.gms.tasks.OnSuccessListener;
import com.google.android.gms.tasks.Task;
import com.google.android.material.snackbar.Snackbar;
import com.google.firebase.FirebaseApp;
import com.google.firebase.auth.AuthResult;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.database.ChildEventListener;
import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.database.GenericTypeIndicator;
import com.google.firebase.storage.FileDownloadTask;
import com.google.firebase.storage.FirebaseStorage;
import com.google.firebase.storage.OnProgressListener;
import com.google.firebase.storage.StorageReference;
import com.google.firebase.storage.UploadTask;
import com.nc.lofiz.RequestNetwork;
import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Random;
import java.util.Timer;
import java.util.TimerTask;
public class ProfileActivity extends AppCompatActivity {
private OnCompleteListener<AuthResult> _auth_create_user_listener;
private OnCompleteListener<Void> _auth_reset_password_listener;
private OnCompleteListener<AuthResult> _auth_sign_in_listener;
private RequestNetwork.RequestListener _req_request_listener;
private OnSuccessListener _storage_delete_success_listener;
private OnProgressListener _storage_download_progress_listener;
private OnSuccessListener<FileDownloadTask.TaskSnapshot> _storage_download_success_listener;
private OnFailureListener _storage_failure_listener;
private OnProgressListener _storage_upload_progress_listener;
private OnCompleteListener<Uri> _storage_upload_success_listener;
private ChildEventListener _users_child_listener;
private TextView about_text;
private TextView admin;
private FirebaseAuth auth;
private OnCompleteListener<Void> auth_deleteUserListener;
private OnCompleteListener<Void> auth_emailVerificationSentListener;
private OnCompleteListener<AuthResult> auth_googleSignInListener;
private OnCompleteListener<AuthResult> auth_phoneAuthListener;
private OnCompleteListener<Void> auth_updateEmailListener;
private OnCompleteListener<Void> auth_updatePasswordListener;
private OnCompleteListener<Void> auth_updateProfileListener;
private Button button1;
private EditText edittext2;
private ImageView golden;
private ImageView image;
private ImageView imageview11;
private ImageView imageview14;
private ImageView imageview15;
private ImageView imageview16;
private ImageView imageview7;
private ImageView imageview8;
private LinearLayout linear1;
private LinearLayout linear10;
private LinearLayout linear11;
private LinearLayout linear19;
private LinearLayout linear2;
private LinearLayout linear20;
private LinearLayout linear21;
private LinearLayout linear22;
private LinearLayout linear23;
private LinearLayout linear24;
private LinearLayout linear25;
private LinearLayout linear27;
private LinearLayout linear28;
private LinearLayout linear29;
private LinearLayout linear6;
private LinearLayout linear9;
private LinearLayout linstat;
private TextView maintainer;
private TextView name;
private EditText name_chnage;
private ImageView owner;
private TextView owner_text;
private ProgressBar progressbar1;
private RequestNetwork req;
private LinearLayout searchbar;
private ImageView silver;
private TextView textview10;
private TextView textview11;
private TextView textview13;
private TextView textview7;
private TextView textview8;
private TimerTask timer;
private TextView txdown;
private TextView txlike;
private TextView txproj;
private ImageView vip;
public final int REQ_CD_FP = 101;
private Timer _timer = new Timer();
private FirebaseDatabase _firebase = FirebaseDatabase.getInstance();
private FirebaseStorage _firebase_storage = FirebaseStorage.getInstance();
private String uid = "";
private String profile = "";
private String profileName = "";
private double choose_profile = 0.0d;
private HashMap<String, Object> map = new HashMap<>();
private DatabaseReference users = this._firebase.getReference("users");
private StorageReference storage = this._firebase_storage.getReference("storage");
private Intent fp = new Intent("android.intent.action.GET_CONTENT");
private Intent i = new Intent();
@Override
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
setContentView(R.layout.profile);
initialize(bundle);
FirebaseApp.initializeApp(this);
if (ContextCompat.checkSelfPermission(this, "android.permission.READ_EXTERNAL_STORAGE") != -1 && ContextCompat.checkSelfPermission(this, "android.permission.WRITE_EXTERNAL_STORAGE") != -1) {
initializeLogic();
} else {
ActivityCompat.requestPermissions(this, new String[]{"android.permission.READ_EXTERNAL_STORAGE", "android.permission.WRITE_EXTERNAL_STORAGE"}, 1000);
}
}
@Override
public void onRequestPermissionsResult(int i, String[] strArr, int[] iArr) {
super.onRequestPermissionsResult(i, strArr, iArr);
if (i == 1000) {
initializeLogic();
}
}
private void initialize(Bundle bundle) {
this.linear1 = (LinearLayout) findViewById(R.id.linear1);
this.searchbar = (LinearLayout) findViewById(R.id.searchbar);
this.linear2 = (LinearLayout) findViewById(R.id.linear2);
this.linear22 = (LinearLayout) findViewById(R.id.linear22);
this.imageview16 = (ImageView) findViewById(R.id.imageview16);
this.imageview14 = (ImageView) findViewById(R.id.imageview14);
this.linear9 = (LinearLayout) findViewById(R.id.linear9);
this.linear10 = (LinearLayout) findViewById(R.id.linear10);
this.linear21 = (LinearLayout) findViewById(R.id.linear21);
this.admin = (TextView) findViewById(R.id.admin);
this.maintainer = (TextView) findViewById(R.id.maintainer);
this.linstat = (LinearLayout) findViewById(R.id.linstat);
this.edittext2 = (EditText) findViewById(R.id.edittext2);
this.button1 = (Button) findViewById(R.id.button1);
this.owner_text = (TextView) findViewById(R.id.owner_text);
this.linear23 = (LinearLayout) findViewById(R.id.linear23);
this.linear6 = (LinearLayout) findViewById(R.id.linear6);
this.linear11 = (LinearLayout) findViewById(R.id.linear11);
this.linear24 = (LinearLayout) findViewById(R.id.linear24);
this.image = (ImageView) findViewById(R.id.image);
this.imageview15 = (ImageView) findViewById(R.id.imageview15);
this.name_chnage = (EditText) findViewById(R.id.name_chnage);
this.linear25 = (LinearLayout) findViewById(R.id.linear25);
this.linear20 = (LinearLayout) findViewById(R.id.linear20);
this.name = (TextView) findViewById(R.id.name);
this.textview13 = (TextView) findViewById(R.id.textview13);
this.imageview7 = (ImageView) findViewById(R.id.imageview7);
this.imageview11 = (ImageView) findViewById(R.id.imageview11);
this.linear29 = (LinearLayout) findViewById(R.id.linear29);
this.owner = (ImageView) findViewById(R.id.owner);
this.vip = (ImageView) findViewById(R.id.vip);
this.silver = (ImageView) findViewById(R.id.silver);
this.golden = (ImageView) findViewById(R.id.golden);
this.textview11 = (TextView) findViewById(R.id.textview11);
this.progressbar1 = (ProgressBar) findViewById(R.id.progressbar1);
this.imageview8 = (ImageView) findViewById(R.id.imageview8);
this.about_text = (TextView) findViewById(R.id.about_text);
this.linear19 = (LinearLayout) findViewById(R.id.linear19);
this.linear27 = (LinearLayout) findViewById(R.id.linear27);
this.linear28 = (LinearLayout) findViewById(R.id.linear28);
this.textview7 = (TextView) findViewById(R.id.textview7);
this.txproj = (TextView) findViewById(R.id.txproj);
this.textview8 = (TextView) findViewById(R.id.textview8);
this.txlike = (TextView) findViewById(R.id.txlike);
this.textview10 = (TextView) findViewById(R.id.textview10);
this.txdown = (TextView) findViewById(R.id.txdown);
this.auth = FirebaseAuth.getInstance();
this.fp.setType("image/*");
this.fp.putExtra("android.intent.extra.ALLOW_MULTIPLE", true);
this.req = new RequestNetwork(this);
this.imageview16.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
ProfileActivity.this.edittext2.setVisibility(8);
ProfileActivity.this.button1.setVisibility(8);
ProfileActivity.this.image.setVisibility(0);
ProfileActivity.this.imageview15.setVisibility(8);
ProfileActivity.this.imageview14.setVisibility(0);
ProfileActivity.this.imageview16.setVisibility(8);
ProfileActivity.this.name_chnage.setVisibility(8);
ProfileActivity.this.linear25.setVisibility(0);
}
});
this.imageview14.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
ProfileActivity.this.edittext2.setVisibility(0);
ProfileActivity.this.button1.setVisibility(0);
ProfileActivity.this.image.setVisibility(8);
ProfileActivity.this.imageview15.setVisibility(0);
ProfileActivity.this.imageview16.setVisibility(0);
ProfileActivity.this.imageview14.setVisibility(8);
ProfileActivity.this.name_chnage.setVisibility(0);
ProfileActivity.this.linear25.setVisibility(8);
}
});
this.button1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (!ProfileActivity.this.edittext2.getText().toString().equals("") && !ProfileActivity.this.name_chnage.getText().toString().equals("") && !ProfileActivity.this.name_chnage.getText().toString().equals("BATCHMATE") && !ProfileActivity.this.name_chnage.getText().toString().equals(" ") && !ProfileActivity.this.name_chnage.getText().toString().equals("batchmate") && !ProfileActivity.this.name_chnage.getText().toString().equals("ADMIN") && !ProfileActivity.this.name_chnage.getText().toString().equals(".") && !ProfileActivity.this.name_chnage.getText().toString().equals("admin") && !ProfileActivity.this.name_chnage.getText().toString().equals("owner") && !ProfileActivity.this.name_chnage.getText().toString().equals("leader")) {
ProfileActivity.this.map = new HashMap();
ProfileActivity.this.map.put("about", ProfileActivity.this.edittext2.getText().toString());
ProfileActivity.this.map.put("name", ProfileActivity.this.name_chnage.getText().toString());
ProfileActivity.this.users.child(FirebaseAuth.getInstance().getCurrentUser().getUid()).updateChildren(ProfileActivity.this.map);
ProfileActivity.this.map.clear();
ProfileActivity.this.edittext2.setVisibility(8);
ProfileActivity.this.button1.setVisibility(8);
ProfileActivity.this.imageview16.setVisibility(8);
ProfileActivity.this.imageview14.setVisibility(0);
ProfileActivity.this.image.setVisibility(0);
ProfileActivity.this.imageview15.setVisibility(8);
ProfileActivity.this.linear25.setVisibility(0);
ProfileActivity.this.name_chnage.setVisibility(8);
}
}
});
this.imageview15.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
ProfileActivity.this.startActivityForResult(ProfileActivity.this.fp, 101);
}
});
this.imageview7.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
ProfileActivity.this._createSnackBar("Maintainers");
}
});
this.imageview11.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
ProfileActivity.this._createSnackBar("Admin");
}
});
this.owner.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
ProfileActivity.this._createSnackBar("Owner!");
}
});
this.vip.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
ProfileActivity.this._createSnackBar("Silver Membership");
}
});
this.silver.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
ProfileActivity.this._createSnackBar("Golden Membership");
}
});
this.golden.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
ProfileActivity.this._createSnackBar("Diamond Membership");
}
});
this._users_child_listener = new ChildEventListener() {
@Override
public void onChildAdded(DataSnapshot dataSnapshot, String str) {
GenericTypeIndicator<HashMap<String, Object>> genericTypeIndicator = new GenericTypeIndicator<HashMap<String, Object>>() {
};
String key = dataSnapshot.getKey();
HashMap hashMap = (HashMap) dataSnapshot.getValue(genericTypeIndicator);
ProfileActivity.this.uid = FirebaseAuth.getInstance().getCurrentUser().getUid();
if (key.equals(ProfileActivity.this.uid) && hashMap.containsKey("plan")) {
if (hashMap.get("plan").toString().equals("owner")) {
ProfileActivity.this.vip.setVisibility(8);
ProfileActivity.this.silver.setVisibility(8);
ProfileActivity.this.golden.setVisibility(8);
ProfileActivity.this.owner.setVisibility(0);
ProfileActivity.this.name.setTextColor(-7617718);
} else if (hashMap.get("plan").toString().equals("diamond")) {
ProfileActivity.this.vip.setVisibility(8);
ProfileActivity.this.silver.setVisibility(8);
ProfileActivity.this.golden.setVisibility(0);
ProfileActivity.this.owner.setVisibility(8);
ProfileActivity.this.name.setTextColor(-16121);
} else if (hashMap.get("plan").toString().equals("golden")) {
ProfileActivity.this.vip.setVisibility(8);
ProfileActivity.this.silver.setVisibility(0);
ProfileActivity.this.golden.setVisibility(8);
ProfileActivity.this.owner.setVisibility(8);
ProfileActivity.this.name.setTextColor(-43230);
} else if (hashMap.get("plan").toString().equals("silver")) {
ProfileActivity.this.vip.setVisibility(0);
ProfileActivity.this.silver.setVisibility(8);
ProfileActivity.this.golden.setVisibility(8);
ProfileActivity.this.owner.setVisibility(8);
ProfileActivity.this.name.setTextColor(-12627531);
} else if (hashMap.get("plan").toString().equals("free")) {
ProfileActivity.this.vip.setVisibility(8);
ProfileActivity.this.silver.setVisibility(8);
ProfileActivity.this.golden.setVisibility(8);
ProfileActivity.this.owner.setVisibility(8);
}
}
if (key.equals(ProfileActivity.this.uid) && hashMap.containsKey("avatar")) {
if (hashMap.containsKey("avatar")) {
Glide.with(ProfileActivity.this.getApplicationContext()).load(Uri.parse(hashMap.get("avatar").toString())).into(ProfileActivity.this.image);
} else {
ProfileActivity.this.image.setImageResource(R.drawable.default_image);
}
}
if (key.equals(ProfileActivity.this.uid) && hashMap.containsKey("name")) {
ProfileActivity.this.name.setText(hashMap.get("name").toString());
}
if (key.equals(ProfileActivity.this.uid) && hashMap.containsKey("name")) {
ProfileActivity.this.name_chnage.setText(hashMap.get("name").toString());
}
if (key.equals(ProfileActivity.this.uid) && hashMap.containsKey("about")) {
ProfileActivity.this.edittext2.setText(hashMap.get("about").toString());
}
if (key.equals(ProfileActivity.this.uid) && hashMap.containsKey("maintainer")) {
ProfileActivity.this.maintainer.setText(hashMap.get("maintainer").toString());
if (!ProfileActivity.this.maintainer.getText().toString().equals("true")) {
if (ProfileActivity.this.maintainer.getText().toString().equals("false")) {
ProfileActivity.this.imageview7.setVisibility(8);
}
} else {
ProfileActivity.this.imageview7.setVisibility(0);
ProfileActivity.this.name.setTextColor(-769226);
}
}
if (key.equals(ProfileActivity.this.uid) && hashMap.containsKey("admin")) {
ProfileActivity.this.admin.setText(hashMap.get("admin").toString());
if (!ProfileActivity.this.admin.getText().toString().equals("true")) {
if (ProfileActivity.this.admin.getText().toString().equals("false")) {
ProfileActivity.this.imageview11.setVisibility(8);
}
} else {
ProfileActivity.this.imageview11.setVisibility(0);
ProfileActivity.this.name.setTextColor(-6543440);
}
}
if (key.equals(ProfileActivity.this.uid) && hashMap.containsKey("about")) {
ProfileActivity.this.about_text.setText(hashMap.get("about").toString());
}
}
@Override
public void onChildChanged(DataSnapshot dataSnapshot, String str) {
GenericTypeIndicator<HashMap<String, Object>> genericTypeIndicator = new GenericTypeIndicator<HashMap<String, Object>>() {
};
String key = dataSnapshot.getKey();
HashMap hashMap = (HashMap) dataSnapshot.getValue(genericTypeIndicator);
ProfileActivity.this.uid = FirebaseAuth.getInstance().getCurrentUser().getUid();
if (key.equals(ProfileActivity.this.uid) && hashMap.containsKey("plan")) {
if (hashMap.get("plan").toString().equals("owner")) {
ProfileActivity.this.vip.setVisibility(8);
ProfileActivity.this.silver.setVisibility(8);
ProfileActivity.this.golden.setVisibility(8);
ProfileActivity.this.owner.setVisibility(0);
ProfileActivity.this.name.setTextColor(-7617718);
} else if (hashMap.get("plan").toString().equals("diamond")) {
ProfileActivity.this.vip.setVisibility(8);
ProfileActivity.this.silver.setVisibility(8);
ProfileActivity.this.golden.setVisibility(0);
ProfileActivity.this.owner.setVisibility(8);
ProfileActivity.this.name.setTextColor(-16121);
} else if (hashMap.get("plan").toString().equals("golden")) {
ProfileActivity.this.vip.setVisibility(8);
ProfileActivity.this.silver.setVisibility(0);
ProfileActivity.this.golden.setVisibility(8);
ProfileActivity.this.owner.setVisibility(8);
ProfileActivity.this.name.setTextColor(-43230);
} else if (hashMap.get("plan").toString().equals("silver")) {
ProfileActivity.this.vip.setVisibility(0);
ProfileActivity.this.silver.setVisibility(8);
ProfileActivity.this.golden.setVisibility(8);
ProfileActivity.this.owner.setVisibility(8);
ProfileActivity.this.name.setTextColor(-12627531);
} else if (hashMap.get("plan").toString().equals("free")) {
ProfileActivity.this.vip.setVisibility(8);
ProfileActivity.this.silver.setVisibility(8);
ProfileActivity.this.golden.setVisibility(8);
ProfileActivity.this.owner.setVisibility(8);
}
}
if (key.equals(ProfileActivity.this.uid) && hashMap.containsKey("avatar")) {
if (hashMap.containsKey("avatar")) {
Glide.with(ProfileActivity.this.getApplicationContext()).load(Uri.parse(hashMap.get("avatar").toString())).into(ProfileActivity.this.image);
} else {
ProfileActivity.this.image.setImageResource(R.drawable.default_image);
}
}
if (key.equals(ProfileActivity.this.uid) && hashMap.containsKey("name")) {
ProfileActivity.this.name.setText(hashMap.get("name").toString());
}
if (key.equals(ProfileActivity.this.uid) && hashMap.containsKey("name")) {
ProfileActivity.this.name_chnage.setText(hashMap.get("name").toString());
}
if (key.equals(ProfileActivity.this.uid) && hashMap.containsKey("about")) {
ProfileActivity.this.edittext2.setText(hashMap.get("about").toString());
}
if (key.equals(ProfileActivity.this.uid) && hashMap.containsKey("maintainer")) {
ProfileActivity.this.maintainer.setText(hashMap.get("maintainer").toString());
if (!ProfileActivity.this.maintainer.getText().toString().equals("true")) {
if (ProfileActivity.this.maintainer.getText().toString().equals("false")) {
ProfileActivity.this.imageview7.setVisibility(8);
}
} else {
ProfileActivity.this.imageview7.setVisibility(0);
ProfileActivity.this.name.setTextColor(-769226);
}
}
if (key.equals(ProfileActivity.this.uid) && hashMap.containsKey("admin")) {
ProfileActivity.this.admin.setText(hashMap.get("admin").toString());
if (!ProfileActivity.this.admin.getText().toString().equals("true")) {
if (ProfileActivity.this.admin.getText().toString().equals("false")) {
ProfileActivity.this.imageview11.setVisibility(8);
}
} else {
ProfileActivity.this.imageview11.setVisibility(0);
ProfileActivity.this.name.setTextColor(-6543440);
}
}
if (key.equals(ProfileActivity.this.uid) && hashMap.containsKey("about")) {
ProfileActivity.this.about_text.setText(hashMap.get("about").toString());
}
}
@Override
public void onChildMoved(DataSnapshot dataSnapshot, String str) {
}
@Override
public void onChildRemoved(DataSnapshot dataSnapshot) {
GenericTypeIndicator<HashMap<String, Object>> genericTypeIndicator = new GenericTypeIndicator<HashMap<String, Object>>() {
};
dataSnapshot.getKey();
HashMap hashMap = (HashMap) dataSnapshot.getValue(genericTypeIndicator);
}
@Override
public void onCancelled(DatabaseError databaseError) {
databaseError.getCode();
databaseError.getMessage();
}
};
this.users.addChildEventListener(this._users_child_listener);
this._storage_upload_progress_listener = new AnonymousClass12();
this._storage_download_progress_listener = new OnProgressListener<FileDownloadTask.TaskSnapshot>() {
@Override
public void onProgress(FileDownloadTask.TaskSnapshot taskSnapshot) {
taskSnapshot.getBytesTransferred();
taskSnapshot.getTotalByteCount();
}
};
this._storage_upload_success_listener = new OnCompleteListener<Uri>() {
@Override
public void onComplete(Task<Uri> task) {
String uri = task.getResult().toString();
ProfileActivity.this.imageview15.setVisibility(8);
ProfileActivity.this.image.setVisibility(0);
ProfileActivity.this.map = new HashMap();
ProfileActivity.this.map.put("avatar", uri);
ProfileActivity.this.users.child(FirebaseAuth.getInstance().getCurrentUser().getUid()).updateChildren(ProfileActivity.this.map);
ProfileActivity.this.map.clear();
ProfileActivity.this.linear6.setVisibility(8);
}
};
this._storage_download_success_listener = new OnSuccessListener<FileDownloadTask.TaskSnapshot>() {
@Override
public void onSuccess(FileDownloadTask.TaskSnapshot taskSnapshot) {
taskSnapshot.getTotalByteCount();
}
};
this._storage_delete_success_listener = new OnSuccessListener() {
@Override
public void onSuccess(Object obj) {
}
};
this._storage_failure_listener = new OnFailureListener() {
@Override
public void onFailure(Exception exc) {
exc.getMessage();
}
};
this._req_request_listener = new RequestNetwork.RequestListener() {
@Override
public void onResponse(String str, String str2, HashMap<String, Object> hashMap) {
}
@Override
public void onErrorResponse(String str, String str2) {
SketchwareUtil.showMessage(ProfileActivity.this.getApplicationContext(), "Check Internet Connection");
ProfileActivity.this.overridePendingTransition(17432576, 17432577);
ProfileActivity.this.i.setClass(ProfileActivity.this.getApplicationContext(), InternetActivity.class);
ProfileActivity.this.startActivity(ProfileActivity.this.i);
ProfileActivity.this.finish();
}
};
this.auth_updateEmailListener = new OnCompleteListener<Void>() {
@Override
public void onComplete(Task<Void> task) {
task.isSuccessful();
if (task.getException() != null) {
task.getException().getMessage();
}
}
};
this.auth_updatePasswordListener = new OnCompleteListener<Void>() {
@Override
public void onComplete(Task<Void> task) {
task.isSuccessful();
if (task.getException() != null) {
task.getException().getMessage();
}
}
};
this.auth_emailVerificationSentListener = new OnCompleteListener<Void>() {
@Override
public void onComplete(Task<Void> task) {
task.isSuccessful();
if (task.getException() != null) {
task.getException().getMessage();
}
}
};
this.auth_deleteUserListener = new OnCompleteListener<Void>() {
@Override
public void onComplete(Task<Void> task) {
task.isSuccessful();
if (task.getException() != null) {
task.getException().getMessage();
}
}
};
this.auth_phoneAuthListener = new OnCompleteListener<AuthResult>() {
@Override
public void onComplete(Task<AuthResult> task) {
task.isSuccessful();
if (task.getException() != null) {
task.getException().getMessage();
}
}
};
this.auth_updateProfileListener = new OnCompleteListener<Void>() {
@Override
public void onComplete(Task<Void> task) {
task.isSuccessful();
if (task.getException() != null) {
task.getException().getMessage();
}
}
};
this.auth_googleSignInListener = new OnCompleteListener<AuthResult>() {
@Override
public void onComplete(Task<AuthResult> task) {
task.isSuccessful();
if (task.getException() != null) {
task.getException().getMessage();
}
}
};
this._auth_create_user_listener = new OnCompleteListener<AuthResult>() {
@Override
public void onComplete(Task<AuthResult> task) {
task.isSuccessful();
if (task.getException() != null) {
task.getException().getMessage();
}
}
};
this._auth_sign_in_listener = new OnCompleteListener<AuthResult>() {
@Override
public void onComplete(Task<AuthResult> task) {
task.isSuccessful();
if (task.getException() != null) {
task.getException().getMessage();
}
}
};
this._auth_reset_password_listener = new OnCompleteListener<Void>() {
@Override
public void onComplete(Task<Void> task) {
task.isSuccessful();
}
};
}
public class AnonymousClass12 implements OnProgressListener<UploadTask.TaskSnapshot> {
AnonymousClass12() {
}
@Override
public void onProgress(UploadTask.TaskSnapshot taskSnapshot) {
double bytesTransferred = (100.0d * taskSnapshot.getBytesTransferred()) / taskSnapshot.getTotalByteCount();
ProfileActivity.this.linear6.setVisibility(0);
ProfileActivity.this.textview11.setText(String.valueOf((long) bytesTransferred).concat("%"));
ProfileActivity.this.progressbar1.setProgress((int) bytesTransferred);
ProfileActivity.this.timer = new TimerTask() {
@Override
public void run() {
ProfileActivity.this.runOnUiThread(new Runnable() {
@Override
public void run() {
ProfileActivity.this.imageview8.setRotation(ProfileActivity.this.imageview8.getRotation() + 45.0f);
}
});
}
};
ProfileActivity.this._timer.scheduleAtFixedRate(ProfileActivity.this.timer, 100L, 100L);
}
}
private void initializeLogic() {
this.req.startRequestNetwork("GET", "https://www.google.com/", "a", this._req_request_listener);
this.edittext2.setVisibility(8);
this.button1.setVisibility(8);
this.imageview15.setVisibility(8);
this.linear6.setVisibility(8);
this.imageview16.setVisibility(8);
this.name_chnage.setVisibility(8);
_Elevation(this.linear9, 7.0d);
_gd(this.linear9, 4.0d, "#FFFFFF");
_Elevation(this.linear10, 7.0d);
_gd(this.linear10, 4.0d, "#FFFFFF");
_Elevation(this.linear21, 7.0d);
_gd(this.linear21, 4.0d, "#FFFFFF");
_Elevation(this.linear23, 7.0d);
_gd(this.linear23, 4.0d, "#FFFFFF");
_Elevation(this.linear24, 7.0d);
_gd(this.linear24, 4.0d, "#FFFFFF");
_Elevation(this.linear11, 7.0d);
_gd(this.linear11, 4.0d, "#FFFFFF");
_Elevation(this.edittext2, 7.0d);
_gd(this.edittext2, 4.0d, "#FFFFFF");
_Elevation(this.name_chnage, 7.0d);
_gd(this.name_chnage, 4.0d, "#FFFFFF");
_Elevation(this.linear19, 7.0d);
_gd(this.linear19, 4.0d, "#FFFFFF");
_Elevation(this.linear27, 7.0d);
_gd(this.linear27, 4.0d, "#FFFFFF");
_Elevation(this.linear28, 7.0d);
_gd(this.linear28, 4.0d, "#FFFFFF");
_Elevation(this.searchbar, 7.0d);
_gd(this.searchbar, 4.0d, "#FFFFFF");
}
@Override
public void onActivityResult(int i, int i2, Intent intent) {
super.onActivityResult(i, i2, intent);
switch (i) {
case 101:
if (i2 == -1) {
ArrayList arrayList = new ArrayList();
if (intent != null) {
if (intent.getClipData() != null) {
for (int i3 = 0; i3 < intent.getClipData().getItemCount(); i3++) {
arrayList.add(FileUtil.convertUriToFilePath(getApplicationContext(), intent.getClipData().getItemAt(i3).getUri()));
}
} else {
arrayList.add(FileUtil.convertUriToFilePath(getApplicationContext(), intent.getData()));
}
}
this.profile = (String) arrayList.get(0);
this.profileName = Uri.parse(this.profile).getLastPathSegment();
FileUtil.resizeBitmapFileToCircle(this.profile, FileUtil.getExternalStorageDir().concat("/".concat("Android").concat("/".concat("data").concat("/".concat("com.ckmovie.con").concat("/".concat(".avatar".concat("/".concat(this.profileName))))))));
this.image.setImageBitmap(FileUtil.decodeSampleBitmapFromPath(FileUtil.getExternalStorageDir().concat("/".concat("Android").concat("/".concat("data").concat("/".concat("com.ckmovie.con").concat("/".concat(".avatar".concat("/".concat(this.profileName))))))), 1024, 1024));
this.choose_profile = 1.0d;
this.imageview15.setVisibility(8);
this.storage.child(this.profileName).putFile(Uri.fromFile(new File(this.profile))).addOnFailureListener(this._storage_failure_listener).addOnProgressListener(this._storage_upload_progress_listener).continueWithTask(new Continuation<UploadTask.TaskSnapshot, Task<Uri>>() {
@Override
public Task<Uri> then(Task<UploadTask.TaskSnapshot> task) throws Exception {
return ProfileActivity.this.storage.child(ProfileActivity.this.profileName).getDownloadUrl();
}
}).addOnCompleteListener(this._storage_upload_success_listener);
return;
}
return;
default:
return;
}
}
public void _Elevation(View view, double d) {
view.setElevation((int) d);
}
public void _gd(View view, double d, String str) {
GradientDrawable gradientDrawable = new GradientDrawable();
gradientDrawable.setColor(Color.parseColor(str));
gradientDrawable.setCornerRadius((int) d);
view.setBackground(gradientDrawable);
}
public void _createSnackBar(String str) {
Snackbar.make((ViewGroup) ((ViewGroup) findViewById(16908290)).getChildAt(0), str, 0).setAction("OK", new View.OnClickListener() {
@Override
public void onClick(View view) {
}
}).show();
}
@Deprecated
public void showMessage(String str) {
Toast.makeText(getApplicationContext(), str, 0).show();
}
@Deprecated
public int getLocationX(View view) {
int[] iArr = new int[2];
view.getLocationInWindow(iArr);
return iArr[0];
}
@Deprecated
public int getLocationY(View view) {
int[] iArr = new int[2];
view.getLocationInWindow(iArr);
return iArr[1];
}
@Deprecated
public int getRandom(int i, int i2) {
return new Random().nextInt((i2 - i) + 1) + i;
}
@Deprecated
public ArrayList<Double> getCheckedItemPositionsToArray(ListView listView) {
ArrayList<Double> arrayList = new ArrayList<>();
SparseBooleanArray checkedItemPositions = listView.getCheckedItemPositions();
for (int i = 0; i < checkedItemPositions.size(); i++) {
if (checkedItemPositions.valueAt(i)) {
arrayList.add(Double.valueOf(checkedItemPositions.keyAt(i)));
}
}
return arrayList;
}
@Deprecated
public float getDip(int i) {
return TypedValue.applyDimension(1, i, getResources().getDisplayMetrics());
}
@Deprecated
public int getDisplayWidthPixels() {
return getResources().getDisplayMetrics().widthPixels;
}
@Deprecated
public int getDisplayHeightPixels() {
return getResources().getDisplayMetrics().heightPixels;
}
}