add stuffs
This commit is contained in:
parent
d8d7134c1e
commit
50180c78e1
|
@ -1,6 +1,7 @@
|
|||
package com.psmreborn.nopsmdrm;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
|
||||
|
@ -13,8 +14,11 @@ import eu.chainfire.libsuperuser.Shell;
|
|||
public class Helper {
|
||||
|
||||
private static Context ctx;
|
||||
public static SharedPreferences sharedPrefs;
|
||||
public static void setContext(Context context){
|
||||
|
||||
ctx = context;
|
||||
ctx.getSharedPreferences("settings", Context.MODE_PRIVATE);
|
||||
}
|
||||
public static boolean isNoPsmDrmAlreadyInstalled() {
|
||||
try {
|
||||
|
|
|
@ -13,7 +13,9 @@ import android.view.View;
|
|||
import com.psmreborn.nopsmdrm.pscertified.PlayStationCertified;
|
||||
import com.psmreborn.nopsmdrm.pscertified.PsCertificatesInstaller;
|
||||
|
||||
|
||||
public class MainActivity extends Activity {
|
||||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
MenuInflater inflater = getMenuInflater();
|
||||
|
@ -65,12 +67,7 @@ public class MainActivity extends Activity {
|
|||
(new PsCertificatesInstaller(MainActivity.this)).execute();
|
||||
}
|
||||
})
|
||||
.setNegativeButton("No", new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
(new NoPsmDrmInstaller(MainActivity.this)).execute();
|
||||
}
|
||||
}).show();
|
||||
.setNegativeButton("No", null).show();
|
||||
}
|
||||
else {
|
||||
(new NoPsmDrmInstaller(this)).execute();
|
||||
|
|
|
@ -137,9 +137,9 @@ public class NoPsmDrmInstaller extends AsyncTask<Void, Void, Void> {
|
|||
// then generate our own shared_prefs
|
||||
|
||||
// encrypt the actual strings, username, password, etc
|
||||
String emailAddress = stringEncryptor.encryptString("nopsmdrm@transrights.lgbt");
|
||||
String password = stringEncryptor.encryptString("password");
|
||||
String accountId = stringEncryptor.encryptString(String.valueOf(0x123456789ABCDEFL));
|
||||
String emailAddress = stringEncryptor.encryptString(Helper.sharedPrefs.getString("saveAccountEmail","nopsmdrm@transrights.lgbt"));
|
||||
String password = stringEncryptor.encryptString(Helper.sharedPrefs.getString("saveAccountPassword", "password"));
|
||||
String accountId = stringEncryptor.encryptString(String.valueOf(Helper.sharedPrefs.getLong("saveAccountId", 0x123456789ABCDEFL)));
|
||||
|
||||
// get the cache folder for our 'shared_prefs'
|
||||
String tmpPrefsFolder = ctx.getCacheDir().getAbsolutePath();
|
||||
|
|
Loading…
Reference in New Issue
Block a user