/*
 * Copyright (C) 2014 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.murati.oszk.audiobook.ui;

import android.content.Intent;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import com.murati.oszk.audiobook.R;

/**
 * Placeholder activity for features that are not implemented in this sample, but
 * are in the navigation drawer.
 */
public class AboutActivity extends BaseActivity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_about);
        initializeToolbar();

        // Version info
        final TextView versionText = findViewById(R.id.version);
        versionText.setText(getVersion());

        // Button
        final Button button = findViewById(R.id.murati);
        button.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
                Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://murati.hu"));
                intent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
                startActivity(intent);
            }
        });

        // Button
        final Button patreon = findViewById(R.id.patreon);
        patreon.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
                Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://www.patreon.com/murati"));
                intent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
                startActivity(intent);
            }
        });
    }

    public String getVersion() {
        try {
            PackageInfo packageInfo = getPackageManager().getPackageInfo(getPackageName(), 0);
            return packageInfo.versionName;
        } catch (PackageManager.NameNotFoundException e) {
            //TODO: capture log
        }
        return "";
    }
}

@@ -814,16 +814,42 @@
 Bundle;%0A
+import android.view.Menu;%0A
 import a
@@ -2302,16 +2302,395 @@
 %0A    %7D%0A%0A
+    @Override%0A    public boolean onPrepareOptionsMenu(Menu menu) %7B%0A        menu.findItem(R.id.search).setVisible(false);%0A        menu.findItem(R.id.option_favorite).setVisible(false);%0A        menu.findItem(R.id.option_download).setVisible(false);%0A        menu.findItem(R.id.option_delete).setVisible(false);%0A%0A        super.onPrepareOptionsMenu(menu);%0A        return true;%0A    %7D%0A%0A
     publ

Fix about menu ityems