fix missing generic type

This commit is contained in:
Mohamed Zenadi 2015-06-10 00:02:37 +02:00
parent 533d7babfc
commit c7dead6455

View file

@ -46,7 +46,7 @@ import java.util.ArrayList;
import java.util.HashSet; import java.util.HashSet;
import java.util.Set; import java.util.Set;
public class PgpHandler extends AppCompatActivity implements OpenPgpServiceConnection.OnBound{ public class PgpHandler extends AppCompatActivity implements OpenPgpServiceConnection.OnBound {
private OpenPgpServiceConnection mServiceConnection; private OpenPgpServiceConnection mServiceConnection;
@ -68,8 +68,6 @@ public class PgpHandler extends AppCompatActivity implements OpenPgpServiceConne
public static final String TAG = "Keychain"; public static final String TAG = "Keychain";
} }
private String filePath;
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
@ -83,7 +81,7 @@ public class PgpHandler extends AppCompatActivity implements OpenPgpServiceConne
// some persistance // some persistance
settings = PreferenceManager.getDefaultSharedPreferences(this); settings = PreferenceManager.getDefaultSharedPreferences(this);
String providerPackageName = settings.getString("openpgp_provider_list", ""); String providerPackageName = settings.getString("openpgp_provider_list", "");
keyIDs = settings.getStringSet("openpgp_key_ids_set", new HashSet<>()); keyIDs = settings.getStringSet("openpgp_key_ids_set", new HashSet<String>());
registered = false; registered = false;
@ -107,12 +105,12 @@ public class PgpHandler extends AppCompatActivity implements OpenPgpServiceConne
} }
@Override @Override
public void onStop(){ public void onStop() {
super.onStop(); super.onStop();
if (this.registered && this.mServiceConnection.isBound()) if (this.registered && this.mServiceConnection.isBound())
try { try {
this.mServiceConnection.unbindFromService(); this.mServiceConnection.unbindFromService();
} catch (Exception e){ } catch (Exception e) {
} }
} }
@ -152,8 +150,7 @@ public class PgpHandler extends AppCompatActivity implements OpenPgpServiceConne
showToast(this.getResources().getString(R.string.clipboard_beginning_toast_text) showToast(this.getResources().getString(R.string.clipboard_beginning_toast_text)
+ " " + Integer.parseInt(settings.getString("general_show_time", "45")) + " " + " " + Integer.parseInt(settings.getString("general_show_time", "45")) + " "
+ this.getResources().getString(R.string.clipboard_ending_toast_text)); + this.getResources().getString(R.string.clipboard_ending_toast_text));
} catch (NumberFormatException e) } catch (NumberFormatException e) {
{
showToast(this.getResources().getString(R.string.clipboard_beginning_toast_text) showToast(this.getResources().getString(R.string.clipboard_beginning_toast_text)
+ " 45 " + " 45 "
+ this.getResources().getString(R.string.clipboard_ending_toast_text)); + this.getResources().getString(R.string.clipboard_ending_toast_text));
@ -224,9 +221,9 @@ public class PgpHandler extends AppCompatActivity implements OpenPgpServiceConne
this.pb = (ProgressBar) findViewById(R.id.pbLoading); this.pb = (ProgressBar) findViewById(R.id.pbLoading);
// Make Show Time a user preference // Make Show Time a user preference
// kLeZ: Changed to match the default for pass // kLeZ: Changed to match the default for pass
SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(container.getContext()); SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(container.getContext());
int SHOW_TIME; int SHOW_TIME;
try { try {
SHOW_TIME = Integer.parseInt(settings.getString("general_show_time", "45")); SHOW_TIME = Integer.parseInt(settings.getString("general_show_time", "45"));
@ -238,10 +235,9 @@ public class PgpHandler extends AppCompatActivity implements OpenPgpServiceConne
@Override @Override
protected Boolean doInBackground(Void... params) { protected Boolean doInBackground(Void... params) {
while (this.pb.getProgress() < this.pb.getMax()) while (this.pb.getProgress() < this.pb.getMax()) {
{
SystemClock.sleep(1000); SystemClock.sleep(1000);
publishProgress(this.pb.getProgress() + 1); publishProgress(this.pb.getProgress() + 1);
} }
return true; return true;
} }
@ -434,6 +430,7 @@ public class PgpHandler extends AppCompatActivity implements OpenPgpServiceConne
/** /**
* Encrypts a password file * Encrypts a password file
*
* @param data * @param data
*/ */
public void encrypt(Intent data) { public void encrypt(Intent data) {