Loading core/res/res/values/customize.xml +0 −2 Original line number Diff line number Diff line Loading @@ -59,8 +59,6 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. <string name="def_wifi_wifihotspot_pass" translatable="false"></string> <!-- Default wi-fi direct name --> <string name="def_wifi_direct_name" translatable="false"></string> <!-- Setting customize default bluetooth name --> <string name="def_custom_bt_defname"></string> <!-- custom date format or not --> <bool name="config_dateformat">false</bool> </resources> core/res/res/values/symbols.xml +0 −1 Original line number Diff line number Diff line Loading @@ -2405,7 +2405,6 @@ <java-symbol type="integer" name="wifi_hotspot_security_type" /> <java-symbol type="string" name="def_wifi_wifihotspot_pass" /> <java-symbol type="string" name="def_wifi_direct_name" /> <java-symbol type="string" name="def_custom_bt_defname" /> <!-- config 2G/3G/4G RAT strings for carriers --> <java-symbol type="string" name="config_rat_unknown" /> <java-symbol type="string" name="config_rat_2g" /> Loading packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothEventManager.java +0 −23 Original line number Diff line number Diff line Loading @@ -110,7 +110,6 @@ public final class BluetoothEventManager { addHandler(Intent.ACTION_DOCK_EVENT, new DockEventHandler()); mContext.registerReceiver(mBroadcastReceiver, mAdapterIntentFilter, null, mReceiverHandler); setDefaultBtName(); } void registerProfileIntentReceiver() { Loading @@ -124,25 +123,6 @@ public final class BluetoothEventManager { registerProfileIntentReceiver(); } // set bluetooth default name private void setDefaultBtName() { String name = mContext.getResources().getString( com.android.internal.R.string.def_custom_bt_defname); boolean needSet = !TextUtils.isEmpty(name); Log.d(TAG, "custom bluetooth name: " + name); // This flag is to only set default bluetooth name once. SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(mContext); boolean notSet = preferences.getBoolean("is_first_boot",true); // only bluetooth state is on, set name will success, or, it will fail. boolean okToSet = mLocalAdapter.getBluetoothState() == BluetoothAdapter.STATE_ON; if (needSet && notSet && okToSet) { mLocalAdapter.setName(name); SharedPreferences.Editor edit = preferences.edit(); edit.putBoolean("is_first_boot",false); edit.apply(); } } /** Register to start receiving callbacks for Bluetooth events. */ public void registerCallback(BluetoothCallback callback) { synchronized (mCallbacks) { Loading Loading @@ -178,9 +158,6 @@ public final class BluetoothEventManager { BluetoothAdapter.ERROR); // update local profiles and get paired devices mLocalAdapter.setBluetoothStateInt(state); if (state == BluetoothAdapter.STATE_ON) { setDefaultBtName(); } // send callback to update UI and possibly start scanning synchronized (mCallbacks) { for (BluetoothCallback callback : mCallbacks) { Loading Loading
core/res/res/values/customize.xml +0 −2 Original line number Diff line number Diff line Loading @@ -59,8 +59,6 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. <string name="def_wifi_wifihotspot_pass" translatable="false"></string> <!-- Default wi-fi direct name --> <string name="def_wifi_direct_name" translatable="false"></string> <!-- Setting customize default bluetooth name --> <string name="def_custom_bt_defname"></string> <!-- custom date format or not --> <bool name="config_dateformat">false</bool> </resources>
core/res/res/values/symbols.xml +0 −1 Original line number Diff line number Diff line Loading @@ -2405,7 +2405,6 @@ <java-symbol type="integer" name="wifi_hotspot_security_type" /> <java-symbol type="string" name="def_wifi_wifihotspot_pass" /> <java-symbol type="string" name="def_wifi_direct_name" /> <java-symbol type="string" name="def_custom_bt_defname" /> <!-- config 2G/3G/4G RAT strings for carriers --> <java-symbol type="string" name="config_rat_unknown" /> <java-symbol type="string" name="config_rat_2g" /> Loading
packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothEventManager.java +0 −23 Original line number Diff line number Diff line Loading @@ -110,7 +110,6 @@ public final class BluetoothEventManager { addHandler(Intent.ACTION_DOCK_EVENT, new DockEventHandler()); mContext.registerReceiver(mBroadcastReceiver, mAdapterIntentFilter, null, mReceiverHandler); setDefaultBtName(); } void registerProfileIntentReceiver() { Loading @@ -124,25 +123,6 @@ public final class BluetoothEventManager { registerProfileIntentReceiver(); } // set bluetooth default name private void setDefaultBtName() { String name = mContext.getResources().getString( com.android.internal.R.string.def_custom_bt_defname); boolean needSet = !TextUtils.isEmpty(name); Log.d(TAG, "custom bluetooth name: " + name); // This flag is to only set default bluetooth name once. SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(mContext); boolean notSet = preferences.getBoolean("is_first_boot",true); // only bluetooth state is on, set name will success, or, it will fail. boolean okToSet = mLocalAdapter.getBluetoothState() == BluetoothAdapter.STATE_ON; if (needSet && notSet && okToSet) { mLocalAdapter.setName(name); SharedPreferences.Editor edit = preferences.edit(); edit.putBoolean("is_first_boot",false); edit.apply(); } } /** Register to start receiving callbacks for Bluetooth events. */ public void registerCallback(BluetoothCallback callback) { synchronized (mCallbacks) { Loading Loading @@ -178,9 +158,6 @@ public final class BluetoothEventManager { BluetoothAdapter.ERROR); // update local profiles and get paired devices mLocalAdapter.setBluetoothStateInt(state); if (state == BluetoothAdapter.STATE_ON) { setDefaultBtName(); } // send callback to update UI and possibly start scanning synchronized (mCallbacks) { for (BluetoothCallback callback : mCallbacks) { Loading