Loading services/core/java/com/android/server/power/PreRebootLogger.java +4 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.server.power; import android.annotation.DurationMillisLong; import android.annotation.NonNull; import android.content.Context; import android.os.Binder; import android.os.Environment; import android.os.IBinder; import android.os.ParcelFileDescriptor; Loading Loading @@ -146,6 +147,7 @@ final class PreRebootLogger { return; } final long token = Binder.clearCallingIdentity(); try { final File dumpFile = new File(dumpDir, serviceName); final ParcelFileDescriptor fd = ParcelFileDescriptor.open(dumpFile, Loading @@ -154,6 +156,8 @@ final class PreRebootLogger { binder.dump(fd.getFileDescriptor(), ArrayUtils.emptyArray(String.class)); } catch (FileNotFoundException | RemoteException e) { Slog.e(TAG, String.format("Failed to dump %s service before reboot", serviceName), e); } finally { Binder.restoreCallingIdentity(token); } } } Loading
services/core/java/com/android/server/power/PreRebootLogger.java +4 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.server.power; import android.annotation.DurationMillisLong; import android.annotation.NonNull; import android.content.Context; import android.os.Binder; import android.os.Environment; import android.os.IBinder; import android.os.ParcelFileDescriptor; Loading Loading @@ -146,6 +147,7 @@ final class PreRebootLogger { return; } final long token = Binder.clearCallingIdentity(); try { final File dumpFile = new File(dumpDir, serviceName); final ParcelFileDescriptor fd = ParcelFileDescriptor.open(dumpFile, Loading @@ -154,6 +156,8 @@ final class PreRebootLogger { binder.dump(fd.getFileDescriptor(), ArrayUtils.emptyArray(String.class)); } catch (FileNotFoundException | RemoteException e) { Slog.e(TAG, String.format("Failed to dump %s service before reboot", serviceName), e); } finally { Binder.restoreCallingIdentity(token); } } }