Permalink
Browse files

iyokan: updated kernel binary to 4.0.2.A.0.42 with latest fixes and r…

…emoved old keyboard changer

Change-Id: If2d27d1e2e8cb254d64f1996ff38ed2a3a564f26
  • Loading branch information...
freexperia committed Nov 9, 2011
1 parent ffed274 commit b404f4f950ed5e60bb39b2df759e3640f0ca0bd3
View
@@ -1,24 +0,0 @@
-#
-# Copyright (C) 2008 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-LOCAL_PATH := $(call my-dir)
-#LOCAL_MODULE_TAGS := optional
-
-include $(CLEAR_VARS)
-LOCAL_SRC_FILES := $(call all-subdir-java-files)
-LOCAL_PACKAGE_NAME := KeyboardChanger
-LOCAL_CERTIFICATE := platform
-include $(BUILD_PACKAGE)
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="bin4ry.FreeXperia.KeyboardChanger"
- android:versionCode="1"
- android:versionName="1.0" android:installLocation="internalOnly">
- <uses-sdk android:minSdkVersion="10" />
-
- <application android:debuggable="true" android:icon="@drawable/icon" android:label="@string/app_name">
- <activity android:name=".KeyboardChangerActivity"
- android:label="@string/app_name">
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="android.intent.category.LAUNCHER" />
- </intent-filter>
- </activity>
-
- </application>
-</manifest>
View
@@ -1,2 +0,0 @@
-FreeXperia KeyboardChanger for Xperia Mini Pro / Xperia Pro
-Eclipse Project
Deleted file not rendered
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent" android:layout_height="fill_parent">
-
-<RadioGroup xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent" android:layout_height="fill_parent">
- <TextView android:layout_height="wrap_content"
- android:text="@string/header"
- android:layout_width="wrap_content"
- android:textSize="15sp"
- android:paddingBottom="10dip">
- </TextView>
- <TextView android:text="@string/current"></TextView>
- <TextView android:text="@string/qwertz" android:id="@+id/TVcurrent"></TextView>
- <RadioButton android:text="@string/radio_button_1" android:id="@+id/rbqwertz"/>
- <RadioButton android:text="@string/radio_button_2" android:id="@+id/rbqwertyen" />
- <RadioButton android:text="@string/radio_button_3" android:id="@+id/rbazerty" />
- <RadioButton android:text="@string/radio_button_4" android:id="@+id/rbqwertybr" />
- <RadioButton android:text="@string/radio_button_5" android:id="@+id/rbqwertynodk" />
- <RadioButton android:text="@string/radio_button_6" android:id="@+id/rbqwertysefi" />
- <RadioButton android:text="@string/radio_button_7" android:id="@+id/rblatinonarabic" />
- <RadioButton android:text="@string/radio_button_8" android:id="@+id/rblatinonarabicazerty" />
- <RadioButton android:text="@string/radio_button_9" android:id="@+id/rblatinonbopomofo" />
- <RadioButton android:text="@string/radio_button_10" android:id="@+id/rblatinoncyrillic" />
- <RadioButton android:text="@string/radio_button_11" android:id="@+id/rblatinongreek" />
- <RadioButton android:text="@string/radio_button_12" android:id="@+id/rblatinonhebrew" />
- <RadioButton android:text="@string/radio_button_13" android:id="@+id/rblatinonkorean" />
- <RadioButton android:text="@string/radio_button_14" android:id="@+id/rblatinonpinyin" />
- <RadioButton android:text="@string/radio_button_15" android:id="@+id/rblatinonthai" />
- <Button android:layout_height="wrap_content" android:id="@+id/button1" android:text="@string/button" android:layout_width="101dp"></Button>
-</RadioGroup>
-</ScrollView>
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources>
- <string name="app_name">FreeXperia KeyboardChanger by Bin4ry</string>
- <string name="header">Please choose your HW-Keyboard Layout:</string>
- <string name="qwertz">qwertz</string>
- <string name="radio_button_1">qwertz</string>
- <string name="radio_button_2">qwerty-en</string>
- <string name="radio_button_3">azerty</string>
- <string name="radio_button_4">qwerty-br</string>
- <string name="radio_button_5">qwerty-no-dk</string>
- <string name="radio_button_6">qwerty-se-fi</string>
- <string name="radio_button_7">latin-on-arabic</string>
- <string name="radio_button_8">latin-on-arabic-azerty</string>
- <string name="radio_button_9">latin-on-bopomofo</string>
- <string name="radio_button_10">latin-on-cyrillic</string>
- <string name="radio_button_11">latin-on-greek</string>
- <string name="radio_button_12">latin-on-hebrew</string>
- <string name="radio_button_13">latin-on-korean</string>
- <string name="radio_button_14">latin-on-pinyin</string>
- <string name="radio_button_15">latin-on-thai</string>
- <string name="button">Save and Reboot</string>
- <string name="current">Current Keyboard: </string>
-</resources>
@@ -1,249 +0,0 @@
-package bin4ry.FreeXperia.KeyboardChanger;
-
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.DataOutputStream;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.OutputStreamWriter;
-import java.io.Writer;
-
-import bin4ry.FreeXperia.KeyboardChanger.ShellCommand.CommandResult;
-
-import android.app.Activity;
-import android.os.Bundle;
-
-import android.app.Activity;
-import android.os.Bundle;
-import android.view.View;
-import android.view.View.OnClickListener;
-import android.widget.Button;
-import android.widget.RadioButton;
-import android.widget.TextView;
-
-public class KeyboardChangerActivity extends Activity {
-
- TextView currentKey;
- RadioButton qwertzRB;
- RadioButton qwertyenRB;
- RadioButton azertyRB;
- RadioButton qwertybrRB;
- RadioButton qwertynodkRB;
- RadioButton qwertysefiRB;
- RadioButton latinonarabicRB;
- RadioButton latinonarabicazertyRB;
- RadioButton latinonbopomofoRB;
- RadioButton latinoncyrillicRB;
- RadioButton latinongreekRB;
- RadioButton latinonhebrewRB;
- RadioButton latinonkoreanRB;
- RadioButton latinonpinyinRB;
- RadioButton latinonthaiRB;
- TextView sampleTV;
- String oldlayout;
- String newlayout;
- Process p;
- DataOutputStream os;
- ShellCommand cmd = new ShellCommand();
-
-
- /** Called when the activity is first created. */
- @Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.main);
-
- /*
- * Find the views declared in main.xml.
- */
- currentKey = (TextView) findViewById(R.id.TVcurrent);
- qwertzRB = (RadioButton) findViewById(R.id.rbqwertz);
- qwertyenRB = (RadioButton) findViewById(R.id.rbqwertyen);
- azertyRB = (RadioButton) findViewById(R.id.rbazerty);
- qwertybrRB = (RadioButton) findViewById(R.id.rbqwertybr);
- qwertynodkRB = (RadioButton) findViewById(R.id.rbqwertynodk);
- qwertysefiRB = (RadioButton) findViewById(R.id.rbqwertysefi);
- latinonarabicRB = (RadioButton) findViewById(R.id.rblatinonarabic);
- latinonarabicazertyRB = (RadioButton) findViewById(R.id.rblatinonarabicazerty);
- latinonbopomofoRB = (RadioButton) findViewById(R.id.rblatinonbopomofo);
- latinoncyrillicRB = (RadioButton) findViewById(R.id.rblatinoncyrillic);
- latinongreekRB = (RadioButton) findViewById(R.id.rblatinongreek);
- latinonhebrewRB = (RadioButton) findViewById(R.id.rblatinonhebrew);
- latinonkoreanRB = (RadioButton) findViewById(R.id.rblatinonkorean);
- latinonpinyinRB = (RadioButton) findViewById(R.id.rblatinonpinyin);
- latinonthaiRB = (RadioButton) findViewById(R.id.rblatinonthai);
-
- /*
- * Set a listener that will listen for clicks on the radio buttons and
- * perform suitable actions.
- */
- qwertzRB.setOnClickListener(radio_listener);
- qwertyenRB.setOnClickListener(radio_listener);
- azertyRB.setOnClickListener(radio_listener);
- qwertybrRB.setOnClickListener(radio_listener);
- qwertynodkRB.setOnClickListener(radio_listener);
- qwertysefiRB.setOnClickListener(radio_listener);
- latinonarabicRB.setOnClickListener(radio_listener);
- latinonarabicazertyRB.setOnClickListener(radio_listener);
- latinonbopomofoRB.setOnClickListener(radio_listener);
- latinoncyrillicRB.setOnClickListener(radio_listener);
- latinongreekRB.setOnClickListener(radio_listener);
- latinonhebrewRB.setOnClickListener(radio_listener);
- latinonkoreanRB.setOnClickListener(radio_listener);
- latinonpinyinRB.setOnClickListener(radio_listener);
- latinonthaiRB.setOnClickListener(radio_listener);
-
- Process r;
- try {
- String[] cmd = {
- "/system/bin/sh",
- "-c",
- "cat /system/usr/keyboard-config/keyprint.xml | grep latin | awk '{print $3}' | sed -e 's/keylayout=\"//g' | sed -e 's/\"\\/>//g'"
- };
- r = Runtime.getRuntime().exec(cmd);
- BufferedReader in = new BufferedReader(new
- InputStreamReader(r.getInputStream()));
- try {
- oldlayout = in.readLine();
- currentKey.setText(oldlayout);
- } catch (IOException e) {}
- } catch (IOException e1) {
- // TODO Auto-generated catch block
- e1.printStackTrace();
- }
- setActiveButton(oldlayout);
- cmd.su.run("busybox mount -o remount,rw /dev/block/mtdblock0 /system");
-
- final Button button = (Button) findViewById(R.id.button1);
- button.setOnClickListener(new View.OnClickListener() {
- public void onClick(View v) {
- cmd.su.run("sed -i 's/" + oldlayout + "/" + newlayout + "/g' /system/usr/keyboard-config/keyprint.xml");
- try {
- Thread.sleep(500);
- } catch (InterruptedException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- cmd.su.run("busybox mount -o remount,r0 /dev/block/mtdblock0 /system");
- try {
- Thread.sleep(500);
- } catch (InterruptedException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- cmd.su.run("reboot");
- }
- });
- }
-
- private void setActiveButton (String s){
- if (s.equals("qwertz")) {
- qwertzRB.toggle();
- };
- if (s.equals("qwerty-en")) {
- qwertyenRB.toggle();
- };
- if (s.equals("azerty")) {
- azertyRB.toggle();
- };
- if (s.equals("qwerty-br")) {
- qwertybrRB.toggle();
- };
- if (s.equals("qwerty-no-dk")) {
- qwertynodkRB.toggle();
- };
- if (s.equals("qwerty-se-fi")) {
- qwertysefiRB.toggle();
- };
- if (s.equals("latin-on-arabic")) {
- latinonarabicRB.toggle();
- };
- if (s.equals("latin-on-arabic-azerty")) {
- latinonarabicazertyRB.toggle();
- };
- if (s.equals("latin-on-bopomofo")) {
- latinonbopomofoRB.toggle();
- };
- if (s.equals("latin-on-cyrillic")) {
- latinoncyrillicRB.toggle();
- };
- if (s.equals("latin-on-greek")) {
- latinongreekRB.toggle();
- };
- if (s.equals("latin-on-hebrew")) {
- latinonhebrewRB.toggle();
- };
- if (s.equals("latin-on-korean")) {
- latinonkoreanRB.toggle();
- };
- if (s.equals("latin-on-pinyin")) {
- latinonpinyinRB.toggle();
- };
- if (s.equals("latin-on-thai")) {
- latinonthaiRB.toggle();
- };
- }
-
-
- /*
- * Define a OnClickListener that will change the size of the sample text
- * depending on which of the radio button that has been clicked.
- */
- private OnClickListener radio_listener = new OnClickListener() {
- public void onClick(View v) {
- ShellCommand cmd = new ShellCommand();
- switch (v.getId()) {
- case R.id.rbqwertz:
- newlayout = "qwertz";
- break;
- case R.id.rbqwertyen:
- newlayout = "qwerty-en";
- break;
- case R.id.rbazerty:
- newlayout = "azerty";
- break;
- case R.id.rbqwertybr:
- newlayout = "qwerty-br";
- break;
- case R.id.rbqwertynodk:
- newlayout = "qwerty-no-dk";
- break;
- case R.id.rbqwertysefi:
- newlayout = "qwerty-se-fi";
- break;
- case R.id.rblatinonarabic:
- newlayout = "latin-on-arabic";
- break;
- case R.id.rblatinonarabicazerty:
- newlayout = "latin-on-arabic-azerty";
- break;
- case R.id.rblatinonbopomofo:
- newlayout = "latin-on-bopomofo";
- break;
- case R.id.rblatinoncyrillic:
- newlayout = "latin-on-cyrillic";
- break;
- case R.id.rblatinongreek:
- newlayout = "latin-on-greek";
- break;
- case R.id.rblatinonhebrew:
- newlayout = "latin-on-hebrew";
- break;
- case R.id.rblatinonkorean:
- newlayout = "latin-on-korean";
- break;
- case R.id.rblatinonpinyin:
- newlayout = "latin-on-pinyin";
- break;
- case R.id.rblatinonthai:
- newlayout = "latin-on-thai";
- break;
- default:
- }
- }
- };
-}
Oops, something went wrong.

0 comments on commit b404f4f

Please sign in to comment.