0005-Bug-28051-Cast-the-layout-elements.patch 3.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. From f05130d2184702b5005ecabe5363225459f7df74 Mon Sep 17 00:00:00 2001
  2. From: Matthew Finkel <Matthew.Finkel@gmail.com>
  3. Date: Sat, 24 Nov 2018 04:44:03 +0000
  4. Subject: [PATCH 05/13] Bug 28051 - Cast the layout elements
  5. This is now required since we are using an older Android support library -
  6. 23.4.0 instead of 27.1.1. The exact reason for this is not known.
  7. ---
  8. .../torproject/android/ui/AppManagerActivity.java | 4 ++--
  9. .../android/ui/onboarding/BridgeWizardActivity.java | 12 ++++++------
  10. 2 files changed, 8 insertions(+), 8 deletions(-)
  11. diff --git a/app/src/main/java/org/torproject/android/ui/AppManagerActivity.java b/app/src/main/java/org/torproject/android/ui/AppManagerActivity.java
  12. index 2f60a40c..5bdcd504 100644
  13. --- a/app/src/main/java/org/torproject/android/ui/AppManagerActivity.java
  14. +++ b/app/src/main/java/org/torproject/android/ui/AppManagerActivity.java
  15. @@ -58,8 +58,8 @@ public class AppManagerActivity extends AppCompatActivity implements OnClickList
  16. this.setContentView(R.layout.layout_apps);
  17. setTitle(R.string.apps_mode);
  18. getSupportActionBar().setDisplayHomeAsUpEnabled(true);
  19. - listApps = findViewById(R.id.applistview);
  20. - progressBar = findViewById(R.id.progressBar);
  21. + listApps = (GridView) findViewById(R.id.applistview);
  22. + progressBar = (ProgressBar) findViewById(R.id.progressBar);
  23. }
  24. /*
  25. diff --git a/app/src/main/java/org/torproject/android/ui/onboarding/BridgeWizardActivity.java b/app/src/main/java/org/torproject/android/ui/onboarding/BridgeWizardActivity.java
  26. index e03a8d2d..e047e58f 100644
  27. --- a/app/src/main/java/org/torproject/android/ui/onboarding/BridgeWizardActivity.java
  28. +++ b/app/src/main/java/org/torproject/android/ui/onboarding/BridgeWizardActivity.java
  29. @@ -34,16 +34,16 @@ public class BridgeWizardActivity extends AppCompatActivity {
  30. protected void onCreate(Bundle savedInstanceState) {
  31. super.onCreate(savedInstanceState);
  32. setContentView(R.layout.activity_bridge_wizard);
  33. - Toolbar toolbar = findViewById(R.id.toolbar);
  34. + Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
  35. setSupportActionBar(toolbar);
  36. getSupportActionBar().setDisplayHomeAsUpEnabled(true);
  37. - tvStatus = findViewById(R.id.lbl_bridge_test_status);
  38. + tvStatus = (TextView) findViewById(R.id.lbl_bridge_test_status);
  39. tvStatus.setVisibility(View.GONE);
  40. setTitle(getString(R.string.bridges));
  41. - RadioButton btnDirect = findViewById(R.id.btnBridgesDirect);
  42. + RadioButton btnDirect = (RadioButton) findViewById(R.id.btnBridgesDirect);
  43. btnDirect.setOnClickListener(new View.OnClickListener() {
  44. @Override
  45. public void onClick(View v) {
  46. @@ -53,7 +53,7 @@ public class BridgeWizardActivity extends AppCompatActivity {
  47. }
  48. });
  49. - RadioButton btnObfs4 = findViewById(R.id.btnBridgesObfs4);
  50. + RadioButton btnObfs4 = (RadioButton) findViewById(R.id.btnBridgesObfs4);
  51. btnObfs4.setOnClickListener(new View.OnClickListener() {
  52. @Override
  53. public void onClick(View v) {
  54. @@ -64,7 +64,7 @@ public class BridgeWizardActivity extends AppCompatActivity {
  55. });
  56. - RadioButton btnMeek = findViewById(R.id.btnBridgesMeek);
  57. + RadioButton btnMeek = (RadioButton) findViewById(R.id.btnBridgesMeek);
  58. btnMeek.setOnClickListener(new View.OnClickListener() {
  59. @Override
  60. public void onClick(View v) {
  61. @@ -75,7 +75,7 @@ public class BridgeWizardActivity extends AppCompatActivity {
  62. });
  63. - RadioButton btnNew = findViewById(R.id.btnBridgesNew);
  64. + RadioButton btnNew = (RadioButton) findViewById(R.id.btnBridgesNew);
  65. btnNew.setOnClickListener(new View.OnClickListener() {
  66. @Override
  67. public void onClick(View v) {
  68. --
  69. 2.17.1