// Path: app/src/main/java/org/simlar/helper/Version.java
// public final class Version
// {
// 	private static final boolean DEVELOPER_MENU = false;
// 
// 	private Version()
// 	{
// 		throw new AssertionError("This class was not meant to be instantiated");
// 	}
// 
// 	public static String getVersionName(final Context context)
// 	{
// 		final String versionName = getPackageInfo(context).versionName;
// 		if (Util.isNullOrEmpty(versionName)) {
// 			return "";
// 		}
// 
// 		return versionName;
// 	}
// 
// 	public static int getVersionCode(final Context context)
// 	{
// 		return getPackageInfo(context).versionCode;
// 	}
// 
// 	public static boolean showDeveloperMenu()
// 	{
// 		return DEVELOPER_MENU;
// 	}
// 
// 	private static PackageInfo createEmptyPackageInfo()
// 	{
// 		final PackageInfo info = new PackageInfo();
// 		info.versionName = "";
// 		info.versionCode = -1;
// 		return info;
// 	}
// 
// 	private static PackageInfo getPackageInfo(final Context context)
// 	{
// 		if (context == null) {
// 			return createEmptyPackageInfo();
// 		}
// 
// 		try {
// 			return context.getPackageManager().getPackageInfo(context.getPackageName(), 0);
// 		} catch (final NameNotFoundException e) {
// 			Lg.ex(e, "NameNotFoundException in Version.getPackageInfo:");
// 			return createEmptyPackageInfo();
// 		}
// 	}
// }


import android.os.Bundle;
import android.text.method.LinkMovementMethod;
import android.view.Menu;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
import org.simlar.R;
import org.simlar.helper.Version;
/**
 * Copyright (C) 2013 The Simlar Authors.
 *
 * This file is part of Simlar. (https://www.simlar.org)
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */

package org.simlar.widgets;




public final class AboutActivity extends AppCompatActivity
{
	@Override
	protected void onCreate(final Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_about);

		final TextView version = findViewById(R.id.textViewVersion);
// Path: app/src/main/java/org/simlar/helper/Version.java
// public final class Version
// {
// 	private static final boolean DEVELOPER_MENU = false;
// 
// 	private Version()
// 	{
// 		throw new AssertionError("This class was not meant to be instantiated");
// 	}
// 
// 	public static String getVersionName(final Context context)
// 	{
// 		final String versionName = getPackageInfo(context).versionName;
// 		if (Util.isNullOrEmpty(versionName)) {
// 			return "";
// 		}
// 
// 		return versionName;
// 	}
// 
// 	public static int getVersionCode(final Context context)
// 	{
// 		return getPackageInfo(context).versionCode;
// 	}
// 
// 	public static boolean showDeveloperMenu()
// 	{
// 		return DEVELOPER_MENU;
// 	}
// 
// 	private static PackageInfo createEmptyPackageInfo()
// 	{
// 		final PackageInfo info = new PackageInfo();
// 		info.versionName = "";
// 		info.versionCode = -1;
// 		return info;
// 	}
// 
// 	private static PackageInfo getPackageInfo(final Context context)
// 	{
// 		if (context == null) {
// 			return createEmptyPackageInfo();
// 		}
// 
// 		try {
// 			return context.getPackageManager().getPackageInfo(context.getPackageName(), 0);
// 		} catch (final NameNotFoundException e) {
// 			Lg.ex(e, "NameNotFoundException in Version.getPackageInfo:");
// 			return createEmptyPackageInfo();
// 		}
// 	}
// }


// Path: app/src/main/java/org/simlar/widgets/AboutActivity.java
import android.os.Bundle;
import android.text.method.LinkMovementMethod;
import android.view.Menu;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
import org.simlar.R;
import org.simlar.helper.Version;

/**
 * Copyright (C) 2013 The Simlar Authors.
 *
 * This file is part of Simlar. (https://www.simlar.org)
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */

package org.simlar.widgets;




public final class AboutActivity extends AppCompatActivity
{
	@Override
	protected void onCreate(final Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_about);

		final TextView version = findViewById(R.id.textViewVersion);
		version.setText(Version.getVersionName(this));