From 8e5d12af9f12549981158c80047acb1ea4985bc5 Mon Sep 17 00:00:00 2001 From: satok Date: Fri, 2 Sep 2011 19:52:29 +0900 Subject: [PATCH] Add logs Change-Id: I640186c8be8013841b542e8cefa5f033eb7afc32 --- .../com/android/inputmethod/latin/SubtypeSwitcher.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/java/src/com/android/inputmethod/latin/SubtypeSwitcher.java b/java/src/com/android/inputmethod/latin/SubtypeSwitcher.java index a60f444fb..56f14de57 100644 --- a/java/src/com/android/inputmethod/latin/SubtypeSwitcher.java +++ b/java/src/com/android/inputmethod/latin/SubtypeSwitcher.java @@ -19,6 +19,7 @@ package com.android.inputmethod.latin; import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; +import android.content.pm.PackageManager.NameNotFoundException; import android.content.res.Configuration; import android.content.res.Resources; import android.graphics.drawable.Drawable; @@ -263,6 +264,15 @@ public class SubtypeSwitcher { // as it is not the current input mode. mVoiceInputWrapper.reset(); } + final String packageName = mService.getPackageName(); + int version = -1; + try { + version = mService.getPackageManager().getPackageInfo( + packageName, 0).versionCode; + } catch (NameNotFoundException e) { + } + throw new RuntimeException("Unknown subtype mode: " + version + ", " + packageName + + ", " + mVoiceInputWrapper); } }