Snap for 10347638 from 542ef9e5b2
to udc-qpr1-release
Change-Id: I013250054ac4cff714625e9b705900f2fadbeb1b
This commit is contained in:
@@ -98,7 +98,7 @@ public class QrCodeScanModeActivity extends QrCodeScanModeBaseActivity {
|
||||
BluetoothBroadcastUtils.TAG_FRAGMENT_QR_CODE_SCANNER);
|
||||
|
||||
if (fragment == null) {
|
||||
fragment = new QrCodeScanModeFragment(mIsGroupOp, mSink);
|
||||
fragment = new QrCodeScanModeFragment();
|
||||
} else {
|
||||
if (fragment.isVisible()) {
|
||||
return;
|
||||
|
@@ -18,7 +18,6 @@ package com.android.settings.bluetooth;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.settings.SettingsEnums;
|
||||
import android.bluetooth.BluetoothDevice;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Matrix;
|
||||
@@ -71,9 +70,7 @@ public class QrCodeScanModeFragment extends InstrumentedFragment implements
|
||||
|
||||
public static final String KEY_BROADCAST_METADATA = "key_broadcast_metadata";
|
||||
|
||||
private boolean mIsGroupOp;
|
||||
private int mCornerRadius;
|
||||
private BluetoothDevice mSink;
|
||||
private String mBroadcastMetadata;
|
||||
private Context mContext;
|
||||
private QrCamera mCamera;
|
||||
@@ -81,11 +78,6 @@ public class QrCodeScanModeFragment extends InstrumentedFragment implements
|
||||
private TextView mSummary;
|
||||
private TextView mErrorMessage;
|
||||
|
||||
public QrCodeScanModeFragment(boolean isGroupOp, BluetoothDevice sink) {
|
||||
mIsGroupOp = isGroupOp;
|
||||
mSink = sink;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
@@ -20,9 +20,8 @@ import android.content.Context;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.util.SparseIntArray;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.IdRes;
|
||||
import androidx.annotation.DrawableRes;
|
||||
import androidx.annotation.IntDef;
|
||||
import androidx.annotation.VisibleForTesting;
|
||||
import androidx.preference.Preference;
|
||||
@@ -134,7 +133,8 @@ public abstract class BatteryTip implements Comparable<BatteryTip>, Parcelable {
|
||||
|
||||
public abstract CharSequence getSummary(Context context);
|
||||
|
||||
@IdRes
|
||||
/** Gets the drawable resource id for the icon. */
|
||||
@DrawableRes
|
||||
public abstract int getIconId();
|
||||
|
||||
/**
|
||||
@@ -162,21 +162,12 @@ public abstract class BatteryTip implements Comparable<BatteryTip>, Parcelable {
|
||||
preference.setTitle(getTitle(context));
|
||||
preference.setSummary(getSummary(context));
|
||||
preference.setIcon(getIconId());
|
||||
@IdRes int iconTintColorId = getIconTintColorId();
|
||||
if (iconTintColorId != View.NO_ID) {
|
||||
preference.getIcon().setTint(context.getColor(iconTintColorId));
|
||||
}
|
||||
final CardPreference cardPreference = castToCardPreferenceSafely(preference);
|
||||
if (cardPreference != null) {
|
||||
cardPreference.resetLayoutState();
|
||||
}
|
||||
}
|
||||
|
||||
/** Returns the color resid for tinting {@link #getIconId()} or {@link View#NO_ID} if none. */
|
||||
public @IdRes int getIconTintColorId() {
|
||||
return View.NO_ID;
|
||||
}
|
||||
|
||||
public boolean shouldShowDialog() {
|
||||
return mShowDialog;
|
||||
}
|
||||
|
@@ -69,7 +69,7 @@ public class WifiAPITest extends SettingsPreferenceFragment implements
|
||||
|
||||
@Override
|
||||
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
|
||||
addPreferencesFromResource(R.layout.wifi_api_test);
|
||||
addPreferencesFromResource(R.xml.wifi_api_test);
|
||||
|
||||
final PreferenceScreen preferenceScreen = getPreferenceScreen();
|
||||
|
||||
|
@@ -18,11 +18,11 @@ package com.android.settings.fuelgauge.batterytip.tips;
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.View;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.IdRes;
|
||||
import androidx.annotation.DrawableRes;
|
||||
import androidx.preference.Preference;
|
||||
import androidx.preference.PreferenceViewHolder;
|
||||
|
||||
@@ -45,7 +45,7 @@ public class BatteryTipTest {
|
||||
|
||||
private static final String TITLE = "title";
|
||||
private static final String SUMMARY = "summary";
|
||||
@IdRes
|
||||
@DrawableRes
|
||||
private static final int ICON_ID = R.drawable.ic_fingerprint;
|
||||
|
||||
private Context mContext;
|
||||
|
Reference in New Issue
Block a user