Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit de844c23 authored by Zhao Wei Liew's avatar Zhao Wei Liew Committed by Gerrit Code Review
Browse files

Revert "CMFM: Fix landscape/rotation issues in file system info dialog"

The original commit is incomplete, and either causes 2 overlapping
disk usage graphs to be drawn upon device rotation, or causes
the disk usage graph to be improperly sized upon device rotation..

Revert the commit to bring in CAF's fixes for the original issue,
which does not exhibit the issue mentioned above.

This reverts commit c25f3b99.

Change-Id: Ie699b17e07d4ea2b04b03181fe13c6d93ef5da62
parent f35a631f
Loading
Loading
Loading
Loading
+268 −280
Original line number Diff line number Diff line
@@ -257,23 +257,13 @@
  </ScrollView>

  <!-- Disk Usage -->
  <ScrollView
  <LinearLayout
    android:id="@+id/filesystem_tab_diskusage"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_below="@id/filesystem_tabs"
          android:scrollbars="vertical"
    android:visibility="gone" >

    <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical">

      <LinearLayout
              android:layout_width="match_parent"
              android:layout_height="wrap_content">

    <com.cyanogenmod.filemanager.ui.widgets.DiskUsageGraph
      android:id="@+id/filesystem_disk_usage_graph"
      android:layout_width="0dip"
@@ -360,6 +350,7 @@
      </TableRow>
    </TableLayout>
  </LinearLayout>

  <GridLayout
    android:id="@+id/ll_legend"
    android:gravity="center"
@@ -374,8 +365,5 @@
    android:padding="@dimen/legend_padding"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"/>
    </LinearLayout>

  </ScrollView>

</RelativeLayout>
+0 −11
Original line number Diff line number Diff line
@@ -206,7 +206,6 @@ public class NavigationActivity extends Activity
    private SearchView mSearchView;
    private NavigationCustomTitleView mCustomTitleView;
    private InputMethodManager mImm;
    private FilesystemInfoDialog.OnConfigChangeListener mOnConfigChangeListener;
    private ListPopupWindow mPopupWindow;
    private ActionsDialog mActionsDialog;

@@ -807,9 +806,6 @@ public class NavigationActivity extends Activity
                mDrawerToggle.onConfigurationChanged(newConfig);
            }
        }
        if (mActiveDialog != null && mOnConfigChangeListener != null) {
            mOnConfigChangeListener.onConfigurationChanged(newConfig);
        }
        NavigationView navView = getCurrentNavigationView();
        if (navView != null) {
            navView.refreshViewMode();
@@ -2306,13 +2302,6 @@ public class NavigationActivity extends Activity
                }
            }
        });
        mOnConfigChangeListener = dialog.getOnConfigChangeListener();
        dialog.setOnDismissListener(new DialogInterface.OnDismissListener() {
            @Override
            public void onDismiss(DialogInterface dialog) {
                mOnConfigChangeListener = null;
            }
        });
        dialog.show();
    }

+0 −30
Original line number Diff line number Diff line
@@ -19,7 +19,6 @@ package com.cyanogenmod.filemanager.ui.dialogs;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.res.Configuration;
import android.database.Cursor;
import android.util.Log;
import android.view.LayoutInflater;
@@ -158,11 +157,6 @@ public class FilesystemInfoDialog implements OnClickListener, OnCheckedChangeLis
    }


    public interface OnConfigChangeListener {
        void onConfigurationChanged(Configuration newConfig);
    }



    private static final String TAG = "FilesystemInfoDialog"; //$NON-NLS-1$

@@ -193,22 +187,6 @@ public class FilesystemInfoDialog implements OnClickListener, OnCheckedChangeLis
    private final boolean mIsAdvancedMode;
    private boolean mIsInUsageTab = false;

    private final OnConfigChangeListener mOnConfigChangeListener = new OnConfigChangeListener() {
        @Override
        public void onConfigurationChanged(Configuration newConfig) {
            if (mDiskUsageGraph != null) {
                populateLegend();
                mDiskUsageGraph.post(new Runnable() {
                    @Override
                    public void run() {
                        //Animate disk usage graph
                        FilesystemInfoDialog.this.mDiskUsageGraph.drawDiskUsage(mDiskUsage);
                    }
                });
            }
        }
    };

    /**
     * Constructor of <code>FilesystemInfoDialog</code>.
     *
@@ -270,14 +248,6 @@ public class FilesystemInfoDialog implements OnClickListener, OnCheckedChangeLis
        this.mOnMountListener = onMountListener;
    }

    public OnConfigChangeListener getOnConfigChangeListener() {
        return mOnConfigChangeListener;
    }

    public void setOnDismissListener(final DialogInterface.OnDismissListener listener) {
        mDialog.setOnDismissListener(listener);
    }

    /**
     * Method that fill the dialog with the data of the mount point.
     *