Clean up: use AppPreference for PowerGaugePreference

- And remove the code for customizing app icon size.

Bug: 65182905
Bug: 68426851
Test: robotests
Change-Id: I4e37bbee3636266f7c1a639b8e9faabb78d61110
This commit is contained in:
Fan Zhang
2017-10-29 11:54:10 -07:00
parent 1c3a4de93d
commit fdf96975e3
2 changed files with 6 additions and 11 deletions

View File

@@ -15,6 +15,8 @@
*/
package com.android.settings.fuelgauge;
import static com.google.common.truth.Truth.assertThat;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.VectorDrawable;
@@ -35,8 +37,6 @@ import org.mockito.MockitoAnnotations;
import org.robolectric.RuntimeEnvironment;
import org.robolectric.annotation.Config;
import static com.google.common.truth.Truth.assertThat;
@RunWith(SettingsRobolectricTestRunner.class)
@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION)
public class PowerGaugePreferenceTest {
@@ -53,7 +53,7 @@ public class PowerGaugePreferenceTest {
MockitoAnnotations.initMocks(this);
mContext = RuntimeEnvironment.application;
mRootView = LayoutInflater.from(mContext).inflate(R.layout.preference,
mRootView = LayoutInflater.from(mContext).inflate(R.layout.preference_app,
null);
mWidgetView = LayoutInflater.from(mContext).inflate(R.layout.preference_widget_summary,
null);
@@ -61,6 +61,7 @@ public class PowerGaugePreferenceTest {
mPreferenceViewHolder = PreferenceViewHolder.createInstanceForTests(mRootView);
mPowerGaugePreference = new PowerGaugePreference(mContext);
assertThat(mPowerGaugePreference.getLayoutResource()).isEqualTo(R.layout.preference_app);
}
@Test