Skip to content
Snippets Groups Projects
Commit 2f55c8ad authored by Diego Wilson's avatar Diego Wilson Committed by B2G User
Browse files

Add vendor specific settings and prefs

This currently includes camera settings and webrtc prefs.

Change-Id: I38ccf37526041e7d0d727fcd8f69565cc8f6f7e0
parent 3dca3525
No related branches found
No related tags found
No related merge requests found
......@@ -39,8 +39,7 @@ $(AAPT):
mkdir -p $(@D)
ln -sf $(FAKETOOLS_AAPT) $@
include $(LOCAL_PATH)/updater/Android.mk \
$(LOCAL_PATH)/jsmin/Android.mk
include $(call all-subdir-makefiles)
ifdef GAIA_DISTRIBUTION_DIR
......
LOCAL_PATH:= $(call my-dir)
TEMPLATE_GAIA_DISTRIBUTION_DIR:=$(LOCAL_PATH)/distribution
gaia/profile.tar.gz: $(GAIA_DISTRIBUTION_DIR)/.exist
CAMERA_RECORDING_PREFERREDSIZES=\"cif\"
ifeq ($(TARGET_PRODUCT),msm8226)
CAMERA_RECORDING_PREFERREDSIZES=\"720p\"
endif
ifeq ($(TARGET_PRODUCT),msm8610)
CAMERA_RECORDING_PREFERREDSIZES=\"480p\"
endif
MERGEJSON:=$(LOCAL_PATH)/bin/mergejson
$(GAIA_DISTRIBUTION_DIR)/.exist: $(GAIA_DISTRIBUTION_DIR)/settings.json
$(GAIA_DISTRIBUTION_DIR)/settings.json: \
$(GAIA_DISTRIBUTION_DIR)/.settings.tmp \
$(EXTRA_SETTINGS_JSON_FILE)
echo extra json file is $(EXTRA_SETTINGS_JSON_FILE)
if [ -z "$(EXTRA_SETTINGS_JSON_FILE)" ]; then \
cp $< $@; \
else \
$(MERGEJSON) $(EXTRA_SETTINGS_JSON_FILE) $(GAIA_DISTRIBUTION_DIR)/.settings.tmp $@; \
fi
$(GAIA_DISTRIBUTION_DIR)/.settings.tmp: $(TEMPLATE_GAIA_DISTRIBUTION_DIR)/settings.json
mkdir -p $(@D)
cpp -P -DCAMERA_RECORDING_PREFERREDSIZES=$(CAMERA_RECORDING_PREFERREDSIZES) $< $@
$(GAIA_DISTRIBUTION_DIR)/.exist: $(GAIA_DISTRIBUTION_DIR)/partner-prefs.js
$(GAIA_DISTRIBUTION_DIR)/partner-prefs.js: \
$(TEMPLATE_GAIA_DISTRIBUTION_DIR)/partner-prefs.js \
$(EXTRA_PARTNER_PREFS_FILE)
mkdir -p $(@D)
cp $< $@
cat $(EXTRA_PARTNER_PREFS_FILE) >> $@
$(GAIA_DISTRIBUTION_DIR)/.exist: $(GAIA_DISTRIBUTION_DIR)/camera.json
$(GAIA_DISTRIBUTION_DIR)/camera.json: \
$(TEMPLATE_GAIA_DISTRIBUTION_DIR)/camera.json
mkdir -p $(@D)
cp $< $@
$(GAIA_DISTRIBUTION_DIR)/.exist:
mkdir -p $(@D)
touch $@
#!/usr/bin/env python
# Copyright (c) 2014, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
def usage():
print """
Merge two JSON files into a single file
Usage: mergeJSON [input file 1] [input file 2] [output file]
"""
import sys
if len(sys.argv) < 2 or sys.argv[1] == '-h':
usage()
sys.exit(0)
if len(sys.argv) < 4:
print('error: please provide input and output files')
usage()
sys.exit(1)
baseA = sys.argv[1]
baseB = sys.argv[2]
merge = sys.argv[3]
import json
from pprint import pprint
dictA = None
with open(baseA) as f:
dictA = json.load(f)
dictB = None
with open(baseB) as f:
dictB = json.load(f)
dictMerge = {key: value for (key, value)
in (dictA.items() + dictB.items())}
with open(merge, 'w') as f:
json.dump(dictMerge, f)
print('Merged ' + str(baseA) + ' and ' + str(baseB) + ' into ' + str(merge))
/*
Copyright (c) 2014, The Linux Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of The Linux Foundation nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
{
"maxImagePixelSize": 5242880,
"maxSnapshotPixelSize": 3145728,
"requiredEXIFPreviewSize": { "width": 640, "height": 480}
}
/*
Copyright (c) 2014, The Linux Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of The Linux Foundation nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
pref("media.peerconnection.video.h264_enabled", true);
pref("media.peerconnection.video.max_bitrate", 600);
/*
Copyright (c) 2014, The Linux Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of The Linux Foundation nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
{
"camera.recording.preferredSizes": [CAMERA_RECORDING_PREFERREDSIZES]
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment