Loading core/java/android/app/backup/BackupAgent.java +22 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,8 @@ import android.system.StructStat; import android.util.ArraySet; import android.util.Log; import libcore.io.IoUtils; import org.xmlpull.v1.XmlPullParserException; import java.io.File; Loading Loading @@ -921,6 +923,13 @@ public abstract class BackupAgent extends ContextWrapper { } catch (RemoteException e) { // we'll time out anyway, so we're safe } // Don't close the fd out from under the system service if this was local if (Binder.getCallingPid() != Process.myPid()) { IoUtils.closeQuietly(oldState); IoUtils.closeQuietly(data); IoUtils.closeQuietly(newState); } } } Loading Loading @@ -951,6 +960,11 @@ public abstract class BackupAgent extends ContextWrapper { } catch (RemoteException e) { // we'll time out anyway, so we're safe } if (Binder.getCallingPid() != Process.myPid()) { IoUtils.closeQuietly(data); IoUtils.closeQuietly(newState); } } } Loading Loading @@ -994,6 +1008,10 @@ public abstract class BackupAgent extends ContextWrapper { } catch (RemoteException e) { // we'll time out anyway, so we're safe } if (Binder.getCallingPid() != Process.myPid()) { IoUtils.closeQuietly(data); } } } Loading Loading @@ -1041,6 +1059,10 @@ public abstract class BackupAgent extends ContextWrapper { } catch (RemoteException e) { // we'll time out anyway, so we're safe } if (Binder.getCallingPid() != Process.myPid()) { IoUtils.closeQuietly(data); } } } Loading Loading
core/java/android/app/backup/BackupAgent.java +22 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,8 @@ import android.system.StructStat; import android.util.ArraySet; import android.util.Log; import libcore.io.IoUtils; import org.xmlpull.v1.XmlPullParserException; import java.io.File; Loading Loading @@ -921,6 +923,13 @@ public abstract class BackupAgent extends ContextWrapper { } catch (RemoteException e) { // we'll time out anyway, so we're safe } // Don't close the fd out from under the system service if this was local if (Binder.getCallingPid() != Process.myPid()) { IoUtils.closeQuietly(oldState); IoUtils.closeQuietly(data); IoUtils.closeQuietly(newState); } } } Loading Loading @@ -951,6 +960,11 @@ public abstract class BackupAgent extends ContextWrapper { } catch (RemoteException e) { // we'll time out anyway, so we're safe } if (Binder.getCallingPid() != Process.myPid()) { IoUtils.closeQuietly(data); IoUtils.closeQuietly(newState); } } } Loading Loading @@ -994,6 +1008,10 @@ public abstract class BackupAgent extends ContextWrapper { } catch (RemoteException e) { // we'll time out anyway, so we're safe } if (Binder.getCallingPid() != Process.myPid()) { IoUtils.closeQuietly(data); } } } Loading Loading @@ -1041,6 +1059,10 @@ public abstract class BackupAgent extends ContextWrapper { } catch (RemoteException e) { // we'll time out anyway, so we're safe } if (Binder.getCallingPid() != Process.myPid()) { IoUtils.closeQuietly(data); } } } Loading