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

Commit 5a2910ae authored by Chris Soyars's avatar Chris Soyars
Browse files

Merge branch 'eclair' of git://github.com/cyanogen/android_frameworks_base into HEAD

parents 33c711c1 67dd0a3c
Loading
Loading
Loading
Loading
+10 −0
Original line number Original line Diff line number Diff line
@@ -89,6 +89,16 @@ final public class Proxy {
        return getDefaultPort();
        return getDefaultPort();
    }
    }


    /**
     * @param ctx
     * @return if we should only proxy while on wifi
     * @hide
     */
    static final public boolean isProxyForWifiOnly(Context ctx) {
        return Settings.Secure.getInt(ctx.getContentResolver(),
                Settings.Secure.HTTP_PROXY_WIFI_ONLY, 1) != 0;
    }
    
    /**
    /**
     * Return the default proxy host specified by the carrier.
     * Return the default proxy host specified by the carrier.
     * @return String containing the host name or null if there is no proxy for
     * @return String containing the host name or null if there is no proxy for
+7 −9
Original line number Original line Diff line number Diff line
@@ -237,6 +237,7 @@ public class RequestQueue implements RequestFeeder {
            mContext.registerReceiver(mProxyChangeReceiver,
            mContext.registerReceiver(mProxyChangeReceiver,
                                      new IntentFilter(Proxy.PROXY_CHANGE_ACTION));
                                      new IntentFilter(Proxy.PROXY_CHANGE_ACTION));
        }
        }
        setProxyConfig();	
    }
    }


    /**
    /**
@@ -258,19 +259,16 @@ public class RequestQueue implements RequestFeeder {
     */
     */
    private synchronized void setProxyConfig() {
    private synchronized void setProxyConfig() {
        NetworkInfo info = mConnectivityManager.getActiveNetworkInfo();
        NetworkInfo info = mConnectivityManager.getActiveNetworkInfo();
        if (info != null && info.getType() == ConnectivityManager.TYPE_WIFI) {
            mProxyHost = null;
        } else {
        String host = Proxy.getHost(mContext);
        String host = Proxy.getHost(mContext);
        if (HttpLog.LOGV) HttpLog.v("RequestQueue.setProxyConfig " + host);
        if (HttpLog.LOGV) HttpLog.v("RequestQueue.setProxyConfig " + host);
            if (host == null) {
        if (host == null || (Proxy.isProxyForWifiOnly(mContext) &&
                (info == null || info.getType() != ConnectivityManager.TYPE_WIFI))) {
            mProxyHost = null;
            mProxyHost = null;
        } else {
        } else {
            mActivePool.disablePersistence();
            mActivePool.disablePersistence();
            mProxyHost = new HttpHost(host, Proxy.getPort(mContext), "http");
            mProxyHost = new HttpHost(host, Proxy.getPort(mContext), "http");
        }
        }
    }
    }
    }


    /**
    /**
     * used by webkit
     * used by webkit
+13 −1
Original line number Original line Diff line number Diff line
@@ -1443,12 +1443,18 @@ public final class Settings {
         * @hide
         * @hide
         */
         */
        public static final String TRACKBALL_WAKE_SCREEN = "trackball_wake_screen";
        public static final String TRACKBALL_WAKE_SCREEN = "trackball_wake_screen";
        /**
         * Whether to unlock the screen with the trackball. The value is boolean (1 or 0).
         * @hide
         */
        public static final String TRACKBALL_UNLOCK_SCREEN = "trackball_unlock_screen";
        
        
        /**
        /**
         * Whether to show the 4 columns or 5 columns on the launcher.
         * Whether to show the 4 columns or 5 columns on the launcher.
         * @hide
         * @hide
         */
         */
        public static final String LAUNCHER_COLUMN_NUMBER = "launcher_column_number";
        public static final String LAUNCHER_COLUMN_NUMBER = "launcher_column_number";
        
        /**
        /**
         * Whether to show the battery level percentage overlayed on the icon.
         * Whether to show the battery level percentage overlayed on the icon.
         * @hide
         * @hide
@@ -2086,6 +2092,12 @@ public final class Settings {
         */
         */
        public static final String HTTP_PROXY = "http_proxy";
        public static final String HTTP_PROXY = "http_proxy";


        /**
         * If proxy should be active on wifi only
         * @hide
         */
        public static final String HTTP_PROXY_WIFI_ONLY = "http_proxy_wifi_only";
        
        /**
        /**
         * Whether the package installer should allow installation of apps downloaded from
         * Whether the package installer should allow installation of apps downloaded from
         * sources other than the Android Market (vending machine).
         * sources other than the Android Market (vending machine).
+9 −2
Original line number Original line Diff line number Diff line
@@ -370,7 +370,7 @@ public class BluetoothService extends IBluetooth.Stub {
                                                "Need BLUETOOTH_ADMIN permission");
                                                "Need BLUETOOTH_ADMIN permission");


        // Airplane mode can prevent Bluetooth radio from being turned on.
        // Airplane mode can prevent Bluetooth radio from being turned on.
        if (mIsAirplaneSensitive && isAirplaneModeOn()) {
        if (mIsAirplaneSensitive && isAirplaneModeOn() && !isAirplaneToggleable()) {
            return false;
            return false;
        }
        }
        if (mBluetoothState != BluetoothAdapter.STATE_OFF) {
        if (mBluetoothState != BluetoothAdapter.STATE_OFF) {
@@ -545,7 +545,7 @@ public class BluetoothService extends IBluetooth.Stub {
                mEventLoop.onPropertyChanged(propVal);
                mEventLoop.onPropertyChanged(propVal);
            }
            }


            if (mIsAirplaneSensitive && isAirplaneModeOn()) {
            if (mIsAirplaneSensitive && isAirplaneModeOn() && !isAirplaneToggleable()) {
                disable(false);
                disable(false);
            }
            }


@@ -1612,6 +1612,13 @@ public class BluetoothService extends IBluetooth.Stub {
                Settings.System.AIRPLANE_MODE_ON, 0) == 1;
                Settings.System.AIRPLANE_MODE_ON, 0) == 1;
    }
    }


    private boolean isAirplaneToggleable() {
        String toggleableRadios = Settings.System.getString(mContext.getContentResolver(),
                Settings.System.AIRPLANE_MODE_TOGGLEABLE_RADIOS);
        return toggleableRadios != null
            && toggleableRadios.contains(Settings.System.RADIO_BLUETOOTH);
    }
    
    /* Broadcast the Uuid intent */
    /* Broadcast the Uuid intent */
    /*package*/ synchronized void sendUuidIntent(String address) {
    /*package*/ synchronized void sendUuidIntent(String address) {
        ParcelUuid[] uuid = getUuidFromCache(address);
        ParcelUuid[] uuid = getUuidFromCache(address);
+4 −0
Original line number Original line Diff line number Diff line
@@ -122,6 +122,9 @@
    <string name="turn_on_radio" msgid="3912793092339962371">"Zapnout bezdrátové připojení"</string>
    <string name="turn_on_radio" msgid="3912793092339962371">"Zapnout bezdrátové připojení"</string>
    <string name="turn_off_radio" msgid="8198784949987062346">"Vypnout bezdrátové připojení"</string>
    <string name="turn_off_radio" msgid="8198784949987062346">"Vypnout bezdrátové připojení"</string>
    <string name="screen_lock" msgid="799094655496098153">"Zámek obrazovky"</string>
    <string name="screen_lock" msgid="799094655496098153">"Zámek obrazovky"</string>
    <string name="reboot_system">Restartovat</string>
    <string name="reboot_confirm">Váš telefon bude restartován.</string>
    <string name="reboot_progress">Restartování...</string>
    <string name="power_off" msgid="4266614107412865048">"Vypnout"</string>
    <string name="power_off" msgid="4266614107412865048">"Vypnout"</string>
    <string name="shutdown_progress" msgid="2281079257329981203">"Vypínání..."</string>
    <string name="shutdown_progress" msgid="2281079257329981203">"Vypínání..."</string>
    <string name="shutdown_confirm" msgid="649792175242821353">"Váš telefon bude vypnut."</string>
    <string name="shutdown_confirm" msgid="649792175242821353">"Váš telefon bude vypnut."</string>
@@ -129,6 +132,7 @@
    <string name="global_actions" msgid="2406416831541615258">"Možnosti telefonu"</string>
    <string name="global_actions" msgid="2406416831541615258">"Možnosti telefonu"</string>
    <string name="global_action_lock" msgid="2844945191792119712">"Zámek obrazovky"</string>
    <string name="global_action_lock" msgid="2844945191792119712">"Zámek obrazovky"</string>
    <string name="global_action_power_off" msgid="4471879440839879722">"Vypnout"</string>
    <string name="global_action_power_off" msgid="4471879440839879722">"Vypnout"</string>
    <string name="global_action_reboot">Restartovat</string>
    <string name="global_action_toggle_silent_mode" msgid="8219525344246810925">"Tichý režim"</string>
    <string name="global_action_toggle_silent_mode" msgid="8219525344246810925">"Tichý režim"</string>
    <string name="global_action_silent_mode_on_status" msgid="3289841937003758806">"Zvuk je VYPNUTÝ."</string>
    <string name="global_action_silent_mode_on_status" msgid="3289841937003758806">"Zvuk je VYPNUTÝ."</string>
    <string name="global_action_silent_mode_off_status" msgid="1506046579177066419">"Zvuk je zapnutý"</string>
    <string name="global_action_silent_mode_off_status" msgid="1506046579177066419">"Zvuk je zapnutý"</string>