Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge changes from upstream. #10

Open
wants to merge 21 commits into
base: own-n
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
1c9c5a3
repopick: Add 'reset' option
harryyoud Jul 18, 2017
ea82b9f
charger: Fix small battery capacity font
BadDaemon Jul 22, 2017
8146415
sensitive_pn: Include France DOM (Overseas regions) codes
julroy67 Jul 9, 2017
7dff2f7
apns: correct the mvno_match_data for MasMovil Spain
Bauuuuu Jul 26, 2017
fc30f6b
overlay: Enable “Panic Detection” mode
bgcngm Jul 7, 2017
ee8db8f
vendor: cm: sepolicy: Allow rw-access to system_app_data_file
BadDaemon Jul 26, 2017
cc0d29e
Revert "vendor: cm: sepolicy: Allow rw-access to system_app_data_file"
BadDaemon Jul 27, 2017
54afae5
sensitive_pn: add EU 116 Numbers
jumoog Jun 23, 2017
3237895
templates: Remove empty cat << EOF
mikeNG Jul 26, 2017
beb05c8
config: Set some default TWRP flags
mikeNG Jul 18, 2017
b6effb3
extract_utils: Fix cleanup variables assigment
May 1, 2017
2168b71
Revert "Revert "vendor: cm: sepolicy: Allow rw-access to system_app_d…
mikeNG Jul 28, 2017
675d959
build: Update smali and baksmali to 2.2.1
Rashed97 Jul 30, 2017
855fbdd
extract_files: Add support for specifying blob sections
Rashed97 Apr 4, 2017
8b87b09
extract_files: Add support for paths without system/
Rashed97 Apr 4, 2017
58ce825
templates: Update to show usage for new extract_files features
Rashed97 Jul 30, 2017
deed26f
qcom: Allow setting custom audio, display, and media HALs
Rashed97 Jul 30, 2017
36dcbd4
Add WOM Internet/MMS (CL) apn
xkeitamon Aug 4, 2017
9c5d129
Fix extract_utils when not using blob sections
harryyoud Aug 5, 2017
3af5191
Add Correios Celular (BR) APN
Xinayder Aug 5, 2017
96140c4
Merge branch 'cm-14.1' of https://github.com/LineageOS/android_vendor…
HassanSardar Aug 8, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions build/core/qcom_target.mk
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ ifeq ($(BOARD_USES_QCOM_HARDWARE),true)
endif
endif

$(call project-set-path,qcom-audio,hardware/qcom/audio-caf/$(QCOM_HARDWARE_VARIANT))
$(call project-set-path,qcom-display,hardware/qcom/display-caf/$(QCOM_HARDWARE_VARIANT))
$(call project-set-path,qcom-media,hardware/qcom/media-caf/$(QCOM_HARDWARE_VARIANT))
$(call set-device-specific-path,AUDIO,audio,hardware/qcom/audio-caf/$(QCOM_HARDWARE_VARIANT))
$(call set-device-specific-path,DISPLAY,display,hardware/qcom/display-caf/$(QCOM_HARDWARE_VARIANT))
$(call set-device-specific-path,MEDIA,media,hardware/qcom/media-caf/$(QCOM_HARDWARE_VARIANT))

$(call set-device-specific-path,CAMERA,camera,hardware/qcom/camera)
$(call set-device-specific-path,GPS,gps,hardware/qcom/gps)
Expand Down
36 changes: 21 additions & 15 deletions build/templates/extract-files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,25 +34,31 @@ if [ ! -f "$HELPER" ]; then
fi
. "$HELPER"

if [ $# -eq 0 ]; then
# default to not sanitizing the vendor folder before extraction
clean_vendor=false

while [ "$1" != "" ]; do
case $1 in
-p | --path ) shift
SRC=$1
;;
-s | --section ) shift
SECTION=$1
clean_vendor=false
;;
-c | --clean-vendor ) clean_vendor=true
;;
esac
shift
done

if [ -z "$SRC" ]; then
SRC=adb
else
if [ $# -eq 1 ]; then
SRC=$1
else
echo "$0: bad number of arguments"
echo ""
echo "usage: $0 [PATH_TO_EXPANDED_ROM]"
echo ""
echo "If PATH_TO_EXPANDED_ROM is not specified, blobs will be extracted from"
echo "the device using adb pull."
exit 1
fi
fi

# Initialize the helper
setup_vendor "$DEVICE" "$VENDOR" "$CM_ROOT"
setup_vendor "$DEVICE" "$VENDOR" "$CM_ROOT" false $clean_vendor

extract "$MY_DIR"/proprietary-files.txt "$SRC"
extract "$MY_DIR"/proprietary-files.txt "$SRC" "$SECTION"

"$MY_DIR"/setup-makefiles.sh
4 changes: 0 additions & 4 deletions build/templates/setup-makefiles.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,5 @@ write_headers

write_makefiles "$MY_DIR"/proprietary-files.txt

cat << EOF >> "$ANDROIDMK"

EOF

# Finish
write_footers
22 changes: 19 additions & 3 deletions build/tools/extract_utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ function setup_vendor() {
COMMON=0
fi

if [ "$5" == "true" ] || [ "$5" == "1" ]; then
if [ "$5" == "false" ] || [ "$5" == "0" ]; then
VENDOR_STATE=1
VENDOR_RADIO_STATE=1
else
Expand Down Expand Up @@ -555,6 +555,7 @@ function _adb_connected {
# parse_file_list:
#
# $1: input file
# $2: blob section in file - optional
#
# Sets PRODUCT_PACKAGES and PRODUCT_COPY_FILES while parsing the input file
#
Expand All @@ -567,6 +568,14 @@ function parse_file_list() {
exit 1
fi

if [ $# -eq 2 ]; then
LIST=$TMPDIR/files.txt
cat $1 | sed -n '/# '"$2"'/I,/^\s*$/p' > $LIST
else
LIST=$1
fi


PRODUCT_PACKAGES_LIST=()
PRODUCT_PACKAGES_HASHES=()
PRODUCT_COPY_FILES_LIST=()
Expand Down Expand Up @@ -595,7 +604,7 @@ function parse_file_list() {
PRODUCT_COPY_FILES_HASHES+=("$HASH")
fi

done < <(egrep -v '(^#|^[[:space:]]*$)' "$1" | LC_ALL=C sort | uniq)
done < <(egrep -v '(^#|^[[:space:]]*$)' "$LIST" | LC_ALL=C sort | uniq)
}

#
Expand Down Expand Up @@ -779,14 +788,19 @@ function fix_xml() {
#
# $1: file containing the list of items to extract
# $2: path to extracted system folder, an ota zip file, or "adb" to extract from device
# $3: section in list file to extract - optional
#
function extract() {
if [ -z "$OUTDIR" ]; then
echo "Output dir not set!"
exit 1
fi

parse_file_list "$1"
if [ -z "$3" ]; then
parse_file_list "$1"
else
parse_file_list "$1" "$3"
fi

# Allow failing, so we can try $DEST and/or $FILE
set +e
Expand Down Expand Up @@ -863,6 +877,8 @@ function extract() {
TARGET="$FROM"
OUTPUT_DIR="$OUTPUT_DIR/rootfs"
TMP_DIR="$TMP_DIR/rootfs"
elif [ -f "$SRC/$FILE" ] && [ "$SRC" != "adb" ]; then
TARGET="$FROM"
else
TARGET="system/$FROM"
FILE="system/$FILE"
Expand Down
8 changes: 7 additions & 1 deletion build/tools/repopick.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ def fetch_query(remote_url, query):
parser.add_argument('change_number', nargs='*', help='change number to cherry pick. Use {change number}/{patchset number} to get a specific revision.')
parser.add_argument('-i', '--ignore-missing', action='store_true', help='do not error out if a patch applies to a missing directory')
parser.add_argument('-s', '--start-branch', nargs=1, help='start the specified branch before cherry picking')
parser.add_argument('-r', '--reset', action='store_true', help='reset to initial state (abort cherry-pick) if there is a conflict')
parser.add_argument('-a', '--abandon-first', action='store_true', help='before cherry picking, abandon the branch specified in --start-branch')
parser.add_argument('-b', '--auto-branch', action='store_true', help='shortcut to "--start-branch auto --abandon-first --ignore-missing"')
parser.add_argument('-q', '--quiet', action='store_true', help='print as little as possible')
Expand Down Expand Up @@ -408,7 +409,12 @@ def fetch_query(remote_url, query):
cmd_out = None
result = subprocess.call(cmd, cwd=project_path, shell=True, stdout=cmd_out, stderr=cmd_out)
if result != 0:
print('ERROR: git command failed')
if args.reset:
print('ERROR: git command failed, aborting cherry-pick')
cmd = ['git cherry-pick --abort']
subprocess.call(cmd, cwd=project_path, shell=True, stdout=cmd_out, stderr=cmd_out)
else:
print('ERROR: git command failed')
sys.exit(result)
if not args.quiet:
print('')
Binary file modified build/tools/smali/baksmali.jar
Binary file not shown.
Binary file modified build/tools/smali/smali.jar
Binary file not shown.
22 changes: 19 additions & 3 deletions charger/healthd_board_cm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
#define LOGI(x...) do { KLOG_INFO("charger", x); } while (0)
#define LOGV(x...) do { KLOG_DEBUG("charger", x); } while (0)

static const GRFont* gr_font = NULL;

struct frame {
int min_capacity;
GRSurface *surface;
Expand All @@ -62,6 +64,11 @@ static struct animation anim = {
.num_frames = 0,
};

static const GRFont* get_font()
{
return gr_font;
}

static int draw_surface_centered(GRSurface* surface)
{
int w, h, x, y;
Expand All @@ -83,14 +90,14 @@ static void draw_capacity(int capacity)

struct frame *f = &anim.frames[0];
int font_x, font_y;
gr_font_size(gr_sys_font(), &font_x, &font_y);
int w = gr_measure(gr_sys_font(), cap_str);
gr_font_size(get_font(), &font_x, &font_y);
int w = gr_measure(get_font(), cap_str);
int h = gr_get_height(f->surface);
int x = (gr_fb_width() - w) / 2;
int y = (gr_fb_height() + h) / 2;

gr_color(255, 255, 255, 255);
gr_text(gr_sys_font(), x, y + font_y / 2, cap_str, 0);
gr_text(get_font(), x, y + font_y / 2, cap_str, 0);
}

#ifdef QCOM_HARDWARE
Expand Down Expand Up @@ -412,4 +419,13 @@ void healthd_board_mode_charger_set_backlight(bool)

void healthd_board_mode_charger_init(void)
{
GRFont* tmp_font;
int res = gr_init_font("font_log", &tmp_font);
if (res == 0) {
gr_font = tmp_font;
} else {
LOGW("Couldn't open font, falling back to default!\n");
gr_font = gr_sys_font();
}

}
5 changes: 5 additions & 0 deletions config/common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,11 @@ ifneq ($(TARGET_DISABLE_CMSDK), true)
include vendor/ownrom/config/cmsdk_common.mk
endif

# TWRP
ifeq ($(WITH_TWRP),true)
include vendor/cm/config/twrp.mk
endif

# Required OwnROM packages
PRODUCT_PACKAGES += \
BluetoothExt \
Expand Down
2 changes: 2 additions & 0 deletions config/twrp.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
RECOVERY_VARIANT := twrp
TW_EXCLUDE_SUPERSU := true
6 changes: 6 additions & 0 deletions overlay/common/frameworks/base/core/res/res/values/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,10 @@
<!-- If this is true, long press on power button will be available from a
non-interactive state. -->
<bool name="config_supportLongPressPowerWhenNonInteractive">true</bool>

<!-- Control the behavior when the user panic presses the back button.
0 - Nothing
1 - Go to home
-->
<integer name="config_backPanicBehavior">1</integer>
</resources>
9 changes: 6 additions & 3 deletions prebuilt/common/etc/apns-conf.xml
Original file line number Diff line number Diff line change
Expand Up @@ -258,9 +258,9 @@
<apn carrier="Carrefour MMS" mcc="214" mnc="03" apn="carrefourmms" proxy="" port="" user="carrefour" password="carrefour" mmsc="http://mms.orange.es" mmsproxy="172.22.188.25" mmsport="8080" mvno_type="spn" mvno_match_data="Carrefour" type="mms" />
<apn carrier="Llamaya Internet" mcc="214" mnc="03" apn="moreinternet" proxy="" port="" user="" password="" mmsc="" type="default,supl" />
<apn carrier="Llamaya MMS" mcc="214" mnc="03" apn="moremms" proxy="" port="" user="" password="" mmsc="http://mms.orange.es" mmsproxy="172.022.188.25" mmsport="8080" type="mms" />
<apn carrier="MasMovil Internet" mcc="214" mnc="03" apn="internetmas" proxy="" port="" user="" password="" mmsc="" mvno_type="spn" mvno_match_data="Mas Movil" type="default,supl" />
<apn carrier="MasMovil 30MB" mcc="214" mnc="03" apn="int.socialmas" proxy="" port="" user="" password="" mmsc="" mvno_type="spn" mvno_match_data="Mas Movil" type="default,supl" />
<apn carrier="MasMovil MMS" mcc="214" mnc="03" apn="masvidamms" proxy="" port="" user="masvidamms" password="MMSmasvida" mmsc="http://mms.orange.es" mmsproxy="172.22.188.25" mmsport="8080" mvno_type="spn" mvno_match_data="Mas Movil" type="mms" />
<apn carrier="MasMovil Internet" mcc="214" mnc="03" apn="internetmas" proxy="" port="" user="" password="" mmsc="" mvno_type="spn" mvno_match_data="MasMovil" type="default,supl" />
<apn carrier="MasMovil 30MB" mcc="214" mnc="03" apn="int.socialmas" proxy="" port="" user="" password="" mmsc="" mvno_type="spn" mvno_match_data="MasMovil" type="default,supl" />
<apn carrier="MasMovil MMS" mcc="214" mnc="03" apn="masvidamms" proxy="" port="" user="masvidamms" password="MMSmasvida" mmsc="http://mms.orange.es" mmsproxy="172.22.188.25" mmsport="8080" mvno_type="spn" mvno_match_data="MasMovil" type="mms" />
<apn carrier="Jazztel MMS" mcc="214" mnc="03" apn="jazzmms" proxy="" port="" user="" password="" mmsc="http://jazztelmms.com/servlets/mms" mmsproxy="37.132.0.10" mmsport="8080" mvno_type="spn" mvno_match_data="JAZZTEL" type="mms" />
<apn carrier="Jazztel" mcc="214" mnc="03" apn="jazzinternet" proxy="" port="" user="" password="" mmsc="" mvno_type="spn" mvno_match_data="JAZZTEL" type="default,supl" />
<apn carrier="Yoigo Internet" mcc="214" mnc="04" apn="internet" mmsc="" user="" password="" type="default,supl" />
Expand Down Expand Up @@ -3760,6 +3760,7 @@
<apn carrier="Oi MMS" mcc="724" mnc="16" apn="mmsgprs.oi.com.br" proxy="" port="" mmsproxy="192.168.10.50" mmsport="3128" mmsc="http://200.222.42.204:8002/" user="oimms" password="oioioi" authtype="1" type="mms" />
<apn carrier="BrT Internet" mcc="724" mnc="16" apn="brt.br" user="brt" password="brt" mmsc="null" type="default,supl" />
<apn carrier="BrT MMS" mcc="724" mnc="16" apn="mms.brt.br" user="brt" password="brt" mmsc="http://mms.brasiltelecom.com.br/" mmsproxy="200.96.8.29" mmsport="8080" type="mms" />
<apn carrier="Correios Celular" mcc="724" mnc="17" apn="internet.br" type="default,supl" />
<apn carrier="Telemig GPRS" mcc="724" mnc="19" apn="gprs.telemigcelular.com.br" user="celular" password="celular" mmsc="null" type="default,supl" />
<apn carrier="Telemig MMS" mcc="724" mnc="19" apn="mmsgprs.telemigcelular.com.br" user="celular" password="celular" mmsc="http://mms.telemigcelular.com.br" mmsproxy="200.192.230.142" mmsport="8080" type="mms" />
<apn carrier="Vivo Internet" mcc="724" mnc="23" apn="zap.vivo.com.br" mmsc="http://www.google.com.br" user="vivo" password="vivo" authtype="1" type="default,supl" />
Expand Down Expand Up @@ -3800,6 +3801,8 @@
<apn carrier="APLICACIONES" mcc="730" mnc="07" apn="wap.tmovil.cl" user="wap" password="wap" type="default,supl" />
<apn carrier="Movistar MMS" mcc="730" mnc="07" apn="mms.tmovil.cl" proxy="" port="" mmsproxy="172.17.8.10" mmsport="8080" mmsc="http://mms.movistar.cl" user="mms" password="mms" type="mms" />
<apn carrier="Virgin Mobile CL" mcc="730" mnc="07" apn="imovil.virginmobile.cl" type="default,supl" />
<apn carrier="Internet WOM" mmc="730" mnc="09" apn="internet" proxy="" port="" user="" password="" mmsc="" type="default,supl" />
<apn carrier="MMS WOM" mmc="730" mnc="09" apn="mms" proxy="" port="" user="" password="" mmsc="http://3gmms.nextelmovil.cl" mmsproxy="129.192.129.104" mmsport="8080" type="mms" />
<apn carrier="Internet Movil" mcc="730" mnc="10" apn="imovil.entelpcs.cl" user="entelpcs" password="entelpcs" type="default,supl" />
<apn carrier="MMS Entel PCS" mcc="730" mnc="10" apn="mms.entelpcs.cl" proxy="" port="" mmsproxy="10.99.0.10" mmsport="8080" mmsc="http://mmsc.entelpcs.cl" user="entelpcs" password="entelmms" type="mms" />
<apn carrier="Internet Movil" mcc="730" mnc="10" apn="bam.entelpcs.cl" user="entelpcs" password="entelpcs" proxy="10.99.0.10" port="8080" type="default,supl" />
Expand Down