// Path: app/src/main/java/com/google/android/diskusage/datasource/DataSource.java
// public abstract class DataSource {
//   private static DataSource currentDataSource = new DefaultDataSource();
// 
//   public static DataSource get() {
//     return currentDataSource;
//   }
// 
//   public static void override(DataSource dataSource) {
//     LoadableActivity.resetStoredStates();
//     currentDataSource = dataSource;
//   }
// 
//   public abstract int getAndroidVersion();
// 
//   public abstract List<PkgInfo> getInstalledPackages(PackageManager pm);
// 
//   public abstract StatFsSource statFs(String mountPoint);
// 
//   @TargetApi(Build.VERSION_CODES.FROYO)
//   public abstract PortableFile getExternalFilesDir(Context context);
//   @TargetApi(Build.VERSION_CODES.KITKAT)
//   public abstract PortableFile[] getExternalFilesDirs(Context context);
// 
//   public abstract PortableFile getExternalStorageDirectory();
// 
//   public abstract InputStream createNativeScanner(
//       Context context, String path,
//       boolean rootRequired) throws IOException, InterruptedException;
// 
//   public abstract boolean isDeviceRooted();
// 
//   public abstract LegacyFile createLegacyScanFile(String root);
// 
//   public final BufferedReader getProcReader() throws IOException {
//     return new BufferedReader(new InputStreamReader(getProc()));
//   }
// 
//   public abstract InputStream getProc() throws IOException;
// 
//   public abstract void getPackageSizeInfo(
//       PkgInfo pkgInfo,
//       Method getPackageSizeInfo,
//       PackageManager pm,
//       AppStatsCallback callback) throws Exception;
// 
//   public abstract PortableFile getParentFile(PortableFile file);
// }


import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.SharedPreferences;
import android.content.DialogInterface.OnCancelListener;
import android.content.DialogInterface.OnClickListener;
import android.os.Build;
import android.view.View;
import com.google.android.diskusage.datasource.DataSource;
import com.google.android.diskusage.entity.FileSystemSuperRoot;
import com.google.android.diskusage.opengl.FileSystemViewGPU;
package com.google.android.diskusage;



public class RendererManager {
  private static final String HW_RENDERER = "hw_renderer";

  private final DiskUsage diskusage;
  private boolean hwRenderer;
  private boolean rendererChanged = false;

  private SharedPreferences getPrefs() {
    return diskusage.getSharedPreferences("settings", Context.MODE_PRIVATE);
  }

  public RendererManager(DiskUsage diskusage) {
    this.diskusage = diskusage;
  }

  public boolean hardwareRendererByDefault() {
// Path: app/src/main/java/com/google/android/diskusage/datasource/DataSource.java
// public abstract class DataSource {
//   private static DataSource currentDataSource = new DefaultDataSource();
// 
//   public static DataSource get() {
//     return currentDataSource;
//   }
// 
//   public static void override(DataSource dataSource) {
//     LoadableActivity.resetStoredStates();
//     currentDataSource = dataSource;
//   }
// 
//   public abstract int getAndroidVersion();
// 
//   public abstract List<PkgInfo> getInstalledPackages(PackageManager pm);
// 
//   public abstract StatFsSource statFs(String mountPoint);
// 
//   @TargetApi(Build.VERSION_CODES.FROYO)
//   public abstract PortableFile getExternalFilesDir(Context context);
//   @TargetApi(Build.VERSION_CODES.KITKAT)
//   public abstract PortableFile[] getExternalFilesDirs(Context context);
// 
//   public abstract PortableFile getExternalStorageDirectory();
// 
//   public abstract InputStream createNativeScanner(
//       Context context, String path,
//       boolean rootRequired) throws IOException, InterruptedException;
// 
//   public abstract boolean isDeviceRooted();
// 
//   public abstract LegacyFile createLegacyScanFile(String root);
// 
//   public final BufferedReader getProcReader() throws IOException {
//     return new BufferedReader(new InputStreamReader(getProc()));
//   }
// 
//   public abstract InputStream getProc() throws IOException;
// 
//   public abstract void getPackageSizeInfo(
//       PkgInfo pkgInfo,
//       Method getPackageSizeInfo,
//       PackageManager pm,
//       AppStatsCallback callback) throws Exception;
// 
//   public abstract PortableFile getParentFile(PortableFile file);
// }


// Path: app/src/main/java/com/google/android/diskusage/RendererManager.java
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.SharedPreferences;
import android.content.DialogInterface.OnCancelListener;
import android.content.DialogInterface.OnClickListener;
import android.os.Build;
import android.view.View;
import com.google.android.diskusage.datasource.DataSource;
import com.google.android.diskusage.entity.FileSystemSuperRoot;
import com.google.android.diskusage.opengl.FileSystemViewGPU;

package com.google.android.diskusage;



public class RendererManager {
  private static final String HW_RENDERER = "hw_renderer";

  private final DiskUsage diskusage;
  private boolean hwRenderer;
  private boolean rendererChanged = false;

  private SharedPreferences getPrefs() {
    return diskusage.getSharedPreferences("settings", Context.MODE_PRIVATE);
  }

  public RendererManager(DiskUsage diskusage) {
    this.diskusage = diskusage;
  }

  public boolean hardwareRendererByDefault() {
    final int sdkVersion = DataSource.get().getAndroidVersion();