Fix TempDirectory initialization

The proxy for local services were not intializing the TempDirectory.

Also, move the TempDirectory initialization out of the try/catch block.
Otherwise if Device.getDeviceId threw an exception, the temp directory
wouldn't be initialized

Bug: 8531456
Change-Id: Iea34e0b03203d6c6fe6e5d1ae9902d081bd90c27
This commit is contained in:
Paul Westbrook 2013-04-11 00:15:06 -07:00
parent bb3a938d61
commit 69ef2b22ff
1 changed files with 3 additions and 9 deletions

View File

@ -81,6 +81,7 @@ public class EmailServiceProxy extends ServiceProxy implements IEmailService {
public EmailServiceProxy(Context _context, Class<?> _class, IEmailServiceCallback _callback) {
super(_context, new Intent(_context, _class));
TempDirectory.setTempDirectory(_context);
mCallback = _callback;
isRemote = false;
}
@ -91,22 +92,15 @@ public class EmailServiceProxy extends ServiceProxy implements IEmailService {
super(_context, _intent);
try {
Device.getDeviceId(_context);
TempDirectory.setTempDirectory(_context);
} catch (IOException e) {
}
TempDirectory.setTempDirectory(_context);
mCallback = _callback;
isRemote = true;
}
public EmailServiceProxy(Context _context, String _action, IEmailServiceCallback _callback) {
super(_context, new Intent(_action));
try {
Device.getDeviceId(_context);
TempDirectory.setTempDirectory(_context);
} catch (IOException e) {
}
mCallback = _callback;
isRemote = true;
this(_context, new Intent(_action), _callback);
}
@Override