diff options
author | Amith Yamasani <yamasani@google.com> | 2012-09-17 10:21:27 -0700 |
---|---|---|
committer | Amith Yamasani <yamasani@google.com> | 2012-09-17 12:39:41 -0700 |
commit | e940dac47a1d978211eea973fe8576edc4626d48 (patch) | |
tree | 0f076f9e3413d665da88cfc9947e176ff007207b /src/com/android/settings/fuelgauge | |
parent | bdb9fc8687fe6fbe7ed9d1222dba21794206c415 (diff) | |
download | packages_apps_settings-e940dac47a1d978211eea973fe8576edc4626d48.zip packages_apps_settings-e940dac47a1d978211eea973fe8576edc4626d48.tar.gz packages_apps_settings-e940dac47a1d978211eea973fe8576edc4626d48.tar.bz2 |
Use UserManager.getUserIcon() to get the user's avatar.
Change-Id: I035a5e2a518eb827a2e44910471ed04923921aa3
Diffstat (limited to 'src/com/android/settings/fuelgauge')
-rw-r--r-- | src/com/android/settings/fuelgauge/PowerUsageSummary.java | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/com/android/settings/fuelgauge/PowerUsageSummary.java b/src/com/android/settings/fuelgauge/PowerUsageSummary.java index 173efef..9bd5538 100644 --- a/src/com/android/settings/fuelgauge/PowerUsageSummary.java +++ b/src/com/android/settings/fuelgauge/PowerUsageSummary.java @@ -54,6 +54,7 @@ import com.android.internal.os.BatteryStatsImpl; import com.android.internal.os.PowerProfile; import com.android.settings.R; import com.android.settings.fuelgauge.PowerUsageDetail.DrainType; +import com.android.settings.users.UserUtils; import java.io.PrintWriter; import java.io.StringWriter; @@ -768,11 +769,7 @@ public class PowerUsageSummary extends PreferenceFragment implements Runnable { UserInfo info = mUm.getUserInfo(userId); Drawable icon = null; if (info != null && info.iconPath != null) { - try { - icon = Drawable.createFromPath(info.iconPath); - } catch (Exception e) { - Log.w(TAG, "Failure loading user picture " + info.iconPath, e); - } + icon = UserUtils.getUserIcon(mUm, info); } String name = info != null ? info.name : null; if (name == null) { |