فهرست منبع

fix AndroidStudio warnings

tobiasKaminsky 8 سال پیش
والد
کامیت
707a51b05e
1فایلهای تغییر یافته به همراه5 افزوده شده و 3 حذف شده
  1. 5 3
      src/main/java/com/owncloud/android/ui/activity/LogHistoryActivity.java

+ 5 - 3
src/main/java/com/owncloud/android/ui/activity/LogHistoryActivity.java

@@ -1,4 +1,4 @@
-/**
+/*
  *   ownCloud Android client application
  *   ownCloud Android client application
  *
  *
  *   Copyright (C) 2015 ownCloud Inc.
  *   Copyright (C) 2015 ownCloud Inc.
@@ -76,7 +76,9 @@ public class LogHistoryActivity extends ToolbarActivity {
         setupToolbar();
         setupToolbar();
 
 
         setTitle(getText(R.string.actionbar_logger));
         setTitle(getText(R.string.actionbar_logger));
-        getSupportActionBar().setDisplayHomeAsUpEnabled(true);
+        if (getSupportActionBar() != null) {
+            getSupportActionBar().setDisplayHomeAsUpEnabled(true);
+        }
         Button deleteHistoryButton = (Button) findViewById(R.id.deleteLogHistoryButton);
         Button deleteHistoryButton = (Button) findViewById(R.id.deleteLogHistoryButton);
         Button sendHistoryButton = (Button) findViewById(R.id.sendLogHistoryButton);
         Button sendHistoryButton = (Button) findViewById(R.id.sendLogHistoryButton);
         TextView logTV = (TextView) findViewById(R.id.logTV);
         TextView logTV = (TextView) findViewById(R.id.logTV);
@@ -195,7 +197,7 @@ public class LogHistoryActivity extends ToolbarActivity {
     private class LoadingLogTask extends AsyncTask<String, Void, String> {
     private class LoadingLogTask extends AsyncTask<String, Void, String> {
         private final WeakReference<TextView> textViewReference;
         private final WeakReference<TextView> textViewReference;
 
 
-        public LoadingLogTask(TextView logTV){
+        LoadingLogTask(TextView logTV) {
             // Use of a WeakReference to ensure the TextView can be garbage collected
             // Use of a WeakReference to ensure the TextView can be garbage collected
             textViewReference  = new WeakReference<>(logTV);
             textViewReference  = new WeakReference<>(logTV);
         }
         }