luca020400

Untitled

May 9th, 2015
304
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.62 KB | None | 0 0
  1. From 9860ebe9416918077620e14bbd9ab6e2b2a77844 Mon Sep 17 00:00:00 2001
  2. From: luca020400 <[email protected]>
  3. Date: Sat, 9 May 2015 19:34:34 +0200
  4. Subject: [PATCH] bluetooth: unified default name
  5.  
  6. Change-Id: I737ec2885916e05379fcfc11e3517ffefd087d9e
  7. ---
  8. bluetooth/bdroid_buildcfg.h | 25 +++++++++++++++++++++++--
  9.  1 file changed, 23 insertions(+), 2 deletions(-)
  10.  
  11. diff --git a/bluetooth/bdroid_buildcfg.h b/bluetooth/bdroid_buildcfg.h
  12. index b526c9f..e995e11 100644
  13. --- a/bluetooth/bdroid_buildcfg.h
  14. +++ b/bluetooth/bdroid_buildcfg.h
  15. @@ -1,6 +1,6 @@
  16.  /*
  17.   * Copyright (C) 2012 The Android Open Source Project
  18. - * Copyright (C) 2014 The CyanogenMod Project
  19. + * Copyright (C) 2015 The CyanogenMod Project
  20.   *
  21.   * Licensed under the Apache License, Version 2.0 (the "License");
  22.   * you may not use this file except in compliance with the License.
  23. @@ -18,7 +18,28 @@
  24.  #ifndef _BDROID_BUILDCFG_H
  25.  #define _BDROID_BUILDCFG_H
  26.  
  27. -#define BTM_DEF_LOCAL_NAME   "Moto G"
  28. +#include <cutils/properties.h>
  29. +#include <string.h>
  30. +
  31. +inline const char* BtmGetDefaultName()
  32. +{
  33. +   char device[PROPERTY_VALUE_MAX];
  34. +   property_get("ro.boot.device", device, "");
  35. +
  36. +   if (!strcmp("falcon", device)) {
  37. +       return "Moto G";
  38. +   } else if (!strcmp("peregrine", device)) {
  39. +       return "Moto G LTE";
  40. +   } else if (!strcmp("thea", device)) {
  41. +       return "Moto G 2014 LTE";
  42. +   } else if (!strcmp("titan", device)) {
  43. +       return "Moto G 2014";
  44. +   }
  45. +
  46. +   return "";
  47. +}
  48. +
  49. +#define BTM_DEF_LOCAL_NAME   BtmGetDefaultName()
  50.  #define BLUETOOTH_QTI_SW TRUE
  51.  // Disables read remote device feature
  52.  #define BTA_SKIP_BLE_READ_REMOTE_FEAT FALSE
  53. --
  54. 2.4.0
Advertisement
Add Comment
Please, Sign In to add comment