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

Commit 9daa1d93 authored by Linux Build Service Account's avatar Linux Build Service Account
Browse files

Merge e88e8fc8 on remote branch

Change-Id: I64acf55b14627986d6b50526e331dec6df793b2a
parents f014e31a e88e8fc8
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -298,6 +298,15 @@ public class PrivacySettings extends SettingsPreferenceFragment implements Index
    }

    private static boolean collectDiagnosticsEnabled(Context context) {
        return context.getResources().getBoolean(R.bool.config_collect_diagnostics_enabled);
        if (!context.getResources().getBoolean(R.bool.config_collect_diagnostics_enabled)) {
            return false;
        }

        try {
            return context.getPackageManager().getPackageInfo(
                    "com.tmobile.pr.mytmobile", 0) != null;
        } catch(PackageManager.NameNotFoundException e) {
            return false;
        }
    }
}
+18 −0
Original line number Diff line number Diff line
@@ -48,6 +48,7 @@ public final class DevicePickerFragment extends DeviceListPreferenceFragment {
    private String mLaunchPackage;
    private String mLaunchClass;
    private boolean mStartScanOnResume;
    private boolean mDeviceSelected;

    @Override
    void addPreferencesForActivity() {
@@ -103,12 +104,28 @@ public final class DevicePickerFragment extends DeviceListPreferenceFragment {
    public void onResume() {
        super.onResume();
        addCachedDevices();
        mDeviceSelected = false;
        if (mStartScanOnResume) {
            mLocalAdapter.startScanning(true);
            mStartScanOnResume = false;
        }
    }

    @Override
    public void onPause() {
        super.onPause();
        /* Check if any device was selected, if no device selected
         * send  ACTION_DEVICE_NOT_SELECTED intent, otherwise
         * don;t do anything */
        if (!mDeviceSelected) {
            Intent intent = new Intent(BluetoothDevicePicker.ACTION_DEVICE_NOT_SELECTED);
            if (mLaunchPackage != null && mLaunchClass != null) {
                intent.setClassName(mLaunchPackage, mLaunchClass);
            }
            getActivity().sendBroadcast(intent);
        }
    }

    @Override
    void onDevicePreferenceClick(BluetoothDevicePreference btPreference) {
        mLocalAdapter.stopScanning();
@@ -144,6 +161,7 @@ public final class DevicePickerFragment extends DeviceListPreferenceFragment {
    }

    private void sendDevicePickedIntent(BluetoothDevice device) {
        mDeviceSelected = true;
        Intent intent = new Intent(BluetoothDevicePicker.ACTION_DEVICE_SELECTED);
        intent.putExtra(BluetoothDevice.EXTRA_DEVICE, device);
        if (mLaunchPackage != null && mLaunchClass != null) {
+0 −0

File mode changed from 100644 to 100755.

+4 −1
Original line number Diff line number Diff line
@@ -138,10 +138,12 @@ public class UsbModeChooserActivity extends Activity {

    private void inflateOption(final int mode, boolean selected, LinearLayout container,
            final boolean disallowedByAdmin) {
        /** UsbSecurity is disable
        boolean isSimCardInserted = SystemProperties.getBoolean(
            "persist.sys.sim.activate", false);
        boolean isUsbSecurityEnable = SystemProperties.getBoolean(
            "persist.sys.usb.security", false);
        **/

        View v = mLayoutInflater.inflate(R.layout.restricted_radio_with_summary, container, false);

@@ -174,10 +176,11 @@ public class UsbModeChooserActivity extends Activity {
            }
        });
        ((Checkable) v).setChecked(selected);
        /** UsbSecurity is disable
        if( !isSimCardInserted && isUsbSecurityEnable )
        {
            v.setEnabled(selected);
        }
        }**/
        container.addView(v);
    }