Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f6316252 authored by Aishwarya Mallampati's avatar Aishwarya Mallampati Committed by Android (Google) Code Review
Browse files

Merge "Remove commit() in constructor to avoid slow I/O in main thread." into main

parents 2f1b3d12 5959350a
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -139,12 +139,6 @@ public class DatagramReceiver extends Handler {
        } catch (Exception e) {
            loge("Cannot get default shared preferences: " + e);
        }

        if ((mSharedPreferences != null) &&
                (!mSharedPreferences.contains(SATELLITE_DATAGRAM_ID_KEY))) {
            mSharedPreferences.edit().putLong(SATELLITE_DATAGRAM_ID_KEY, mNextDatagramId.get())
                    .commit();
        }
    }

    private static final class DatagramReceiverHandlerRequest {
+0 −9
Original line number Diff line number Diff line
@@ -25,7 +25,6 @@ import android.content.ContentResolver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.SharedPreferences;
import android.content.res.Resources;
import android.database.ContentObserver;
import android.net.wifi.WifiManager;
@@ -138,7 +137,6 @@ public class SatelliteController extends Handler {
    @NonNull private final DatagramController mDatagramController;
    @NonNull private final ControllerMetricsStats mControllerMetricsStats;
    @NonNull private final ProvisionMetricsStats mProvisionMetricsStats;
    private SharedPreferences mSharedPreferences = null;
    private final CommandsInterface mCi;
    private ContentResolver mContentResolver = null;

@@ -296,13 +294,6 @@ public class SatelliteController extends Handler {
        mContentResolver = mContext.getContentResolver();
        mCarrierConfigManager = mContext.getSystemService(CarrierConfigManager.class);

        try {
            mSharedPreferences = mContext.getSharedPreferences(SATELLITE_SHARED_PREF,
                    Context.MODE_PRIVATE);
        } catch (Exception e) {
            loge("Cannot get default shared preferences: " + e);
        }

        initializeSatelliteModeRadios();

        ContentObserver satelliteModeRadiosContentObserver = new ContentObserver(this) {