| Index: src/org/adblockplus/android/updater/UpdaterActivity.java |
| diff --git a/src/org/adblockplus/android/updater/UpdaterActivity.java b/src/org/adblockplus/android/updater/UpdaterActivity.java |
| index 7f6f02227923d86d2269764ba0ca92391e0eb661..0968e90b835ec2208adb14d47cd38e05d282ee6d 100644 |
| --- a/src/org/adblockplus/android/updater/UpdaterActivity.java |
| +++ b/src/org/adblockplus/android/updater/UpdaterActivity.java |
| @@ -37,64 +37,67 @@ import android.view.Window; |
| public class UpdaterActivity extends Activity |
| { |
| @Override |
| - public void onCreate(Bundle savedInstanceState) |
| + public void onCreate(final Bundle savedInstanceState) |
| { |
| super.onCreate(savedInstanceState); |
| - requestWindowFeature(Window.FEATURE_NO_TITLE); |
| + this.requestWindowFeature(Window.FEATURE_NO_TITLE); |
| // Prompt user to download update |
| - if ("download".equals(getIntent().getAction())) |
| + if ("download".equals(this.getIntent().getAction())) |
| { |
| - final Bundle extras = getIntent().getExtras(); |
| + final Bundle extras = this.getIntent().getExtras(); |
| if (extras == null || extras.getString("url") == null) |
| { |
| - finish(); |
| + this.finish(); |
| return; |
| } |
| - new AlertDialog.Builder(this).setTitle(R.string.msg_update_available).setMessage(getString(R.string.msg_update_description)).setIcon(android.R.drawable.ic_dialog_info) |
| - .setPositiveButton(R.string.ok, new OnClickListener() { |
| + new AlertDialog.Builder(this).setTitle(R.string.msg_update_available).setMessage(this.getString(R.string.msg_update_description)) |
| + .setIcon(android.R.drawable.ic_dialog_info) |
| + .setPositiveButton(R.string.ok, new OnClickListener() |
| + { |
| @Override |
| - public void onClick(DialogInterface arg0, int arg1) |
| + public void onClick(final DialogInterface arg0, final int arg1) |
| { |
| // Start download service |
| - startService(new Intent(UpdaterActivity.this, UpdaterService.class).putExtras(extras)); |
| - finish(); |
| + UpdaterActivity.this.startService(new Intent(UpdaterActivity.this, UpdaterService.class).putExtras(extras)); |
| + UpdaterActivity.this.finish(); |
| } |
| - }).setNegativeButton(R.string.cancel, new OnClickListener() { |
| + }).setNegativeButton(R.string.cancel, new OnClickListener() |
| + { |
| @Override |
| - public void onClick(DialogInterface dialog, int which) |
| + public void onClick(final DialogInterface dialog, final int which) |
| { |
| - finish(); |
| + UpdaterActivity.this.finish(); |
| } |
| - }).setOnCancelListener(new OnCancelListener() { |
| + }).setOnCancelListener(new OnCancelListener() |
| + { |
| @Override |
| - public void onCancel(DialogInterface dialog) |
| + public void onCancel(final DialogInterface dialog) |
| { |
| - finish(); |
| + UpdaterActivity.this.finish(); |
| } |
| }).create().show(); |
| } |
| // Install downloaded update |
| else |
| { |
| - String file = getIntent().getStringExtra("path"); |
| - File updateFile = new File(file); |
| + final String file = this.getIntent().getStringExtra("path"); |
| + final File updateFile = new File(file); |
| try |
| { |
| - Intent installerIntent = new Intent(); |
| + final Intent installerIntent = new Intent(); |
| installerIntent.setAction(Intent.ACTION_VIEW); |
| installerIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); |
| installerIntent.setDataAndType(Uri.fromFile(updateFile), "application/vnd.android.package-archive"); |
| - startActivity(installerIntent); |
| + this.startActivity(installerIntent); |
| android.os.Process.killProcess(android.os.Process.myPid()); |
| } |
| - catch (Exception e) |
| + catch (final Exception e) |
| { |
| e.printStackTrace(); |
| } |
| } |
| } |
| - |
| } |