resolve merge conflicts of d42d9a41f6
to sc-dev
Change-Id: Ifa6a4af09d7cd45773a8c057416ab90fac23061e
This commit is contained in:
@@ -17,7 +17,6 @@ package com.android.settings.datausage;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.os.Bundle;
|
||||
import android.provider.Settings;
|
||||
import android.util.Log;
|
||||
|
||||
import com.android.settings.R;
|
||||
|
@@ -42,7 +42,6 @@ import java.util.ArrayList;
|
||||
import java.util.Set;
|
||||
import java.util.TreeSet;
|
||||
|
||||
|
||||
public class UnrestrictedDataAccessPreferenceController extends BasePreferenceController implements
|
||||
LifecycleObserver, OnStart, OnStop, OnDestroy, ApplicationsState.Callbacks,
|
||||
AppStateBaseBridge.Callback, Preference.OnPreferenceChangeListener {
|
||||
|
@@ -29,9 +29,9 @@ import android.os.UserHandle;
|
||||
import android.os.UserManager;
|
||||
import android.os.storage.StorageManager;
|
||||
import android.os.storage.VolumeInfo;
|
||||
import android.util.Log;
|
||||
import android.text.format.DateUtils;
|
||||
import android.text.format.Formatter;
|
||||
import android.util.Log;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.UUID;
|
||||
|
@@ -1,160 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2010 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.deviceinfo;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.TypedArray;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Paint;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
|
||||
import com.android.settings.R;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* Draws a horizontal bar chart with colored slices, each represented by
|
||||
* {@link Entry}.
|
||||
*/
|
||||
public class PercentageBarChart extends View {
|
||||
private final Paint mEmptyPaint = new Paint();
|
||||
|
||||
private Collection<Entry> mEntries;
|
||||
|
||||
private int mMinTickWidth = 1;
|
||||
|
||||
public static class Entry implements Comparable<Entry> {
|
||||
public final int order;
|
||||
public final float percentage;
|
||||
public final Paint paint;
|
||||
|
||||
protected Entry(int order, float percentage, Paint paint) {
|
||||
this.order = order;
|
||||
this.percentage = percentage;
|
||||
this.paint = paint;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(Entry another) {
|
||||
return order - another.order;
|
||||
}
|
||||
}
|
||||
|
||||
public PercentageBarChart(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
|
||||
TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.PercentageBarChart);
|
||||
mMinTickWidth = a.getDimensionPixelSize(R.styleable.PercentageBarChart_minTickWidth, 1);
|
||||
int emptyColor = a.getColor(R.styleable.PercentageBarChart_emptyColor, Color.BLACK);
|
||||
a.recycle();
|
||||
|
||||
mEmptyPaint.setColor(emptyColor);
|
||||
mEmptyPaint.setStyle(Paint.Style.FILL);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDraw(Canvas canvas) {
|
||||
super.onDraw(canvas);
|
||||
|
||||
final int left = getPaddingLeft();
|
||||
final int right = getWidth() - getPaddingRight();
|
||||
final int top = getPaddingTop();
|
||||
final int bottom = getHeight() - getPaddingBottom();
|
||||
|
||||
final int width = right - left;
|
||||
|
||||
final boolean isLayoutRtl = isLayoutRtl();
|
||||
if (isLayoutRtl) {
|
||||
float nextX = right;
|
||||
|
||||
if (mEntries != null) {
|
||||
for (final Entry e : mEntries) {
|
||||
final float entryWidth;
|
||||
if (e.percentage == 0.0f) {
|
||||
entryWidth = 0.0f;
|
||||
} else {
|
||||
entryWidth = Math.max(mMinTickWidth, width * e.percentage);
|
||||
}
|
||||
|
||||
final float lastX = nextX - entryWidth;
|
||||
if (lastX < left) {
|
||||
canvas.drawRect(left, top, nextX, bottom, e.paint);
|
||||
return;
|
||||
}
|
||||
|
||||
canvas.drawRect(lastX, top, nextX, bottom, e.paint);
|
||||
nextX = lastX;
|
||||
}
|
||||
}
|
||||
|
||||
canvas.drawRect(left, top, nextX, bottom, mEmptyPaint);
|
||||
} else {
|
||||
float lastX = left;
|
||||
|
||||
if (mEntries != null) {
|
||||
for (final Entry e : mEntries) {
|
||||
final float entryWidth;
|
||||
if (e.percentage == 0.0f) {
|
||||
entryWidth = 0.0f;
|
||||
} else {
|
||||
entryWidth = Math.max(mMinTickWidth, width * e.percentage);
|
||||
}
|
||||
|
||||
final float nextX = lastX + entryWidth;
|
||||
if (nextX > right) {
|
||||
canvas.drawRect(lastX, top, right, bottom, e.paint);
|
||||
return;
|
||||
}
|
||||
|
||||
canvas.drawRect(lastX, top, nextX, bottom, e.paint);
|
||||
lastX = nextX;
|
||||
}
|
||||
}
|
||||
|
||||
canvas.drawRect(lastX, top, right, bottom, mEmptyPaint);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the background for this chart. Callers are responsible for later
|
||||
* calling {@link #invalidate()}.
|
||||
*/
|
||||
@Override
|
||||
public void setBackgroundColor(int color) {
|
||||
mEmptyPaint.setColor(color);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a new slice to the percentage bar chart. Callers are responsible for
|
||||
* later calling {@link #invalidate()}.
|
||||
*
|
||||
* @param percentage the total width that
|
||||
* @param color the color to draw the entry
|
||||
*/
|
||||
public static Entry createEntry(int order, float percentage, int color) {
|
||||
final Paint p = new Paint();
|
||||
p.setColor(color);
|
||||
p.setStyle(Paint.Style.FILL);
|
||||
return new Entry(order, percentage, p);
|
||||
}
|
||||
|
||||
public void setEntries(Collection<Entry> entries) {
|
||||
mEntries = entries;
|
||||
}
|
||||
}
|
||||
|
@@ -19,7 +19,6 @@ package com.android.settings.deviceinfo;
|
||||
import android.app.usage.StorageStatsManager;
|
||||
import android.content.Context;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.storage.StorageManager;
|
||||
import android.os.storage.VolumeInfo;
|
||||
|
@@ -17,18 +17,12 @@
|
||||
package com.android.settings.deviceinfo.firmwareversion;
|
||||
|
||||
import android.app.settings.SettingsEnums;
|
||||
import android.content.Context;
|
||||
import android.provider.SearchIndexableResource;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.dashboard.DashboardFragment;
|
||||
import com.android.settings.search.BaseSearchIndexProvider;
|
||||
import com.android.settingslib.search.Indexable;
|
||||
import com.android.settingslib.search.SearchIndexable;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@SearchIndexable
|
||||
public class FirmwareVersionSettings extends DashboardFragment {
|
||||
|
||||
|
@@ -18,18 +18,12 @@ package com.android.settings.deviceinfo.hardwareinfo;
|
||||
|
||||
import android.app.settings.SettingsEnums;
|
||||
import android.content.Context;
|
||||
import android.provider.SearchIndexableResource;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.dashboard.DashboardFragment;
|
||||
import com.android.settings.search.BaseSearchIndexProvider;
|
||||
import com.android.settingslib.search.Indexable;
|
||||
import com.android.settingslib.search.SearchIndexable;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@SearchIndexable
|
||||
public class HardwareInfoFragment extends DashboardFragment {
|
||||
|
||||
|
@@ -27,7 +27,6 @@ import com.android.settings.core.BasePreferenceController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public abstract class LegalPreferenceController extends BasePreferenceController {
|
||||
private final PackageManager mPackageManager;
|
||||
private Preference mPreference;
|
||||
|
@@ -17,7 +17,6 @@
|
||||
package com.android.settings.network;
|
||||
|
||||
import android.content.Context;
|
||||
import android.telephony.PhoneStateListener;
|
||||
import android.telephony.TelephonyCallback;
|
||||
import android.telephony.TelephonyManager;
|
||||
import android.util.Log;
|
||||
@@ -26,7 +25,6 @@ import androidx.annotation.VisibleForTesting;
|
||||
|
||||
import java.util.concurrent.Executor;
|
||||
|
||||
|
||||
/**
|
||||
* {@link TelephonyCallback} to listen to Allowed Network Types changed
|
||||
*/
|
||||
@@ -49,7 +47,7 @@ public class AllowedNetworkTypesListener extends TelephonyCallback implements
|
||||
}
|
||||
|
||||
/**
|
||||
* Register a PhoneStateListener for Allowed Network Types changed.
|
||||
* Register a TelephonyCallback for Allowed Network Types changed.
|
||||
* @param context the Context
|
||||
* @param subId the subscription id.
|
||||
*/
|
||||
@@ -60,7 +58,7 @@ public class AllowedNetworkTypesListener extends TelephonyCallback implements
|
||||
}
|
||||
|
||||
/**
|
||||
* Unregister a PhoneStateListener for Allowed Network Types changed.
|
||||
* Unregister a TelephonyCallback for Allowed Network Types changed.
|
||||
* @param context the Context
|
||||
* @param subId the subscription id.
|
||||
*/
|
||||
|
@@ -47,7 +47,6 @@ import com.android.settingslib.core.lifecycle.events.OnSaveInstanceState;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public class MobilePlanPreferenceController extends AbstractPreferenceController
|
||||
implements PreferenceControllerMixin, LifecycleObserver, OnCreate, OnSaveInstanceState {
|
||||
|
||||
|
@@ -23,7 +23,6 @@ import androidx.preference.Preference;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.core.BasePreferenceController;
|
||||
import com.android.settingslib.core.AbstractPreferenceController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
@@ -47,7 +47,6 @@ import com.android.settingslib.utils.ThreadUtils;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public class VpnPreferenceController extends AbstractPreferenceController
|
||||
implements PreferenceControllerMixin, LifecycleObserver, OnResume, OnPause {
|
||||
|
||||
|
@@ -19,7 +19,6 @@ package com.android.settings.network.ims;
|
||||
import android.telephony.ims.ImsMmTelManager;
|
||||
import android.util.Log;
|
||||
|
||||
|
||||
/**
|
||||
* An {@link ImsQuery} for accessing IMS user setting for enhanced 4G LTE
|
||||
*/
|
||||
|
@@ -21,7 +21,6 @@ import android.telephony.ims.feature.MmTelFeature;
|
||||
import android.telephony.ims.stub.ImsRegistrationImplBase;
|
||||
import android.util.Log;
|
||||
|
||||
|
||||
/**
|
||||
* An {@link ImsQuery} for accessing IMS provision stat
|
||||
*/
|
||||
|
@@ -19,7 +19,6 @@ package com.android.settings.network.ims;
|
||||
import android.telephony.ims.ImsMmTelManager;
|
||||
import android.util.Log;
|
||||
|
||||
|
||||
/**
|
||||
* An {@link ImsQuery} for accessing IMS tty on VoLte stat
|
||||
*/
|
||||
|
@@ -19,7 +19,6 @@ package com.android.settings.network.ims;
|
||||
import android.telephony.ims.ImsMmTelManager;
|
||||
import android.util.Log;
|
||||
|
||||
|
||||
/**
|
||||
* An {@link ImsQuery} for accessing IMS VT enabled settings from user
|
||||
*/
|
||||
|
@@ -19,7 +19,6 @@ package com.android.settings.network.ims;
|
||||
import android.telephony.ims.ImsMmTelManager;
|
||||
import android.util.Log;
|
||||
|
||||
|
||||
/**
|
||||
* An {@link ImsQuery} for accessing IMS WFC enabled settings from user
|
||||
*/
|
||||
|
@@ -22,11 +22,9 @@ import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.os.Bundle;
|
||||
import android.telephony.ims.ImsManager;
|
||||
import android.telephony.ims.ImsRcsManager;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import androidx.annotation.VisibleForTesting;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.core.instrumentation.InstrumentedDialogFragment;
|
||||
|
@@ -37,7 +37,6 @@ import androidx.preference.SwitchPreference;
|
||||
|
||||
import com.android.settings.network.SubscriptionUtil;
|
||||
|
||||
|
||||
/**
|
||||
* Controller for the "Contact Discovery" option present in MobileNetworkSettings.
|
||||
*/
|
||||
|
@@ -31,7 +31,6 @@ import com.android.settings.core.instrumentation.InstrumentedDialogFragment;
|
||||
import com.android.settings.network.SubscriptionUtil;
|
||||
import com.android.settings.wifi.WifiPickerTrackerHelper;
|
||||
|
||||
|
||||
/**
|
||||
* Dialog Fragment to show dialog for "mobile data"
|
||||
*
|
||||
|
@@ -28,7 +28,6 @@ import com.android.settings.core.BasePreferenceController;
|
||||
import com.android.settings.utils.AnnotationSpan;
|
||||
import com.android.settingslib.HelpUtils;
|
||||
|
||||
|
||||
/**
|
||||
* Class to show the footer that can't connect to 5G when device is in DSDS mode.
|
||||
*/
|
||||
|
@@ -20,8 +20,6 @@
|
||||
*/
|
||||
package com.android.settings.network.telephony;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
public interface TelephonyAvailabilityHandler {
|
||||
|
||||
/**
|
||||
|
@@ -41,7 +41,6 @@ import com.android.settings.network.telephony.MobileNetworkUtils;
|
||||
import com.android.settings.network.telephony.NetworkSelectSettings;
|
||||
import com.android.settings.network.telephony.TelephonyBasePreferenceController;
|
||||
|
||||
|
||||
/**
|
||||
* Preference controller for "Open network select"
|
||||
*/
|
||||
|
@@ -18,7 +18,6 @@ package com.android.settings.sim;
|
||||
|
||||
import android.app.settings.SettingsEnums;
|
||||
import android.content.Context;
|
||||
import android.telecom.PhoneAccount;
|
||||
import android.telecom.PhoneAccountHandle;
|
||||
import android.telecom.TelecomManager;
|
||||
import android.telephony.SubscriptionInfo;
|
||||
|
@@ -27,6 +27,7 @@ import com.android.settingslib.applications.ApplicationsState.AppEntry;
|
||||
import com.android.settingslib.applications.ApplicationsState.AppFilter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/*
|
||||
* Connects info of apps that change wifi state to the ApplicationsState. Wraps around the generic
|
||||
* AppStateAppOpsBridge class to tailor to the semantics of CHANGE_WIFI_STATE. Also provides app
|
||||
|
@@ -26,7 +26,6 @@ import android.content.DialogInterface;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.net.wifi.ScanResult;
|
||||
import android.net.wifi.WifiConfiguration;
|
||||
import android.net.wifi.WifiManager.NetworkRequestMatchCallback;
|
||||
import android.net.wifi.WifiManager.NetworkRequestUserSelectionCallback;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
|
@@ -32,7 +32,6 @@ import androidx.preference.PreferenceScreen;
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.SettingsPreferenceFragment;
|
||||
|
||||
|
||||
/**
|
||||
* Provide an interface for testing out the Wifi API
|
||||
*/
|
||||
|
@@ -26,7 +26,6 @@ import com.android.settings.R;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* Configuration details saved by the user on the WifiSettings screen
|
||||
*/
|
||||
|
@@ -21,7 +21,6 @@ import android.content.Intent;
|
||||
import android.net.NetworkInfo;
|
||||
import android.net.wifi.WifiConfiguration;
|
||||
import android.net.wifi.WifiManager;
|
||||
import android.net.wifi.WifiManager.ActionListener;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.HandlerThread;
|
||||
|
@@ -22,7 +22,6 @@ import android.os.Bundle;
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.SettingsPreferenceFragment;
|
||||
|
||||
|
||||
/**
|
||||
* Wifi information menu item on the diagnostic screen
|
||||
*/
|
||||
|
@@ -45,7 +45,6 @@ import java.net.URL;
|
||||
import java.net.UnknownHostException;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* Show the current status details of Wifi related fields
|
||||
*/
|
||||
|
@@ -30,7 +30,9 @@ import android.widget.ArrayAdapter;
|
||||
import android.widget.ListAdapter;
|
||||
import android.widget.RadioButton;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.appcompat.app.AlertDialog.Builder;
|
||||
|
||||
import com.android.settings.CustomListPreference;
|
||||
import com.android.settings.R;
|
||||
|
||||
|
@@ -43,7 +43,6 @@ import androidx.slice.builders.ListBuilder;
|
||||
import androidx.slice.builders.ListBuilder.RowBuilder;
|
||||
import androidx.slice.builders.SliceAction;
|
||||
|
||||
import com.android.ims.ImsConfig;
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.Utils;
|
||||
import com.android.settings.network.ims.WifiCallingQueryImsState;
|
||||
@@ -57,7 +56,6 @@ import java.util.concurrent.FutureTask;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.TimeoutException;
|
||||
|
||||
|
||||
/**
|
||||
* Helper class to control slices for wifi calling settings.
|
||||
*/
|
||||
|
@@ -27,7 +27,6 @@ import androidx.preference.PreferenceScreen;
|
||||
|
||||
import com.android.settings.core.BasePreferenceController;
|
||||
import com.android.settings.wifi.WifiDialog2;
|
||||
import com.android.settingslib.core.AbstractPreferenceController;
|
||||
import com.android.wifitrackerlib.WifiEntry;
|
||||
|
||||
/**
|
||||
|
@@ -28,7 +28,6 @@ import androidx.preference.PreferenceScreen;
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.core.BasePreferenceController;
|
||||
import com.android.settings.wifi.WifiDialog2;
|
||||
import com.android.settingslib.core.AbstractPreferenceController;
|
||||
import com.android.wifitrackerlib.WifiEntry;
|
||||
|
||||
/**
|
||||
|
@@ -19,8 +19,6 @@ package com.android.settings.wifi.slice;
|
||||
import android.content.Context;
|
||||
import android.net.Uri;
|
||||
|
||||
import com.android.settings.slices.SliceBackgroundWorker;
|
||||
|
||||
/**
|
||||
* {@link SliceBackgroundWorker} for Wi-Fi, used by {@link ContextualWifiSlice}.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user