[MOD][DEV] Motorola style Transparent NavBar [JOP40D] - Android Themes

-----------------------------------------------------------------------------
Updated to v1.1
- add Tablet UI support : Preview
- very minor fixes
-----------------------------------------------------------------------------
This mod is originally posted in Galaxy Nexus theme forum :
[MOD] Moto Style - Transparent Navbar and Modified Launcher
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
-----------------------------------------------------------------------------
* diff for JOP40D : download
Code:
diff -rupN ./a/frameworks/base/packages/SystemUI/res/layout/navigation_bar.xml ./b/frameworks/base/packages/SystemUI/res/layout/navigation_bar.xml
--- ./a/frameworks/base/packages/SystemUI/res/layout/navigation_bar.xml 2012-11-15 06:56:46.284574000 +0900
+++ ./b/frameworks/base/packages/SystemUI/res/layout/navigation_bar.xml 2012-11-26 02:22:33.688340970 +0900
@@ -23,7 +23,7 @@
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui"
android:layout_height="match_parent"
android:layout_width="match_parent"
- android:background="#FF000000"
+ android:background="#88000000"
>
<FrameLayout android:id="@+id/rot0"
diff -rupN ./a/frameworks/base/packages/SystemUI/res/layout-sw600dp/navigation_bar.xml ./b/frameworks/base/packages/SystemUI/res/layout-sw600dp/navigation_bar.xml
--- ./a/frameworks/base/packages/SystemUI/res/layout-sw600dp/navigation_bar.xml 2012-11-15 06:56:51.254573000 +0900
+++ ./b/frameworks/base/packages/SystemUI/res/layout-sw600dp/navigation_bar.xml 2012-11-26 02:22:45.329174028 +0900
@@ -22,7 +22,7 @@
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui"
android:layout_height="match_parent"
android:layout_width="match_parent"
- android:background="#FF000000"
+ android:background="#88000000"
>
<FrameLayout android:id="@+id/rot0"
diff -rupN ./a/frameworks/base/packages/SystemUI/res/values/colors.xml ./b/frameworks/base/packages/SystemUI/res/values/colors.xml
--- ./a/frameworks/base/packages/SystemUI/res/values/colors.xml 2012-11-15 06:56:15.354577000 +0900
+++ ./b/frameworks/base/packages/SystemUI/res/values/colors.xml 2012-11-26 02:23:37.219186755 +0900
@@ -19,7 +19,7 @@
<resources>
<drawable name="notification_number_text_color">#ffffffff</drawable>
<drawable name="ticker_background_color">#ff1d1d1d</drawable>
- <drawable name="status_bar_background">#ff000000</drawable>
+ <drawable name="status_bar_background">#88000000</drawable>
<color name="notification_panel_solid_background">#ff000000</color>
<drawable name="status_bar_recents_app_thumbnail_background">#88000000</drawable>
<color name="status_bar_recents_app_label_color">#ffffffff</color>
@@ -31,8 +31,8 @@
<drawable name="notification_header_bg">#FF000000</drawable>
<!-- ==================== system bar only ==================== -->
- <drawable name="system_bar_background">#ff000000</drawable>
+ <drawable name="system_bar_background">#88000000</drawable>
<!-- the darkening filter applied to notifications -->
- <drawable name="notification_icon_area_smoke">#aa000000</drawable>
+ <drawable name="notification_icon_area_smoke">#88000000</drawable>
<color name="notification_panel_scrim_color">#B0000000</color>
</resources>
diff -rupN ./a/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java ./b/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
--- ./a/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java 2012-11-15 06:56:11.314567000 +0900
+++ ./b/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java 2012-12-04 03:48:39.654073231 +0900
@@ -410,7 +410,7 @@ public class PhoneStatusBar extends Base
}
// figure out which pixel-format to use for the status bar.
- mPixelFormat = PixelFormat.OPAQUE;
+ mPixelFormat = PixelFormat.TRANSLUCENT;
mSystemIconArea = (LinearLayout) mStatusBarView.findViewById(R.id.system_icon_area);
mStatusIcons = (LinearLayout)mStatusBarView.findViewById(R.id.statusIcons);
@@ -800,7 +800,7 @@ public class PhoneStatusBar extends Base
| WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL
| WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH
| WindowManager.LayoutParams.FLAG_SPLIT_TOUCH,
- PixelFormat.OPAQUE);
+ PixelFormat.TRANSLUCENT);
// this will allow the navbar to run in an overlay on devices that support this
if (ActivityManager.isHighEndGfx()) {
lp.flags |= WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED;
diff -rupN ./a/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java ./b/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
--- ./a/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java 2012-11-15 06:56:20.634573000 +0900
+++ ./b/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java 2012-12-04 03:49:10.074070472 +0900
@@ -223,7 +223,7 @@ public class TabletStatusBar extends Bas
WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
| WindowManager.LayoutParams.FLAG_TOUCHABLE_WHEN_WAKING
| WindowManager.LayoutParams.FLAG_SPLIT_TOUCH,
- PixelFormat.OPAQUE);
+ PixelFormat.TRANSLUCENT);
// We explicitly leave FLAG_HARDWARE_ACCELERATED out of the flags. The status bar occupies
// very little screen real-estate and is updated fairly frequently. By using CPU rendering
diff -rupN ./a/frameworks/base/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java ./b/frameworks/base/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
--- ./a/frameworks/base/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java 2012-11-15 06:56:30.065396000 +0900
+++ ./b/frameworks/base/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java 2012-11-26 02:17:11.528336640 +0900
@@ -2547,8 +2547,6 @@ public class PhoneWindowManager implemen
systemRect.top = mSystemTop;
systemRect.right = mSystemRight;
systemRect.bottom = mSystemBottom;
- if (mStatusBar != null) return mStatusBar.getSurfaceLayer();
- if (mNavigationBar != null) return mNavigationBar.getSurfaceLayer();
return 0;
}
diff -rupN ./a/packages/apps/Launcher2/res/layout-port/launcher.xml ./b/packages/apps/Launcher2/res/layout-port/launcher.xml
--- ./a/packages/apps/Launcher2/res/layout-port/launcher.xml 2012-11-15 06:56:33.644567000 +0900
+++ ./b/packages/apps/Launcher2/res/layout-port/launcher.xml 2012-11-26 02:13:44.479173944 +0900
@@ -19,7 +19,7 @@
xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher"
android:id="@+id/drag_layer"
- android:background="@drawable/workspace_bg"
+ android:background="#00000000"
android:layout_width="match_parent"
android:layout_height="match_parent">
diff -rupN ./a/packages/apps/Launcher2/res/values/dimens.xml ./b/packages/apps/Launcher2/res/values/dimens.xml
--- ./a/packages/apps/Launcher2/res/values/dimens.xml 2012-11-15 06:56:36.904569000 +0900
+++ ./b/packages/apps/Launcher2/res/values/dimens.xml 2012-11-26 02:14:58.399175719 +0900
@@ -43,8 +43,8 @@
<dimen name="workspace_divider_padding_right">3dp</dimen>
<dimen name="workspace_divider_padding_top">0dp</dimen>
<dimen name="workspace_divider_padding_bottom">0dp</dimen>
- <dimen name="hotseat_cell_width">64dp</dimen>
- <dimen name="hotseat_cell_height">64dp</dimen>
+ <dimen name="hotseat_cell_width">72dp</dimen>
+ <dimen name="hotseat_cell_height">88dp</dimen>
<dimen name="hotseat_width_gap">-1dp</dimen>
<dimen name="hotseat_height_gap">-1dp</dimen>
<dimen name="workspace_overscroll_drawable_padding">0dp</dimen>
diff -rupN ./a/packages/apps/Launcher2/src/com/android/launcher2/CellLayout.java ./b/packages/apps/Launcher2/src/com/android/launcher2/CellLayout.java
--- ./a/packages/apps/Launcher2/src/com/android/launcher2/CellLayout.java 2012-11-26 02:13:14.109170000 +0900
+++ ./b/packages/apps/Launcher2/src/com/android/launcher2/CellLayout.java 2012-11-26 00:46:51.878340000 +0900
@@ -609,11 +609,7 @@ public class CellLayout extends ViewGrou
BubbleTextView bubbleChild = (BubbleTextView) child;
Resources res = getResources();
- if (mIsHotseat) {
- bubbleChild.setTextColor(res.getColor(android.R.color.transparent));
- } else {
- bubbleChild.setTextColor(res.getColor(R.color.workspace_icon_text_color));
- }
+ bubbleChild.setTextColor(res.getColor(R.color.workspace_icon_text_color));
}
child.setScaleX(getChildrenScale());
diff -rupN ./a/packages/apps/Launcher2/src/com/android/launcher2/Workspace.java ./b/packages/apps/Launcher2/src/com/android/launcher2/Workspace.java
--- ./a/packages/apps/Launcher2/src/com/android/launcher2/Workspace.java 2012-11-26 02:13:06.868336000 +0900
+++ ./b/packages/apps/Launcher2/src/com/android/launcher2/Workspace.java 2012-11-26 00:50:40.238351000 +0900
@@ -43,6 +43,7 @@ import android.os.Build;
import android.os.IBinder;
import android.os.Parcelable;
import android.util.AttributeSet;
+import android.util.DisplayMetrics;
import android.util.Log;
import android.util.SparseArray;
import android.view.Display;
@@ -522,7 +523,7 @@ public class Workspace extends SmoothPag
// Hide folder title in the hotseat
if (child instanceof FolderIcon) {
- ((FolderIcon) child).setTextVisible(false);
+ ((FolderIcon) child).setTextVisible(true);
}
if (screen < 0) {
@@ -837,12 +838,10 @@ public class Workspace extends SmoothPag
}
protected void setWallpaperDimension() {
- Point minDims = new Point();
- Point maxDims = new Point();
- mLauncher.getWindowManager().getDefaultDisplay().getCurrentSizeRange(minDims, maxDims);
-
- final int maxDim = Math.max(maxDims.x, maxDims.y);
- final int minDim = Math.min(minDims.x, minDims.y);
+ DisplayMetrics displayMetrics = new DisplayMetrics();
+ mLauncher.getWindowManager().getDefaultDisplay().getRealMetrics(displayMetrics);
+ final int maxDim = Math.max(displayMetrics.widthPixels, displayMetrics.heightPixels);
+ final int minDim = Math.min(displayMetrics.widthPixels, displayMetrics.heightPixels);
// We need to ensure that there is enough extra space in the wallpaper for the intended
// parallax effects
@@ -971,9 +970,9 @@ public class Workspace extends SmoothPag
class WallpaperOffsetInterpolator {
float mFinalHorizontalWallpaperOffset = 0.0f;
- float mFinalVerticalWallpaperOffset = 0.5f;
+ float mFinalVerticalWallpaperOffset = 0.0f;
float mHorizontalWallpaperOffset = 0.0f;
- float mVerticalWallpaperOffset = 0.5f;
+ float mVerticalWallpaperOffset = 0.0f;
long mLastWallpaperOffsetUpdateTime;
boolean mIsMovingFast;
boolean mOverrideHorizontalCatchupConstant;
* resources : download
-----------------------------------------------------------------------------

I'm a fan of moto's new interface. Good job bro.

welcome back man! i'ts been awhile
transparent Navbar! nice :good:
i think this would be great with my Moto theme lol

Galaxy Nexus AOSP JRO03C ok:good:

Only on the desktop is transparent to other interface or black
Not compatible cm, aokp?, Will stop at the boot screen

you did a great job!

Im sorry for the stupid question but what do i do with this please ?.......yes im a noob :crying:

tibi09 said:
Only on the desktop is transparent to other interface or black
Not compatible cm, aokp?, Will stop at the boot screen
Click to expand...
Click to collapse
Yes, this mod makes navbar and statusbar to semi-transparent on stock launcher's workspace(home screen) only.
If navbar is transparent when using other apps, that will cause many ui problems.. (navbar will overlap some ui elements)
And this patch is for AOSP only, because I'm using stock rom..
But I think making same mod for cm9 or aokp is not much different from this. (but you have to apply patch manually)
Sean_Seany said:
Im sorry for the stupid question but what do i do with this please ?.......yes im a noob :crying:
Click to expand...
Click to collapse
This patch is for someone who know how to compile android on linux. (not difficult at all because there are so many great guides about it )
Apply this patch and compile rom or each files(SystemUI.apk, android.policy.jar and Launcher2.apk). then you can get this mod for your device (or rom).

is this possible on windows?

aooga said:
is this possible on windows?
Click to expand...
Click to collapse
i think yes,but very elaborated without all the change...OP sad the modify at framework,but not these on policy.jar and systemUI..instaed with the inux method,with diff and patch tools you can easily do the mod.i'm linux user from 2 months,but i'm not able to do that.i'm trying right now,i want to do that on codename for gnex,i'll let you say if i have good response on this work!

Updated!
Now transparent navbar is compatible with tablet & phablet(Nexus 7) UI.
And I added 2 more patches for CM10 and Paranoid Android rom.
aooga said:
is this possible on windows?
Click to expand...
Click to collapse
Yes possible but you have to edit each smali and xml files manually.. and sorry I can't be much help about this because I don't have any knowledge about smali..

Looks absolutely fantastic! Will you submit this to cyanogenmod? That would eliminate the need to patch for every nightly
Sent from my GT-I9100 using xda app-developers app

well that sucks...wish there was a really detailed tutorial on how to use these on ubuntu.
EDIT: If i were to give you the systemui.apk, framework-res.apk, and android-policy.jar, could you pleeeeease apply the patch for them?

The all legends of ICS Mods, welcome back. This is totally awesome. Compiled through my aokp workspace and it works fine with aokp. Should make a toggle for this.

after a little search,i got the diff and patch
copy patch file to your source path
run terminal and cd /your/source/path
patch -p2 < PATCHFILENAME

how to use this?
Sent from my GT-P1000 using Tapatalk 2

I am using Codenameandroid so which on should i download?

asvantypography said:
how to use this?
Sent from my GT-P1000 using Tapatalk 2
Click to expand...
Click to collapse
You'll need to patch it using a Java app called 'NetBeans', if you're on linux, you can just compile it together with your aosp sources. (if you have one.)

But where do I put the png's? Applied patch in ~/android/system and all went fine, but I'm not sure where I should put the new navigation bar buttons. And how do I compile single apk's?
New to compiling, used to zip before... :angel:

its very easy to do in Windows, just lost 10 minutes. :good:

Related

[Q] Wi-Fi Ad-Hoc mode & wpa_supplicant

I have tried all this wpa_supplicant files to fix ad-hoc connection on my gsi9001, but every time it is hanging on the obtaining ip. Please someone help me with trying on other roms to manage ad-hoc mod. correctly i have used I9001XXKP4 with cranium mod...
tokokh said:
I have tried all this wpa_supplicant files to fix ad-hoc connection on my gsi9001, but every time it is hanging on the obtaining ip. Please someone help me with trying on other roms to manage ad-hoc mod. correctly i have used I9001XXKP4 with cranium mod...
Click to expand...
Click to collapse
these are modules?
2-of them are zip installation and one is just wpa_supplicant module... the all meaning is to change wpa_supplicant module to see ad-hoc connections...
diff --git a/ctrl_iface.c b/ctrl_iface.c
index ef93533..5accae6 100644
--- a/ctrl_iface.c
+++ b/ctrl_iface.c
@@ -28,6 +28,13 @@
#include "wpa_ctrl.h"
#include "eap.h"
+#define ANDROID_IBSS_HACK
+
+#ifdef ANDROID_IBSS_HACK
+/// NOTE: don't confuse WifiService.parseScanResult
+#define ANDROID_IBSS_PREFIX "(*)"
+#define ANDROID_IBSS_PREFIX_LEN 3
+#endif
static int wpa_supplicant_global_iface_interfaces(struct wpa_global *global,
char *buf, int len);
@@ -230,6 +237,13 @@ static int wpa_supplicant_ctrl_iface_status(struct wpa_supplicant *wpa_s,
ssid_len = _res;
_ssid = ssid_buf;
}
+#ifdef ANDROID_IBSS_HACK
+ if (ssid->mode == IEEE80211_MODE_IBSS)
+ ret = os_snprintf(pos, end - pos, "ssid=%s%s\nid=%d\n",
+ ANDROID_IBSS_PREFIX, wpa_ssid_txt(_ssid, ssid_len),
+ ssid->id);
+ else
+#endif
ret = os_snprintf(pos, end - pos, "ssid=%s\nid=%d\n",
wpa_ssid_txt(_ssid, ssid_len),
ssid->id);
@@ -574,12 +588,14 @@ static int wpa_supplicant_ctrl_iface_scan_results(
return retpos - buf;
pos += ret;
}
+#ifndef ANDROID_IBSS_HACK
if (res->caps & IEEE80211_CAP_IBSS) {
ret = os_snprintf(pos, end - pos, "[IBSS]");
if (ret < 0 || ret >= end - pos)
return retpos - buf;
pos += ret;
}
+#endif
if (!res->wpa_ie_len && !res->rsn_ie_len) {
ret = os_snprintf(pos, end - pos, "\t");
if (ret < 0 || ret >= end - pos)
@@ -587,6 +603,12 @@ static int wpa_supplicant_ctrl_iface_scan_results(
pos += ret;
}
+#ifdef ANDROID_IBSS_HACK
+ if (res->caps & IEEE80211_CAP_IBSS)
+ ret = os_snprintf(pos, end - pos, "\t%s%s",
+ ANDROID_IBSS_PREFIX, wpa_ssid_txt(res->ssid, res->ssid_len));
+ else
+#endif
ret = os_snprintf(pos, end - pos, "\t%s",
wpa_ssid_txt(res->ssid, res->ssid_len));
if (ret < 0 || ret >= end - pos)
@@ -792,6 +814,21 @@ static int wpa_supplicant_ctrl_iface_set_network(
return -1;
}
+#ifdef ANDROID_IBSS_HACK
+ if (os_strcmp(name, "ssid") == 0) {
+ // check prefix
+ if ((value[0] == '"') && (os_strncmp(value+1, ANDROID_IBSS_PREFIX,
+ ANDROID_IBSS_PREFIX_LEN) == 0)) {
+ if (wpa_config_set(ssid, "mode", "1", 0) < 0) {
+ wpa_printf(MSG_DEBUG, "CTRL_IFACE: failed to set IBSS on '%s'",
+ value);
+ return -1;
+ }
+ value += ANDROID_IBSS_PREFIX_LEN;
+ value[0] = '"';
+ }
+ }
+#endif
if (wpa_config_set(ssid, name, value, 0) < 0) {
wpa_printf(MSG_DEBUG, "CTRL_IFACE: Failed to set network "
"variable '%s'", name);
@@ -846,6 +883,11 @@ static int wpa_supplicant_ctrl_iface_get_network(
return -1;
}
+#ifdef ANDROID_IBSS_HACK
+ if ((os_strcmp(name, "ssid") == 0) && (ssid->mode == IEEE80211_MODE_IBSS))
+ os_snprintf(buf, buflen, "\"%s%s", ANDROID_IBSS_PREFIX, value+1);
+ else
+#endif
os_snprintf(buf, buflen, "%s", value);
buf[buflen - 1] = '\0';
diff --git a/events.c b/events.c
index bb5be64..c591f30 100644
--- a/events.c
+++ b/events.c
@@ -479,9 +479,12 @@ wpa_supplicant_select_bss(struct wpa_supplicant *wpa_s, struct wpa_ssid *group,
}
if (bss->caps & IEEE80211_CAP_IBSS) {
+//#ifdef ANDROID_IBSS_HACK // FIXME
+ if (ssid->mode != IEEE80211_MODE_IBSS) {
wpa_printf(MSG_DEBUG, " skip - "
"IBSS (adhoc) network");
continue;
+ }
}
selected = bss;
tokokh said:
diff --git a/ctrl_iface.c b/ctrl_iface.c
index ef93533..5accae6 100644
--- a/ctrl_iface.c
+++ b/ctrl_iface.c
@@ -28,6 +28,13 @@
#include "wpa_ctrl.h"
#include "eap.h"
+#define ANDROID_IBSS_HACK
+
+#ifdef ANDROID_IBSS_HACK
+/// NOTE: don't confuse WifiService.parseScanResult
+#define ANDROID_IBSS_PREFIX "(*)"
+#define ANDROID_IBSS_PREFIX_LEN 3
+#endif
static int wpa_supplicant_global_iface_interfaces(struct wpa_global *global,
char *buf, int len);
@@ -230,6 +237,13 @@ static int wpa_supplicant_ctrl_iface_status(struct wpa_supplicant *wpa_s,
ssid_len = _res;
_ssid = ssid_buf;
}
+#ifdef ANDROID_IBSS_HACK
+ if (ssid->mode == IEEE80211_MODE_IBSS)
+ ret = os_snprintf(pos, end - pos, "ssid=%s%s\nid=%d\n",
+ ANDROID_IBSS_PREFIX, wpa_ssid_txt(_ssid, ssid_len),
+ ssid->id);
+ else
+#endif
ret = os_snprintf(pos, end - pos, "ssid=%s\nid=%d\n",
wpa_ssid_txt(_ssid, ssid_len),
ssid->id);
@@ -574,12 +588,14 @@ static int wpa_supplicant_ctrl_iface_scan_results(
return retpos - buf;
pos += ret;
}
+#ifndef ANDROID_IBSS_HACK
if (res->caps & IEEE80211_CAP_IBSS) {
ret = os_snprintf(pos, end - pos, "[IBSS]");
if (ret < 0 || ret >= end - pos)
return retpos - buf;
pos += ret;
}
+#endif
if (!res->wpa_ie_len && !res->rsn_ie_len) {
ret = os_snprintf(pos, end - pos, "\t");
if (ret < 0 || ret >= end - pos)
@@ -587,6 +603,12 @@ static int wpa_supplicant_ctrl_iface_scan_results(
pos += ret;
}
+#ifdef ANDROID_IBSS_HACK
+ if (res->caps & IEEE80211_CAP_IBSS)
+ ret = os_snprintf(pos, end - pos, "\t%s%s",
+ ANDROID_IBSS_PREFIX, wpa_ssid_txt(res->ssid, res->ssid_len));
+ else
+#endif
ret = os_snprintf(pos, end - pos, "\t%s",
wpa_ssid_txt(res->ssid, res->ssid_len));
if (ret < 0 || ret >= end - pos)
@@ -792,6 +814,21 @@ static int wpa_supplicant_ctrl_iface_set_network(
return -1;
}
+#ifdef ANDROID_IBSS_HACK
+ if (os_strcmp(name, "ssid") == 0) {
+ // check prefix
+ if ((value[0] == '"') && (os_strncmp(value+1, ANDROID_IBSS_PREFIX,
+ ANDROID_IBSS_PREFIX_LEN) == 0)) {
+ if (wpa_config_set(ssid, "mode", "1", 0) < 0) {
+ wpa_printf(MSG_DEBUG, "CTRL_IFACE: failed to set IBSS on '%s'",
+ value);
+ return -1;
+ }
+ value += ANDROID_IBSS_PREFIX_LEN;
+ value[0] = '"';
+ }
+ }
+#endif
if (wpa_config_set(ssid, name, value, 0) < 0) {
wpa_printf(MSG_DEBUG, "CTRL_IFACE: Failed to set network "
"variable '%s'", name);
@@ -846,6 +883,11 @@ static int wpa_supplicant_ctrl_iface_get_network(
return -1;
}
+#ifdef ANDROID_IBSS_HACK
+ if ((os_strcmp(name, "ssid") == 0) && (ssid->mode == IEEE80211_MODE_IBSS))
+ os_snprintf(buf, buflen, "\"%s%s", ANDROID_IBSS_PREFIX, value+1);
+ else
+#endif
os_snprintf(buf, buflen, "%s", value);
buf[buflen - 1] = '\0';
diff --git a/events.c b/events.c
index bb5be64..c591f30 100644
--- a/events.c
+++ b/events.c
@@ -479,9 +479,12 @@ wpa_supplicant_select_bss(struct wpa_supplicant *wpa_s, struct wpa_ssid *group,
}
if (bss->caps & IEEE80211_CAP_IBSS) {
+//#ifdef ANDROID_IBSS_HACK // FIXME
+ if (ssid->mode != IEEE80211_MODE_IBSS) {
wpa_printf(MSG_DEBUG, " skip - "
"IBSS (adhoc) network");
continue;
+ }
}
selected = bss;
Click to expand...
Click to collapse
works this without hangign at obtaining ip ?
Actually it's hanging... but after restarting wifi i'ts getting connected...
I´m having some issues too with connection.
I use Crybernation, before always worked with other ROMs, but now it hangs on getting IP...
I changed scan_interval to 0 too, but nothing happens.
Those files are for? Just change them from mine?
Thanks!
ok now it's working simplest way to get ad hoc running is the ad hoc enabler app from the market
http://www.youtube.com/watch?v=MtqiHcC0x5E
First u need to have superuser and busybox installed
Then download "WiFi Ad Hoc enabler" from market and instal it
Open it and goto settings,tick for disable comparibility check
and then click on 1)Verify Prerequisites
it will ask for superuser permission click Allow
Then click on 2)enable adhoc wifi
it will ask u to restart wifi
vamsikrishnach said:
First u need to have superuser and busybox installed
Then download "WiFi Ad Hoc enabler" from market and instal it
Open it and goto settings,tick for disable comparibility check
and then click on 1)Verify Prerequisites
it will ask for superuser permission click Allow
Then click on 2)enable adhoc wifi
it will ask u to restart wifi
Click to expand...
Click to collapse
Good morning.
I have also SGS Plus (I9001) with Gingerbread. XXKPS (Android 2.3.6) and Kernel 2.6.35.7-perf [email protected]#1.
I have also "WiFi Ad Hoc enabler" Ver. 1.8.3.
My problem is this:
I have an internet connection on my Netbook HP mini (internet key USB H3G Italian provider) and an DHCP method for IP adress my LAN (192.168.0.40 to 192.168.0.50, gateway 192.168.0.1 and subnet mask 255.255.255.0)
I share with an adhoc connection to another Laptop HP with Win 7 64 bits, and it work very well
I share my internet connection from my laptop with Windows XP by WIFI to my laptop Win7.
When i tried to connect my android on this lan, i see the connection, after try to connect and the windows XP PC crashed any time.
I didn' understand the reason of this crash.
If i connect first the Android phone and after the win7 laptop, all is good and i have a very fast connection (adhoc by DHCP)
If i connect first the Win7 laptop and after the android phone, the windows XP netbook crashed.
Can you please give me some indication ?
Important. i didn't have on my "WiFi Ad Hoc enabler" the settigs page, only the "about" page with information on the program.
Thanks in advance for your answers
Ask Microsoft why it happens...?
Sent from my GT-I9001 using XDA App
Hey, how to connect my phone to ad hoc? Im currently used BroodROM RC5 btw. Before this, i've tried wifi ad hoc enabler 1.8.4 but i got an error about ownership of supplicant.conf. I appreciate any help in thi9s regard.
-corrupt1234

diffing kj4 - kj6 kernels

as kj6 is supposed to bring some bug fixes, I thought I'd check the kernel source.
there's not a huge amount of difference, but some looks interesting, hopefully of use to anyone wanting to building it.
Code:
--- drivers/input/touchscreen/mxt540e.c 2011-10-20 02:58:48.000000000
+++ drivers/input/touchscreen/mxt540e.c 2011-10-25 17:58:10.000000000
@@ -907,16 +907,16 @@
}
if (object_type == PROCG_NOISESUPPRESSION_T48) {
if (msg[4] == 5) { /* Median filter error */
printk("[TSP] Median filter Error\n");
get_object_info(data, PROCG_NOISESUPPRESSION_T48, &size, &obj_address);
- value = data->calcfg_batt_e;
+ value = 0;
error = write_mem(data, obj_address+2, 1, &value);
- msleep(5);
- value |= 0x20;
+ msleep(15);
+ value = data->calcfg_batt_e;
error |= write_mem(data, obj_address+2, 1, &value);
if(error) printk(KERN_ERR "[TSP] failed to reenable CHRGON\n");
}
}
if (object_type == TOUCH_MULTITOUCHSCREEN_T9) {
Code:
--- drivers/input/keyboard/cypress/cypress-touchkey.c 2011-10-20 02:58:48.000000000
+++ drivers/input/keyboard/cypress/cypress-touchkey.c 2011-10-25 17:58:10.000000000
@@ -1909,18 +1909,20 @@
int ret = 0;
#ifdef TEST_JIG_MODE
unsigned char get_touch = 0x40;
#endif
+#ifndef CONFIG_MACH_Q1_REV02
if (gpio_request(_3_TOUCH_SDA_28V, "_3_TOUCH_SDA_28V"))
WARN(1, "Fail to request gpio (_3_TOUCH_SDA_28V)\n");
if (gpio_request(_3_TOUCH_SCL_28V, "_3_TOUCH_SCL_28V"))
WARN(1, "Fail to request gpio (_3_TOUCH_SCL_28V)\n");
if (gpio_request(_3_GPIO_TOUCH_EN, "_3_GPIO_TOUCH_EN"))
WARN(1, "Fail to request gpio (_3_GPIO_TOUCH_EN)\n");
+#endif
if (gpio_request(_3_GPIO_TOUCH_INT, "_3_GPIO_TOUCH_INT"))
WARN(1, "Fail to request gpio (_3_GPIO_TOUCH_INT)\n");
/*20110222 N1_firmware_sync*/
sec_touchkey = device_create(sec_class, NULL, 0, NULL, "sec_touchkey");
@@ -2212,18 +2214,20 @@
misc_deregister(&touchkey_update_device);
if (touchkey_wq) {
destroy_workqueue(touchkey_wq);
}
+#ifndef CONFIG_MACH_Q1_REV02
gpio_free(_3_TOUCH_SDA_28V);
gpio_free(_3_TOUCH_SCL_28V);
gpio_free(_3_GPIO_TOUCH_EN);
+#endif
gpio_free(_3_GPIO_TOUCH_INT);
}
late_initcall(touchkey_init);
module_exit(touchkey_exit);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("@@@");
MODULE_DESCRIPTION("melfas touch keypad");
Code:
--- drivers/leds/leds-max8997.c 2011-10-20 02:58:48.000000000
+++ drivers/leds/leds-max8997.c 2011-10-25 17:58:10.000000000
@@ -242,19 +242,30 @@
regulator_led_disable(led);
regulator_put(led->vcc);
kfree(led);
return 0;
}
+static void regulator_led_shutdown(struct platform_device *pdev)
+{
+ struct regulator_led *led = platform_get_drvdata(pdev);
+
+ if (regulator_is_enabled(led->vcc)) {
+ regulator_led_disable(led);
+ }
+ return;
+}
+
static struct platform_driver regulator_led_driver = {
.driver = {
.name = "leds-max8997",
.owner = THIS_MODULE,
},
.probe = regulator_led_probe,
.remove = __devexit_p(regulator_led_remove),
+ .shutdown = regulator_led_shutdown,
};
static int __init regulator_led_init(void)
{
return platform_driver_register(&regulator_led_driver);
}
Code:
--- drivers/media/video/samsung/mali/common/mali_kernel_mem_os.c 2011-10-20 02:58:48.000000000
+++ drivers/media/video/samsung/mali/common/mali_kernel_mem_os.c 2011-10-25 17:58:10.000000000
@@ -251,12 +251,13 @@
{
if ( allocation_order > 0 ) {
--allocation_order;
} else {
/* return OOM */
_mali_osk_lock_signal(info->mutex, _MALI_OSK_LOCKMODE_RW);
+ MALI_PRINT(("Failed to allocate consistent memory in all sizes.\n"));
return MALI_MEM_ALLOC_NONE;
}
}
/* try to allocate 2^(allocation_order) pages, if that fails, try
* allocation_order-1 to allocation_order 0 (inclusive) */
@@ -270,18 +271,21 @@
--allocation_order;
}
if ( NULL == virt )
{
MALI_DEBUG_PRINT(1, ("Failed to allocate consistent memory. Is CONSISTENT_DMA_SIZE set too low?\n"));
+ MALI_PRINT(("Failed to allocate consistent memory. Is CONSISTENT_DMA_SIZE set too low?\n"));
/* return OOM */
_mali_osk_lock_signal(info->mutex, _MALI_OSK_LOCKMODE_RW);
return MALI_MEM_ALLOC_NONE;
}
MALI_DEBUG_PRINT(5, ("os_allocator_allocate_page_table_block: Allocation of order %i succeeded\n",
+ allocation_order));
+ MALI_PRINT(("os_allocator_allocate_page_table_block: Allocation of order %i succeeded\n",
allocation_order));
/* we now know the size of the allocation since we know for what
* allocation_order the allocation succeeded */
size = _MALI_OSK_CPU_PAGE_SIZE << allocation_order;
Code:
--- drivers/media/video/m5mo.c 2011-10-20 02:58:48.000000000
+++ drivers/media/video/m5mo.c 2011-10-25 17:58:10.000000000
@@ -1707,13 +1707,13 @@
}
#endif
static int m5mo_set_touch_auto_focus(struct v4l2_subdev *sd, int val)
{
struct m5mo_state *state = to_state(sd);
- int err = -EINVAL;
+ int err;
cam_info("%s\n", val ? "start" : "stop");
state->focus.touch = val;
if (val) {
err = m5mo_set_af_mode(sd, FOCUS_MODE_TOUCH);
@@ -1727,13 +1727,13 @@
err = m5mo_writew(sd, M5MO_CATEGORY_LENS,
M5MO_LENS_AF_TOUCH_POSY, state->focus.pos_y);
CHECK_ERR(err);
}
cam_trace("X\n");
- return err;
+ return 0;
}
static int m5mo_set_zoom(struct v4l2_subdev *sd, struct v4l2_control *ctrl)
{
struct m5mo_state *state = to_state(sd);
struct v4l2_queryctrl qc = {0,};
Code:
--- drivers/power/smb328_charger.c 2011-10-20 02:58:49.000000000
+++ drivers/power/smb328_charger.c 2011-10-25 17:58:10.000000000
@@ -820,18 +820,26 @@
{
struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent);
struct smb328_chip *chip;
int ret = 0;
int gpio = 0;
u8 data;
+ int i;
- if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE))
- return -EIO;
+ i = 10;
+ while (1) {
+ if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE))
+ goto I2CERROR;
- if (smb328_i2c_read(client, 0x36, &data)<0) /* check HW */
- return -EIO;
+ if (smb328_i2c_read(client, 0x36, &data)>=0) /* check HW */
+ break;
+
+I2CERROR:
+ if (!i--) return -EIO;
+ msleep(300);
+ }
dev_info(&client->dev, "%s : SMB328 Charger Driver Loading\n", __func__);
chip = kzalloc(sizeof(struct smb328_chip), GFP_KERNEL);
if (!chip)
return -ENOMEM;
Code:
--- drivers/video/samsung/s3cfb_s6e8aa0.c 2011-10-20 02:58:50.000000000
+++ drivers/video/samsung/s3cfb_s6e8aa0.c 2011-10-25 17:58:10.000000000
@@ -1009,19 +1009,27 @@
return 0;
}
int s6e8ax0_read_mtp(struct lcd_info *lcd, u8 *mtp_data)
{
int ret;
+ u8 retry_cnt = 3;
s6e8ax0_write(lcd, enable_mtp_register, ARRAY_SIZE(enable_mtp_register));
+
+read_retry:
ret = s6e8ax0_read(lcd, LDI_MTP_ADDR, LDI_MTP_LENGTH, mtp_data);
if (!ret) {
- printk("ERROR:MTP read failed\n");
- return 0;
+ if (retry_cnt) {
+ printk("[WARN:LCD] : %s : retry cnt : %d\n", __func__, retry_cnt);
+ retry_cnt--;
+ goto read_retry;
+ } else
+ printk("ERROR:MTP read failed\n");
}
+
s6e8ax0_write(lcd, disable_mtp_register, ARRAY_SIZE(disable_mtp_register));
return ret;
}
#endif
static ssize_t lcdtype_show(struct device *dev, struct
@@ -1228,12 +1236,13 @@
struct s5p_platform_dsim *pd = (struct s5p_platform_dsim *)pdev->dev.platform_data;
#endif
#ifdef SMART_DIMMING
u8 mtp_data[LDI_MTP_LENGTH] = {0,};
u32 i;
u8 id_buf[3] = {0,};
+ u8 retry_cnt = 3;
#endif
lcd = kzalloc(sizeof(struct lcd_info), GFP_KERNEL);
if (!lcd) {
pr_err("failed to allocate for lcd\n");
ret = -ENOMEM;
@@ -1330,17 +1339,24 @@
dev_info(&lcd->ld->dev, "s6e8aa0 lcd panel driver has been probed.\n");
#ifdef SMART_DIMMING
mutex_init(&lcd->bl_lock);
- //read mpt
+read_retry:
ret = s6e8ax0_read(lcd, PANEL_ID_COMMAND, 3, id_buf);
if (!ret) {
- printk("[LCD:ERROR] : %s read id failed\n", __func__);
- //return -1;
+ if (retry_cnt) {
+ printk("[WARN:LCD] : %s : retry cnt : %d\n", __func__, retry_cnt);
+ retry_cnt--;
+ goto read_retry;
+ } else {
+ printk("[ERROR:LCD] : %s : Read ID Failed\n", __func__);
+ /*To protect ELVSS Wrong Operation*/
+ id_buf[2] = 0x33;
+ }
}
printk("Read ID : %x, %x, %x\n", id_buf[0], id_buf[1], id_buf[2]);
if (id_buf[2] == 0x33) {
lcd->support_elvss = 0;
@@ -1361,22 +1377,23 @@
init_table_info(&lcd->smart);
ret = s6e8ax0_read_mtp(lcd, mtp_data);
if (!ret) {
printk("[LCD:ERROR] : %s read mtp failed\n", __func__);
- //return -1;
+ lcd->connected = 0;
+ dev_info(&lcd->ld->dev, "panel is not connected well\n");
+ /*return -1;*/
}
calc_voltage_table(&lcd->smart, mtp_data);
s6e8ax0_adb_brightness_update(lcd, lcd->bd->props.brightness, 1);
#endif
- if (id_buf[0] == 0xa2) {
- lcd->connected = 1;
+ if (lcd->connected) {
INIT_DELAYED_WORK(&hs_clk_re_try, hs_clk_re_try_work);
lcd->irq = gpio_to_irq(GPIO_OLED_DET);
s3c_gpio_cfgpin(GPIO_OLED_DET, S3C_GPIO_SFN(0xf));
s3c_gpio_setpull(GPIO_OLED_DET, S3C_GPIO_PULL_NONE);
@@ -1384,15 +1401,12 @@
if (request_irq(lcd->irq, oled_det_int, IRQF_TRIGGER_FALLING, "vgh_toggle", 0)) {
pr_err("failed to reqeust irq. %d\n", lcd->irq);
ret = -EINVAL;
goto out_free_backlight;
}
- } else {
- lcd->connected = 0;
- dev_info(&lcd->ld->dev, "panel is not connected\n");
}
return 0;
out_free_backlight:
lcd_device_unregister(lcd->ld);
Code:
--- drivers/video/samsung/s5p-dsim.c 2011-10-20 02:58:50.000000000
+++ drivers/video/samsung/s5p-dsim.c 2011-10-25 17:58:10.000000000
@@ -115,13 +115,13 @@
#define MIPI_CMD_GENERIC_RD_2 0x24
#define MIPI_CMD_DSI_RD_0 0x06
#define MIPI_CMD_DSI_SET_PKT_SZ 0x37
-#define MIPI_RX_TIMEOUT HZ
+#define MIPI_RX_TIMEOUT msecs_to_jiffies(250)
#define DSMI_RX_FIFO_READ_DONE 0x30800002
#define DSIM_MAX_RX_FIFO 20
#define S5P_DSIM_INT_SFR_FIFO_EMPTY 29
#define S5P_DSIM_INT_BTA 25
#define S5P_DSIM_INT_MSK_FRAME_DONE 24
@@ -358,13 +358,13 @@
}
rxhd = readl(reg_base + S5P_DSIM_RXFIFO);
printk("rxhd : %x\n", rxhd);
if ((u8)(rxhd & 0xff) != response) {
printk(KERN_ERR "[DSIM:ERROR]:%s wrong response rxhd : %x, response:%x\n"
- ,__func__, rxhd, response);
+ , __func__, rxhd, response);
goto clear_rx_fifo;
}
// for short packet
if (count <= 2) {
for (i = 0; i < count; i++)
buf[i] = (rxhd >> (8+(i*8))) & 0xff;
@@ -379,21 +379,21 @@
goto clear_rx_fifo;
}
for (i = 0; i < rxsize>>2; i++) {
temp = readl(reg_base + S5P_DSIM_RXFIFO);
printk("pkt : %08x\n", temp);
- for(j=0; j < 4; j++) {
+ for (j = 0; j < 4; j++) {
buf[(i*4)+j] = (u8)(temp>>(j*8))&0xff;
//printk("Value : %02x\n",(temp>>(j*8))&0xff);
}
}
if (rxsize % 4) {
temp = readl(reg_base + S5P_DSIM_RXFIFO);
printk("pkt-l : %08x\n", temp);
- for(j=0; j < rxsize%4; j++) {
+ for (j = 0; j < rxsize%4; j++) {
buf[(i*4)+j] = (u8)(temp>>(j*8))&0xff;
//printk("Value : %02x\n",(temp>>(j*8))&0xff);
}
}
}
@@ -1089,30 +1089,30 @@
writel(int_stat, dsim.reg_base + S5P_DSIM_INTMSK);
}
int s5p_dsim_fifo_clear(void)
{
- int dsim_count=0,ret;
+ int dsim_count = 0, ret;
writel(SwRstRelease, dsim.reg_base + S5P_DSIM_INTSRC);
-
+
writel(DSIM_FUNCRST, dsim.reg_base + S5P_DSIM_SWRST);
- do{
- if(++dsim_count>90000){
- printk("dsim fifo clear fail re_try dsim resume\n");
- ret=0;
+ do {
+ if (++dsim_count > 90000) {
+ printk("dsim fifo clear fail re_try dsim resume\n");
+ ret = 0;
break;
- }
-
- if(readl(dsim.reg_base + S5P_DSIM_INTSRC) & SwRstRelease){
- s5p_dsim_interrupt_mask_set();
- ret=1;
+ }
+
+ if (readl(dsim.reg_base + S5P_DSIM_INTSRC) & SwRstRelease) {
+ s5p_dsim_interrupt_mask_set();
+ ret = 1;
break;
}
- }while(1);
+ } while (1);
return ret;
}
#ifdef CONFIG_HAS_EARLYSUSPEND
void s5p_dsim_early_suspend(void)
@@ -1140,24 +1140,24 @@
if (dsim.mipi_drv->suspend)
dsim.mipi_drv->suspend(dsim.dev, state);
if (dsim.mipi_ddi_pd->lcd_power_on)
dsim.mipi_ddi_pd->lcd_power_on(dsim.dev, 0);
-
+
s5p_dsim_enable_hs_clock(dsim.reg_base, 0);
s5p_dsim_set_clock(dsim.reg_base, dsim.dsim_info->e_byte_clk, 0);
-
+
writel(0xffff, dsim.reg_base + S5P_DSIM_CLKCTRL);
writel(0x0, dsim.reg_base + S5P_DSIM_PLLCTRL);
writel(0x0, dsim.reg_base + S5P_DSIM_PLLTMR);
writel(0x0, dsim.reg_base + S5P_DSIM_PHYACCHR);
- writel(0x0, dsim.reg_base + S5P_DSIM_PHYACCHR1);
+ writel(0x0, dsim.reg_base + S5P_DSIM_PHYACCHR1);
writel(0x1, dsim.reg_base + S5P_DSIM_SWRST);
-
+
clk_disable(dsim.clock);
#if 0
if (dsim.pd->mipi_power)
dsim.pd->mipi_power(0);
else
Code:
--- drivers/video/samsung/s6e8aa0_param.h 2011-10-20 02:58:50.000000000
+++ drivers/video/samsung/s6e8aa0_param.h 2011-10-25 17:58:10.000000000
@@ -66,13 +66,14 @@
static const unsigned char SEQ_APPLY_LEVEL_2_KEY[] = {
0xFC,
0x5A, 0x5A
};
static const unsigned char SEQ_SLEEP_OUT[] = {
- 0x11
+ 0x11,
+ 0x00,0x00
};
static const unsigned char SEQ_PANEL_CONDITION_SET[] = {
0xF8,
0x25, 0x34, 0x00, 0x00, 0x00, 0x95, 0x00, 0x3C, 0x7D, 0x08,
0x27, 0x00, 0x00, 0x10, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00,
@@ -83,13 +84,14 @@
static const unsigned char SEQ_DISPLAY_CONDITION_SET[] = {
0xF2,
0x80, 0x03, 0x0D
};
static const unsigned char SEQ_GAMMA_UPDATE[] = {
- 0xF7, 0x03
+ 0xF7, 0x03,
+ 0x00
};
static const unsigned char SEQ_ETC_SOURCE_CONTROL[] = {
0xF6,
0x00, 0x02, 0x00
};
@@ -116,30 +118,35 @@
0x14, 0x40, 0x0C, 0xCB, 0xCE,
0x6E, 0xC4, 0x0F, 0x40, 0x41,
0xD9, 0x00, 0x00, 0x00
};
static const unsigned char SEQ_DISPLAY_ON[] = {
- 0x29
+ 0x29,
+ 0x00,0x00
};
static const unsigned char SEQ_DISPLAY_OFF[] = {
- 0x28
+ 0x28,
+ 0x00,0x00
};
static const unsigned char SEQ_STANDBY_ON[] = {
- 0x01
+ 0x01,
+ 0x00,0x00
};
static const unsigned char SEQ_ACL_ON[] = {
0xC0, 0x01,
+ 0x00
};
static const unsigned char SEQ_ACL_OFF[] = {
0xC0, 0x00,
+ 0x00
};
static const unsigned char SEQ_ACL_CUTOFF_20[] = {
0xC1,
0x47, 0x53, 0x13, 0x53, 0x00,
0x00, 0x03, 0x1F, 0x00, 0x00,
and they changed to codesourcery for toolchain
+CROSS_COMPILE ?= /opt/toolchains/arm-2009q3/bin/arm-none-linux-gnueabi-
Not a massive amount of differences, the screen driver changes looks most interesting to me.
fards said:
and they changed to codesourcery for toolchain
+CROSS_COMPILE ?= /opt/toolchains/arm-2009q3/bin/arm-none-linux-gnueabi-
Not a massive amount of differences, the screen driver changes looks most interesting to me.
Click to expand...
Click to collapse
Is there a new kernel source?
Sent from my GT-I9100
yes, kj6 is up,
the diffs are between kj4 and that kj6
to show the file differences (there's also some docs changes but they aren't really needed)
fards said:
yes, kj6 is up,
the diffs are between kj4 and that kj6
to show the file differences (there's also some docs changes but they aren't really needed)
Click to expand...
Click to collapse
Where did you get the kernel source?
https://opensource.samsung.com/index.jsp
search for N7000
I presume the kkx build will be there under the other device code.
fards said:
https://opensource.samsung.com/index.jsp
search for N7000
I presume the kkx build will be there under the other device code.
Click to expand...
Click to collapse
LOL you have the Hong Kong version source code xD
netchip said:
LOL you have the Hong Kong version source code xD
Click to expand...
Click to collapse
kj6 as I said...
to compare against kj4 as 6 is supposed to bring bugfixes..
fards said:
Not a massive amount of differences, the screen driver changes looks most interesting to me.
Click to expand...
Click to collapse
Maybe that diff solves my screen issue.
Just to explain, sometimes my screen does not wake up even if the phone is still running (long pressing the on/off button makes the phone vibrate which means that it is still working) and when I hard reboot it (8 seconds long on/off button press), it restarts and in the battery usage I can see that the phone has been awake for a long time instead of having been idle (when it happens, it is generally during the night).
As I am facing it globally (with both European stock and Hong Kong ROMs), I hope this kernel change corrects it.
The_Steph said:
Maybe that diff solves my screen issue.
Just to explain, sometimes my screen does not wake up even if the phone is still running (long pressing the on/off button makes the phone vibrate which means that it is still working) and when I hard reboot it (8 seconds long on/off button press), it restarts and in the battery usage I can see that the phone has been awake for a long time instead of having been idle (when it happens, it is generally during the night).
As I am facing it globally (with both European stock and Hong Kong ROMs), I hope this kernel change corrects it.
Click to expand...
Click to collapse
I've seen the same thing a couple of times. Still haven't tested the KJ6 kernel to see the effect of those patches yet.
Actually thats spurred me onto testing the KJ6.. Initialtesting suggests Screen powers back up Much quicker from standby
KJ6, where did you get it?
Edit: I have Baseband version N7000XXKJ6 but Kernel N7000ZSKK1. Is is this version you are talking about?
The_Steph said:
KJ6, where did you get it?
Edit: I have Baseband version N7000XXKJ6 but Kernel N7000ZSKK1. Is is this version you are talking about?
Click to expand...
Click to collapse
no there's threads with the kj6 kernel, including the CF root thread.
I've just built kernel with the patches, working well so far.
Basically, what you did is you installed KJ6 kernel, rooted it and install the kernel you built?
If yes, do you mind, allowing me to download the kernel you built in order to use it?

[MOD][GUIDE] Panasonic Eluga style lockscreen (Trace the arc to unlock)

This is just another ICS lockscreen mod. Panasonic Eluga style.
And originally posted on Nexus S theme forum.. :
[MOD] Panasonic Eluga style lockscreen (Trace the arc to unlock)
Preview :
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
-----------------------------------------------------------------------------
* Caution : All values and resources(PNGs) are for HDPI=WVGA devices *
How to :
1) Apply patch(diff) with resources.
2) Compile.
3) Done
*How to use patch : http://jungels.net/articles/diff-patch-ten-minutes.html
* diff : Download
Code:
diff -rupN ./a/core/java/com/android/internal/widget/WaveView.java ./b/core/java/com/android/internal/widget/WaveView.java
--- ./a/core/java/com/android/internal/widget/WaveView.java 2012-04-05 00:32:15.291482000 +0900
+++ ./b/core/java/com/android/internal/widget/WaveView.java 2012-04-19 17:23:22.719207000 +0900
@@ -43,7 +43,7 @@ import com.android.internal.R;
public class WaveView extends View implements ValueAnimator.AnimatorUpdateListener {
private static final String TAG = "WaveView";
private static final boolean DBG = false;
- private static final int WAVE_COUNT = 20; // default wave count
+ private static final int WAVE_COUNT = 1; // default wave count
private static final long VIBRATE_SHORT = 20; // msec
private static final long VIBRATE_LONG = 20; // msec
@@ -62,7 +62,7 @@ public class WaveView extends View imple
private static final long FINAL_DELAY = 200; // delay for unlock success animation
private static final long SHORT_DELAY = 100; // for starting one animation after another.
private static final long WAVE_DURATION = 2000; // amount of time for way to expand/decay
- private static final long RESET_TIMEOUT = 3000; // elapsed time of inactivity before we reset
+ private static final long RESET_TIMEOUT = 200; // elapsed time of inactivity before we reset
private static final long DELAY_INCREMENT = 15; // increment per wave while tracking motion
private static final long DELAY_INCREMENT2 = 12; // increment per wave while not tracking
private static final long WAVE_DELAY = WAVE_DURATION / WAVE_COUNT; // initial propagation delay
@@ -84,8 +84,8 @@ public class WaveView extends View imple
private ArrayList<DrawableHolder> mDrawables = new ArrayList<DrawableHolder>(3);
private ArrayList<DrawableHolder> mLightWaves = new ArrayList<DrawableHolder>(WAVE_COUNT);
private boolean mFingerDown = false;
- private float mRingRadius = 182.0f; // Radius of bitmap ring. Used to snap halo to it
- private int mSnapRadius = 136; // minimum threshold for drag unlock
+ private float mRingRadius = 320.0f; // Radius of bitmap ring. Used to snap halo to it
+ private int mSnapRadius = 180; // minimum threshold for drag unlock
private int mWaveCount = WAVE_COUNT; // number of waves
private long mWaveTimerDelay = WAVE_DELAY;
private int mCurrentWave = 0;
@@ -166,16 +166,16 @@ public class WaveView extends View imple
mUnlockRing = new DrawableHolder(createDrawable(R.drawable.unlock_ring));
mUnlockRing.setX(mLockCenterX);
mUnlockRing.setY(mLockCenterY);
- mUnlockRing.setScaleX(0.1f);
- mUnlockRing.setScaleY(0.1f);
+ mUnlockRing.setScaleX(1.0f);
+ mUnlockRing.setScaleY(1.0f);
mUnlockRing.setAlpha(0.0f);
mDrawables.add(mUnlockRing);
mUnlockDefault = new DrawableHolder(createDrawable(R.drawable.unlock_default));
mUnlockDefault.setX(mLockCenterX);
mUnlockDefault.setY(mLockCenterY);
- mUnlockDefault.setScaleX(0.1f);
- mUnlockDefault.setScaleY(0.1f);
+ mUnlockDefault.setScaleX(1.0f);
+ mUnlockDefault.setScaleY(1.0f);
mUnlockDefault.setAlpha(0.0f);
mDrawables.add(mUnlockDefault);
@@ -215,41 +215,23 @@ public class WaveView extends View imple
mLightWaves.get(i).startAnimations(this);
}
- mUnlockRing.addAnimTo(DURATION, 0, "x", mLockCenterX, true);
- mUnlockRing.addAnimTo(DURATION, 0, "y", mLockCenterY, true);
- mUnlockRing.addAnimTo(DURATION, 0, "scaleX", 0.1f, true);
- mUnlockRing.addAnimTo(DURATION, 0, "scaleY", 0.1f, true);
- mUnlockRing.addAnimTo(DURATION, 0, "alpha", 0.0f, true);
-
- mUnlockDefault.removeAnimationFor("x");
- mUnlockDefault.removeAnimationFor("y");
- mUnlockDefault.removeAnimationFor("scaleX");
- mUnlockDefault.removeAnimationFor("scaleY");
- mUnlockDefault.removeAnimationFor("alpha");
+ mUnlockRing.setX(mLockCenterX);
+ mUnlockRing.setY(mLockCenterY);
+ mUnlockRing.setScaleX(1.0f);
+ mUnlockRing.setScaleY(1.0f);
+ mUnlockRing.setAlpha(1.0f);
+
mUnlockDefault.setX(mLockCenterX);
mUnlockDefault.setY(mLockCenterY);
- mUnlockDefault.setScaleX(0.1f);
- mUnlockDefault.setScaleY(0.1f);
+ mUnlockDefault.setScaleX(1.0f);
+ mUnlockDefault.setScaleY(1.0f);
mUnlockDefault.setAlpha(0.0f);
- mUnlockDefault.addAnimTo(DURATION, SHORT_DELAY, "scaleX", 1.0f, true);
- mUnlockDefault.addAnimTo(DURATION, SHORT_DELAY, "scaleY", 1.0f, true);
- mUnlockDefault.addAnimTo(DURATION, SHORT_DELAY, "alpha", 1.0f, true);
-
- mUnlockHalo.removeAnimationFor("x");
- mUnlockHalo.removeAnimationFor("y");
- mUnlockHalo.removeAnimationFor("scaleX");
- mUnlockHalo.removeAnimationFor("scaleY");
- mUnlockHalo.removeAnimationFor("alpha");
+
mUnlockHalo.setX(mLockCenterX);
mUnlockHalo.setY(mLockCenterY);
- mUnlockHalo.setScaleX(0.1f);
- mUnlockHalo.setScaleY(0.1f);
- mUnlockHalo.setAlpha(0.0f);
- mUnlockHalo.addAnimTo(DURATION, SHORT_DELAY, "x", mLockCenterX, true);
- mUnlockHalo.addAnimTo(DURATION, SHORT_DELAY, "y", mLockCenterY, true);
- mUnlockHalo.addAnimTo(DURATION, SHORT_DELAY, "scaleX", 1.0f, true);
- mUnlockHalo.addAnimTo(DURATION, SHORT_DELAY, "scaleY", 1.0f, true);
- mUnlockHalo.addAnimTo(DURATION, SHORT_DELAY, "alpha", 1.0f, true);
+ mUnlockHalo.setScaleX(1.0f);
+ mUnlockHalo.setScaleY(1.0f);
+ mUnlockHalo.setAlpha(1.0f);
removeCallbacks(mLockTimerActions);
@@ -263,24 +245,12 @@ public class WaveView extends View imple
case STATE_START_ATTEMPT:
if (DBG) Log.v(TAG, "State START_ATTEMPT");
- mUnlockDefault.removeAnimationFor("x");
- mUnlockDefault.removeAnimationFor("y");
- mUnlockDefault.removeAnimationFor("scaleX");
- mUnlockDefault.removeAnimationFor("scaleY");
- mUnlockDefault.removeAnimationFor("alpha");
- mUnlockDefault.setX(mLockCenterX + 182);
- mUnlockDefault.setY(mLockCenterY);
- mUnlockDefault.setScaleX(0.1f);
- mUnlockDefault.setScaleY(0.1f);
- mUnlockDefault.setAlpha(0.0f);
- mUnlockDefault.addAnimTo(DURATION, SHORT_DELAY, "scaleX", 1.0f, false);
- mUnlockDefault.addAnimTo(DURATION, SHORT_DELAY, "scaleY", 1.0f, false);
- mUnlockDefault.addAnimTo(DURATION, SHORT_DELAY, "alpha", 1.0f, false);
-
- mUnlockRing.addAnimTo(DURATION, 0, "scaleX", 1.0f, true);
- mUnlockRing.addAnimTo(DURATION, 0, "scaleY", 1.0f, true);
- mUnlockRing.addAnimTo(DURATION, 0, "alpha", 1.0f, true);
+ mUnlockRing.setX(mLockCenterX);
+ mUnlockRing.setY(mLockCenterY);
+ mUnlockRing.setScaleX(1.0f);
+ mUnlockRing.setScaleY(1.0f);
+ mUnlockRing.setAlpha(1.0f);
mLockState = STATE_ATTEMPTING;
break;
@@ -290,11 +260,8 @@ public class WaveView extends View imple
if (dragDistance > mSnapRadius) {
mFinishWaves = true; // don't start any more waves.
if (fingerDown) {
- mUnlockHalo.addAnimTo(0, 0, "x", ringX, true);
- mUnlockHalo.addAnimTo(0, 0, "y", ringY, true);
- mUnlockHalo.addAnimTo(0, 0, "scaleX", 1.0f, true);
- mUnlockHalo.addAnimTo(0, 0, "scaleY", 1.0f, true);
- mUnlockHalo.addAnimTo(0, 0, "alpha", 1.0f, true);
+ mUnlockDefault.setAlpha(1.0f);
+ mUnlockRing.setAlpha(0.0f);
} else {
if (DBG) Log.v(TAG, "up detected, moving to STATE_UNLOCK_ATTEMPT");
mLockState = STATE_UNLOCK_ATTEMPT;
@@ -307,11 +274,8 @@ public class WaveView extends View imple
// mWaveTimerDelay = WAVE_DELAY;
postDelayed(mAddWaveAction, mWaveTimerDelay);
}
- mUnlockHalo.addAnimTo(0, 0, "x", mouseX, true);
- mUnlockHalo.addAnimTo(0, 0, "y", mouseY, true);
- mUnlockHalo.addAnimTo(0, 0, "scaleX", 1.0f, true);
- mUnlockHalo.addAnimTo(0, 0, "scaleY", 1.0f, true);
- mUnlockHalo.addAnimTo(0, 0, "alpha", 1.0f, true);
+ mUnlockDefault.setAlpha(0.0f);
+ mUnlockRing.setAlpha(1.0f);
}
break;
@@ -331,42 +295,6 @@ public class WaveView extends View imple
mLightWaves.get(i).startAnimations(this);
}
- mUnlockRing.addAnimTo(FINAL_DURATION, 0, "x", ringX, false);
- mUnlockRing.addAnimTo(FINAL_DURATION, 0, "y", ringY, false);
- mUnlockRing.addAnimTo(FINAL_DURATION, 0, "scaleX", 0.1f, false);
- mUnlockRing.addAnimTo(FINAL_DURATION, 0, "scaleY", 0.1f, false);
- mUnlockRing.addAnimTo(FINAL_DURATION, 0, "alpha", 0.0f, false);
-
- mUnlockRing.addAnimTo(FINAL_DURATION, FINAL_DELAY, "alpha", 0.0f, false);
-
- mUnlockDefault.removeAnimationFor("x");
- mUnlockDefault.removeAnimationFor("y");
- mUnlockDefault.removeAnimationFor("scaleX");
- mUnlockDefault.removeAnimationFor("scaleY");
- mUnlockDefault.removeAnimationFor("alpha");
- mUnlockDefault.setX(ringX);
- mUnlockDefault.setY(ringY);
- mUnlockDefault.setScaleX(0.1f);
- mUnlockDefault.setScaleY(0.1f);
- mUnlockDefault.setAlpha(0.0f);
-
- mUnlockDefault.addAnimTo(FINAL_DURATION, 0, "x", ringX, true);
- mUnlockDefault.addAnimTo(FINAL_DURATION, 0, "y", ringY, true);
- mUnlockDefault.addAnimTo(FINAL_DURATION, 0, "scaleX", 1.0f, true);
- mUnlockDefault.addAnimTo(FINAL_DURATION, 0, "scaleY", 1.0f, true);
- mUnlockDefault.addAnimTo(FINAL_DURATION, 0, "alpha", 1.0f, true);
-
- mUnlockDefault.addAnimTo(FINAL_DURATION, FINAL_DELAY, "scaleX", 3.0f, false);
- mUnlockDefault.addAnimTo(FINAL_DURATION, FINAL_DELAY, "scaleY", 3.0f, false);
- mUnlockDefault.addAnimTo(FINAL_DURATION, FINAL_DELAY, "alpha", 0.0f, false);
-
- mUnlockHalo.addAnimTo(FINAL_DURATION, 0, "x", ringX, false);
- mUnlockHalo.addAnimTo(FINAL_DURATION, 0, "y", ringY, false);
-
- mUnlockHalo.addAnimTo(FINAL_DURATION, FINAL_DELAY, "scaleX", 3.0f, false);
- mUnlockHalo.addAnimTo(FINAL_DURATION, FINAL_DELAY, "scaleY", 3.0f, false);
- mUnlockHalo.addAnimTo(FINAL_DURATION, FINAL_DELAY, "alpha", 0.0f, false);
-
removeCallbacks(mLockTimerActions);
postDelayed(mLockTimerActions, RESET_TIMEOUT);
Binary files ./a/core/res/res/drawable-hdpi/unlock_default.png and ./b/core/res/res/drawable-hdpi/unlock_default.png differ
Binary files ./a/core/res/res/drawable-hdpi/unlock_halo.png and ./b/core/res/res/drawable-hdpi/unlock_halo.png differ
Binary files ./a/core/res/res/drawable-hdpi/unlock_ring.png and ./b/core/res/res/drawable-hdpi/unlock_ring.png differ
Binary files ./a/core/res/res/drawable-hdpi/unlock_wave.png and ./b/core/res/res/drawable-hdpi/unlock_wave.png differ
diff -rupN ./a/core/res/res/layout/keyguard_screen_tab_unlock.xml ./b/core/res/res/layout/keyguard_screen_tab_unlock.xml
--- ./a/core/res/res/layout/keyguard_screen_tab_unlock.xml 2012-04-05 00:32:17.031482000 +0900
+++ ./b/core/res/res/layout/keyguard_screen_tab_unlock.xml 2012-04-19 19:13:39.669207000 +0900
@@ -28,16 +28,29 @@
android:layout_height="match_parent"
android:gravity="center_horizontal">
+ <TextView
+ android:id="@+id/carrier"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_alignParentBottom="true"
+ android:layout_marginTop="12dip"
+ android:layout_marginRight="12dip"
+ android:gravity="right"
+ android:singleLine="true"
+ android:ellipsize="marquee"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:textSize="16dip"
+ android:textStyle="bold"
+ />
+
<com.android.internal.widget.DigitalClock android:id="@+id/time"
android:layout_marginTop="@dimen/keyguard_lockscreen_status_line_clockfont_top_margin"
- android:layout_marginBottom="12dip"
- android:layout_marginRight="@dimen/keyguard_lockscreen_status_line_font_right_margin"
- android:layout_gravity="right">
+ android:layout_marginBottom="12dip">
<!-- Because we can't have multi-tone fonts, we render two TextViews, one on
top of the other. Hence the redundant layout... -->
<TextView android:id="@+id/timeDisplayBackground"
- android:layout_width="wrap_content"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:singleLine="true"
android:ellipsize="none"
@@ -45,10 +58,11 @@
android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_marginBottom="6dip"
android:textColor="@color/lockscreen_clock_background"
+ android:gravity="center_horizontal"
/>
<TextView android:id="@+id/timeDisplayForeground"
- android:layout_width="wrap_content"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:singleLine="true"
android:ellipsize="none"
@@ -58,52 +72,57 @@
android:textColor="@color/lockscreen_clock_foreground"
android:layout_alignLeft="@id/timeDisplayBackground"
android:layout_alignTop="@id/timeDisplayBackground"
+ android:gravity="center_horizontal"
/>
</com.android.internal.widget.DigitalClock>
<LinearLayout
android:orientation="horizontal"
- android:layout_gravity="right"
- android:layout_marginRight="@dimen/keyguard_lockscreen_status_line_font_right_margin">
+ android:layout_width="match_parent">
<TextView
android:id="@+id/date"
- android:layout_width="wrap_content"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:singleLine="true"
android:ellipsize="marquee"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textSize="@dimen/keyguard_lockscreen_status_line_font_size"
+ android:textStyle="bold"
+ android:gravity="center_horizontal"
/>
<TextView
android:id="@+id/alarm_status"
- android:layout_width="wrap_content"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="16dip"
android:singleLine="true"
android:ellipsize="marquee"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textSize="@dimen/keyguard_lockscreen_status_line_font_size"
+ android:textStyle="bold"
android:drawablePadding="4dip"
+ android:gravity="center_horizontal"
/>
</LinearLayout>
<TextView
android:id="@+id/status1"
- android:layout_gravity="right"
- android:layout_marginRight="@dimen/keyguard_lockscreen_status_line_font_right_margin"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
android:singleLine="true"
android:ellipsize="marquee"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textSize="@dimen/keyguard_lockscreen_status_line_font_size"
+ android:textStyle="bold"
android:drawablePadding="4dip"
+ android:layout_marginBottom="16dip"
+ android:gravity="center_horizontal"
/>
- <Space android:layout_gravity="fill" />
-
<!-- emergency call button shown when sim is PUKd and tab_selector is hidden -->
<Button
android:id="@+id/emergencyCallButton"
@@ -111,7 +130,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="4dip"
android:layout_marginRight="16dip"
- android:layout_gravity="right"
+ android:layout_gravity="center_horizontal"
android:drawableLeft="@*android:drawable/lockscreen_emergency_button"
style="?android:attr/buttonBarButtonStyle"
android:drawablePadding="4dip"
@@ -121,42 +140,13 @@
<RelativeLayout
android:layout_width="match_parent"
- android:layout_height="302dip">
+ android:layout_height="320dip"
+ android:layout_gravity="center_horizontal">
- <com.android.internal.widget.multiwaveview.MultiWaveView
+ <com.android.internal.widget.WaveView
android:id="@+id/unlock_widget"
- android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:layout_alignParentBottom="true"
-
- android:targetDrawables="@array/lockscreen_targets_with_camera"
- android:targetDescriptions="@array/lockscreen_target_descriptions_with_camera"
- android:directionDescriptions="@array/lockscreen_direction_descriptions"
- android:handleDrawable="@drawable/ic_lockscreen_handle"
- android:waveDrawable="@drawable/ic_lockscreen_outerring"
- android:outerRadius="@dimen/multiwaveview_target_placement_radius"
- android:snapMargin="@dimen/multiwaveview_snap_margin"
- android:hitRadius="@dimen/multiwaveview_hit_radius"
- android:rightChevronDrawable="@drawable/ic_lockscreen_chevron_right"
- android:horizontalOffset="0dip"
- android:verticalOffset="60dip"
- android:feedbackCount="3"
- android:vibrationDuration="20"
- />
-
- <TextView
- android:id="@+id/carrier"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_alignParentBottom="true"
- android:layout_marginBottom="12dip"
- android:gravity="center_horizontal"
- android:singleLine="true"
- android:ellipsize="marquee"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textSize="@dimen/keyguard_lockscreen_status_line_font_size"
- android:textColor="?android:attr/textColorSecondary"
/>
</RelativeLayout>
@@ -166,13 +156,13 @@
android:layout_width="match_parent"
style="?android:attr/buttonBarStyle"
android:gravity="center"
- android:weightSum="2">
+ android:weightSum="0">
<Button android:id="@+id/emergencyCallButton"
android:layout_gravity="center_horizontal"
android:layout_width="0dip"
android:layout_height="wrap_content"
- android:layout_weight="1"
+ android:layout_weight="0"
style="?android:attr/buttonBarButtonStyle"
android:textSize="@dimen/keyguard_lockscreen_status_line_font_size"
android:text="@*android:string/lockscreen_emergency_call"
diff -rupN ./a/core/res/res/values/dimens.xml ./b/core/res/res/values/dimens.xml
--- ./a/core/res/res/values/dimens.xml 2012-04-05 00:32:17.671482000 +0900
+++ ./b/core/res/res/values/dimens.xml 2012-04-19 18:27:08.859215000 +0900
@@ -164,7 +164,7 @@
<dimen name="keyguard_lockscreen_status_line_font_right_margin">42dip</dimen>
<!-- Size of top margin on Clock font to edge on unlock LockScreen -->
- <dimen name="keyguard_lockscreen_status_line_clockfont_top_margin">22dip</dimen>
+ <dimen name="keyguard_lockscreen_status_line_clockfont_top_margin">34dip</dimen>
<!-- Size of top margin on Clock font to edge on unlock LockScreen -->
<dimen name="keyguard_lockscreen_status_line_clockfont_bottom_margin">12dip</dimen>
* resources : Download
-----------------------------------------------------------------------------
Thanks to stephenjungels.com for guide to diff and patch..
-----------------------------------------------------------------------------
the guide to use patch is only for linux user ? Is it right ? How to apply it on windows ?
Your Mod for ICS LockScreen works only on Nexus S?
Can i apply it on my Motorola Defy with CM9, by your patch?
remix96 said:
Your Mod for ICS LockScreen works only on Nexus S?
Can i apply it on my Motorola Defy with CM9, by your patch?
Click to expand...
Click to collapse
Once again thanks evilisto for the mods ^_^
Yes you can this should work on any ics rom but obviously with aokp and other roms with a different framework it might require some different changes(correct me if am wrong evilisto)...... I am currently using the Optimus 4x lockscreen which I used a patch for on my defy also ...... Btw you know you need the source code to use this........
Kayant said:
Once again thanks evilisto for the mods ^_^
Yes you can this should work on any ics rom but obviously with aokp and other roms with different a framework it might require some different changes(correct me if am wrong evilisto)...... I am currently using the Optimus 4x lockscreen which I used a patch for on my defy also ...... Btw you know you need the source code to use this........
Click to expand...
Click to collapse
Oh! You use this lockscreen mods on Defy!?!?!?
Can you tell me how to specifically apply that mods on Defy?
And what you intend for "know the source code"... why i need to know that for this mod?
P.S. You can PM me, if you want
Kayant said:
Once again thanks evilisto for the mods ^_^
Yes you can this should work on any ics rom but obviously with aokp and other roms with different a framework it might require some different changes(correct me if am wrong evilisto)...... I am currently using the Optimus 4x lockscreen which I used a patch for on my defy also ...... Btw you know you need the source code to use this........
Click to expand...
Click to collapse
You are right. Basically this patch will work well on other devices but it will not work on AOKP or AOKP-based other custom roms. (need some modifications)
resources updated
I re-drew arc image. Now it is more similar to original..
Can anyone with an xperia arc patch their files and post them here please? I really want this mod, but i am unable to patch my files since i am not on linux
Can any one help get this work on a Galaxy S2
question
where does the resources files put into?
chenleicpp said:
where does the resources files put into?
Click to expand...
Click to collapse
Once you apply the patch to your source files then you add the files(resource) to your source as well then compile your rom or if you have compiled once already use the mmm command to compile the part that got changed - http://wiki.cyanogenmod.com/wiki/Howto:_Speed_up_building#Using_mmm_to_rebuild_only_valid_parts
help
tt tooks this error and i think i dont have WaveView before?
[email protected]:/work/cm9source/frameworks$ patch -p1 < base/Trace_the_Arc_LS.patch
can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -rupN ./a/core/java/com/android/internal/widget/WaveView.java ./b/core/java/com/android/internal/widget/WaveView.java
|--- ./a/core/java/com/android/internal/widget/WaveView.java 2012-04-05 00:32:15.291482000 +0900
|+++ ./b/core/java/com/android/internal/widget/WaveView.java 2012-04-19 17:23:22.719207000 +0900
--------------------------
chenleicpp said:
tt tooks this error and i think i dont have WaveView before?
[email protected]:/work/cm9source/frameworks$ patch -p1 < base/Trace_the_Arc_LS.patch
can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -rupN ./a/core/java/com/android/internal/widget/WaveView.java ./b/core/java/com/android/internal/widget/WaveView.java
|--- ./a/core/java/com/android/internal/widget/WaveView.java 2012-04-05 00:32:15.291482000 +0900
|+++ ./b/core/java/com/android/internal/widget/WaveView.java 2012-04-19 17:23:22.719207000 +0900
--------------------------
Click to expand...
Click to collapse
Do you have the rom source code because that's why you're getting an error as it can't find which files to patch..
yes
Kayant said:
Do you have the rom source code because that's why you're getting an error as it can't find which files to patch..
Click to expand...
Click to collapse
yes,maybe it is the point,because in my frameworks/base/core/java/android/widget folder,there is no waveview.java, so i need compelete code to include this theme.
---------- Post added at 11:10 AM ---------- Previous post was at 11:01 AM ----------
also i want to say that my sourcecode is cm9,and how to use it in cm9
for lg p500
i want ths lockscreen , how do i gt that??

[GUIDE]MTK LockScreen

Hello all! This is basicly a easy build.prop mod for changing lockscreen on mtk devices like Alcatel ot-991, ot-918, Spice Mi-350n Hero 7300, Star A3...
What Is Required :
PHP:
? Rooted phone
? Notepad++(for opening build.prop files)
? Android Commander
? Tool for decompiling jar files - apkmanager/apktool/virtous or...
Weel if u had all mentioned above u have to find build.prop file. On alcatel stock roms that file is used to be in custpack folder but often is in system folder. When u find it open it and search for line :
curlockscreen=[number/letter]
Click to expand...
Click to collapse
and now depending on what device you have that number/letter could be for example :
>>HERO 7300<<
*LOCK_SCREEN_ORI:I = 1
*LOCK_SCREEN_SLIDE:I = 2
*LOCK_SCREEN_SENSE:I = 3
*LOCK_SCREEN_SENSE_G11:I = 4
*LOCK_SCREEN_GLASS:I = 5
*LOCK_SCREEN_SENSE_G11_PLUS:I = 6
*LOCK_SCREEN_SENSE_PLUS:I = 7
*LOCK_SCREEN_GLASS_G2:I = 8
*LOCK_SCREEN_IPHONE:I = 9
*LOCK_SCREEN_SENSE_G14:I = a
*LOCK_SCREEN_WAVE:I = b
*LOCK_SCREEN_ROLLER:I = c
>>STAR A3<<
*LOCK_SCREEN_ORI:I = 1
*LOCK_SCREEN_SLIDE:I = 2
*LOCK_SCREEN_SENSE:I = 3
*LOCK_SCREEN_SENSE_G11:I = 4
*LOCK_SCREEN_GLASS:I = 5
*LOCK_SCREEN_SENSE_G11_PLUS:I = 6
*LOCK_SCREEN_SENSE_PLUS:I = 7
*LOCK_SCREEN_GLASS_G2:I = 8
*LOCK_SCREEN_IPHONE:I = 9
>>SPICE Mi-350n<<
*LOCK_SCREEN_ORI:I = 0x1
*LOCK_SCREEN_SLIDE:I = 0x2
*LOCK_SCREEN_WINDBELL:I = 0x3
>>ALCATEl OT-991 / OT-918<<
*LOCK_SCREEN_ORI:I = 0x1
*LOCK_SCREEN_SLIDE:I = 0x2
*LOCK_SCREEN_JRD:I = 0x3
and this is how it should look like in case of OT-991/918
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
lockscreen1 lockscreen2 lockscreen3
...but if you having custom rom there is a chance that developers already modify strings so u can't make that chances.
Best way is to decompile android.policy.jar (if u dont know how find it here) and search for LockPatternKeyguardView.smali which is located in :
com/android/internal/policy/impl
Click to expand...
Click to collapse
When u open "LockPatternKeyguardView.smali" look for ... (or something like that) :
# static fields
.field static final ACTION_EMERGENCY_DIAL:Ljava/lang/String; = "com.android.phone.EmergencyDialer.DIAL"
.field private static final DEBUG:Z = false
.field static final DEBUG_CONFIGURATION:Z = false
.field private static final EMERGENCY_CALL_TIMEOUT:I = 0x2710
.field public static final LOCK_SCREEN_JRD:I = 0x3
.field public static final LOCK_SCREEN_ORI:I = 0x1
.field public static final LOCK_SCREEN_SLIDE:I = 0x2
.field private static final TAG:Ljava/lang/String; = "LockPatternKeyguardView"
Click to expand...
Click to collapse
As u can see in this case, /Alcatel ot-991/ there is 3 lock screens (bolded strings). So that is the best to find out what number u have to write after "curlockscreen" string in build.prop.
Little explanation - "JRD" is Alcatel lockscreen - vertical pull down (pict. 3), "ORI" is Gingerbread original - horizontal slide (pict. 1) and "SLIDE" in this case is pull up lock with weekdays in bootom (pict. 2).
Oh and one last thing if u miss the number/letter that is not present in android.policy (for example u write 22 instead of 2) it should be fine, just ur lockscreen is gonna be set to default one.
After changing build.prop push it back to folder and reboot phone.
Vesavoj said:
Hello all! This is basicly a easy build.prop mod for changing lockscreen on mtk devices like Alcatel ot-991, ot-918, Spice Mi-350n Hero 7300, Star A3...
What Is Required :
PHP:
? Rooted phone
? Notepad++(for opening build.prop files)
? Android Commander
? Tool for decompiling jar files - apkmanager/apktool/virtous or...
Weel if u had all mentioned above u have to find build.prop file. On alcatel stock roms that file is used to be in custpack folder but often is in system folder. When u find it open it and search for line :
and now depending on what device you have that number/letter could be for example :
>>HERO 7300<<
*LOCK_SCREEN_ORI:I = 1
*LOCK_SCREEN_SLIDE:I = 2
*LOCK_SCREEN_SENSE:I = 3
*LOCK_SCREEN_SENSE_G11:I = 4
*LOCK_SCREEN_GLASS:I = 5
*LOCK_SCREEN_SENSE_G11_PLUS:I = 6
*LOCK_SCREEN_SENSE_PLUS:I = 7
*LOCK_SCREEN_GLASS_G2:I = 8
*LOCK_SCREEN_IPHONE:I = 9
*LOCK_SCREEN_SENSE_G14:I = a
*LOCK_SCREEN_WAVE:I = b
*LOCK_SCREEN_ROLLER:I = c
>>STAR A3<<
*LOCK_SCREEN_ORI:I = 1
*LOCK_SCREEN_SLIDE:I = 2
*LOCK_SCREEN_SENSE:I = 3
*LOCK_SCREEN_SENSE_G11:I = 4
*LOCK_SCREEN_GLASS:I = 5
*LOCK_SCREEN_SENSE_G11_PLUS:I = 6
*LOCK_SCREEN_SENSE_PLUS:I = 7
*LOCK_SCREEN_GLASS_G2:I = 8
*LOCK_SCREEN_IPHONE:I = 9
>>SPICE Mi-350n<<
*LOCK_SCREEN_ORI:I = 0x1
*LOCK_SCREEN_SLIDE:I = 0x2
*LOCK_SCREEN_WINDBELL:I = 0x3
>>ALCATEl OT-991 / OT-918<<
*LOCK_SCREEN_ORI:I = 0x1
*LOCK_SCREEN_SLIDE:I = 0x2
*LOCK_SCREEN_JRD:I = 0x3
and this is how it should look like in case of OT-991/918
View attachment 2216448 View attachment 2216502 View attachment 2216450
lockscreen1 lockscreen2 lockscreen3
...but if you having custom rom there is a chance that developers already modify strings so u can't make that chances.
Best way is to decompile android.policy.jar (if u dont know how find it here) and search for LockPatternKeyguardView.smali which is located in :
When u open "LockPatternKeyguardView.smali" look for ... (or something like that) :
As u can see in this case, /Alcatel ot-991/ there is 3 lock screens (bolded strings). So that is the best to find out what number u have to write after "curlockscreen" string in build.prop.
Little explanation - "JRD" is Alcatel lockscreen - vertical pull down (pict. 3), "ORI" is Gingerbread original - horizontal slide (pict. 1) and "SLIDE" in this case is pull up lock with weekdays in bootom (pict. 2).
Oh and one last thing if u miss the number/letter that is not present in android.policy (for example u write 22 instead of 2) it should be fine, just ur lockscreen is gonna be set to default one.
After changing build.prop push it back to folder and reboot phone.
Click to expand...
Click to collapse
i tried the mod but my device got bootloop. my phone is ot-918n. how to make this work on my device?
What have u tried, did u check LockPatternKeyguardView.smali in order to hit the right numbers? If u have custom rom installed it could be changed.
Vesavoj said:
What have u tried, did u check LockPatternKeyguardView.smali in order to hit the right numbers? If u have custom rom installed it could be changed.
Click to expand...
Click to collapse
I did check LockPatternKeyguardView.smali. here's what's written there
"# static fields
.field static final ACTION_EMERGENCY_DIAL:Ljava/lang/String; = "com.android.phone.EmergencyDialer.DIAL"
.field private static final DEBUG:Z = false
.field static final DEBUG_CONFIGURATION:Z = false
.field private static final EMERGENCY_CALL_TIMEOUT:I = 0x2710
.field public static final LOCK_SCREEN_JRD:I = 0x3
.field public static final LOCK_SCREEN_ORG:I = 0x4
.field public static final LOCK_SCREEN_ORI:I = 0x1
.field public static final LOCK_SCREEN_SLIDE:I = 0x2
.field private static final TAG:Ljava/lang/String; = "LockPatternKeyguardView"
I tried those four numbers above but my phone got bootloop. im on stock rom. how could i make this work?
Hello,
I tried to follow your guide on my Alcatel OT-997D, but I can't seem to find any lockscreens to choose from.
The preset in build.prop is "curlockscreen=2" but there aren't any matching fields. So no modding possible here?
# static fields
.field static final ACTION_EMERGENCY_DIAL:Ljava/lang/String; = "com.android.phone.EmergencyDialer.DIAL"
.field private static final DEBUG:Z = false
.field static final DEBUG_CONFIGURATION:Z = false
.field private static final EMERGENCY_CALL_TIMEOUT:I = 0x2710
.field private static final SIM_CARD_HOT_SWAP_ACTION:Ljava/lang/String; = "jrdcom.action.SIMCARD_HOTSWAP"
.field private static final TAG:Ljava/lang/String; = "LockPatternKeyguardView"
.field private static final TRANSPORT_USERACTIVITY_TIMEOUT:I = 0x2710
.field static sAlarmBootInitDone:Z
.field static sIsAlarmBoot:Z
.field private static sIsFirstAppearanceAfterBoot:Z
Click to expand...
Click to collapse
kvcaron78 said:
I did check LockPatternKeyguardView.smali. here's what's written there
"# static fields
.field static final ACTION_EMERGENCY_DIAL:Ljava/lang/String; = "com.android.phone.EmergencyDialer.DIAL"
.field private static final DEBUG:Z = false
.field static final DEBUG_CONFIGURATION:Z = false
.field private static final EMERGENCY_CALL_TIMEOUT:I = 0x2710
.field public static final LOCK_SCREEN_JRD:I = 0x3
.field public static final LOCK_SCREEN_ORG:I = 0x4
.field public static final LOCK_SCREEN_ORI:I = 0x1
.field public static final LOCK_SCREEN_SLIDE:I = 0x2
.field private static final TAG:Ljava/lang/String; = "LockPatternKeyguardView"
I tried those four numbers above but my phone got bootloop. im on stock rom. how could i make this work?
Click to expand...
Click to collapse
Try to push changed build.prop in custpack and system folder.
kuano said:
Hello,
I tried to follow your guide on my Alcatel OT-997D, but I can't seem to find any lockscreens to choose from.
The preset in build.prop is "curlockscreen=2" but there aren't any matching fields. So no modding possible here?
Click to expand...
Click to collapse
Maybe code is on other place, you can set "curlockscreen=1" or "curlockscreen=3", if u stuck on boot splash return to defalt value.
I've set curlockscreen to several values from 1 to 8 and even deleted the whole entry, but the lockscreen stays still the same.
Gesendet von meinem ALCATEL ONE TOUCH 997D mit Tapatalk
I know this thread is quite old still I hope to get an answer
Soo I am using a Kingzone K1 with one of those ugly oem lockscreen... i cant seem to be able to activate the aosp one, not even sure if it is included? its 4.4.2...
build.prop contains curlockscreen=1, tried setting it to 0 and 2 and rebootet, nothing changed.
Would I have to clear cache, dalvik etc?
After this i tried to edit the android.policy.jar.
Decompiled fine but I cant find LockPatternKeyguardView.smali, and no other smali containing simular code (but well there are really many )
EDIT: I know found out that the lockscreen seems to work kinda different in 4.4.2...
android.policy.jar is just used to link an apk that does the job: keyguard.apk in system/priv-app.
Replacing this with the same file from Nexus 5 4.4.2 factoy image gets you a working aosp lockscreen, but 2nd sim doesnt work! seems like keyguard controls more than just the lockscreen...
Most likely you could decompile stock keyguard (or get source from aosp), do the same thing with your stock apk, merge those two sources and get a working lockscreen.
Luckily, I just tried a keyguard.apk from another 4.4.2 rom for a very simular phone (THL 5000, http://www.needrom.com/download/original-rom-1-1-1/) and all works fine now.
This should work for other phones/roms with simular stats (mtk6592, dual sim, 2gb ram, 1920x1080 screen)!
Just in case someone has the same issue and finds this thread

Widget Show Other App's Icon

I'm trying to create a widget that will show the icon's of some app's installed on the device.
I manage to get a list of packages installed in the device, but i don't know how to get the icon from these.
I have this in my activity:
Code:
final static List<String> pacote_app = new ArrayList<String>();
final List<ApplicationInfo> apps = pm.getInstalledApplications(0);
for (ApplicationInfo app : apps) {
//checks for flags; if flagged, check if updated system app
if ((app.flags & ApplicationInfo.FLAG_UPDATED_SYSTEM_APP) != 0) {
// installedApps.add(app);
//it's a system app, not interested
} else if ((app.flags & ApplicationInfo.FLAG_SYSTEM) != 0) {
//Discard this one
//in this case, it should be a user-installed app
} else {
String pacote = (String) app.packageName; //NOME DOS PACOTES
pacote_app.add(pacote);
}
}
// ATTENTION: This was auto-generated to implement the App Indexing API.
// See https://g.co/AppIndexing/AndroidStudio for more information.
client = new GoogleApiClient.Builder(this).addApi(AppIndex.API).build();
WidgetViewsFactory
Code:
import static com.example.magcr23.mywidget.LoremActivity.pacote_app;
public class WidgetViewsFactory implements RemoteViewsService.RemoteViewsFactory {
Context context;
private Context ctxt=null;
private int appWidgetId;
public WidgetViewsFactory(Context ctxt, Intent intent) {
this.ctxt=ctxt;
appWidgetId=intent.getIntExtra(AppWidgetManager.EXTRA_APPWIDGET_ID,
AppWidgetManager.INVALID_APPWIDGET_ID);
}
@Override
public void onCreate() {}
@Override
public void onDestroy() {
// no-op
}
@Override
public int getCount() {
return(pacote_app.size());
}
@Override
public RemoteViews getViewAt(int position) {
RemoteViews row=new RemoteViews(ctxt.getPackageName(),
R.layout.list_item);
//FILL LIST
row.setTextViewText(android.R.id.text1, pacote_app.get(position));
//SEND WORD TO ACTIVITY
Intent i=new Intent();
Bundle extras=new Bundle();
extras.putString(WidgetProvider.EXTRA_WORD, pacote_app.get(position));
i.putExtras(extras);
row.setOnClickFillInIntent(android.R.id.text1, i);
//--------------
return(row);
}
@Override
public RemoteViews getLoadingView() {
return(null);
}
@Override
public int getViewTypeCount() {
return(1);
}
@Override
public long getItemId(int position) {
return(position);
}
@Override
public boolean hasStableIds() {
return(true);
}
@Override
public void onDataSetChanged() {
// no-op
}
}
WidgetProvider
Code:
public class WidgetProvider extends AppWidgetProvider{
public static String EXTRA_WORD=
"com.commonsware.android.appwidget.lorem.WORD";
@Override
public void onUpdate(Context ctxt, AppWidgetManager appWidgetManager,
int[] appWidgetIds) {
for (int i=0; i<appWidgetIds.length; i++) {
Intent svcIntent=new Intent(ctxt, WidgetService.class);
svcIntent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetIds[i]);
svcIntent.setData(Uri.parse(svcIntent.toUri(Intent.URI_INTENT_SCHEME)));
RemoteViews widget=new RemoteViews(ctxt.getPackageName(),
R.layout.novo_widget);
widget.setRemoteAdapter(appWidgetIds[i], R.id.listagem,
svcIntent);
Intent clickIntent=new Intent(ctxt, LoremActivity.class);
PendingIntent clickPI=PendingIntent
.getActivity(ctxt, 0,
clickIntent,
PendingIntent.FLAG_UPDATE_CURRENT);
widget.setPendingIntentTemplate(R.id.listagem, clickPI);
appWidgetManager.updateAppWidget(appWidgetIds[i], widget);
}
super.onUpdate(ctxt, appWidgetManager, appWidgetIds);
}
}
WidgetService
Code:
public class WidgetService extends RemoteViewsService {
@Override
public RemoteViewsFactory onGetViewFactory(Intent intent) {
return(new WidgetViewsFactory(this.getApplicationContext(),
intent));
}
Layout
Code:
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="@dimen/widget_margin"
android:orientation="horizontal">
<ListView
android:id="@+id/listagem"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
ListView Layout
Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="@android:id/text1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:gravity="center_vertical"
android:paddingLeft="6dip"
android:minHeight="?android:attr/listPreferredItemHeight"
android:textColor="#000"
/>
</LinearLayout>
(Whoops, topic a bit old, haven't see the date)
Hi,
You should give a look to PackageItemInfo methods, especially loadIcon (https://developer.android.com/refer...ml#loadIcon(android.content.pm.PackageManager)
In your code:
Code:
final static List<String> pacote_app = new ArrayList<String>();
final List<ApplicationInfo> apps = pm.getInstalledApplications(0);
for (ApplicationInfo app : apps) {
//checks for flags; if flagged, check if updated system app
if ((app.flags & ApplicationInfo.FLAG_UPDATED_SYSTEM_APP) != 0) {
// installedApps.add(app);
//it's a system app, not interested
} else if ((app.flags & ApplicationInfo.FLAG_SYSTEM) != 0) {
//Discard this one
//in this case, it should be a user-installed app
} else {
String pacote = (String) app.packageName; //NOME DOS PACOTES
pacote_app.add(pacote);
// I guess you want to get your icon here
Drawable packageIcon = app.loadIcon(pm);
}
}
To show it, the easiest might be to add an ImageView and call setImageDrawable
Good luck!

Categories

Resources