Loading src/com/android/contacts/common/vcard/ExportVCardActivity.java +13 −12 Original line number Diff line number Diff line Loading @@ -147,7 +147,7 @@ public class ExportVCardActivity extends Activity implements ServiceConnection, Log.d(LOG_TAG, "create document cancelled or no data returned"); } } unbindAndFinish(); finish(); } } Loading @@ -161,7 +161,7 @@ public class ExportVCardActivity extends Activity implements ServiceConnection, startActivityForResult(getCreateDocIntent(), REQUEST_CREATE_DOCUMENT); } // Use synchronized since we don't want to call unbindAndFinish() just after this call. // Use synchronized since we don't want to call finish() just after this call. @Override public synchronized void onServiceDisconnected(ComponentName name) { if (DEBUG) Log.d(LOG_TAG, "onServiceDisconnected()"); Loading Loading @@ -202,14 +202,14 @@ public class ExportVCardActivity extends Activity implements ServiceConnection, @Override public void onClick(DialogInterface dialog, int which) { if (DEBUG) Log.d(LOG_TAG, "ExportVCardActivity#onClick() is called"); unbindAndFinish(); finish(); } @Override public void onCancel(DialogInterface dialog) { if (DEBUG) Log.d(LOG_TAG, "ExportVCardActivity#onCancel() is called"); mProcessOngoing = false; unbindAndFinish(); finish(); } @Override Loading @@ -218,6 +218,15 @@ public class ExportVCardActivity extends Activity implements ServiceConnection, super.unbindService(conn); } @Override protected void onDestroy() { if (mConnected) { unbindService(this); mConnected = false; } super.onDestroy(); } /** * Returns the display name for the given openable Uri or null if it could not be resolved. */ static String getOpenableUriDisplayName(Context context, Uri uri) { Loading @@ -234,12 +243,4 @@ public class ExportVCardActivity extends Activity implements ServiceConnection, } return null; } protected synchronized void unbindAndFinish() { if (mConnected) { unbindService(this); mConnected = false; } finish(); } } src/com/android/contacts/common/vcard/ShareVCardActivity.java +2 −2 Original line number Diff line number Diff line Loading @@ -51,7 +51,7 @@ public class ShareVCardActivity extends ExportVCardActivity { file.createNewFile(); } catch (IOException e) { Log.e(LOG_TAG, "Failed to create .vcf file, because: " + e); unbindAndFinish(); finish(); return; } Loading @@ -63,7 +63,7 @@ public class ShareVCardActivity extends ExportVCardActivity { // The connection object will call finish(). mService.handleExportRequest(request, new NotificationImportExportListener( ShareVCardActivity.this)); unbindAndFinish(); finish(); } /** Loading Loading
src/com/android/contacts/common/vcard/ExportVCardActivity.java +13 −12 Original line number Diff line number Diff line Loading @@ -147,7 +147,7 @@ public class ExportVCardActivity extends Activity implements ServiceConnection, Log.d(LOG_TAG, "create document cancelled or no data returned"); } } unbindAndFinish(); finish(); } } Loading @@ -161,7 +161,7 @@ public class ExportVCardActivity extends Activity implements ServiceConnection, startActivityForResult(getCreateDocIntent(), REQUEST_CREATE_DOCUMENT); } // Use synchronized since we don't want to call unbindAndFinish() just after this call. // Use synchronized since we don't want to call finish() just after this call. @Override public synchronized void onServiceDisconnected(ComponentName name) { if (DEBUG) Log.d(LOG_TAG, "onServiceDisconnected()"); Loading Loading @@ -202,14 +202,14 @@ public class ExportVCardActivity extends Activity implements ServiceConnection, @Override public void onClick(DialogInterface dialog, int which) { if (DEBUG) Log.d(LOG_TAG, "ExportVCardActivity#onClick() is called"); unbindAndFinish(); finish(); } @Override public void onCancel(DialogInterface dialog) { if (DEBUG) Log.d(LOG_TAG, "ExportVCardActivity#onCancel() is called"); mProcessOngoing = false; unbindAndFinish(); finish(); } @Override Loading @@ -218,6 +218,15 @@ public class ExportVCardActivity extends Activity implements ServiceConnection, super.unbindService(conn); } @Override protected void onDestroy() { if (mConnected) { unbindService(this); mConnected = false; } super.onDestroy(); } /** * Returns the display name for the given openable Uri or null if it could not be resolved. */ static String getOpenableUriDisplayName(Context context, Uri uri) { Loading @@ -234,12 +243,4 @@ public class ExportVCardActivity extends Activity implements ServiceConnection, } return null; } protected synchronized void unbindAndFinish() { if (mConnected) { unbindService(this); mConnected = false; } finish(); } }
src/com/android/contacts/common/vcard/ShareVCardActivity.java +2 −2 Original line number Diff line number Diff line Loading @@ -51,7 +51,7 @@ public class ShareVCardActivity extends ExportVCardActivity { file.createNewFile(); } catch (IOException e) { Log.e(LOG_TAG, "Failed to create .vcf file, because: " + e); unbindAndFinish(); finish(); return; } Loading @@ -63,7 +63,7 @@ public class ShareVCardActivity extends ExportVCardActivity { // The connection object will call finish(). mService.handleExportRequest(request, new NotificationImportExportListener( ShareVCardActivity.this)); unbindAndFinish(); finish(); } /** Loading