BatteryStatsViewer: Fix initial activity after launch
Test: Open through Settings IA, observe it lands on the picker
activity instead of opening a random consumer by default.
Change-Id: I2456422a38f6e1842c5c883e687b2d09d6779e39
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
This commit is contained in:
@@ -79,14 +79,6 @@ public class BatteryConsumerPickerActivity extends AppCompatActivity {
|
||||
mBatteryConsumerListAdapter =
|
||||
new BatteryConsumerListAdapter((this::setSelectedBatteryConsumer));
|
||||
mAppList.setAdapter(mBatteryConsumerListAdapter);
|
||||
|
||||
if (icicle == null) {
|
||||
final String batteryConsumerId = getPreferences(Context.MODE_PRIVATE)
|
||||
.getString(PREF_SELECTED_BATTERY_CONSUMER, null);
|
||||
if (batteryConsumerId != null) {
|
||||
startBatteryStatsActivity(batteryConsumerId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void setSelectedBatteryConsumer(String batteryConsumerId) {
|
||||
|
||||
Reference in New Issue
Block a user