Skip to content

Commit

Permalink
Move in the few common Stuff back to device Tree
Browse files Browse the repository at this point in the history
    To support more devices with only wifi like Galaxy view

Change-Id: Iecc9bb0554b4dcb887da488f6186fa4a7c660a8f
Signed-off-by: Apavayan Sinha <[email protected]>
  • Loading branch information
aapav01 committed Jan 7, 2017
1 parent d0dff09 commit 076e1be
Show file tree
Hide file tree
Showing 10 changed files with 274 additions and 0 deletions.
3 changes: 3 additions & 0 deletions BoardConfig.mk
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ TARGET_OTA_ASSERT_DEVICE := j7e3g,j7e3gxx,j7elte,j7eltexx

DEVICE_PATH := device/samsung/j7eltexx

# Bluetooth
BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := $(DEVICE_PATH)/bluetooth

# Init
TARGET_INIT_VENDOR_LIB := libinit_sec
TARGET_UNIFIED_DEVICE := true
Expand Down
23 changes: 23 additions & 0 deletions bluetooth/bdroid_buildcfg.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
* Copyright (C) 2012 The Android Open Source Project
* Copyright (C) 2014 The CyanogenMod Project <http://www.cyanogenmod.org>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#ifndef _BDROID_BUILDCFG_H
#define _BDROID_BUILDCFG_H

#define BTM_DEF_LOCAL_NAME "Samsung Galaxy J7"

#endif
15 changes: 15 additions & 0 deletions device.mk
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/gps/gps.conf:system/etc/gps.conf \
$(LOCAL_PATH)/configs/gps/gps.xml:system/etc/gps.xml

# Key-layout
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/keylayout/Button_Jack.kl:system/usr/keylayout/Button_Jack.kl \
$(LOCAL_PATH)/keylayout/gpio_keys.kl:system/usr/keylayout/gpio_keys.kl \
$(LOCAL_PATH)/keylayout/sec_touchkey.kl:system/usr/keylayout/sec_touchkey.kl

# Lights
PRODUCT_PACKAGES += \
lights.universal7580
Expand Down Expand Up @@ -77,6 +83,15 @@ PRODUCT_COPY_FILES += \

ADDITIONAL_DEFAULT_PROPERTIES += \
wifi.interface=wlan0

# Samsung
PRODUCT_PACKAGES += \
SamsungServiceMode

# Ril
PRODUCT_PACKAGES += \
libprotobuf-cpp-full \
modemloader

# cpboot-daemon for modem
PRODUCT_COPY_FILES += \
Expand Down
3 changes: 3 additions & 0 deletions keylayout/Button_Jack.kl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
key 256 HEADSETHOOK
key 257 VOLUME_UP
key 258 VOLUME_DOWN
16 changes: 16 additions & 0 deletions keylayout/gpio_keys.kl
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# You can find out the values using the 'getevent' command.
# Press a button and you will see something like:
#
# /dev/input/event7: 0001 0074 00000001
# ^^^^
#
# This is the power button. Convert 0x74 hex to decimal and
# add it here to a file you name after the 'name' of the
# device.
#
key 114 VOLUME_DOWN
key 115 VOLUME_UP
key 116 POWER
key 152 POWER
key 172 HOME

18 changes: 18 additions & 0 deletions keylayout/sec_touchkey.kl
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#
# Copyright (C) 2016 The CyanogenMod Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

key 158 BACK VIRTUAL
key 254 APP_SWITCH VIRTUAL
110 changes: 110 additions & 0 deletions overlay/frameworks/base/core/res/res/values/config.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
<<<<<<< HEAD
** Copyright 2017, The Android Open Source Project
=======
** Copyright 2014, The Android Open Source Project
>>>>>>> 3c949e0... Move in the few common Stuff back to device Tree
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -48,4 +52,110 @@
<!-- Operating volatage for bluetooth controller. -->
<integer name="config_bluetooth_operating_voltage_mv">4</integer>

<!-- This string array should be overridden by the device to present a list of network
attributes. This is used by the connectivity manager to decide which networks can coexist
based on the hardware -->
<!-- An Array of "[Connection name],[ConnectivityManager.TYPE_xxxx],
[associated radio-type],[priority],[restoral-timer(ms)],[dependencyMet] -->
<!-- the 5th element "resore-time" indicates the number of milliseconds to delay
before automatically restore the default connection. Set -1 if the connection
does not require auto-restore. -->
<!-- the 6th element indicates boot-time dependency-met value. -->
<string-array translatable="false" name="networkAttributes">
<item>wifi,1,1,1,-1,true</item>
<item>mobile,0,0,0,-1,true</item>
<item>mobile_mms,2,0,2,240000,true</item>
<item>mobile_supl,3,0,2,60000,true</item>
<item>mobile_dun,4,0,2,60000,true</item>
<item>mobile_hipri,5,0,3,60000,true</item>
<item>bluetooth,7,7,0,-1,true</item>
<item>ethernet,9,9,2,-1,true</item>
<item>mobile_fota,10,0,2,60000,true</item>
<item>mobile_ims,11,0,1,-1,true</item>
<item>mobile_cbs,12,0,2,60000,true</item>
<item>wifi_p2p,13,1,0,-1,true</item>
<item>mobile_ia,14,0,2,-1,true</item>
<item>mobile_emergency,15,0,2,-1,true</item>
<item>mobile_bip,23,0,2,60000,true</item>
<item>mobile_cas,24,0,3,60000,true</item>
<item>mobile_xcap,27,0,2,60000,true</item>
<item>mobile_ent1,28,0,2,-1,true</item>
<item>mobile_ent2,29,0,2,-1,true</item>
</string-array>

<!-- Array of ConnectivityManager.TYPE_xxxx values allowable for tethering -->
<!-- Common options are [1, 4] for TYPE_WIFI and TYPE_MOBILE_DUN or
<!== [0,1,5,7] for TYPE_MOBILE, TYPE_WIFI, TYPE_MOBILE_HIPRI and TYPE_BLUETOOTH -->
<integer-array translatable="false" name="config_tether_upstream_types">
<item>0</item>
<item>1</item>
<item>4</item>
<item>5</item>
<item>7</item>
<item>9</item>
</integer-array>

<!-- The default iface on which to monitor data use -->
<string name="config_datause_iface" translatable="false">rmnet0</string>

<!-- ############################################################## -->
<!-- ### HARDWARE KEYS -->
<!-- ############################################################## -->

<!-- Hardware keys present on the device, stored as a bit field.
This integer should equal the sum of the corresponding value for each
of the following keys present:
1 - Home
2 - Back
4 - Menu
8 - Assistant (search)
16 - App switch
32 - Camera
64 - Volume rocker
For example, a device with Home, Back and Menu keys would set this
config to 7. -->
<integer name="config_deviceHardwareKeys">83</integer>

<!-- Hardware keys present on the device with the ability to wake, stored as a bit field.
This integer should equal the sum of the corresponding value for each
of the following keys present:
1 - Home
2 - Back
4 - Menu
8 - Assistant (search)
16 - App switch
32 - Camera
64 - Volume rocker
For example, a device with Home, Back and Menu keys would set this
config to 7. -->
<integer name="config_deviceHardwareWakeKeys">65</integer>

<!-- Control the behavior when the user long presses the home button.
0 - Nothing
1 - Menu key
2 - Recent apps view in SystemUI
3 - Launch assist intent
4 - Voice Search
5 - In-app Search
This needs to match the constants in
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
-->
<integer name="config_longPressOnHomeBehavior">3</integer>

<!-- Control the behavior when the user double-taps the home button.
0 - Nothing
1 - Menu
2 - Recent apps view in SystemUI
3 - Launch assist intent
4 - Voice Search
5 - In-app Search
This needs to match the constants in
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
-->
<integer name="config_doubleTapOnHomeBehavior">2</integer>

<!-- These resources are around just to allow their values to be customized
for different hardware and product builds. -->
<string name="config_radio_access_family">GSM | WCDMA | LTE | CDMA | EVDO</string>

</resources>
49 changes: 49 additions & 0 deletions overlay/packages/apps/Mms/res/xml/mms_config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2013 The CyanogenMod Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<!-- Version History
version 1 - initial version.
version 2 - added recipientLimit.
version 3 - added min/max recycler values.
-->

<mms_config version="3">

<!-- Maximum message size in bytes for a MMS message -->
<int name="maxMessageSize">1045876</int>

<!-- Maximum height for an attached image -->
<int name="maxImageHeight">2592</int>

<!-- Maximum width for an attached image -->
<int name="maxImageWidth">2592</int>

<!-- If true, The text message over 160 characters will be sent in multi part.
If false, The text message over 160 characters will be sent
via multi media message. -->
<bool name="enableMultipartSMS">true</bool>

<!-- If true, the text message will be split every 160 characters.
If false, the text will never be split before being sent. -->
<bool name="enableSplitSMS">false</bool>

<!-- User-Agent parameter used in MMS http request -->
<string name="userAgent">SAMSUNG-SM-J700F-Mms</string>

<!-- UAProf URL -->
<string name="uaProfUrl">http://wap.samsungmobile.com/uaprof/SM-J700F.xml</string>

</mms_config>
25 changes: 25 additions & 0 deletions overlay/packages/services/Telephony/res/values/config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2009 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<!-- Phone app resources that may need to be customized
for different hardware or product builds. -->
<resources>
<!-- Determines if device implements a noise suppression device for in call audio-->
<bool name="has_in_call_noise_suppression">true</bool>

<!-- Show enabled lte option for lte device -->
<bool name="config_enabled_lte" translatable="false">true</bool>
</resources>
12 changes: 12 additions & 0 deletions system.prop
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,15 @@ ro.hwui.fbo_cache_size=8

# FRP
#ro.frp.pst=/dev/block/persistent

# Radio
#telephony.lteOnCdmaDevice=0
persist.radio.apm_sim_not_pwdn=1
persist.radio.add_power_save=1
rild.libpath=/system/lib/libsec-ril.so
rild.libargs=-d /dev/ttyS0
ro.telephony.ril_class=SlteRIL
ro.use_data_netmgrd=false
persist.data.netmgrd.qos.enable=false
ro.ril.hsxpa=1
ro.ril.gprsclass=10

0 comments on commit 076e1be

Please sign in to comment.