Anyone help me mod Silk Browser add long press back key - Android General

Sorry my english
I want mod Silk Browser TV full work for Shield TV. but Shield TV have not Menu key, and press Voice Search Shield will open Google Assistant(In Fire TV when i press Menu Key or Voice Search Key. It will open Menu of Silk).
I have ideal "long press Back Key to open Menu (call ) " use function
public boolean onKeyLongPress(int keyCode, KeyEvent event)
{
if (keyCode == KeyEvent.KEYCODE_BACK)
{
// do some thing. i will put code showHome() in here
return true;
}
return super.onKeyLongPress(keyCode, event);
}
I create app "androidphysicalexample" use simple project bellow in eclispe and put code above in project.
https://examples.javacodegeeks.com/android/core/ui/events/android-physical-keys-example/
I use apk tool to decomplie apk androidphysicalexample to view function onKeyLongPress in file .smali then modify to .smali of Silk (i try modify to FireTvSlateActivity.smali but nothing when i long press back key )
Anyone can help me. thank

if you can help me. you can download Silk in here
https://drive.google.com/file/d/1XJCE6pt0BB--mb2n0W5K5IUg0ul8Z2Ww/view?usp=drivesdk
- and use website http://www.javadecompilers.com/apk
to decomplie to source code

Related

Default Opera input.ini

I accidentally messed up part of my input.ini file and can't find a copy of the original online. Opera comes as part of the stock ROM (x7501) so I don't have a CAB I can just reload.
What I am looking for is in the [Browser Widget] section; what is the mapping for "Enter"? When I have a link selected now, and click Enter, it does not follow the link. Stupid question, I know, but any help would be appreciated.
[Browser Widget]
Left = Navigate left
Right = Navigate right
Up = Navigate up
Down = Navigate down
6 = Page up
9 = Page down
3 = Go to start
Enter = Focus form | Activate element
Tab = Focus next widget
Tab shift = Focus previous widget
Space = Page down
Space shift = Page up
PageDown = Page down
PageUp = Page up
Just out of interest, has anyone found a way to use the wheel to zoom? I don't want to use the keyboard all the time (A, B, C etc.)
Looking at the input.ini file I don't see how you can customise that.

[App] ButtonRemapper - Beta v0.2.4 (New Galaxy S version added)

Important questions will be marked with the tag FAQ when they are answered in this thread. Search for FAQ with the "search this thread" button to fetch them.
-------- Update notes --------
Update (Jan 22): New, separate version for the Samsung Galaxy S (This version is not compatible with the Galaxy S variants like the Captivate and Vibrant. A version compatible with these devices will be posted soon)
A special version for the Galaxy Tab can be found here .
------ Initial Announcement --------
* Beta* for full rooted devices. (NAND unlocked. Full, permanent write access to the system dir is needed)
Tool to remap the hardware buttons. Or better: a generic tool to edit the key layout map file Android uses to map the keys. (For info about key layout files, see:
http://forum.xda-developers.com/showthread.php?t=695936 and
http://source.android.com/porting/keymaps_keyboard_input.html)
Supported devices: All, except Samsung Galaxy S variants (only partial support. Update: new, separate version for SGS attached to this post), Droid 2 and Huawei U8110/Android 2.1. On the Vibrate and Captivate only a few buttons can be remapped.
(If you have issues with your device, please let me know)
{
"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"
}
Functions that can be assigned:
Code:
"Power",
"Home",
"Menu",
"Back",
"Search",
"Volume up",
"Volume down",
"Camera",
"Focus",
"Endcall",
"Call",
"Media Play Pause",
"Media Stop",
"Media Next",
"Media Previous",
"Media Rewind",
"Media Fast Forward",
"Dpad center",
"Dpad up",
"Dpad down",
"Dpad left",
"Dpad right"
As it with all root apps a Nandroid backup is adviced, because you never know.
Tips
In generall, these are the codes of the keys on a standard Android device (for people who can also edit the keyboard codes of a hardware keyboard):
Code:
102, // home button
114, // Volume down
115, // Volume up
116, // Power
139, // Menu
158, // Back
217, // Search`
231, // CALL
232, // DPAD_CENTER
108, // DPAD_DOWN
103, // DPAD_UP
105, // DPAD_LEFT
106, // DPAD_RIGHT
211, // HEADSETHOOK
212, // CAMERA
242 // FOCUS
Attached is a little helper app (KeynrTracker.apk) to identify the keynumber you want to remap .
Faq
Q: can you do also other remappings with the buttons, like for example long pressing, double press, context sensitive remappings etc.
A: For now, this is pretty much it. Check out LaunchKey if you also want to remap the long-press search button.
Q: So this is it?
A: I do plan to add some more functionality and to update the interface, but when that will be I can't tell.
Reviews
Review by Android Police
Review by Gizmoninja
Changelog
v0.2.4: Fixed restore problem on some devices (Thanks ljjehl for noticing)
v0.2.3: Hasn't never been released
v0.2.2: * Added support for the Droid X (Thanks Doug for your feedback!) * added an option to hot reboot the device after applying a change, so one can almost change buttons on the fly.
v0.2 Fixed UI issues * Fix for Galaxy S Variants * added (camera) focus as an option to the "remap list"
--
If you like the app and/or wish to support this project consider buying the donation version from the market (Search term: ButtonRemapper). Don't feel obliged though!
So on a nexus 1, this will only remap the power, volume rockers and possibly trackball? Will it work for the capacitive buttons?
overground said:
So on a nexus 1, this will only remap the power, volume rockers and possibly trackball? Will it work for the capacitive buttons?
Click to expand...
Click to collapse
Absolutely. It will remap all buttons. I added a list of functions that can be remapped. (Also hardware keyboards can be remapped with this app... )
I plan to integrate this with the LaunchKey app in the future, so it would be possible to assign also apps etc to buttons.
I'll be giving it a shot shortly, then. Thanks, AF!
EDIT: donated
overground said:
I'll be giving it a shot shortly, then. Thanks, AF!
EDIT: donated
Click to expand...
Click to collapse
Thanks.
As always your critical feedback is very much appreciated.
What's "Grave" ? And there's 2 search entries and 3 menu entries. A little confusing. Are these for long press, double tap, etc. or are those for possible layouts across devices? How does one get to the "Apply" screen pictured? Will play around some more.
overground said:
What's "Grave" ? And there's 2 search entries and 3 menu entries. A little confusing. Are these for long press, double tap, etc. or are those for possible layouts across devices? How does one get to the "Apply" screen pictured? Will play around some more.
Click to expand...
Click to collapse
Well, I don't know
At the moment this app is just a tool to play around with the low level key layout mapping files Android uses for mapping the keys. It's sort of a power user tool.
In the future I'll need this layer to make a user friendly key remap tool that can do some low level remapping. Then I will hide much of the definitions that can be tweaked with this app.
Some background info about the key layout mapping files:
http://source.android.com/porting/keymaps_keyboard_input.html
Looks good..Will give it a shot soon..
SWEET, im wondering if it will eventually be possible to use search button on evo to actually take pics(not just open the camera)
Just what I needed. Thanks a lot appelflap.
Would be nice to have the "call" and "end call" function on 1 button (because the only button I do not use on my DHD is the search button..) Don't know if that is possible tho..
Thanks again!
Edit: I'll donate on the final version for sure.
SWEET, im wondering if it will eventually be possible to use search button on evo to actually take pics(not just open the camera)
Click to expand...
Click to collapse
It's possible to add a "focus" mapping. Haven't tested that one out yet. Maybe it will focus and take a picture in one step. I will add the function so one can test that out.
hav0c said:
Just what I needed. Thanks a lot appelflap.
Would be nice to have the "call" and "end call" function on 1 button (because the only button I do not use on my DHD is the search button..) Don't know if that is possible tho..
Thanks again!
Click to expand...
Click to collapse
Very good idea. I think it's possible
----
@all: I really like to know if this works on your device. If so, I can update this app with the functionality of the LaunchKey app and lots and lost of more functionality.
ldc2335 said:
SWEET, im wondering if it will eventually be possible to use search button on evo to actually take pics(not just open the camera)
Click to expand...
Click to collapse
Assigning CAMERA to a button will open the camera, but it will act as a shutter too if you have the camera open! So yes it is possible to use the search button to take pics
Great job with this app.
I would love to see some remaps
For apps. I want search button to open contacts.
Let me know if you want any help.
Sent from my Incredible using XDA App
Opens and asks for SU permission on first run, but force closes immediately and every time opening afterwards.
Phone in sig.
unfortunely doesn`t work on X10
creator2456 said:
Opens and asks for SU permission on first run, but force closes immediately and every time opening afterwards.
Phone in sig.
Click to expand...
Click to collapse
That's definitely not good It would be great if you can send me a logcat.
You can download catlog from the market, open it, open the buttonremapper app, wait till it Force closes and than go back to catlog and choose "send log" in the menu (->more) . You can send it to the email address in the about window of the app.
Would be great and very helpfull if you can do that. Thanks
rendeiro2005 said:
unfortunely doesn`t work on X10
Click to expand...
Click to collapse
Do you get a FC or does the remapping not work? Anyway if you like this to work, maybe you can send me a log.
This is how you can do it (quote from another post):
Download catlog from the market, open it, open the buttonremapper app, and than go back to catlog and choose "send log" in the menu (->more) . You can send it to the email address in the about window of the app.
Thanks.
Button shortcuts to touchscreen keys
Do you think it is possible to have software shortcuts to the hardware buttons?
Something like:
http://forum.xda-developers.com/attachment.php?attachmentid=445304&d=1290250580
http://forum.xda-developers.com/attachment.php?attachmentid=445464&d=1290269366
From the thread: http://forum.xda-developers.com/showthread.php?t=841559
Thank you in advance!
Best regards
appelflap said:
Do you get a FC or does the remapping not work? Anyway if you like this to work, maybe you can send me a log.
This is how you can do it (quote from another post):
Download catlog from the market, open it, open the buttonremapper app, and than go back to catlog and choose "send log" in the menu (->more) . You can send it to the email address in the about window of the app.
Thanks.
Click to expand...
Click to collapse
sorry but strangely after remove and install again it work
go and play a little the give you some feedback
appelflap said:
That's definitely not good It would be great if you can send me a logcat.
You can download catlog from the market, open it, open the buttonremapper app, wait till it Force closes and than go back to catlog and choose "send log" in the menu (->more) . You can send it to the email address in the about window of the app.
Would be great and very helpfull if you can do that. Thanks
Click to expand...
Click to collapse
Here's a logcat for ya...zipped for size.

[Q]First application

Hi guys, i want to do a very simple app for WP7.
It's my first app, so i'm very noob
I put a butto, and i want that when i click on it, it opens a picture.
How i can do that?
There is a guide for noob like me?
you might probably wanna check the guide from Microsoft student..
Please try this out an see if it works. This is using a default empty silverlight project.
In the designer (MainPage.xaml), add a button and an Image element using the XAML:
<Button Name="testButton" Width="140" Height="100" VerticalAlignment="Top" Click="testButton_Click">Open</Button>
<Image Name="imageElement" Width="300" Height="300"></Image>
This should be added inside the Grid Element named "ContentPanel"
Next add the image to your project by right clicking your project in the solution explorer and selecting:
Add -> Existing Item -> And add an image called "test-image.png"
Click on the added image, in the Properties box, set Build Action -> Copy Always
In the code-behind file (MainPage.xaml.cs), add the reference to the library BitmapImage by adding "using System.Windows.Media.Imaging;" to the top of the file.
Add a click event handler for the button using the code:
private void testButton_Click(object sender, RoutedEventArgs e)
{
Uri imageUri = new Uri("/[ProjectName];component/test-image.png", UriKind.Relative);
BitmapImage testImageBitmap = new BitmapImage(imageUri);
this.imageElement.Source = testImageBitmap;
}
But make sure to replace [ProjectName] with the name of your windows phone project.

[root]Alternative keyboard layout compilation

Hi there,
as this phone isn't available outside of the US I guess it's convenient for us importers to have some keyboard layouts to choose from. I just made a german one - I've made a list with those layouts which were already mentioned somewhere in this forum.
German Layout
Download keypad files here
Code:
My changes:
- AT is now the Umlaut special character (eg. press AT, then 'a' to get 'ä')
- AT is bound to the EMAIL key (EMAIL + A/U/O for umlauts works pretty well)
- SEARCH is bound to the CONTACTS key
- ALT is also bound to the VOICESEARCH key
- Y is Z; Z is Y
- ALT + B will now result in 'ß'
I just got used to two ALT buttons (coming from the DZ/G2). The SEARCH button is used in some apps, but not very often.. I like to have it on my keyboard, thus binding it to the CONTACTS key (I use search+'x' for certain shortcuts).
Nordic layout
user032 said:
Here's a Nordic layout I'm using. It should cover Swedish and Finnish characters. The keymaps have been shamelessly ripped off Desire Z CyanogenMod configuration files.
Email = Ö
Messaging = Ä
Voice Search = Å
sec_keypad.kl:
Code:
# Problem Children
key 155 BUTTON_4 WAKE_DROPPED
key 429 BUTTON_5 WAKE_DROPPED
key 217 BUTTON_3 WAKE_DROPPED
sec_keypad.kcm:
Code:
key BUTTON_3 {
label:'\u00C5'
base:'\u00E5'
shift, capslock:'\u00C5'
alt: '\u00E5'
shift+alt:'\u00C5'
}
key BUTTON_4 {
label:'\u00D6'
base:'\u00F6'
shift, capslock:'\u00D6'
alt: '\u00F6'
shift+alt:'\u00D6'
}
key BUTTON_5 {
label:'\u00C4'
base:'\u00E4'
shift, capslock:'\u00C4'
alt: '\u00E4'
shift+alt:'\u00C4'
}
Click to expand...
Click to collapse
jarrodlombardo's layout (Double [email protected]+DPAD_CENTER)
jarrodlombardo said:
Using the tips from http://forum.xda-developers.com/showpost.php?p=33762519&postcount=537 and some prior knowledge, I modified my keys so Irssi ConnectBot could work (it requires a DPAD_CENTER hard key) and some other things could be better.
If you replace your current versions with the below links, you'll get the following changes:
Shift + [number] gives the symbol Alt + [number] does.
The Email key will give you '@' and Alt + Email will give '~'. (This is how I had modified my Sidekick 4G's @ key since that kbd didn't have '~' at all.)
The stupid microphone button does DPAD_CENTER (this is the same as pressing the trackball button on phones that have them).
sec_keypad.kcm Put this in /system/usr/keychars/.
sec_keypad.kl Put this in /system/usr/keylayout/.
Click to expand...
Click to collapse
orange808's layout (multiple SEARCH keys)
orange808 said:
Sure. Here's my configuration:
http://www.mediafire.com/?tp3jc392w2q2jyg
The right shift key and the alt key are now search keys. This makes using quick launch keyboard shortcuts very easy because there are keys in both corners of the device to press--along with another key to launch an app. This eliminates the need to reach across the device when multitasking.
The voice key is now the right shift.
The sms/contacts and email buttons are now both alt keys.
It's not for everyone and most people will probably be confused with keys that perform strange actions (that conflict with their labels), but it works for me.
Click to expand...
Click to collapse
How to
(you need to mount the system partition as R/W to overwrite those files)
sec_keypad.kcm goes to /system/usr/keychars
sec_keypad.lk goes to /system/usr/keylayout
As written by dillalade in his post about keylayouts. Thanks to Nocturin for creating his information portal - which brought me there.
Feel free to upload your layout files / describe your changes - I'll add them to the list. They don't have to be language specific.
Just made some changes to my layout (added 'ß'), added two more (already mentioned) layouts.
Ctrl key.
Sory if this is not right section but I believe it is somehow related.
Is there a chance to add like or emulate key CTRL?
I was in shock when I get the mobile as was never thinking it is not present.
Regards
Mac
mazak23 said:
Sory if this is not right section but I believe it is somehow related.
Is there a chance to add like or emulate key CTRL?
I was in shock when I get the mobile as was never thinking it is not present.
Regards
Mac
Click to expand...
Click to collapse
Sure, since you can use normal keyboards with your android device there has to be some CTRL function - though I don't know why you'd want CTRL keys. There are some shortcuts in android which use CTRL similar to those windows has.. but I can't think of any other uses.
You just have to bind LEFT_CONTROL or RIGHT_CONTROL (in sec_keypad.kl) to any key you want. Haven't tested that though.
Kueber said:
Sure, since you can use normal keyboards with your android device there has to be some CTRL function - though I don't know why you'd want CTRL keys. There are some shortcuts in android which use CTRL similar to those windows has.. but I can't think of any other uses.
You just have to bind LEFT_CONTROL or RIGHT_CONTROL (in sec_keypad.kl) to any key you want. Haven't tested that though.
Click to expand...
Click to collapse
I want to use it for copy/paste options, we can do it on screen, but sometimes it's faster, and I prefer to do it with physical keyboard.
So do I have to root my device to change anything in that file, I am on 4.1.2 stock one now.
Thanks
Mac
Ah, I see - good idea actually, I'll try that.
Yes, you have to be rooted since you have to modify sytem files.
Sent from my SGH-T699
Kueber said:
Ah, I see - good idea actually, I'll try that.
Yes, you have to be rooted since you have to modify sytem files.
Sent from my SGH-T699
Click to expand...
Click to collapse
Recently I did ping in Shell apk and could't stop it, as without CTRL key I don't know how... So there is more than I said before.
Here's a Nordic layout I'm using. It should cover Swedish and Finnish characters. The keymaps have been shamelessly ripped off Desire Z CyanogenMod configuration files.
Email = Ö
Messaging = Ä
Voice Search = Å
sec_keypad.kl said:
# Problem Children
key 155 BUTTON_4 WAKE_DROPPED
key 429 BUTTON_5 WAKE_DROPPED
key 217 BUTTON_3 WAKE_DROPPED
Click to expand...
Click to collapse
sec_keypad.kcm said:
key BUTTON_3 {
label:'\u00C5'
base:'\u00E5'
shift, capslock:'\u00C5'
alt: '\u00E5'
shift+alt:'\u00C5'
}
key BUTTON_4 {
label:'\u00D6'
base:'\u00F6'
shift, capslock:'\u00D6'
alt: '\u00F6'
shift+alt:'\u00D6'
}
key BUTTON_5 {
label:'\u00C4'
base:'\u00E4'
shift, capslock:'\u00C4'
alt: '\u00E4'
shift+alt:'\u00C4'
}
Click to expand...
Click to collapse
Finally I made CONTROL key.
In file sec_keypad.kl I have now:
key 215 CTRL_LEFT
So instead of email key it is left control key.
I am so glad!
Now I am wondering how to add polish characters : ą, ć, ę, ł, ń, ó, ś, ź, ż
They should be under adequate letter and CTRL button (I believe).
Anybody can point me in the right direction?
Kueber said:
Hi there,
as this phone isn't available outside of the US I guess it's convenient for us importers to have some keyboard layouts to choose from. I just made a german one - I've made a list with those layouts which were already mentioned somewhere in this forum.
...
// edit: I forgot the 'ß', lol. I bound it to alt+B, since this button has no alt function + minor thread layout changes, added two more mappings which were mentioned in Nocturin's post
Click to expand...
Click to collapse
*I want to follow you with my layout but cannot found ß symbol in files you are posting.
Can you update files?
Thanks
mazak23 said:
*I want to follow you with my layout but cannot found ß symbol in files you are posting.
Can you update files?
Thanks
Click to expand...
Click to collapse
It's in the sec_keypad.kcm:
Code:
key B {
label: 'B'
number: '2'
base: 'b'
shift, capslock: 'B'
alt: '\u00df'
shift+alt, capslock+alt: '\u00df'
\u00df is unicode for 'ß'.
Kueber said:
It's in the sec_keypad.kcm:
Code:
key B {
label: 'B'
number: '2'
base: 'b'
shift, capslock: 'B'
alt: '\u00df'
shift+alt, capslock+alt: '\u00df'
\u00df is unicode for 'ß'.
Click to expand...
Click to collapse
Yeah , right.
Silly me, I was looking for S sharfe itself, it is unicode UTF 8?
Yup, UTF 8. DF is 223 in decimal. There are tables out there with all the special keys and their HTML-decimal value.
Here is polish keyboard layout.
Mainly we are getting special letters with CTRL button (which is under email key), but some are coming with left ALT. Thus because CTRL + C for example is COPY.
More explained in files.
Soon I will do it with right shift, which I see useless at all.
Pretty interesting this thread.
I just bought one of these best qwerty device masterpiece and I'm start wondering about how to make special CZECH characters under the numbers 2-0
I'd like this:
2 = ě
3 = š
4 = č
5 = ř
6 = ž
7 = ý
8 = á
9 = í
0 = é
Can you guys give me some guide? Many thanks in advance!
Is it no better to do it with alt or ctrl key?
Kueber wrote already instruction on next post.
There is one thing we should remember, permissions.
I experienced that when it is not right Android is using different file for keyboard layout (not using file sec_keypad.kcm).
I believe it is OK to use Root Explorer apk as it was mention somewhere.
Regards
xheretic said:
Pretty interesting this thread.
I just bought one of these best qwerty device masterpiece and I'm start wondering about how to make special CZECH characters under the numbers 2-0
I'd like this:
2 = ě
3 = š
4 = č
5 = ř
6 = ž
7 = ý
8 = á
9 = í
0 = é
Can you guys give me some guide? Many thanks in advance!
Click to expand...
Click to collapse
You have to modify the sec_keypad.kcm - just edit the keys.
For example, find the '2' key and edit the 'ě' in.. but you need to write it in UTF8.
1) Find character ascii value: ě -> 277 I believe (you can find those numbers in any ASCII chart <- this one even displays all the values in hex)
2) convert to HEX: 115
3) ě in unicode is now '\u0115' - just put the hex-number in like I did
4) edit the value in sec_keypad.kcm
Should look like this:
Code:
before
key 2 {
label: '2'
number: '2'
base: '2'
shift: '2'
alt: '@'
shift+alt: '@'
}
after
key 2 {
label: '2'
number: '2'
base: '\u0115'
shift: '2'
alt: '@'
shift+alt: '@'
}
Now "2" will result in a "ě" .. shift+2 will be your regular "2". Hope that helps.
my own polish physical keyboard layout and char map:
http://forum.xda-developers.com/attachment.php?attachmentid=2293495&stc=1&d=1380569369
voicesearch key (the stupid microphone) mapped to ALT_RIGHT
'ć', 'ę', 'ł', 'ń', 'ó', 'ś', 'ź', 'ż' under right alt+c, e, l, n, o, s, x and z key, respectively
'ą' is under right alt+q key, i could not make it work with a
e-mail key mapped to CTRL_LEFT, crtl+c and ctrl+v shortcuts work
i also recommend this:
http://source.android.com/devices/tech/input/key-character-map-files.html
to everyone making custom keyboard layouts. it explains *.kcm files well
i would like to thank kueber, dillalade and mazak23
good to see that i am not the first t699 user in poland
So, who wants to kang this for us? https://github.com/CyanogenMod/andr...mmit/7f6a2c6a56aceca8505cfce97c5a2cf77612a791
Alternatively, if we set this up, would people submit keymaps for various languages?
Nardholio said:
Alternatively, if we set this up, would people submit keymaps for various languages?
Click to expand...
Click to collapse
feel free to use mine and modify it in any way you like

"long press of home button" configuration

Hi,
i searched a lot about this and didn't found an answer about this.
i'm using the LockerPro application as a lock screen but this means that the "long press of home button" can be still activated when i'm in the lockscreen.
in default Android phone the OS disable a lot of things when it is in lock screen mod for example the "long press of home button" that usually lead to
show the "history application" / "running application" list but this is disabled in lockscreen mode.
i'm assuming that if the OS is doing some API calls we can do the same or if the OS is registered in some policy we could do an application that will have the same policy that the lockscreen mod uses.
so, I wanted to know how the OS manage to do this and disable those so i could build an application on rooted phone that will do the same ?
I have started to dig more and found that the place that handle the "long home press" is :
"platform_frameworks_base/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java" that is acctually located in the "android.policy.odex" file that is in the "system\framework\".
there is the following code:
private void handleLongPressOnHome() {
if (mLongPressOnHomeBehavior != LONG_PRESS_HOME_NOTHING) {
mHomeConsumed = true;
performHapticFeedbackLw(null, HapticFeedbackConstants.LONG_PRESS, false);
if (mLongPressOnHomeBehavior == LONG_PRESS_HOME_RECENT_SYSTEM_UI) {
toggleRecentApps();
} else if (mLongPressOnHomeBehavior == LONG_PRESS_HOME_ASSIST) {
launchAssistAction();
}
}
}
Click to expand...
Click to collapse
so i can add a code that before that will update the "mLongPressOnHomeBehavior" from external place (i.e: file) and according to the value in the file we could change
the configuration of the "mLongPressOnHomeBehavior" and override the original behavior. if file doesn't exist then all goes as usual and if file exist read the overwritten value and act according to it...
any other suggestions on how to apply this with more ease ? is there any environment variables that we can set and get globally between the OS and the Applications ?
update:
for now just to see that it is working i have change the dalvik code to return void and don't preform anything and using this guid:
http://www.jordanhotmann.com/2011/08/how-to-change-default-orientation-of.html
I have generated a new android.policy.odex file to my system and it worked perfectly...
now i need to inject code that will read from a conf file what will be the operation of the "long pressed button" so an external application (with root) could dynamically
choose when to enable or disable the "long home press" functionality
will update soon and with Galaxy S4 + S3 latest versions new android.policy.odex for you all to enjoy ...
Regards,
LaBBa

Categories

Resources