Loading core/java/android/os/Process.java +8 −3 Original line number Diff line number Diff line Loading @@ -1442,7 +1442,7 @@ public class Process { * * @hide */ public static boolean hasFileLocks(int pid) throws IOException { public static boolean hasFileLocks(int pid) throws Exception { BufferedReader br = null; try { Loading @@ -1454,9 +1454,14 @@ public class Process { for (int i = 0; i < 5 && st.hasMoreTokens(); i++) { String str = st.nextToken(); try { if (i == 4 && Integer.parseInt(str) == pid) { return true; } } catch (NumberFormatException nfe) { throw new Exception("Exception parsing /proc/locks at \" " + line + " \", token #" + i); } } } Loading services/core/java/com/android/server/am/CachedAppOptimizer.java +2 −2 Original line number Diff line number Diff line Loading @@ -1149,7 +1149,7 @@ public final class CachedAppOptimizer { } return; } } catch (IOException e) { } catch (Exception e) { Slog.e(TAG_AM, "Not freezing. Unable to check file locks for " + name + "(" + pid + "): " + e); return; Loading Loading @@ -1244,7 +1244,7 @@ public final class CachedAppOptimizer { } } } } catch (IOException e) { } catch (Exception e) { Slog.e(TAG_AM, "Unable to check file locks for " + name + "(" + pid + "): " + e); synchronized (mAm) { synchronized (mProcLock) { Loading Loading
core/java/android/os/Process.java +8 −3 Original line number Diff line number Diff line Loading @@ -1442,7 +1442,7 @@ public class Process { * * @hide */ public static boolean hasFileLocks(int pid) throws IOException { public static boolean hasFileLocks(int pid) throws Exception { BufferedReader br = null; try { Loading @@ -1454,9 +1454,14 @@ public class Process { for (int i = 0; i < 5 && st.hasMoreTokens(); i++) { String str = st.nextToken(); try { if (i == 4 && Integer.parseInt(str) == pid) { return true; } } catch (NumberFormatException nfe) { throw new Exception("Exception parsing /proc/locks at \" " + line + " \", token #" + i); } } } Loading
services/core/java/com/android/server/am/CachedAppOptimizer.java +2 −2 Original line number Diff line number Diff line Loading @@ -1149,7 +1149,7 @@ public final class CachedAppOptimizer { } return; } } catch (IOException e) { } catch (Exception e) { Slog.e(TAG_AM, "Not freezing. Unable to check file locks for " + name + "(" + pid + "): " + e); return; Loading Loading @@ -1244,7 +1244,7 @@ public final class CachedAppOptimizer { } } } } catch (IOException e) { } catch (Exception e) { Slog.e(TAG_AM, "Unable to check file locks for " + name + "(" + pid + "): " + e); synchronized (mAm) { synchronized (mProcLock) { Loading