// Path: app/src/main/java/com/chrynan/android_guitar_tuner/presenter/AppInfoPresenter.java
// public class AppInfoPresenter implements Presenter {
// 
//     @ApplicationContext
//     private final Context context;
//     private final AppInfoView view;
//     private final SimpleDateFormat simpleDateFormat;
// 
//     public AppInfoPresenter(@ApplicationContext final Context context, final AppInfoView view) {
//         this.context = context;
//         this.view = view;
//         this.simpleDateFormat = new SimpleDateFormat("MM/dd/yyyy hh:mm a", Locale.getDefault());
//     }
// 
//     public void getAppInformation() {
//         try {
//             PackageInfo packageInfo = context.getPackageManager().getPackageInfo(context.getPackageName(), 0);
//             AppInfo appInfo = new AppInfo(packageInfo);
//             Resources res = context.getResources();
// 
//             view.showAppName(appInfo.getAppName());
//             view.showPackageName(appInfo.getPackageName());
//             view.showAPKLocation(appInfo.getApkLocation());
//             view.showVersionName(appInfo.getVersionName());
//             view.showVersionCode(String.valueOf(appInfo.getVersionCode()));
//             view.showFirstInstallDate(simpleDateFormat.format(new Date(appInfo.getFirstInstallTime())));
//             view.showLastUpdatedDate(simpleDateFormat.format(new Date(appInfo.getLastUpdatedTime())));
// 
//             AndroidApiLevel minVersion = appInfo.getMinAndroidApiLevel();
//             AndroidApiLevel targetVersion = appInfo.getTargetAndroidApiLevel();
//             AndroidApiLevel deviceVersion = appInfo.getDeviceAndroidApiLevel();
// 
//             view.showMinSDKVersion(res.getString(R.string.app_info_text_api_level, minVersion.getAndroidVersion().getName(), minVersion.getVersionCode()));
//             view.showTargetSDKVersion(res.getString(R.string.app_info_text_api_level, targetVersion.getAndroidVersion().getName(), targetVersion.getVersionCode()));
//             view.showDeviceSDKVersion(res.getString(R.string.app_info_text_api_level, deviceVersion.getAndroidVersion().getName(), deviceVersion.getVersionCode()));
//         } catch (PackageManager.NameNotFoundException e) {
//             Timber.e(e, "Error Retrieving PackageManager or PackageInfo.");
//             // TODO Display defaults/error
//         }
//     }
// 
//     @Override
//     public void detachView() {
//         // No Operation
//     }
// }
// 
// Path: app/src/main/java/com/chrynan/android_guitar_tuner/ui/view/AppInfoView.java
// public interface AppInfoView {
// 
//     void showAppName(String appName);
// 
//     void showPackageName(String packageName);
// 
//     void showAPKLocation(String location);
// 
//     void showFirstInstallDate(String firstInstall);
// 
//     void showLastUpdatedDate(String lastUpdated);
// 
//     void showVersionName(String versionName);
// 
//     void showVersionCode(String versionCode);
// 
//     void showMinSDKVersion(String minSDKVersion);
// 
//     void showTargetSDKVersion(String targetSDKVersion);
// 
//     void showDeviceSDKVersion(String deviceSDKVersion);
// }


import android.content.Context;
import com.chrynan.android_guitar_tuner.di.ActivityScope;
import com.chrynan.android_guitar_tuner.di.ApplicationContext;
import com.chrynan.android_guitar_tuner.presenter.AppInfoPresenter;
import com.chrynan.android_guitar_tuner.ui.view.AppInfoView;
import dagger.Module;
import dagger.Provides;
package com.chrynan.android_guitar_tuner.di.module;




/**
 * A Dagger {@link Module} used for dependency injection in an {@link AppInfoView} implementation.
 */
@Module
public class AppInfoViewModule {

    private final AppInfoView view;

    public AppInfoViewModule(final AppInfoView view) {
        this.view = view;
    }

    @Provides
    @ActivityScope
// Path: app/src/main/java/com/chrynan/android_guitar_tuner/presenter/AppInfoPresenter.java
// public class AppInfoPresenter implements Presenter {
// 
//     @ApplicationContext
//     private final Context context;
//     private final AppInfoView view;
//     private final SimpleDateFormat simpleDateFormat;
// 
//     public AppInfoPresenter(@ApplicationContext final Context context, final AppInfoView view) {
//         this.context = context;
//         this.view = view;
//         this.simpleDateFormat = new SimpleDateFormat("MM/dd/yyyy hh:mm a", Locale.getDefault());
//     }
// 
//     public void getAppInformation() {
//         try {
//             PackageInfo packageInfo = context.getPackageManager().getPackageInfo(context.getPackageName(), 0);
//             AppInfo appInfo = new AppInfo(packageInfo);
//             Resources res = context.getResources();
// 
//             view.showAppName(appInfo.getAppName());
//             view.showPackageName(appInfo.getPackageName());
//             view.showAPKLocation(appInfo.getApkLocation());
//             view.showVersionName(appInfo.getVersionName());
//             view.showVersionCode(String.valueOf(appInfo.getVersionCode()));
//             view.showFirstInstallDate(simpleDateFormat.format(new Date(appInfo.getFirstInstallTime())));
//             view.showLastUpdatedDate(simpleDateFormat.format(new Date(appInfo.getLastUpdatedTime())));
// 
//             AndroidApiLevel minVersion = appInfo.getMinAndroidApiLevel();
//             AndroidApiLevel targetVersion = appInfo.getTargetAndroidApiLevel();
//             AndroidApiLevel deviceVersion = appInfo.getDeviceAndroidApiLevel();
// 
//             view.showMinSDKVersion(res.getString(R.string.app_info_text_api_level, minVersion.getAndroidVersion().getName(), minVersion.getVersionCode()));
//             view.showTargetSDKVersion(res.getString(R.string.app_info_text_api_level, targetVersion.getAndroidVersion().getName(), targetVersion.getVersionCode()));
//             view.showDeviceSDKVersion(res.getString(R.string.app_info_text_api_level, deviceVersion.getAndroidVersion().getName(), deviceVersion.getVersionCode()));
//         } catch (PackageManager.NameNotFoundException e) {
//             Timber.e(e, "Error Retrieving PackageManager or PackageInfo.");
//             // TODO Display defaults/error
//         }
//     }
// 
//     @Override
//     public void detachView() {
//         // No Operation
//     }
// }
// 
// Path: app/src/main/java/com/chrynan/android_guitar_tuner/ui/view/AppInfoView.java
// public interface AppInfoView {
// 
//     void showAppName(String appName);
// 
//     void showPackageName(String packageName);
// 
//     void showAPKLocation(String location);
// 
//     void showFirstInstallDate(String firstInstall);
// 
//     void showLastUpdatedDate(String lastUpdated);
// 
//     void showVersionName(String versionName);
// 
//     void showVersionCode(String versionCode);
// 
//     void showMinSDKVersion(String minSDKVersion);
// 
//     void showTargetSDKVersion(String targetSDKVersion);
// 
//     void showDeviceSDKVersion(String deviceSDKVersion);
// }


// Path: app/src/main/java/com/chrynan/android_guitar_tuner/di/module/AppInfoViewModule.java
import android.content.Context;
import com.chrynan.android_guitar_tuner.di.ActivityScope;
import com.chrynan.android_guitar_tuner.di.ApplicationContext;
import com.chrynan.android_guitar_tuner.presenter.AppInfoPresenter;
import com.chrynan.android_guitar_tuner.ui.view.AppInfoView;
import dagger.Module;
import dagger.Provides;

package com.chrynan.android_guitar_tuner.di.module;




/**
 * A Dagger {@link Module} used for dependency injection in an {@link AppInfoView} implementation.
 */
@Module
public class AppInfoViewModule {

    private final AppInfoView view;

    public AppInfoViewModule(final AppInfoView view) {
        this.view = view;
    }

    @Provides
    @ActivityScope
    AppInfoPresenter provideAppInfoPresenter(@ApplicationContext Context context) {