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

Commit 1a19974b authored by Steve Kondik's avatar Steve Kondik Committed by Gerrit Code Review
Browse files

Merge "Better fix for 4G on at boot: frameworks/base portion" into gingerbread

parents e6e33f3d 1560d359
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@ import android.os.Handler;
import android.os.IBinder;
import android.os.ServiceManager;
import android.util.Log;

import android.provider.Settings;
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;

@@ -104,6 +104,9 @@ public class WimaxHelper {
            Object wimaxService = context.getSystemService(WimaxManagerConstants.WIMAX_SERVICE);
            Method m = wimaxService.getClass().getMethod("setWimaxEnabled", boolean.class);
            ret = (Boolean) m.invoke(wimaxService, enabled);
            if (ret)
                Settings.Secure.putInt(context.getContentResolver(),
                        Settings.Secure.WIMAX_ON, (Boolean) enabled ? 1 : 0);
        } catch (Exception e) {
            Log.e(TAG, "Unable to set WiMAX state!", e);
        }
+5 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ import android.content.IntentFilter;
import android.content.res.Resources;
import android.database.ContentObserver;
import android.net.Uri;
import android.net.wimax.WimaxHelper;
import android.os.Handler;
import android.provider.Settings;
import android.util.AttributeSet;
@@ -104,6 +105,10 @@ public class PowerWidget extends FrameLayout {
        if(buttons == null) {
            Log.i(TAG, "Default buttons being loaded");
            buttons = BUTTONS_DEFAULT;
            // Add the WiMAX button if it's supported
            if (WimaxHelper.isWimaxSupported(mContext)) {
                buttons += BUTTON_DELIMITER + PowerButton.BUTTON_WIMAX;
            }
        }
        Log.i(TAG, "Button list: " + buttons);

+0 −7
Original line number Diff line number Diff line
@@ -24,7 +24,6 @@ import android.content.IntentFilter;
import android.net.wimax.WimaxHelper;
import android.net.wimax.WimaxManagerConstants;
import android.os.AsyncTask;
import android.provider.Settings;
import android.util.Log;

public class WimaxButton extends PowerButton {
@@ -72,12 +71,6 @@ public class WimaxButton extends PowerButton {
            int wimaxState = intent.getIntExtra(WimaxManagerConstants.CURRENT_WIMAX_ENABLED_STATE, WimaxManagerConstants.WIMAX_ENABLED_STATE_UNKNOWN);
            int widgetState = wimaxStateToFiveState(wimaxState);
            setCurrentState(context, widgetState);
            if (widgetState == WimaxManagerConstants.WIMAX_ENABLED_STATE_ENABLED)
                Settings.Secure.putInt(context.getContentResolver(),
                    Settings.Secure.WIMAX_ON, 1);
            else if (widgetState == WimaxManagerConstants.WIMAX_ENABLED_STATE_DISABLED)
                Settings.Secure.putInt(context.getContentResolver(),
                    Settings.Secure.WIMAX_ON, 0);
        }

        /**