Revert "Align more prefs for icon space."

Bug: 33798492
This reverts commit ded9fc9b0726bae0e7500fa98e6876b6d003d279.

Change-Id: I9831858ffda263496617dff29249e243c007fa12
diff --git a/src/com/android/settings/WallOfTextPreference.java b/src/com/android/settings/WallOfTextPreference.java
new file mode 100644
index 0000000..4cc2f67
--- /dev/null
+++ b/src/com/android/settings/WallOfTextPreference.java
@@ -0,0 +1,38 @@
+/*
+ * 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.android.settings.fuelgauge;
+
+import android.content.Context;
+import android.support.v7.preference.Preference;
+import android.support.v7.preference.PreferenceViewHolder;
+import android.util.AttributeSet;
+import android.widget.TextView;
+import com.android.settings.DividerPreference;
+
+public class WallOfTextPreference extends DividerPreference {
+
+    public WallOfTextPreference(Context context, AttributeSet attrs) {
+        super(context, attrs);
+    }
+
+    @Override
+    public void onBindViewHolder(PreferenceViewHolder view) {
+        super.onBindViewHolder(view);
+        final TextView summary = (TextView) view.findViewById(android.R.id.summary);
+        summary.setMaxLines(20);
+    }
+}
diff --git a/src/com/android/settings/accounts/AccountPreferenceController.java b/src/com/android/settings/accounts/AccountPreferenceController.java
index 723a1ec..219dd3a 100644
--- a/src/com/android/settings/accounts/AccountPreferenceController.java
+++ b/src/com/android/settings/accounts/AccountPreferenceController.java
@@ -271,6 +271,7 @@
         } else {
             List<UserInfo> profiles = mUm.getProfiles(UserHandle.myUserId());
             final int profilesCount = profiles.size();
+            final boolean addCategory = profilesCount > 1;
             for (int i = 0; i < profilesCount; i++) {
                 updateProfileUi(profiles.get(i));
             }
@@ -297,6 +298,7 @@
             preferenceGroup.setContentDescription(
                 mContext.getString(R.string.account_settings));
         } else if (userInfo.isManagedProfile()) {
+            preferenceGroup.setLayoutResource(R.layout.work_profile_category);
             preferenceGroup.setTitle(R.string.category_work);
             String workGroupSummary = getWorkGroupSummary(context, userInfo);
             preferenceGroup.setSummary(workGroupSummary);
diff --git a/src/com/android/settings/datausage/DataSaverSummary.java b/src/com/android/settings/datausage/DataSaverSummary.java
index b424fa2..b0304fc 100644
--- a/src/com/android/settings/datausage/DataSaverSummary.java
+++ b/src/com/android/settings/datausage/DataSaverSummary.java
@@ -54,8 +54,6 @@
         super.onCreate(icicle);
 
         addPreferencesFromResource(R.xml.data_saver);
-        mFooterPreferenceMixin.createFooterPreference()
-                .setTitle(com.android.internal.R.string.data_saver_description);
         mUnrestrictedAccess = findPreference(KEY_UNRESTRICTED_ACCESS);
         mApplicationsState = ApplicationsState.getInstance(
                 (Application) getContext().getApplicationContext());
diff --git a/src/com/android/settings/deviceinfo/PrivateVolumeSettings.java b/src/com/android/settings/deviceinfo/PrivateVolumeSettings.java
index e63a1df..b0685cf 100644
--- a/src/com/android/settings/deviceinfo/PrivateVolumeSettings.java
+++ b/src/com/android/settings/deviceinfo/PrivateVolumeSettings.java
@@ -18,6 +18,7 @@
 
 import android.app.AlertDialog;
 import android.app.Dialog;
+import android.app.DialogFragment;
 import android.app.Fragment;
 import android.content.ActivityNotFoundException;
 import android.content.Context;
@@ -36,6 +37,7 @@
 import android.os.storage.VolumeInfo;
 import android.os.storage.VolumeRecord;
 import android.provider.DocumentsContract;
+import android.provider.Settings;
 import android.support.v7.preference.Preference;
 import android.support.v7.preference.PreferenceCategory;
 import android.support.v7.preference.PreferenceGroup;
@@ -63,9 +65,9 @@
 import com.android.settingslib.deviceinfo.StorageMeasurement;
 import com.android.settingslib.deviceinfo.StorageMeasurement.MeasurementDetails;
 import com.android.settingslib.deviceinfo.StorageMeasurement.MeasurementReceiver;
-
 import com.google.android.collect.Lists;
 
+import java.io.File;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Objects;
@@ -105,6 +107,9 @@
             R.string.storage_detail_other,
     };
 
+    private static final int DELETION_HELPER_SETTINGS = 1;
+    private static final int DELETION_HELPER_CLEAR = 1;
+
     private StorageManager mStorageManager;
     private UserManager mUserManager;
 
@@ -280,7 +285,8 @@
         if (mHeaderPoolIndex < mHeaderPreferencePool.size()) {
             category = mHeaderPreferencePool.get(mHeaderPoolIndex);
         } else {
-            category = new PreferenceCategory(getPrefContext());
+            category = new PreferenceCategory(getPrefContext(), null,
+                    com.android.internal.R.attr.preferenceCategoryStyle);
             mHeaderPreferencePool.add(category);
         }
         category.setTitle(title);
diff --git a/src/com/android/settings/display/NightDisplaySettings.java b/src/com/android/settings/display/NightDisplaySettings.java
index 619c0d4..1ff4297 100644
--- a/src/com/android/settings/display/NightDisplaySettings.java
+++ b/src/com/android/settings/display/NightDisplaySettings.java
@@ -73,7 +73,7 @@
 
         // Load the preferences from xml.
         addPreferencesFromResource(R.xml.night_display_settings);
-        mFooterPreferenceMixin.createFooterPreference().setTitle(R.string.night_display_text);
+
         mAutoModePreference = (DropDownPreference) findPreference(KEY_NIGHT_DISPLAY_AUTO_MODE);
         mStartTimePreference = findPreference(KEY_NIGHT_DISPLAY_START_TIME);
         mEndTimePreference = findPreference(KEY_NIGHT_DISPLAY_END_TIME);
diff --git a/src/com/android/settings/fuelgauge/BatterySaverSettings.java b/src/com/android/settings/fuelgauge/BatterySaverSettings.java
index 6b7ddf9..4dc8f87 100644
--- a/src/com/android/settings/fuelgauge/BatterySaverSettings.java
+++ b/src/com/android/settings/fuelgauge/BatterySaverSettings.java
@@ -78,8 +78,7 @@
         }
         mCreated = true;
         addPreferencesFromResource(R.xml.battery_saver_settings);
-        mFooterPreferenceMixin.createFooterPreference()
-                .setTitle(com.android.internal.R.string.battery_saver_description);
+
         mContext = getActivity();
         mSwitchBar = ((SettingsActivity) mContext).getSwitchBar();
         mSwitch = mSwitchBar.getSwitch();