Permalink
Browse files

disable keyguard torch

Change-Id: I5e94ab3d62402b229035a7f3966a2e6bf0e6987a
  • Loading branch information...
1 parent d4a5ecd commit fdb51411abea53bdb09eeff29324a7bfc3007bae @yu88my yu88my committed Oct 26, 2012
Showing with 46 additions and 0 deletions.
  1. +22 −0 customize_framework.sh
  2. +24 −0 framework-patch/android.policy/disable_keyguard_torch.patch
@@ -0,0 +1,22 @@
+#!/bin/bash
+#
+# $1: dir for miui
+# $2: dir for original
+#
+
+APKTOOL=$PORT_ROOT/tools/apktool
+GIT_APPLY=$PORT_ROOT/tools/git.apply
+
+if [ "$2" = "out/android.policy" ];then
+ echo "apply compile patch anroid.policy"
+ cp framework-patch/android.policy/*.patch out/android.policy
+ cd out/android.policy
+ for f in `ls *.patch`;do
+ $GIT_APPLY "$f"
+ done
+ rm *.patch
+ for rej in `find -name "*.rej"`;do
+ echo "apply android.policy patch fail"
+ exit 1
+ done
+fi
@@ -0,0 +1,24 @@
+From 55334357549cd069640eb6f94b4c72c1c53cbbf5 Mon Sep 17 00:00:00 2001
+From: yumingyang <yumingyang@xiaomi.com>
+Date: Fri, 26 Oct 2012 11:21:07 +0800
+Subject: [PATCH] disable keyguard torch
+
+---
+ .../policy/impl/MiuiPhoneWindowManager.smali | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+--- a/smali/com/android/internal/policy/impl/MiuiPhoneWindowManager.smali
++++ b/smali/com/android/internal/policy/impl/MiuiPhoneWindowManager.smali
+@@ -459,6 +459,9 @@
+ const/4 v0, 0x1
+
+ :goto_0
++ #return false
++ const/4 v0, 0x0
++
+ return v0
+
+ :cond_0
+--
+1.7.1
+

0 comments on commit fdb5141

Please sign in to comment.