Ability to cancel swap. Made QR code larger.
Added a "Cancel" button to the swap QR code screen. Also changed how the LocalRepoService deals with onDestroy(). Previously, it would invoke `stopNetworkServices()` on the UI thread, blocking for a significant portion of time (enough to cause ANR messages on my devices). Now, it does this on a new thread. As for the QR code size, it was getting quite small on my nexus 4, which I think has a large screen (even though there is much larger about). As a result, it couldn't be scanned properly using barcode scanner. This is the first major diversion from carries mockups, in that the qr view is now in a scroller, which means the "Open QR Code Scanner" button may well not be visible on the main screen on small devices. Not sure about how to manage this tradeoff between biggish qr code but everything viewable on one screen.
This commit is contained in:
parent
de74d6457d
commit
92f71ca13a
@ -1,50 +1,53 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<ScrollView
|
||||||
android:orientation="vertical"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
xmlns:tools="http://schemas.android.com/tools">
|
android:layout_width="wrap_content">
|
||||||
|
|
||||||
<TextView
|
<LinearLayout android:orientation="vertical"
|
||||||
android:layout_width="wrap_content"
|
android:gravity="center"
|
||||||
android:layout_height="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:id="@+id/textView"
|
android:layout_height="wrap_content">
|
||||||
android:layout_gravity="center_horizontal"
|
|
||||||
android:layout_alignParentTop="true"
|
|
||||||
android:layout_alignParentLeft="true"
|
|
||||||
android:layout_alignParentStart="true"
|
|
||||||
android:text="One person needs to scan the code, or type the URL of the other swapper into a browser."
|
|
||||||
style="@style/SwapTheme.Wizard.MainText"/>
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:id="@+id/wifi_qr_code"
|
|
||||||
tools:src="@drawable/swap_qr_example"
|
|
||||||
android:layout_below="@+id/textView"
|
|
||||||
android:layout_above="@+id/device_ip_address"/>
|
|
||||||
|
|
||||||
<!--
|
<TextView
|
||||||
<Button style="@style/SwapTheme.Wizard.OptionButton"
|
android:layout_width="wrap_content"
|
||||||
android:id="@+id/btn_not_working"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/swap_wifi_qr_not_working"
|
android:id="@+id/textView"
|
||||||
android:layout_alignParentBottom="true" />
|
android:text="One person needs to scan the code, or type the URL of the other swapper into a browser."
|
||||||
-->
|
style="@style/SwapTheme.Wizard.MainText"/>
|
||||||
|
|
||||||
<Button style="@style/SwapTheme.Wizard.OptionButton"
|
<ImageView
|
||||||
android:text="@string/open_qr_code_scanner"
|
android:layout_width="250dp"
|
||||||
android:layout_gravity="center"
|
android:layout_height="250dp"
|
||||||
android:layout_alignParentBottom="true"
|
android:maxHeight="20dp"
|
||||||
android:id="@+id/btn_qr_scanner"/>
|
android:id="@+id/wifi_qr_code"
|
||||||
<!-- android:layout_above="@id/btn_not_working" -->
|
tools:src="@drawable/swap_qr_example"/>
|
||||||
|
|
||||||
<TextView
|
<!--
|
||||||
android:layout_width="wrap_content"
|
<Button style="@style/SwapTheme.Wizard.OptionButton"
|
||||||
android:layout_height="wrap_content"
|
android:id="@+id/btn_not_working"
|
||||||
android:id="@+id/device_ip_address"
|
android:text="@string/swap_wifi_qr_not_working"
|
||||||
tools:text="192.168.1.1:8888"
|
android:layout_alignParentBottom="true" />
|
||||||
android:layout_above="@+id/btn_qr_scanner"
|
-->
|
||||||
android:layout_centerHorizontal="true"
|
|
||||||
style="@style/SwapTheme.Wizard.LocalIpAddress"/>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:id="@+id/device_ip_address"
|
||||||
|
tools:text="http://255.255.255.255:8888"
|
||||||
|
style="@style/SwapTheme.Wizard.LocalIpAddress"/>
|
||||||
|
|
||||||
|
<Button style="@style/SwapTheme.Wizard.OptionButton"
|
||||||
|
android:text="@string/open_qr_code_scanner"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:id="@+id/btn_qr_scanner"/>
|
||||||
|
|
||||||
|
<Button style="@style/SwapTheme.Wizard.OptionButton"
|
||||||
|
android:id="@+id/btn_cancel_swap"
|
||||||
|
android:text="@string/cancel" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</ScrollView>
|
@ -113,7 +113,7 @@
|
|||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="SwapTheme.Wizard.LocalIpAddress" parent="@style/SwapTheme.Wizard.Text">
|
<style name="SwapTheme.Wizard.LocalIpAddress" parent="@style/SwapTheme.Wizard.Text">
|
||||||
<item name="android:textSize">32.5sp</item> <!-- 58px * 96dpi / 160dpi -->
|
<item name="android:textSize">26.5sp</item> <!-- 58px * 96dpi / 160dpi = 32.5sp (ended up making a bit smaller, because longer addresses didn't fit well) -->
|
||||||
<item name="android:paddingLeft">40dp</item>
|
<item name="android:paddingLeft">40dp</item>
|
||||||
<item name="android:paddingRight">40dp</item>
|
<item name="android:paddingRight">40dp</item>
|
||||||
<item name="android:paddingTop">22.5dp</item> <!-- 40px * 96dpi / 160dpi -->
|
<item name="android:paddingTop">22.5dp</item> <!-- 40px * 96dpi / 160dpi -->
|
||||||
|
@ -41,13 +41,11 @@ import android.os.Messenger;
|
|||||||
import android.os.RemoteException;
|
import android.os.RemoteException;
|
||||||
import android.preference.PreferenceManager;
|
import android.preference.PreferenceManager;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import com.nostra13.universalimageloader.cache.disc.impl.LimitedAgeDiscCache;
|
import com.nostra13.universalimageloader.cache.disc.impl.LimitedAgeDiscCache;
|
||||||
import com.nostra13.universalimageloader.cache.disc.naming.FileNameGenerator;
|
import com.nostra13.universalimageloader.cache.disc.naming.FileNameGenerator;
|
||||||
import com.nostra13.universalimageloader.core.ImageLoader;
|
import com.nostra13.universalimageloader.core.ImageLoader;
|
||||||
import com.nostra13.universalimageloader.core.ImageLoaderConfiguration;
|
import com.nostra13.universalimageloader.core.ImageLoaderConfiguration;
|
||||||
import com.nostra13.universalimageloader.utils.StorageUtils;
|
import com.nostra13.universalimageloader.utils.StorageUtils;
|
||||||
|
|
||||||
import org.fdroid.fdroid.Preferences.ChangeListener;
|
import org.fdroid.fdroid.Preferences.ChangeListener;
|
||||||
import org.fdroid.fdroid.compat.PRNGFixes;
|
import org.fdroid.fdroid.compat.PRNGFixes;
|
||||||
import org.fdroid.fdroid.data.AppProvider;
|
import org.fdroid.fdroid.data.AppProvider;
|
||||||
@ -57,6 +55,9 @@ import org.fdroid.fdroid.localrepo.LocalRepoService;
|
|||||||
import org.fdroid.fdroid.net.IconDownloader;
|
import org.fdroid.fdroid.net.IconDownloader;
|
||||||
import org.fdroid.fdroid.net.WifiStateChangeService;
|
import org.fdroid.fdroid.net.WifiStateChangeService;
|
||||||
|
|
||||||
|
import javax.net.ssl.HttpsURLConnection;
|
||||||
|
import javax.net.ssl.SSLContext;
|
||||||
|
import javax.net.ssl.TrustManager;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
@ -73,6 +74,8 @@ public class FDroidApp extends Application {
|
|||||||
private static Messenger localRepoServiceMessenger = null;
|
private static Messenger localRepoServiceMessenger = null;
|
||||||
private static boolean localRepoServiceIsBound = false;
|
private static boolean localRepoServiceIsBound = false;
|
||||||
|
|
||||||
|
private static final String TAG = "org.fdroid.fdroid.FDroidApp";
|
||||||
|
|
||||||
BluetoothAdapter bluetoothAdapter = null;
|
BluetoothAdapter bluetoothAdapter = null;
|
||||||
|
|
||||||
public static enum Theme {
|
public static enum Theme {
|
||||||
@ -266,8 +269,7 @@ public class FDroidApp extends Application {
|
|||||||
if (!localRepoServiceIsBound) {
|
if (!localRepoServiceIsBound) {
|
||||||
Context app = context.getApplicationContext();
|
Context app = context.getApplicationContext();
|
||||||
Intent service = new Intent(app, LocalRepoService.class);
|
Intent service = new Intent(app, LocalRepoService.class);
|
||||||
localRepoServiceIsBound = app.bindService(service, serviceConnection,
|
localRepoServiceIsBound = app.bindService(service, serviceConnection, Context.BIND_AUTO_CREATE);
|
||||||
Context.BIND_AUTO_CREATE);
|
|
||||||
if (localRepoServiceIsBound)
|
if (localRepoServiceIsBound)
|
||||||
app.startService(service);
|
app.startService(service);
|
||||||
}
|
}
|
||||||
@ -285,8 +287,7 @@ public class FDroidApp extends Application {
|
|||||||
public static void restartLocalRepoService() {
|
public static void restartLocalRepoService() {
|
||||||
if (localRepoServiceMessenger != null) {
|
if (localRepoServiceMessenger != null) {
|
||||||
try {
|
try {
|
||||||
Message msg = Message.obtain(null,
|
Message msg = Message.obtain(null, LocalRepoService.RESTART, LocalRepoService.RESTART, 0);
|
||||||
LocalRepoService.RESTART, LocalRepoService.RESTART, 0);
|
|
||||||
localRepoServiceMessenger.send(msg);
|
localRepoServiceMessenger.send(msg);
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
@ -294,7 +295,7 @@ public class FDroidApp extends Application {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isLocalRepoServiceRunnig() {
|
public static boolean isLocalRepoServiceRunning() {
|
||||||
return localRepoServiceIsBound;
|
return localRepoServiceIsBound;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -70,6 +70,11 @@ public class QrGenAsyncTask extends AsyncTask<String, Void, Void> {
|
|||||||
@Override
|
@Override
|
||||||
protected void onPostExecute(Void v) {
|
protected void onPostExecute(Void v) {
|
||||||
ImageView qrCodeImageView = (ImageView) activity.findViewById(viewId);
|
ImageView qrCodeImageView = (ImageView) activity.findViewById(viewId);
|
||||||
qrCodeImageView.setImageBitmap(qrBitmap);
|
|
||||||
|
// If the generation takes too long for whatever reason, then this view, and indeed the entire
|
||||||
|
// activity may not be around any more.
|
||||||
|
if (qrCodeImageView != null) {
|
||||||
|
qrCodeImageView.setImageBitmap(qrBitmap);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -58,25 +58,35 @@ public class LocalRepoService extends Service {
|
|||||||
|
|
||||||
final Messenger messenger = new Messenger(new StartStopHandler(this));
|
final Messenger messenger = new Messenger(new StartStopHandler(this));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is most likely going to be created on the UI thread, hence all of
|
||||||
|
* the message handling will take place on a new thread to prevent blocking
|
||||||
|
* the UI.
|
||||||
|
*/
|
||||||
static class StartStopHandler extends Handler {
|
static class StartStopHandler extends Handler {
|
||||||
private static LocalRepoService service;
|
|
||||||
|
private final LocalRepoService service;
|
||||||
|
|
||||||
public StartStopHandler(LocalRepoService service) {
|
public StartStopHandler(LocalRepoService service) {
|
||||||
StartStopHandler.service = service;
|
this.service = service;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void handleMessage(Message msg) {
|
public void handleMessage(final Message msg) {
|
||||||
if (msg.arg1 == START) {
|
new Thread() {
|
||||||
service.startNetworkServices();
|
public void run() {
|
||||||
} else if (msg.arg1 == STOP) {
|
if (msg.arg1 == START) {
|
||||||
service.stopNetworkServices();
|
service.startNetworkServices();
|
||||||
} else if (msg.arg1 == RESTART) {
|
} else if (msg.arg1 == STOP) {
|
||||||
service.stopNetworkServices();
|
service.stopNetworkServices();
|
||||||
service.startNetworkServices();
|
} else if (msg.arg1 == RESTART) {
|
||||||
} else {
|
service.stopNetworkServices();
|
||||||
Log.e(TAG, "unsupported msg.arg1, ignored");
|
service.startNetworkServices();
|
||||||
}
|
} else {
|
||||||
|
Log.e(TAG, "Unsupported msg.arg1 (" + msg.arg1 + "), ignored");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}.start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -116,14 +126,12 @@ public class LocalRepoService extends Service {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@Override
|
private void showNotification() {
|
||||||
public void onCreate() {
|
|
||||||
notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
|
notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
|
||||||
// launch LocalRepoActivity if the user selects this notification
|
// launch LocalRepoActivity if the user selects this notification
|
||||||
Intent intent = new Intent(this, SwapActivity.class);
|
Intent intent = new Intent(this, SwapActivity.class);
|
||||||
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
|
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
|
||||||
PendingIntent contentIntent = PendingIntent.getActivity(this, 0, intent,
|
PendingIntent contentIntent = PendingIntent.getActivity(this, 0, intent, PendingIntent.FLAG_CANCEL_CURRENT);
|
||||||
PendingIntent.FLAG_CANCEL_CURRENT);
|
|
||||||
notification = new NotificationCompat.Builder(this)
|
notification = new NotificationCompat.Builder(this)
|
||||||
.setContentTitle(getText(R.string.local_repo_running))
|
.setContentTitle(getText(R.string.local_repo_running))
|
||||||
.setContentText(getText(R.string.touch_to_configure_local_repo))
|
.setContentText(getText(R.string.touch_to_configure_local_repo))
|
||||||
@ -131,6 +139,11 @@ public class LocalRepoService extends Service {
|
|||||||
.setContentIntent(contentIntent)
|
.setContentIntent(contentIntent)
|
||||||
.build();
|
.build();
|
||||||
startForeground(NOTIFICATION, notification);
|
startForeground(NOTIFICATION, notification);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCreate() {
|
||||||
|
showNotification();
|
||||||
startNetworkServices();
|
startNetworkServices();
|
||||||
Preferences.get().registerLocalRepoBonjourListeners(localRepoBonjourChangeListener);
|
Preferences.get().registerLocalRepoBonjourListeners(localRepoBonjourChangeListener);
|
||||||
|
|
||||||
@ -147,7 +160,12 @@ public class LocalRepoService extends Service {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDestroy() {
|
public void onDestroy() {
|
||||||
stopNetworkServices();
|
new Thread() {
|
||||||
|
public void run() {
|
||||||
|
stopNetworkServices();
|
||||||
|
}
|
||||||
|
}.start();
|
||||||
|
|
||||||
notificationManager.cancel(NOTIFICATION);
|
notificationManager.cancel(NOTIFICATION);
|
||||||
LocalBroadcastManager.getInstance(this).unregisterReceiver(onWifiChange);
|
LocalBroadcastManager.getInstance(this).unregisterReceiver(onWifiChange);
|
||||||
Preferences.get().unregisterLocalRepoBonjourListeners(localRepoBonjourChangeListener);
|
Preferences.get().unregisterLocalRepoBonjourListeners(localRepoBonjourChangeListener);
|
||||||
@ -159,6 +177,7 @@ public class LocalRepoService extends Service {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void startNetworkServices() {
|
private void startNetworkServices() {
|
||||||
|
Log.d(TAG, "Starting local repo network services");
|
||||||
startWebServer();
|
startWebServer();
|
||||||
if (Preferences.get().isLocalRepoBonjourEnabled())
|
if (Preferences.get().isLocalRepoBonjourEnabled())
|
||||||
registerMDNSService();
|
registerMDNSService();
|
||||||
@ -166,8 +185,13 @@ public class LocalRepoService extends Service {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void stopNetworkServices() {
|
private void stopNetworkServices() {
|
||||||
|
Log.d(TAG, "Stopping local repo network services");
|
||||||
Preferences.get().unregisterLocalRepoHttpsListeners(localRepoHttpsChangeListener);
|
Preferences.get().unregisterLocalRepoHttpsListeners(localRepoHttpsChangeListener);
|
||||||
|
|
||||||
|
Log.d(TAG, "Unregistering MDNS service...");
|
||||||
unregisterMDNSService();
|
unregisterMDNSService();
|
||||||
|
|
||||||
|
Log.d(TAG, "Stopping web server...");
|
||||||
stopWebServer();
|
stopWebServer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ public class LocalRepoActivity extends ActionBarActivity {
|
|||||||
public void onResume() {
|
public void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
resetNetworkInfo();
|
resetNetworkInfo();
|
||||||
setRepoSwitchChecked(FDroidApp.isLocalRepoServiceRunnig());
|
setRepoSwitchChecked(FDroidApp.isLocalRepoServiceRunning());
|
||||||
|
|
||||||
LocalBroadcastManager.getInstance(this).registerReceiver(onWifiChange,
|
LocalBroadcastManager.getInstance(this).registerReceiver(onWifiChange,
|
||||||
new IntentFilter(WifiStateChangeService.BROADCAST));
|
new IntentFilter(WifiStateChangeService.BROADCAST));
|
||||||
|
@ -121,7 +121,7 @@ public class SwapActivity extends ActionBarActivity implements SwapProcessManage
|
|||||||
|
|
||||||
if (savedInstanceState == null) {
|
if (savedInstanceState == null) {
|
||||||
|
|
||||||
if (FDroidApp.isLocalRepoServiceRunnig()) {
|
if (FDroidApp.isLocalRepoServiceRunning()) {
|
||||||
onWifiQr();
|
onWifiQr();
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
@ -218,9 +218,13 @@ public class SwapActivity extends ActionBarActivity implements SwapProcessManage
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void startLocalRepo() {
|
private void startLocalRepo() {
|
||||||
if (!FDroidApp.isLocalRepoServiceRunnig()) {
|
if (!FDroidApp.isLocalRepoServiceRunning()) {
|
||||||
FDroidApp.startLocalRepoService(this);
|
FDroidApp.startLocalRepoService(this);
|
||||||
|
initLocalRepoTimer(900000); // 15 mins
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initLocalRepoTimer(long timeoutMilliseconds) {
|
||||||
|
|
||||||
// reset the timer if viewing this Activity again
|
// reset the timer if viewing this Activity again
|
||||||
if (shutdownLocalRepoTimer != null)
|
if (shutdownLocalRepoTimer != null)
|
||||||
@ -233,7 +237,19 @@ public class SwapActivity extends ActionBarActivity implements SwapProcessManage
|
|||||||
public void run() {
|
public void run() {
|
||||||
FDroidApp.stopLocalRepoService(SwapActivity.this);
|
FDroidApp.stopLocalRepoService(SwapActivity.this);
|
||||||
}
|
}
|
||||||
}, 900000); // 15 minutes
|
}, timeoutMilliseconds);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void stopSwapping() {
|
||||||
|
if (FDroidApp.isLocalRepoServiceRunning()) {
|
||||||
|
if (shutdownLocalRepoTimer != null) {
|
||||||
|
shutdownLocalRepoTimer.cancel();
|
||||||
|
}
|
||||||
|
FDroidApp.stopLocalRepoService(SwapActivity.this);
|
||||||
|
}
|
||||||
|
finish();
|
||||||
}
|
}
|
||||||
|
|
||||||
class UpdateAsyncTask extends AsyncTask<Void, String, Void> {
|
class UpdateAsyncTask extends AsyncTask<Void, String, Void> {
|
||||||
|
@ -2,4 +2,5 @@ package org.fdroid.fdroid.views.swap;
|
|||||||
|
|
||||||
public interface SwapProcessManager {
|
public interface SwapProcessManager {
|
||||||
public void nextStep();
|
public void nextStep();
|
||||||
|
public void stopSwapping();
|
||||||
}
|
}
|
||||||
|
@ -45,6 +45,8 @@ public class WifiQrFragment extends Fragment {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
private SwapProcessManager swapManager;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||||
View view = inflater.inflate(R.layout.swap_wifi_qr, container, false);
|
View view = inflater.inflate(R.layout.swap_wifi_qr, container, false);
|
||||||
@ -62,9 +64,22 @@ public class WifiQrFragment extends Fragment {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Button cancel = (Button)view.findViewById(R.id.btn_cancel_swap);
|
||||||
|
cancel.setOnClickListener(new Button.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
swapManager.stopSwapping();
|
||||||
|
}
|
||||||
|
});
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onAttach(Activity activity) {
|
||||||
|
super.onAttach(activity);
|
||||||
|
swapManager = (SwapProcessManager)activity;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onActivityResult(int requestCode, int resultCode, Intent intent) {
|
public void onActivityResult(int requestCode, int resultCode, Intent intent) {
|
||||||
IntentResult scanResult = IntentIntegrator.parseActivityResult(requestCode, resultCode, intent);
|
IntentResult scanResult = IntentIntegrator.parseActivityResult(requestCode, resultCode, intent);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user