package me.calebjones.spacelaunchnow.ui.activity;


import android.content.Context;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.view.View;
import android.widget.Toast;

import com.mikepenz.aboutlibraries.Libs;
import com.mikepenz.aboutlibraries.LibsBuilder;
import com.mikepenz.aboutlibraries.LibsConfiguration;
import com.mikepenz.aboutlibraries.entity.Library;
import com.mikepenz.aboutlibraries.ui.LibsActivity;

import me.calebjones.spacelaunchnow.R;
import me.calebjones.spacelaunchnow.content.database.ListPreferences;
import me.calebjones.spacelaunchnow.utils.Utils;
import timber.log.Timber;

public class AboutActivity extends LibsActivity {
    @Override
    public void onCreate(Bundle savedInstanceState) {
        int m_theme;
        final Context context = this;

        ListPreferences sharedPreference = ListPreferences.getInstance(context);

        if (sharedPreference.getNightMode()) {
            m_theme = R.style.AboutLibrariesDark;
        } else {
            m_theme = R.style.AboutLibrariesLight;
        }


        LibsConfiguration.LibsListener libsListener = new LibsConfiguration.LibsListener() {
            @Override
            public void onIconClicked(View v) {
            }

            @Override
            public boolean onLibraryAuthorClicked(View v, Library library) {
                return false;
            }

            @Override
            public boolean onLibraryContentClicked(View v, Library library) {
                return false;
            }

            @Override
            public boolean onLibraryBottomClicked(View v, Library library) {
                return false;
            }

            @Override
            public boolean onExtraClicked(View v, Libs.SpecialButton specialButton) {
                if(specialButton.ordinal() == 1){
                    Intent intent = new Intent(getApplicationContext(), SupportActivity.class);
                    startActivity(intent);
                } else if (specialButton.ordinal() == 2) {
                    customTabCallback();
                }
                return false;
            }

            @Override
            public boolean onIconLongClicked(View v) {
                return false;
            }

            @Override
            public boolean onLibraryAuthorLongClicked(View v, Library library) {
                return false;
            }

            @Override
            public boolean onLibraryContentLongClicked(View v, Library library) {
                return false;
            }

            @Override
            public boolean onLibraryBottomLongClicked(View v, Library library) {
                return false;
            }
        };

        setIntent(new LibsBuilder()
                .withAutoDetect(true)
                .withLicenseShown(true)
                .withVersionShown(true)
                .withListener(libsListener)
                .withActivityTitle("About")
                .withActivityTheme(m_theme)
                .withAboutSpecial2("Support")
                .withAboutSpecial3("Change Log")
                .withFields(R.string.class.getFields())
                .intent(this));
        super.onCreate(savedInstanceState);
    }

    public void customTabCallback(){
        Utils.openCustomTab(this, getApplicationContext(), "https://github.com/caman9119/SpaceLaunchNow/releases");
    }
}

@@ -112,46 +112,8 @@
 nt;%0A
-import android.content.res.Resources;%0A
 impo
@@ -163,37 +163,8 @@
 iew;
-%0Aimport android.widget.Toast;
 %0A%0Aim
@@ -569,34 +569,8 @@
 ils;
-%0Aimport timber.log.Timber;
 %0A%0Apu
@@ -617,16 +617,17 @@
 ivity %7B%0A
+%0A
     @Ove
@@ -710,46 +710,8 @@
 eme;
-%0A        final Context context = this;
 %0A%0A  
@@ -783,15 +783,12 @@
 nce(
-context
+this
 );%0A%0A
@@ -1757,124 +1757,25 @@
     
-Intent intent = new Intent(getApplicationContext(), SupportActivity.class);%0A                    startActivity(intent
+specialButtonOne(
 );%0A 
@@ -2979,16 +2979,40 @@
 ent(this
+.getApplicationContext()
 ));%0A    
@@ -3054,24 +3054,165 @@
 te);%0A    %7D%0A%0A
+    private void specialButtonOne() %7B%0A        Intent intent = new Intent(this, SupportActivity.class);%0A        startActivity(intent);%0A    %7D%0A%0A
     public v
@@ -3270,39 +3270,20 @@
 b(this, 
-getApplicationContext()
+this
 , %22https
@@ -3339,10 +3339,11 @@
 ;%0A    %7D%0A
+%0A
 %7D%0A

Fix - Small Memory Leak