Merge "Align more prefs for icon space."
This commit is contained in:
committed by
Android (Google) Code Review
commit
20730384a8
@@ -1,38 +0,0 @@
|
||||
/*
|
||||
* 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);
|
||||
}
|
||||
}
|
@@ -271,7 +271,6 @@ public class AccountPreferenceController extends PreferenceController
|
||||
} 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));
|
||||
}
|
||||
@@ -298,7 +297,6 @@ public class AccountPreferenceController extends PreferenceController
|
||||
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);
|
||||
|
@@ -54,6 +54,8 @@ public class DataSaverSummary extends SettingsPreferenceFragment
|
||||
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());
|
||||
|
@@ -18,7 +18,6 @@ package com.android.settings.deviceinfo;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
import android.app.DialogFragment;
|
||||
import android.app.Fragment;
|
||||
import android.content.ActivityNotFoundException;
|
||||
import android.content.Context;
|
||||
@@ -37,7 +36,6 @@ import android.os.storage.StorageManager;
|
||||
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;
|
||||
@@ -65,9 +63,9 @@ import com.android.settings.deviceinfo.StorageSettings.MountTask;
|
||||
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;
|
||||
@@ -107,9 +105,6 @@ public class PrivateVolumeSettings extends SettingsPreferenceFragment {
|
||||
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;
|
||||
|
||||
@@ -285,8 +280,7 @@ public class PrivateVolumeSettings extends SettingsPreferenceFragment {
|
||||
if (mHeaderPoolIndex < mHeaderPreferencePool.size()) {
|
||||
category = mHeaderPreferencePool.get(mHeaderPoolIndex);
|
||||
} else {
|
||||
category = new PreferenceCategory(getPrefContext(), null,
|
||||
com.android.internal.R.attr.preferenceCategoryStyle);
|
||||
category = new PreferenceCategory(getPrefContext());
|
||||
mHeaderPreferencePool.add(category);
|
||||
}
|
||||
category.setTitle(title);
|
||||
|
@@ -73,7 +73,7 @@ public class NightDisplaySettings extends SettingsPreferenceFragment
|
||||
|
||||
// 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);
|
||||
|
@@ -78,7 +78,8 @@ public class BatterySaverSettings extends SettingsPreferenceFragment
|
||||
}
|
||||
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();
|
||||
|
Reference in New Issue
Block a user