Loading src/com/android/bluetooth/opp/BluetoothOppBatch.java +0 −1 Original line number Diff line number Diff line Loading @@ -61,7 +61,6 @@ import com.google.android.collect.Lists; public class BluetoothOppBatch { private static final String TAG = "BtOppBatch"; private static final boolean D = Constants.DEBUG; private static final boolean V = Constants.VERBOSE; public int mId; Loading src/com/android/bluetooth/opp/BluetoothOppIncomingFileConfirmActivity.java +2 −1 Original line number Diff line number Diff line Loading @@ -171,9 +171,10 @@ public class BluetoothOppIncomingFileConfirmActivity extends AlertActivity imple Toast.makeText(this, getString(R.string.bt_toast_2), Toast.LENGTH_SHORT).show(); finish(); } return true; } return false; } @Override protected void onDestroy() { Loading src/com/android/bluetooth/opp/BluetoothOppLauncherActivity.java +34 −5 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ import java.util.ArrayList; import android.app.Activity; import android.bluetooth.BluetoothDevicePicker; import android.content.Intent; import android.content.ContentResolver; import android.content.Context; import android.net.Uri; import android.os.Bundle; Loading Loading @@ -118,7 +119,7 @@ public class BluetoothOppLauncherActivity extends Activity { } } if (isAirplaneModeOn()) { if (!isBluetoothAllowed()) { Intent in = new Intent(this, BluetoothOppBtErrorActivity.class); in.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); in.putExtra("title", this.getString(R.string.airplane_error_title)); Loading Loading @@ -164,11 +165,39 @@ public class BluetoothOppLauncherActivity extends Activity { finish(); } /* Returns true if airplane mode is currently on */ private final boolean isAirplaneModeOn() { return Settings.System.getInt(this.getContentResolver(), Settings.System.AIRPLANE_MODE_ON, 0) == 1; /* Returns true if Bluetooth is allowed given current airplane mode settings. */ private final boolean isBluetoothAllowed() { final ContentResolver resolver = this.getContentResolver(); // Check if airplane mode is on final boolean isAirplaneModeOn = Settings.System.getInt(resolver, Settings.System.AIRPLANE_MODE_ON, 0) == 1; if (!isAirplaneModeOn) { return true; } // Check if airplane mode matters final String airplaneModeRadios = Settings.System.getString(resolver, Settings.System.AIRPLANE_MODE_RADIOS); final boolean isAirplaneSensitive = airplaneModeRadios == null ? true : airplaneModeRadios.contains(Settings.System.RADIO_BLUETOOTH); if (!isAirplaneSensitive) { return true; } // Check if Bluetooth may be enabled in airplane mode final String airplaneModeToggleableRadios = Settings.System.getString(resolver, Settings.System.AIRPLANE_MODE_TOGGLEABLE_RADIOS); final boolean isAirplaneToggleable = airplaneModeToggleableRadios == null ? false : airplaneModeToggleableRadios.contains(Settings.System.RADIO_BLUETOOTH); if (isAirplaneToggleable) { return true; } // If we get here we're not allowed to use Bluetooth right now return false; } private Uri creatFileForSharedContent(Context context, CharSequence shareContent) { if (shareContent == null) { return null; Loading src/com/android/bluetooth/opp/BluetoothOppManager.java +0 −1 Original line number Diff line number Diff line Loading @@ -55,7 +55,6 @@ import java.util.ArrayList; */ public class BluetoothOppManager { private static final String TAG = "BluetoothOppManager"; private static final boolean D = Constants.DEBUG; private static final boolean V = Constants.VERBOSE; private static BluetoothOppManager INSTANCE; Loading src/com/android/bluetooth/opp/BluetoothOppNotification.java +0 −1 Original line number Diff line number Diff line Loading @@ -55,7 +55,6 @@ import java.util.HashMap; */ class BluetoothOppNotification { private static final String TAG = "BluetoothOppNotification"; private static final boolean D = Constants.DEBUG; private static final boolean V = Constants.VERBOSE; static final String status = "(" + BluetoothShare.STATUS + " == '192'" + ")"; Loading Loading
src/com/android/bluetooth/opp/BluetoothOppBatch.java +0 −1 Original line number Diff line number Diff line Loading @@ -61,7 +61,6 @@ import com.google.android.collect.Lists; public class BluetoothOppBatch { private static final String TAG = "BtOppBatch"; private static final boolean D = Constants.DEBUG; private static final boolean V = Constants.VERBOSE; public int mId; Loading
src/com/android/bluetooth/opp/BluetoothOppIncomingFileConfirmActivity.java +2 −1 Original line number Diff line number Diff line Loading @@ -171,9 +171,10 @@ public class BluetoothOppIncomingFileConfirmActivity extends AlertActivity imple Toast.makeText(this, getString(R.string.bt_toast_2), Toast.LENGTH_SHORT).show(); finish(); } return true; } return false; } @Override protected void onDestroy() { Loading
src/com/android/bluetooth/opp/BluetoothOppLauncherActivity.java +34 −5 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ import java.util.ArrayList; import android.app.Activity; import android.bluetooth.BluetoothDevicePicker; import android.content.Intent; import android.content.ContentResolver; import android.content.Context; import android.net.Uri; import android.os.Bundle; Loading Loading @@ -118,7 +119,7 @@ public class BluetoothOppLauncherActivity extends Activity { } } if (isAirplaneModeOn()) { if (!isBluetoothAllowed()) { Intent in = new Intent(this, BluetoothOppBtErrorActivity.class); in.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); in.putExtra("title", this.getString(R.string.airplane_error_title)); Loading Loading @@ -164,11 +165,39 @@ public class BluetoothOppLauncherActivity extends Activity { finish(); } /* Returns true if airplane mode is currently on */ private final boolean isAirplaneModeOn() { return Settings.System.getInt(this.getContentResolver(), Settings.System.AIRPLANE_MODE_ON, 0) == 1; /* Returns true if Bluetooth is allowed given current airplane mode settings. */ private final boolean isBluetoothAllowed() { final ContentResolver resolver = this.getContentResolver(); // Check if airplane mode is on final boolean isAirplaneModeOn = Settings.System.getInt(resolver, Settings.System.AIRPLANE_MODE_ON, 0) == 1; if (!isAirplaneModeOn) { return true; } // Check if airplane mode matters final String airplaneModeRadios = Settings.System.getString(resolver, Settings.System.AIRPLANE_MODE_RADIOS); final boolean isAirplaneSensitive = airplaneModeRadios == null ? true : airplaneModeRadios.contains(Settings.System.RADIO_BLUETOOTH); if (!isAirplaneSensitive) { return true; } // Check if Bluetooth may be enabled in airplane mode final String airplaneModeToggleableRadios = Settings.System.getString(resolver, Settings.System.AIRPLANE_MODE_TOGGLEABLE_RADIOS); final boolean isAirplaneToggleable = airplaneModeToggleableRadios == null ? false : airplaneModeToggleableRadios.contains(Settings.System.RADIO_BLUETOOTH); if (isAirplaneToggleable) { return true; } // If we get here we're not allowed to use Bluetooth right now return false; } private Uri creatFileForSharedContent(Context context, CharSequence shareContent) { if (shareContent == null) { return null; Loading
src/com/android/bluetooth/opp/BluetoothOppManager.java +0 −1 Original line number Diff line number Diff line Loading @@ -55,7 +55,6 @@ import java.util.ArrayList; */ public class BluetoothOppManager { private static final String TAG = "BluetoothOppManager"; private static final boolean D = Constants.DEBUG; private static final boolean V = Constants.VERBOSE; private static BluetoothOppManager INSTANCE; Loading
src/com/android/bluetooth/opp/BluetoothOppNotification.java +0 −1 Original line number Diff line number Diff line Loading @@ -55,7 +55,6 @@ import java.util.HashMap; */ class BluetoothOppNotification { private static final String TAG = "BluetoothOppNotification"; private static final boolean D = Constants.DEBUG; private static final boolean V = Constants.VERBOSE; static final String status = "(" + BluetoothShare.STATUS + " == '192'" + ")"; Loading