Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a9599365 authored by Arthur Hung's avatar Arthur Hung
Browse files

Remove warning-level trace

The exception trace would be shown if the package is disabled or it
didn't install in the device. Remove the trace for such expected
behaviors while loading shortcut keys.

Bug: 197888001
Test: manual
Change-Id: Ie276469b67ecca47952b874d1cc3701c88bd1267
parent 3ae8aa52
Loading
Loading
Loading
Loading
+6 −8
Original line number Diff line number Diff line
@@ -48,7 +48,7 @@ import java.io.IOException;
 * <li> Returning particular kind of application intent by special key.
 */
class ModifierShortcutManager {
    private static final String TAG = "ShortcutManager";
    private static final String TAG = "WindowManager";

    private static final String TAG_BOOKMARKS = "bookmarks";
    private static final String TAG_BOOKMARK = "bookmark";
@@ -188,7 +188,7 @@ class ModifierShortcutManager {
                                            | PackageManager.MATCH_UNINSTALLED_PACKAGES);
                        } catch (PackageManager.NameNotFoundException e1) {
                            Log.w(TAG, "Unable to add bookmark: " + packageName
                                    + "/" + className, e);
                                    + "/" + className + " not found.");
                            continue;
                        }
                    }
@@ -213,10 +213,8 @@ class ModifierShortcutManager {
                    mIntentShortcuts.put(shortcutChar, shortcut);
                }
            }
        } catch (XmlPullParserException e) {
            Log.w(TAG, "Got exception parsing bookmarks.", e);
        } catch (IOException e) {
            Log.w(TAG, "Got exception parsing bookmarks.", e);
        } catch (XmlPullParserException | IOException e) {
            Log.e(TAG, "Got exception parsing bookmarks.", e);
        }
    }

@@ -302,7 +300,7 @@ class ModifierShortcutManager {
                    Slog.w(TAG, "Dropping application launch key because "
                            + "the activity to which it is registered was not found: "
                            + "keyCode=" + KeyEvent.keyCodeToString(keyCode) + ","
                            + " category=" + category, ex);
                            + " category=" + category);
                }
                return true;
            } else {
@@ -318,7 +316,7 @@ class ModifierShortcutManager {
            } catch (ActivityNotFoundException ex) {
                Slog.w(TAG, "Dropping shortcut key combination because "
                        + "the activity to which it is registered was not found: "
                        + "META+ or SEARCH" + KeyEvent.keyCodeToString(keyCode), ex);
                        + "META+ or SEARCH" + KeyEvent.keyCodeToString(keyCode));
            }
            return true;
        }