docstring_tokens
stringlengths
18
16.9k
code_tokens
stringlengths
75
1.81M
html_url
stringlengths
74
116
file_name
stringlengths
3
311
keep keep add keep keep keep keep keep
<mask> import host.exp.exponent.analytics.EXL; <mask> import host.exp.exponent.kernel.Kernel; <mask> import host.exp.exponent.kernel.KernelProvider; <mask> import okhttp3.Call; <mask> import okhttp3.Callback; <mask> import okhttp3.OkHttpClient; <mask> import okhttp3.Request; <mask> import okhttp3.Response; </s> Fixing imagepicker crash on android 7 fbshipit-source-id: 40baba9
https://github.com/expo/expo/commit/14782289579836bf99992736abf143b347762497
android/app/src/main/java/abi9_0_0/host/exp/exponent/modules/api/FileSystemModule.java
keep keep keep keep replace keep keep keep keep keep
<mask> WritableMap result = Arguments.createMap(); <mask> if (file.exists()) { <mask> result.putBoolean("exists", true); <mask> result.putBoolean("isDirectory", file.isDirectory()); <mask> result.putString("uri", Uri.fromFile(file).toString()); <mask> if (options.hasKey("md5") && options.getBoolean("md5")) { <mask> result.putString("md5", md5(file)); <mask> } <mask> promise.resolve(result); <mask> } else { </s> Fixing imagepicker crash on android 7 fbshipit-source-id: 40baba9
https://github.com/expo/expo/commit/14782289579836bf99992736abf143b347762497
android/app/src/main/java/abi9_0_0/host/exp/exponent/modules/api/FileSystemModule.java
keep keep keep keep replace keep keep keep keep keep
<mask> sink.writeAll(response.body().source()); <mask> sink.close(); <mask> <mask> WritableMap result = Arguments.createMap(); <mask> result.putString("uri", Uri.fromFile(file).toString()); <mask> if (options.hasKey("md5") && options.getBoolean("md5")) { <mask> result.putString("md5", md5(file)); <mask> } <mask> promise.resolve(result); <mask> } catch (Exception e) { </s> Fixing imagepicker crash on android 7 fbshipit-source-id: 40baba9
https://github.com/expo/expo/commit/14782289579836bf99992736abf143b347762497
android/app/src/main/java/abi9_0_0/host/exp/exponent/modules/api/FileSystemModule.java
keep keep add keep keep keep keep
<mask> <mask> import host.exp.exponent.ActivityResultListener; <mask> import host.exp.exponent.experience.BaseExperienceActivity; <mask> import host.exp.exponentview.Exponent; <mask> <mask> public class ImagePickerModule extends ReactContextBaseJavaModule implements ActivityResultListener { <mask> static final int REQUEST_LAUNCH_CAMERA = 1; </s> Fixing imagepicker crash on android 7 fbshipit-source-id: 40baba9
https://github.com/expo/expo/commit/14782289579836bf99992736abf143b347762497
android/app/src/main/java/abi9_0_0/host/exp/exponent/modules/api/ImagePickerModule.java
keep keep keep keep replace replace keep keep keep keep keep
<mask> if (imageFile == null) { <mask> promise.reject(new IOException("Could not create temporary image file.")); <mask> return; <mask> } <mask> cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(imageFile)); <mask> mCameraCaptureURI = Uri.fromFile(imageFile); <mask> mPromise = promise; <mask> Exponent.getInstance().getCurrentActivity().startActivityForResult(cameraIntent, REQUEST_LAUNCH_CAMERA); <mask> } <mask> <mask> // NOTE: Currently not reentrant / doesn't support concurrent requests </s> Fixing imagepicker crash on android 7 fbshipit-source-id: 40baba9
https://github.com/expo/expo/commit/14782289579836bf99992736abf143b347762497
android/app/src/main/java/abi9_0_0/host/exp/exponent/modules/api/ImagePickerModule.java
keep keep keep keep replace keep keep keep keep keep
<mask> } <mask> String path = writeImage(bmp); <mask> <mask> WritableMap response = Arguments.createMap(); <mask> response.putString("uri", Uri.fromFile(new File(path)).toString()); <mask> response.putInt("width", bmp.getWidth()); <mask> response.putInt("height", bmp.getHeight()); <mask> response.putBoolean("cancelled", false); <mask> promise.resolve(response); <mask> } </s> Fixing imagepicker crash on android 7 fbshipit-source-id: 40baba9
https://github.com/expo/expo/commit/14782289579836bf99992736abf143b347762497
android/app/src/main/java/abi9_0_0/host/exp/exponent/modules/api/ImagePickerModule.java
keep add keep keep keep keep keep keep
<mask> package host.exp.exponent; <mask> <mask> import android.os.Debug; <mask> import android.support.multidex.MultiDexApplication; <mask> <mask> import com.crashlytics.android.Crashlytics; <mask> import com.facebook.react.bridge.ReactApplicationContext; <mask> </s> Fixing imagepicker crash on android 7 fbshipit-source-id: 40baba9 </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponentview.ExponentViewBuildConfig; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils;
https://github.com/expo/expo/commit/14782289579836bf99992736abf143b347762497
android/app/src/main/java/host/exp/exponent/ExponentApplication.java
keep add keep keep keep keep keep keep
<mask> static { <mask> ExponentViewBuildConfig.USE_INTERNET_KERNEL = BuildVariantConstants.USE_INTERNET_KERNEL; <mask> } <mask> <mask> private static final String TAG = ExponentApplication.class.getSimpleName(); <mask> <mask> private static ExponentApplication sApplication; <mask> </s> Fixing imagepicker crash on android 7 fbshipit-source-id: 40baba9 </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add public static boolean DEBUG = false;
https://github.com/expo/expo/commit/14782289579836bf99992736abf143b347762497
android/app/src/main/java/host/exp/exponent/ExponentApplication.java
keep keep add keep keep keep keep
<mask> import host.exp.exponent.Constants; <mask> import host.exp.exponent.ExponentManifest; <mask> import host.exp.exponentview.Exponent; <mask> import host.exp.exponentview.R; <mask> import host.exp.exponent.RNObject; <mask> import host.exp.exponent.analytics.Analytics; <mask> import host.exp.exponent.analytics.EXL; </s> Fixing imagepicker crash on android 7 fbshipit-source-id: 40baba9 </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponentview.ExponentViewBuildConfig; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils;
https://github.com/expo/expo/commit/14782289579836bf99992736abf143b347762497
android/app/src/main/java/host/exp/exponent/kernel/Kernel.java
keep replace replace keep replace
<mask> <mask> if (BuildConfig.DEBUG) { <mask> handleError(e.getMessage()); <mask> } else { <mask> handleError(mContext.getString(R.string.error_unable_to_load_kernel)); </s> Fixing imagepicker crash on android 7 fbshipit-source-id: 40baba9 </s> remove if (BuildConfig.DEBUG) { </s> add if (ExponentViewBuildConfig.DEBUG) { </s> remove if (BuildConfig.DEBUG) { </s> add if (ExponentViewBuildConfig.DEBUG) { </s> remove if (BuildConfig.DEBUG) { </s> add if (ExponentViewBuildConfig.DEBUG) { </s> remove result.putString("uri", Uri.fromFile(file).toString()); </s> add result.putString("uri", ExpFileUtils.uriFromFile(file).toString()); </s> remove result.putString("uri", Uri.fromFile(file).toString()); </s> add result.putString("uri", ExpFileUtils.uriFromFile(file).toString());
https://github.com/expo/expo/commit/14782289579836bf99992736abf143b347762497
android/app/src/main/java/host/exp/exponent/kernel/Kernel.java
keep keep keep keep replace keep keep
<mask> <string name="app_name">Exponent</string> <mask> <string name="dev_activity_name">Exponent Dev</string> <mask> <string name="preference_file_key">host.exp.exponent.SharedPreferences</string> <mask> <string name="error_default">Something went wrong. Sorry about that.</string> <mask> <string name="error_unable_to_load_kernel">Exponent requires an internet connection.</string> <mask> <string name="error_unable_to_load_experience">Unable to load Experience.</string> <mask> </resources> </s> Fixing imagepicker crash on android 7 fbshipit-source-id: 40baba9 </s> remove <string name="error_unable_to_load_kernel">Exponent requires an internet connection.</string> </s> add </s> remove handleError(mContext.getString(R.string.error_unable_to_load_kernel)); </s> add handleError("Exponent requires an internet connection."); </s> add import host.exp.exponent.utils.ExpFileUtils; </s> remove if (BuildConfig.DEBUG) { handleError(e.getMessage()); </s> add if (ExponentViewBuildConfig.DEBUG) { handleError("Can't load kernel. Are you sure your packager is running and your phone is on the same wifi? " + e.getMessage()); </s> add import host.exp.exponent.utils.ExpFileUtils; </s> remove response.putString("uri", Uri.fromFile(new File(path)).toString()); </s> add response.putString("uri", ExpFileUtils.uriFromFile(new File(path)).toString());
https://github.com/expo/expo/commit/14782289579836bf99992736abf143b347762497
android/app/src/main/res/values/strings.xml
keep keep add keep keep keep
<mask> <receiver <mask> android:name="host.exp.exponent.notifications.ScheduledNotificationReceiver" <mask> android:exported="false" /> <mask> </application> <mask> <mask> </manifest> </s> Fixing imagepicker crash on android 7 fbshipit-source-id: 40baba9 </s> remove <string name="error_unable_to_load_kernel">Exponent requires an internet connection.</string> </s> add </s> add import host.exp.exponent.utils.ExpFileUtils; </s> remove infoMap.putString("uri", Uri.fromFile(file).toString()); </s> add infoMap.putString("uri", ExpFileUtils.uriFromFile(file).toString()); </s> add import host.exp.exponent.utils.ExpFileUtils; </s> remove response.putString("uri", Uri.fromFile(new File(path)).toString()); </s> add response.putString("uri", ExpFileUtils.uriFromFile(new File(path)).toString()); </s> remove cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(imageFile)); mCameraCaptureURI = Uri.fromFile(imageFile); </s> add cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, ExpFileUtils.uriFromFile(imageFile)); mCameraCaptureURI = ExpFileUtils.uriFromFile(imageFile);
https://github.com/expo/expo/commit/14782289579836bf99992736abf143b347762497
android/exponentview/src/main/AndroidManifest.xml
keep keep keep add keep keep keep keep keep
<mask> import javax.inject.Inject; <mask> import javax.inject.Singleton; <mask> <mask> import host.exp.exponentview.BuildConfig; <mask> import okhttp3.Cache; <mask> import okhttp3.Interceptor; <mask> import okhttp3.OkHttpClient; <mask> import okhttp3.Request; <mask> import okhttp3.Response; </s> Fixing imagepicker crash on android 7 fbshipit-source-id: 40baba9 </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils;
https://github.com/expo/expo/commit/14782289579836bf99992736abf143b347762497
android/exponentview/src/main/java/host/exp/exponent/network/ExponentNetwork.java
keep keep keep keep replace keep keep keep keep keep
<mask> <mask> private OkHttpClient.Builder createHttpClientBuilder() { <mask> OkHttpClient.Builder clientBuilder = new OkHttpClient.Builder() <mask> .cache(mCache); <mask> if (BuildConfig.DEBUG) { <mask> clientBuilder.addNetworkInterceptor(new StethoInterceptor()); <mask> } <mask> addOfflineInterceptors(clientBuilder); <mask> <mask> return clientBuilder; </s> Fixing imagepicker crash on android 7 fbshipit-source-id: 40baba9 </s> add import host.exp.exponent.utils.ExpFileUtils; </s> remove if (BuildConfig.DEBUG) { </s> add if (ExponentViewBuildConfig.DEBUG) { </s> add ExponentViewBuildConfig.DEBUG = BuildConfig.DEBUG; </s> remove if (BuildConfig.DEBUG) { </s> add if (ExponentViewBuildConfig.DEBUG) { </s> remove String uri = Uri.fromFile(output).toString(); </s> add String uri = ExpFileUtils.uriFromFile(output).toString(); </s> remove String uri = Uri.fromFile(output).toString(); </s> add String uri = ExpFileUtils.uriFromFile(output).toString();
https://github.com/expo/expo/commit/14782289579836bf99992736abf143b347762497
android/exponentview/src/main/java/host/exp/exponent/network/ExponentNetwork.java
keep keep keep keep replace keep keep keep keep keep
<mask> <mask> <mask> // Amplitude <mask> Analytics.resetAmplitudeDatabaseHelper(); <mask> Amplitude.getInstance().initialize(context, BuildConfig.DEBUG ? ExponentKeys.AMPLITUDE_DEV_KEY : ExponentKeys.AMPLITUDE_KEY); <mask> if (application != null) { <mask> Amplitude.getInstance().enableForegroundTracking(application); <mask> } <mask> try { <mask> JSONObject amplitudeUserProperties = new JSONObject(); </s> Fixing imagepicker crash on android 7 fbshipit-source-id: 40baba9 </s> remove String uri = Uri.fromFile(output).toString(); </s> add String uri = ExpFileUtils.uriFromFile(output).toString(); </s> remove String uri = Uri.fromFile(output).toString(); </s> add String uri = ExpFileUtils.uriFromFile(output).toString(); </s> remove String uri = Uri.fromFile(output).toString(); </s> add String uri = ExpFileUtils.uriFromFile(output).toString(); </s> remove String uri = Uri.fromFile(output).toString(); </s> add String uri = ExpFileUtils.uriFromFile(output).toString(); </s> remove if (!BuildConfig.DEBUG) { </s> add if (!ExponentViewBuildConfig.DEBUG) { </s> remove if (BuildConfig.DEBUG) { </s> add if (ExponentViewBuildConfig.DEBUG) {
https://github.com/expo/expo/commit/14782289579836bf99992736abf143b347762497
android/exponentview/src/main/java/host/exp/exponentview/Exponent.java
keep keep keep keep replace keep keep keep keep keep
<mask> <mask> FacebookSdk.sdkInitialize(context); <mask> <mask> <mask> if (BuildConfig.DEBUG) { <mask> Stetho.initializeWithDefaults(context); <mask> } <mask> <mask> ImageLoader.getInstance().init(new ImageLoaderConfiguration.Builder(context).build()); <mask> } </s> Fixing imagepicker crash on android 7 fbshipit-source-id: 40baba9 </s> remove handleError(mContext.getString(R.string.error_unable_to_load_kernel)); </s> add handleError("Exponent requires an internet connection."); </s> remove if (BuildConfig.DEBUG) { </s> add if (ExponentViewBuildConfig.DEBUG) { </s> remove if (BuildConfig.DEBUG) { </s> add if (ExponentViewBuildConfig.DEBUG) { </s> remove if (BuildConfig.DEBUG) { handleError(e.getMessage()); </s> add if (ExponentViewBuildConfig.DEBUG) { handleError("Can't load kernel. Are you sure your packager is running and your phone is on the same wifi? " + e.getMessage()); </s> remove if (!BuildConfig.DEBUG) { </s> add if (!ExponentViewBuildConfig.DEBUG) { </s> remove result.putString("uri", Uri.fromFile(file).toString()); </s> add result.putString("uri", ExpFileUtils.uriFromFile(file).toString());
https://github.com/expo/expo/commit/14782289579836bf99992736abf143b347762497
android/exponentview/src/main/java/host/exp/exponentview/Exponent.java
keep keep keep keep replace keep keep keep keep keep
<mask> <mask> <mask> <mask> public static void logException(Throwable throwable) { <mask> if (!BuildConfig.DEBUG) { <mask> try { <mask> Crashlytics.logException(throwable); <mask> } catch (Throwable e) { <mask> Log.e(TAG, e.toString()); <mask> } </s> Fixing imagepicker crash on android 7 fbshipit-source-id: 40baba9 </s> remove if (BuildConfig.DEBUG) { handleError(e.getMessage()); </s> add if (ExponentViewBuildConfig.DEBUG) { handleError("Can't load kernel. Are you sure your packager is running and your phone is on the same wifi? " + e.getMessage()); </s> remove result.putString("uri", Uri.fromFile(file).toString()); </s> add result.putString("uri", ExpFileUtils.uriFromFile(file).toString()); </s> remove result.putString("uri", Uri.fromFile(file).toString()); </s> add result.putString("uri", ExpFileUtils.uriFromFile(file).toString()); </s> remove result.putString("uri", Uri.fromFile(file).toString()); </s> add result.putString("uri", ExpFileUtils.uriFromFile(file).toString()); </s> remove result.putString("uri", Uri.fromFile(file).toString()); </s> add result.putString("uri", ExpFileUtils.uriFromFile(file).toString()); </s> remove result.putString("uri", Uri.fromFile(file).toString()); </s> add result.putString("uri", ExpFileUtils.uriFromFile(file).toString());
https://github.com/expo/expo/commit/14782289579836bf99992736abf143b347762497
android/exponentview/src/main/java/host/exp/exponentview/Exponent.java
keep keep add keep
<mask> <mask> public static boolean USE_INTERNET_KERNEL = true; <mask> <mask> } </s> Fixing imagepicker crash on android 7 fbshipit-source-id: 40baba9 </s> add import host.exp.exponentview.ExponentViewBuildConfig; </s> add ExponentViewBuildConfig.DEBUG = BuildConfig.DEBUG; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils;
https://github.com/expo/expo/commit/14782289579836bf99992736abf143b347762497
android/exponentview/src/main/java/host/exp/exponentview/ExponentViewBuildConfig.java
keep keep add keep keep keep keep
<mask> import host.exp.exponent.kernel.KernelConstants; <mask> import host.exp.exponentview.BuildConfig; <mask> import host.exp.exponent.Constants; <mask> <mask> public class FabricModule extends ReactContextBaseJavaModule { <mask> boolean mInScope = false; <mask> </s> Fixing imagepicker crash on android 7 fbshipit-source-id: 40baba9 </s> add public static boolean DEBUG = false; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils;
https://github.com/expo/expo/commit/14782289579836bf99992736abf143b347762497
android/exponentview/src/main/java/versioned/host/exp/exponent/modules/api/FabricModule.java
keep keep keep keep replace keep keep keep keep keep
<mask> if (!mInScope) { <mask> promise.reject(new IllegalStateException("Not in a standalone app!")); <mask> return; <mask> } <mask> if (BuildConfig.DEBUG) { <mask> promise.resolve(Arguments.createMap()); <mask> return; <mask> } <mask> <mask> CustomEvent event = new CustomEvent(eventName); </s> Fixing imagepicker crash on android 7 fbshipit-source-id: 40baba9 </s> remove if (BuildConfig.DEBUG) { </s> add if (ExponentViewBuildConfig.DEBUG) { </s> remove cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(imageFile)); mCameraCaptureURI = Uri.fromFile(imageFile); </s> add cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, ExpFileUtils.uriFromFile(imageFile)); mCameraCaptureURI = ExpFileUtils.uriFromFile(imageFile); </s> remove cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(imageFile)); mCameraCaptureURI = Uri.fromFile(imageFile); </s> add cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, ExpFileUtils.uriFromFile(imageFile)); mCameraCaptureURI = ExpFileUtils.uriFromFile(imageFile); </s> remove cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(imageFile)); mCameraCaptureURI = Uri.fromFile(imageFile); </s> add cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, ExpFileUtils.uriFromFile(imageFile)); mCameraCaptureURI = ExpFileUtils.uriFromFile(imageFile); </s> remove cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(imageFile)); mCameraCaptureURI = Uri.fromFile(imageFile); </s> add cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, ExpFileUtils.uriFromFile(imageFile)); mCameraCaptureURI = ExpFileUtils.uriFromFile(imageFile); </s> remove cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(imageFile)); mCameraCaptureURI = Uri.fromFile(imageFile); </s> add cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, ExpFileUtils.uriFromFile(imageFile)); mCameraCaptureURI = ExpFileUtils.uriFromFile(imageFile);
https://github.com/expo/expo/commit/14782289579836bf99992736abf143b347762497
android/exponentview/src/main/java/versioned/host/exp/exponent/modules/api/FabricModule.java
keep add keep keep keep keep
<mask> import host.exp.exponent.analytics.EXL; <mask> import host.exp.exponent.kernel.KernelProvider; <mask> import okhttp3.Call; <mask> import okhttp3.Callback; <mask> import okhttp3.OkHttpClient; <mask> import okhttp3.Request; </s> Fixing imagepicker crash on android 7 fbshipit-source-id: 40baba9 </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponentview.ExponentViewBuildConfig;
https://github.com/expo/expo/commit/14782289579836bf99992736abf143b347762497
android/exponentview/src/main/java/versioned/host/exp/exponent/modules/api/FileSystemModule.java
keep keep keep keep replace keep keep keep keep keep
<mask> WritableMap result = Arguments.createMap(); <mask> if (file.exists()) { <mask> result.putBoolean("exists", true); <mask> result.putBoolean("isDirectory", file.isDirectory()); <mask> result.putString("uri", Uri.fromFile(file).toString()); <mask> if (options.hasKey("md5") && options.getBoolean("md5")) { <mask> result.putString("md5", md5(file)); <mask> } <mask> promise.resolve(result); <mask> } else { </s> Fixing imagepicker crash on android 7 fbshipit-source-id: 40baba9
https://github.com/expo/expo/commit/14782289579836bf99992736abf143b347762497
android/exponentview/src/main/java/versioned/host/exp/exponent/modules/api/FileSystemModule.java
keep keep keep keep replace keep keep keep keep keep
<mask> sink.writeAll(response.body().source()); <mask> sink.close(); <mask> <mask> WritableMap result = Arguments.createMap(); <mask> result.putString("uri", Uri.fromFile(file).toString()); <mask> if (options.hasKey("md5") && options.getBoolean("md5")) { <mask> result.putString("md5", md5(file)); <mask> } <mask> promise.resolve(result); <mask> } catch (Exception e) { </s> Fixing imagepicker crash on android 7 fbshipit-source-id: 40baba9
https://github.com/expo/expo/commit/14782289579836bf99992736abf143b347762497
android/exponentview/src/main/java/versioned/host/exp/exponent/modules/api/FileSystemModule.java
keep keep keep add keep keep keep keep keep keep
<mask> import com.nostra13.universalimageloader.core.ImageLoader; <mask> import com.theartofdev.edmodo.cropper.CropImage; <mask> <mask> import host.exp.exponent.ActivityResultListener; <mask> import host.exp.exponentview.Exponent; <mask> <mask> public class ImagePickerModule extends ReactContextBaseJavaModule implements ActivityResultListener { <mask> static final int REQUEST_LAUNCH_CAMERA = 1; <mask> static final int REQUEST_LAUNCH_IMAGE_LIBRARY = 2; <mask> </s> Fixing imagepicker crash on android 7 fbshipit-source-id: 40baba9
https://github.com/expo/expo/commit/14782289579836bf99992736abf143b347762497
android/exponentview/src/main/java/versioned/host/exp/exponent/modules/api/ImagePickerModule.java
keep keep keep keep replace replace keep keep keep keep keep
<mask> if (imageFile == null) { <mask> promise.reject(new IOException("Could not create temporary image file.")); <mask> return; <mask> } <mask> cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(imageFile)); <mask> mCameraCaptureURI = Uri.fromFile(imageFile); <mask> mPromise = promise; <mask> Exponent.getInstance().getCurrentActivity().startActivityForResult(cameraIntent, REQUEST_LAUNCH_CAMERA); <mask> } <mask> <mask> // NOTE: Currently not reentrant / doesn't support concurrent requests </s> Fixing imagepicker crash on android 7 fbshipit-source-id: 40baba9
https://github.com/expo/expo/commit/14782289579836bf99992736abf143b347762497
android/exponentview/src/main/java/versioned/host/exp/exponent/modules/api/ImagePickerModule.java
keep keep keep keep replace keep keep keep keep keep
<mask> } <mask> String path = writeImage(bmp); <mask> <mask> WritableMap response = Arguments.createMap(); <mask> response.putString("uri", Uri.fromFile(new File(path)).toString()); <mask> response.putInt("width", bmp.getWidth()); <mask> response.putInt("height", bmp.getHeight()); <mask> response.putBoolean("cancelled", false); <mask> promise.resolve(response); <mask> } </s> Fixing imagepicker crash on android 7 fbshipit-source-id: 40baba9
https://github.com/expo/expo/commit/14782289579836bf99992736abf143b347762497
android/exponentview/src/main/java/versioned/host/exp/exponent/modules/api/ImagePickerModule.java
keep keep keep add keep keep keep keep
<mask> import java.io.FileOutputStream; <mask> import java.io.IOException; <mask> import java.io.OutputStream; <mask> <mask> /** <mask> * Snapshot utility class allow to screenshot a view. <mask> */ <mask> public class ViewShot implements UIBlock { </s> Fixing imagepicker crash on android 7 fbshipit-source-id: 40baba9 </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils; </s> add import host.exp.exponent.utils.ExpFileUtils;
https://github.com/expo/expo/commit/14782289579836bf99992736abf143b347762497
android/exponentview/src/main/java/versioned/host/exp/exponent/modules/api/ViewShot.java
keep keep keep keep replace keep keep keep keep keep
<mask> try { <mask> if ("file".equals(result)) { <mask> os = new FileOutputStream(output); <mask> captureView(view, os); <mask> String uri = Uri.fromFile(output).toString(); <mask> promise.resolve(uri); <mask> } <mask> else if ("base64".equals(result)) { <mask> os = new ByteArrayOutputStream(); <mask> captureView(view, os); </s> Fixing imagepicker crash on android 7 fbshipit-source-id: 40baba9
https://github.com/expo/expo/commit/14782289579836bf99992736abf143b347762497
android/exponentview/src/main/java/versioned/host/exp/exponent/modules/api/ViewShot.java
keep keep keep keep replace keep keep
<mask> <string name="app_name">Exponent</string> <mask> <string name="dev_activity_name">Exponent Dev</string> <mask> <string name="preference_file_key">host.exp.exponent.SharedPreferences</string> <mask> <string name="error_default">Something went wrong. Sorry about that.</string> <mask> <string name="error_unable_to_load_kernel">Exponent requires an internet connection.</string> <mask> <string name="error_unable_to_load_experience">Unable to load Experience.</string> <mask> </resources> </s> Fixing imagepicker crash on android 7 fbshipit-source-id: 40baba9
https://github.com/expo/expo/commit/14782289579836bf99992736abf143b347762497
android/exponentview/src/main/res/values/strings.xml
keep keep keep keep replace keep keep keep keep keep
<mask> EX_EXPORT_SCOPED_MODULE(RCTLinkingManager, KernelLinkingManager); <mask> <mask> - (instancetype)initWithExperienceId:(NSString *)experienceId kernelServiceDelegate:(id)kernelServiceInstance params:(NSDictionary *)params <mask> { <mask> if (self = [super initWithExperienceId:experienceId kernelServiceDelegate:kernelServiceInstance params:params]) { <mask> _kernelLinkingDelegate = kernelServiceInstance; <mask> _initialUrl = params[@"initialUri"]; <mask> if (_initialUrl == [NSNull null]) { <mask> _initialUrl = nil; <mask> } </s> [ios] Use stable manifest ID where applicable (#13280) </s> remove + (BOOL)shouldNotificationRequest:(UNNotificationRequest *)request beHandledByExperience:(NSString *)experienceId </s> add + (BOOL)shouldNotificationRequest:(UNNotificationRequest *)request beHandledByExperience:(NSString *)scopeKey </s> remove forExperienceId:experienceId </s> add forScopeKey:scopeKey
https://github.com/expo/expo/commit/167fd314739391b1d5afe60acbd28aef66497a9e
ios/Exponent/Versioned/Core/Internal/EXLinkingManager.m
keep keep keep keep replace keep keep keep keep keep
<mask> #import "EXScopedNotificationsUtils.h" <mask> <mask> @implementation EXScopedNotificationsUtils <mask> <mask> + (BOOL)shouldNotificationRequest:(UNNotificationRequest *)request beHandledByExperience:(NSString *)experienceId <mask> { <mask> NSString *notificationExperienceId = request.content.userInfo[@"experienceId"]; <mask> if (!notificationExperienceId) { <mask> return true; <mask> } </s> [ios] Use stable manifest ID where applicable (#13280) </s> remove if (self = [super initWithExperienceId:experienceId kernelServiceDelegate:kernelServiceInstance params:params]) { </s> add if (self = [super initWithExperienceStableLegacyId:experienceStableLegacyId scopeKey:scopeKey kernelServiceDelegate:kernelServiceInstance params:params]) { </s> remove forExperienceId:experienceId </s> add forScopeKey:scopeKey
https://github.com/expo/expo/commit/167fd314739391b1d5afe60acbd28aef66497a9e
ios/Exponent/Versioned/Core/UniversalModules/EXNotifications/EXScopedNotificationsUtils.m
keep keep keep keep replace keep keep keep keep keep
<mask> kABI41_0_0RCTDevSettingHotLoadingEnabled: @YES, <mask> kABI41_0_0RCTDevSettingLiveReloadEnabled: @NO, <mask> }; <mask> ABI41_0_0EXDevSettingsDataSource *dataSource = [[ABI41_0_0EXDevSettingsDataSource alloc] initWithDefaultValues:defaultValues <mask> forExperienceId:experienceId <mask> isDevelopment:isDevelopment]; <mask> return [super initWithDataSource:dataSource]; <mask> } <mask> <mask> - (NSArray<NSString *> *)supportedEvents </s> [ios] Use stable manifest ID where applicable (#13280) </s> remove if (self = [super initWithExperienceId:experienceId kernelServiceDelegate:kernelServiceInstance params:params]) { </s> add if (self = [super initWithExperienceStableLegacyId:experienceStableLegacyId scopeKey:scopeKey kernelServiceDelegate:kernelServiceInstance params:params]) { </s> remove + (BOOL)shouldNotificationRequest:(UNNotificationRequest *)request beHandledByExperience:(NSString *)experienceId </s> add + (BOOL)shouldNotificationRequest:(UNNotificationRequest *)request beHandledByExperience:(NSString *)scopeKey
https://github.com/expo/expo/commit/167fd314739391b1d5afe60acbd28aef66497a9e
ios/versioned-react-native/ABI41_0_0/Expo/ExpoKit/Core/Internal/DevSupport/ABI41_0_0EXDevSettings.m
keep keep keep keep replace keep replace keep keep keep
<mask> import expo.modules.updates.db.Reaper; <mask> import expo.modules.updates.db.UpdatesDatabase; <mask> import expo.modules.updates.db.entity.AssetEntity; <mask> import expo.modules.updates.db.entity.UpdateEntity; <mask> import expo.modules.updates.launcher.EmergencyLauncher; <mask> import expo.modules.updates.launcher.Launcher; <mask> import expo.modules.updates.launcher.LauncherWithSelectionPolicy; <mask> import expo.modules.updates.launcher.SelectionPolicy; <mask> import expo.modules.updates.launcher.SelectionPolicyNewest; <mask> import expo.modules.updates.loader.EmbeddedLoader; </s> [expo-updates] add easy setting to enable/disable updates (#7358) </s> remove import expo.modules.updates.launcher.EmergencyLauncher; </s> add import expo.modules.updates.launcher.NoDatabaseLauncher; </s> remove LauncherWithSelectionPolicy launcher = new LauncherWithSelectionPolicy(mUpdatesDirectory, mSelectionPolicy); </s> add DatabaseLauncher launcher = new DatabaseLauncher(mUpdatesDirectory, mSelectionPolicy); </s> add private boolean mIsEmergencyLaunch = false; </s> remove return mLauncher != null && mLauncher instanceof EmergencyLauncher; </s> add return mIsEmergencyLaunch; </s> add if (!mUpdatesConfiguration.isEnabled()) { mLauncher = new NoDatabaseLauncher(context); }
https://github.com/expo/expo/commit/196e5da9c8f6c19a67632bac4aedf8a7a275ea32
packages/expo-updates/android/src/main/java/expo/modules/updates/UpdatesController.java
keep keep keep add keep keep keep keep keep keep
<mask> // launch conditions <mask> private boolean mIsReadyToLaunch = false; <mask> private boolean mTimeoutFinished = false; <mask> private boolean mHasLaunched = false; <mask> private HandlerThread mHandlerThread; <mask> <mask> private UpdatesController(Context context, UpdatesConfiguration updatesConfiguration) { <mask> mUpdatesConfiguration = updatesConfiguration; <mask> mDatabaseHolder = new DatabaseHolder(UpdatesDatabase.getInstance(context)); <mask> mSelectionPolicy = new SelectionPolicyNewest(UpdatesUtils.getRuntimeVersion(updatesConfiguration)); </s> [expo-updates] add easy setting to enable/disable updates (#7358) </s> remove LauncherWithSelectionPolicy launcher = new LauncherWithSelectionPolicy(mUpdatesDirectory, mSelectionPolicy); </s> add DatabaseLauncher launcher = new DatabaseLauncher(mUpdatesDirectory, mSelectionPolicy); </s> remove mLauncher = new EmergencyLauncher(context, mUpdatesDirectoryException); </s> add mLauncher = new NoDatabaseLauncher(context, mUpdatesDirectoryException); mIsEmergencyLaunch = true; } if (mLauncher != null) { </s> add if (mUpdatesConfiguration.getUpdateUrl() == null) { throw new AssertionError("expo-updates is enabled, but no valid updateUrl is configured. Please set a valid URL in AndroidManifest.xml or when initializing UpdatesController."); } </s> remove final LauncherWithSelectionPolicy newLauncher = new LauncherWithSelectionPolicy(mUpdatesDirectory, mSelectionPolicy); </s> add final DatabaseLauncher newLauncher = new DatabaseLauncher(mUpdatesDirectory, mSelectionPolicy); </s> remove String previousFatalError = EmergencyLauncher.consumeErrorLog(context); </s> add String previousFatalError = NoDatabaseLauncher.consumeErrorLog(context); </s> remove final LauncherWithSelectionPolicy newLauncher = new LauncherWithSelectionPolicy(mUpdatesDirectory, mSelectionPolicy); </s> add final DatabaseLauncher newLauncher = new DatabaseLauncher(mUpdatesDirectory, mSelectionPolicy);
https://github.com/expo/expo/commit/196e5da9c8f6c19a67632bac4aedf8a7a275ea32
packages/expo-updates/android/src/main/java/expo/modules/updates/UpdatesController.java
keep keep keep keep replace keep keep keep keep keep
<mask> return mSelectionPolicy; <mask> } <mask> <mask> public boolean isEmergencyLaunch() { <mask> return mLauncher != null && mLauncher instanceof EmergencyLauncher; <mask> } <mask> <mask> /** <mask> * Starts the update process to launch a previously-loaded update and (if configured to do so) <mask> * check for a new update from the server. This method should be called as early as possible in </s> [expo-updates] add easy setting to enable/disable updates (#7358) </s> remove mLauncher = new EmergencyLauncher(context, mUpdatesDirectoryException); </s> add mLauncher = new NoDatabaseLauncher(context, mUpdatesDirectoryException); mIsEmergencyLaunch = true; } if (mLauncher != null) { </s> add if (!mUpdatesConfiguration.isEnabled()) { mLauncher = new NoDatabaseLauncher(context); } </s> remove String previousFatalError = EmergencyLauncher.consumeErrorLog(context); </s> add String previousFatalError = NoDatabaseLauncher.consumeErrorLog(context); </s> add if (mUpdatesConfiguration.getUpdateUrl() == null) { throw new AssertionError("expo-updates is enabled, but no valid updateUrl is configured. Please set a valid URL in AndroidManifest.xml or when initializing UpdatesController."); } </s> remove mLauncher = new EmergencyLauncher(context, e); </s> add mLauncher = new NoDatabaseLauncher(context, e); mIsEmergencyLaunch = true; </s> add if (!controller.getUpdatesConfiguration().isEnabled()) { promise.reject("ERR_UPDATES_DISABLED", "You cannot check for updates when expo-updates is not enabled."); return; }
https://github.com/expo/expo/commit/196e5da9c8f6c19a67632bac4aedf8a7a275ea32
packages/expo-updates/android/src/main/java/expo/modules/updates/UpdatesController.java
keep keep add keep keep keep keep
<mask> * @param context the base context of the application, ideally a {@link ReactApplication} <mask> */ <mask> public synchronized void start(final Context context) { <mask> if (mUpdatesDirectory == null) { <mask> mLauncher = new NoDatabaseLauncher(context, mUpdatesDirectoryException); <mask> mIsEmergencyLaunch = true; <mask> } </s> [expo-updates] add easy setting to enable/disable updates (#7358) </s> remove mLauncher = new EmergencyLauncher(context, mUpdatesDirectoryException); </s> add mLauncher = new NoDatabaseLauncher(context, mUpdatesDirectoryException); mIsEmergencyLaunch = true; } if (mLauncher != null) { </s> remove mLauncher = new EmergencyLauncher(context, e); </s> add mLauncher = new NoDatabaseLauncher(context, e); mIsEmergencyLaunch = true; </s> remove return mLauncher != null && mLauncher instanceof EmergencyLauncher; </s> add return mIsEmergencyLaunch; </s> remove String previousFatalError = EmergencyLauncher.consumeErrorLog(context); </s> add String previousFatalError = NoDatabaseLauncher.consumeErrorLog(context); </s> add if (mUpdatesConfiguration.getUpdateUrl() == null) { throw new AssertionError("expo-updates is enabled, but no valid updateUrl is configured. Please set a valid URL in AndroidManifest.xml or when initializing UpdatesController."); } </s> remove LauncherWithSelectionPolicy launcher = new LauncherWithSelectionPolicy(mUpdatesDirectory, mSelectionPolicy); </s> add DatabaseLauncher launcher = new DatabaseLauncher(mUpdatesDirectory, mSelectionPolicy);
https://github.com/expo/expo/commit/196e5da9c8f6c19a67632bac4aedf8a7a275ea32
packages/expo-updates/android/src/main/java/expo/modules/updates/UpdatesController.java
keep keep keep keep replace keep keep keep keep keep
<mask> * @param context the base context of the application, ideally a {@link ReactApplication} <mask> */ <mask> public synchronized void start(final Context context) { <mask> if (mUpdatesDirectory == null) { <mask> mLauncher = new EmergencyLauncher(context, mUpdatesDirectoryException); <mask> mIsReadyToLaunch = true; <mask> mTimeoutFinished = true; <mask> return; <mask> } <mask> </s> [expo-updates] add easy setting to enable/disable updates (#7358) </s> add if (!mUpdatesConfiguration.isEnabled()) { mLauncher = new NoDatabaseLauncher(context); } </s> remove mLauncher = new EmergencyLauncher(context, e); </s> add mLauncher = new NoDatabaseLauncher(context, e); mIsEmergencyLaunch = true; </s> remove LauncherWithSelectionPolicy launcher = new LauncherWithSelectionPolicy(mUpdatesDirectory, mSelectionPolicy); </s> add DatabaseLauncher launcher = new DatabaseLauncher(mUpdatesDirectory, mSelectionPolicy); </s> remove String previousFatalError = EmergencyLauncher.consumeErrorLog(context); </s> add String previousFatalError = NoDatabaseLauncher.consumeErrorLog(context); </s> remove return mLauncher != null && mLauncher instanceof EmergencyLauncher; </s> add return mIsEmergencyLaunch; </s> add if (mUpdatesConfiguration.getUpdateUrl() == null) { throw new AssertionError("expo-updates is enabled, but no valid updateUrl is configured. Please set a valid URL in AndroidManifest.xml or when initializing UpdatesController."); }
https://github.com/expo/expo/commit/196e5da9c8f6c19a67632bac4aedf8a7a275ea32
packages/expo-updates/android/src/main/java/expo/modules/updates/UpdatesController.java
keep add keep keep keep keep keep
<mask> } <mask> <mask> boolean shouldCheckForUpdate = UpdatesUtils.shouldCheckForUpdateOnLaunch(mUpdatesConfiguration, context); <mask> int delay = getUpdatesConfiguration().getLaunchWaitMs(); <mask> if (delay > 0 && shouldCheckForUpdate) { <mask> mHandlerThread.start(); <mask> new Handler(mHandlerThread.getLooper()).postDelayed(this::finishTimeout, delay); </s> [expo-updates] add easy setting to enable/disable updates (#7358) </s> add private boolean mIsEmergencyLaunch = false; </s> remove LauncherWithSelectionPolicy launcher = new LauncherWithSelectionPolicy(mUpdatesDirectory, mSelectionPolicy); </s> add DatabaseLauncher launcher = new DatabaseLauncher(mUpdatesDirectory, mSelectionPolicy); </s> remove return mLauncher != null && mLauncher instanceof EmergencyLauncher; </s> add return mIsEmergencyLaunch; </s> remove mLauncher = new EmergencyLauncher(context, e); </s> add mLauncher = new NoDatabaseLauncher(context, e); mIsEmergencyLaunch = true; </s> remove mLauncher = new EmergencyLauncher(context, mUpdatesDirectoryException); </s> add mLauncher = new NoDatabaseLauncher(context, mUpdatesDirectoryException); mIsEmergencyLaunch = true; } if (mLauncher != null) { </s> add if (!mUpdatesConfiguration.isEnabled()) { mLauncher = new NoDatabaseLauncher(context); }
https://github.com/expo/expo/commit/196e5da9c8f6c19a67632bac4aedf8a7a275ea32
packages/expo-updates/android/src/main/java/expo/modules/updates/UpdatesController.java
keep keep keep keep replace keep keep keep keep keep
<mask> mTimeoutFinished = true; <mask> } <mask> <mask> UpdatesDatabase database = getDatabase(); <mask> LauncherWithSelectionPolicy launcher = new LauncherWithSelectionPolicy(mUpdatesDirectory, mSelectionPolicy); <mask> mLauncher = launcher; <mask> if (mSelectionPolicy.shouldLoadNewUpdate(EmbeddedLoader.readEmbeddedManifest(context).getUpdateEntity(), launcher.getLaunchableUpdate(database))) { <mask> new EmbeddedLoader(context, database, mUpdatesDirectory).loadEmbeddedUpdate(); <mask> } <mask> launcher.launch(database, context, new Launcher.LauncherCallback() { </s> [expo-updates] add easy setting to enable/disable updates (#7358) </s> remove final LauncherWithSelectionPolicy newLauncher = new LauncherWithSelectionPolicy(mUpdatesDirectory, mSelectionPolicy); </s> add final DatabaseLauncher newLauncher = new DatabaseLauncher(mUpdatesDirectory, mSelectionPolicy); </s> remove final LauncherWithSelectionPolicy newLauncher = new LauncherWithSelectionPolicy(mUpdatesDirectory, mSelectionPolicy); </s> add final DatabaseLauncher newLauncher = new DatabaseLauncher(mUpdatesDirectory, mSelectionPolicy); </s> remove mLauncher = new EmergencyLauncher(context, mUpdatesDirectoryException); </s> add mLauncher = new NoDatabaseLauncher(context, mUpdatesDirectoryException); mIsEmergencyLaunch = true; } if (mLauncher != null) { </s> add if (!controller.getUpdatesConfiguration().isEnabled()) { promise.reject("ERR_UPDATES_DISABLED", "You cannot fetch updates when expo-updates is not enabled."); return; } </s> remove mLauncher = new EmergencyLauncher(context, e); </s> add mLauncher = new NoDatabaseLauncher(context, e); mIsEmergencyLaunch = true; </s> add if (!mUpdatesConfiguration.isEnabled()) { mLauncher = new NoDatabaseLauncher(context); }
https://github.com/expo/expo/commit/196e5da9c8f6c19a67632bac4aedf8a7a275ea32
packages/expo-updates/android/src/main/java/expo/modules/updates/UpdatesController.java
keep keep keep keep replace keep keep keep keep keep
<mask> } <mask> <mask> @Override <mask> public void onFailure(Exception e) { <mask> mLauncher = new EmergencyLauncher(context, e); <mask> finish(); <mask> } <mask> <mask> @Override <mask> public void onSuccess() { </s> [expo-updates] add easy setting to enable/disable updates (#7358) </s> remove UpdatesController.getInstance().relaunchReactApplication(getContext(), new Launcher.LauncherCallback() { </s> add UpdatesController controller = UpdatesController.getInstance(); if (!controller.getUpdatesConfiguration().isEnabled()) { promise.reject("ERR_UPDATES_DISABLED", "You cannot reload when expo-updates is not enabled."); return; } controller.relaunchReactApplication(getContext(), new Launcher.LauncherCallback() { </s> remove final LauncherWithSelectionPolicy newLauncher = new LauncherWithSelectionPolicy(mUpdatesDirectory, mSelectionPolicy); </s> add final DatabaseLauncher newLauncher = new DatabaseLauncher(mUpdatesDirectory, mSelectionPolicy); </s> add if (!controller.getUpdatesConfiguration().isEnabled()) { promise.reject("ERR_UPDATES_DISABLED", "You cannot check for updates when expo-updates is not enabled."); return; } </s> remove final LauncherWithSelectionPolicy newLauncher = new LauncherWithSelectionPolicy(mUpdatesDirectory, mSelectionPolicy); </s> add final DatabaseLauncher newLauncher = new DatabaseLauncher(mUpdatesDirectory, mSelectionPolicy); </s> remove mLauncher = new EmergencyLauncher(context, mUpdatesDirectoryException); </s> add mLauncher = new NoDatabaseLauncher(context, mUpdatesDirectoryException); mIsEmergencyLaunch = true; } if (mLauncher != null) { </s> add if (!mUpdatesConfiguration.isEnabled()) { mLauncher = new NoDatabaseLauncher(context); }
https://github.com/expo/expo/commit/196e5da9c8f6c19a67632bac4aedf8a7a275ea32
packages/expo-updates/android/src/main/java/expo/modules/updates/UpdatesController.java
keep keep keep keep replace keep keep keep keep keep
<mask> } <mask> <mask> @Override <mask> public void onSuccess(@Nullable UpdateEntity update) { <mask> final LauncherWithSelectionPolicy newLauncher = new LauncherWithSelectionPolicy(mUpdatesDirectory, mSelectionPolicy); <mask> newLauncher.launch(database, context, new Launcher.LauncherCallback() { <mask> @Override <mask> public void onFailure(Exception e) { <mask> releaseDatabase(); <mask> finishTimeout(); </s> [expo-updates] add easy setting to enable/disable updates (#7358) </s> remove final LauncherWithSelectionPolicy newLauncher = new LauncherWithSelectionPolicy(mUpdatesDirectory, mSelectionPolicy); </s> add final DatabaseLauncher newLauncher = new DatabaseLauncher(mUpdatesDirectory, mSelectionPolicy); </s> remove LauncherWithSelectionPolicy launcher = new LauncherWithSelectionPolicy(mUpdatesDirectory, mSelectionPolicy); </s> add DatabaseLauncher launcher = new DatabaseLauncher(mUpdatesDirectory, mSelectionPolicy); </s> remove mLauncher = new EmergencyLauncher(context, e); </s> add mLauncher = new NoDatabaseLauncher(context, e); mIsEmergencyLaunch = true; </s> remove UpdatesController.getInstance().relaunchReactApplication(getContext(), new Launcher.LauncherCallback() { </s> add UpdatesController controller = UpdatesController.getInstance(); if (!controller.getUpdatesConfiguration().isEnabled()) { promise.reject("ERR_UPDATES_DISABLED", "You cannot reload when expo-updates is not enabled."); return; } controller.relaunchReactApplication(getContext(), new Launcher.LauncherCallback() { </s> add if (!controller.getUpdatesConfiguration().isEnabled()) { promise.reject("ERR_UPDATES_DISABLED", "You cannot check for updates when expo-updates is not enabled."); return; } </s> add if (!mUpdatesConfiguration.isEnabled()) { mLauncher = new NoDatabaseLauncher(context); }
https://github.com/expo/expo/commit/196e5da9c8f6c19a67632bac4aedf8a7a275ea32
packages/expo-updates/android/src/main/java/expo/modules/updates/UpdatesController.java
keep keep keep keep replace keep keep keep keep keep
<mask> <mask> final String oldLaunchAssetFile = mLauncher.getLaunchAssetFile(); <mask> <mask> UpdatesDatabase database = getDatabase(); <mask> final LauncherWithSelectionPolicy newLauncher = new LauncherWithSelectionPolicy(mUpdatesDirectory, mSelectionPolicy); <mask> newLauncher.launch(database, context, new Launcher.LauncherCallback() { <mask> @Override <mask> public void onFailure(Exception e) { <mask> callback.onFailure(e); <mask> } </s> [expo-updates] add easy setting to enable/disable updates (#7358) </s> remove final LauncherWithSelectionPolicy newLauncher = new LauncherWithSelectionPolicy(mUpdatesDirectory, mSelectionPolicy); </s> add final DatabaseLauncher newLauncher = new DatabaseLauncher(mUpdatesDirectory, mSelectionPolicy); </s> remove LauncherWithSelectionPolicy launcher = new LauncherWithSelectionPolicy(mUpdatesDirectory, mSelectionPolicy); </s> add DatabaseLauncher launcher = new DatabaseLauncher(mUpdatesDirectory, mSelectionPolicy); </s> remove mLauncher = new EmergencyLauncher(context, e); </s> add mLauncher = new NoDatabaseLauncher(context, e); mIsEmergencyLaunch = true; </s> add if (!controller.getUpdatesConfiguration().isEnabled()) { promise.reject("ERR_UPDATES_DISABLED", "You cannot fetch updates when expo-updates is not enabled."); return; } </s> remove UpdatesController.getInstance().relaunchReactApplication(getContext(), new Launcher.LauncherCallback() { </s> add UpdatesController controller = UpdatesController.getInstance(); if (!controller.getUpdatesConfiguration().isEnabled()) { promise.reject("ERR_UPDATES_DISABLED", "You cannot reload when expo-updates is not enabled."); return; } controller.relaunchReactApplication(getContext(), new Launcher.LauncherCallback() { </s> add if (!controller.getUpdatesConfiguration().isEnabled()) { promise.reject("ERR_UPDATES_DISABLED", "You cannot check for updates when expo-updates is not enabled."); return; }
https://github.com/expo/expo/commit/196e5da9c8f6c19a67632bac4aedf8a7a275ea32
packages/expo-updates/android/src/main/java/expo/modules/updates/UpdatesController.java
keep keep keep keep replace keep keep keep keep keep
<mask> <mask> @ExpoMethod <mask> public void reload(final Promise promise) { <mask> try { <mask> UpdatesController.getInstance().relaunchReactApplication(getContext(), new Launcher.LauncherCallback() { <mask> @Override <mask> public void onFailure(Exception e) { <mask> Log.e(TAG, "Failed to relaunch application", e); <mask> promise.reject("ERR_UPDATES_RELOAD", e.getMessage(), e); <mask> } </s> [expo-updates] add easy setting to enable/disable updates (#7358) </s> add if (!controller.getUpdatesConfiguration().isEnabled()) { promise.reject("ERR_UPDATES_DISABLED", "You cannot check for updates when expo-updates is not enabled."); return; } </s> remove mLauncher = new EmergencyLauncher(context, e); </s> add mLauncher = new NoDatabaseLauncher(context, e); mIsEmergencyLaunch = true; </s> remove final LauncherWithSelectionPolicy newLauncher = new LauncherWithSelectionPolicy(mUpdatesDirectory, mSelectionPolicy); </s> add final DatabaseLauncher newLauncher = new DatabaseLauncher(mUpdatesDirectory, mSelectionPolicy); </s> remove final LauncherWithSelectionPolicy newLauncher = new LauncherWithSelectionPolicy(mUpdatesDirectory, mSelectionPolicy); </s> add final DatabaseLauncher newLauncher = new DatabaseLauncher(mUpdatesDirectory, mSelectionPolicy); </s> add if (!controller.getUpdatesConfiguration().isEnabled()) { promise.reject("ERR_UPDATES_DISABLED", "You cannot fetch updates when expo-updates is not enabled."); return; } </s> add if (!mUpdatesConfiguration.isEnabled()) { mLauncher = new NoDatabaseLauncher(context); }
https://github.com/expo/expo/commit/196e5da9c8f6c19a67632bac4aedf8a7a275ea32
packages/expo-updates/android/src/main/java/expo/modules/updates/UpdatesModule.java
keep keep add keep keep keep keep keep keep
<mask> public void checkForUpdateAsync(final Promise promise) { <mask> try { <mask> final UpdatesController controller = UpdatesController.getInstance(); <mask> FileDownloader.downloadManifest(controller.getUpdateUrl(), getContext(), new FileDownloader.ManifestDownloadCallback() { <mask> @Override <mask> public void onFailure(String message, Exception e) { <mask> promise.reject("ERR_UPDATES_CHECK", message, e); <mask> Log.e(TAG, message, e); <mask> } </s> [expo-updates] add easy setting to enable/disable updates (#7358) </s> remove UpdatesController.getInstance().relaunchReactApplication(getContext(), new Launcher.LauncherCallback() { </s> add UpdatesController controller = UpdatesController.getInstance(); if (!controller.getUpdatesConfiguration().isEnabled()) { promise.reject("ERR_UPDATES_DISABLED", "You cannot reload when expo-updates is not enabled."); return; } controller.relaunchReactApplication(getContext(), new Launcher.LauncherCallback() { </s> remove mLauncher = new EmergencyLauncher(context, e); </s> add mLauncher = new NoDatabaseLauncher(context, e); mIsEmergencyLaunch = true; </s> add if (!controller.getUpdatesConfiguration().isEnabled()) { promise.reject("ERR_UPDATES_DISABLED", "You cannot fetch updates when expo-updates is not enabled."); return; } </s> remove final LauncherWithSelectionPolicy newLauncher = new LauncherWithSelectionPolicy(mUpdatesDirectory, mSelectionPolicy); </s> add final DatabaseLauncher newLauncher = new DatabaseLauncher(mUpdatesDirectory, mSelectionPolicy); </s> remove final LauncherWithSelectionPolicy newLauncher = new LauncherWithSelectionPolicy(mUpdatesDirectory, mSelectionPolicy); </s> add final DatabaseLauncher newLauncher = new DatabaseLauncher(mUpdatesDirectory, mSelectionPolicy); </s> add if (!mUpdatesConfiguration.isEnabled()) { mLauncher = new NoDatabaseLauncher(context); }
https://github.com/expo/expo/commit/196e5da9c8f6c19a67632bac4aedf8a7a275ea32
packages/expo-updates/android/src/main/java/expo/modules/updates/UpdatesModule.java
keep add keep keep keep keep
<mask> try { <mask> final UpdatesController controller = UpdatesController.getInstance(); <mask> <mask> AsyncTask.execute(() -> { <mask> UpdatesDatabase database = controller.getDatabase(); <mask> new RemoteLoader(getContext(), database, controller.getUpdatesDirectory()) </s> [expo-updates] add easy setting to enable/disable updates (#7358) </s> add if (!controller.getUpdatesConfiguration().isEnabled()) { promise.reject("ERR_UPDATES_DISABLED", "You cannot check for updates when expo-updates is not enabled."); return; } </s> remove LauncherWithSelectionPolicy launcher = new LauncherWithSelectionPolicy(mUpdatesDirectory, mSelectionPolicy); </s> add DatabaseLauncher launcher = new DatabaseLauncher(mUpdatesDirectory, mSelectionPolicy); </s> remove final LauncherWithSelectionPolicy newLauncher = new LauncherWithSelectionPolicy(mUpdatesDirectory, mSelectionPolicy); </s> add final DatabaseLauncher newLauncher = new DatabaseLauncher(mUpdatesDirectory, mSelectionPolicy); </s> remove UpdatesController.getInstance().relaunchReactApplication(getContext(), new Launcher.LauncherCallback() { </s> add UpdatesController controller = UpdatesController.getInstance(); if (!controller.getUpdatesConfiguration().isEnabled()) { promise.reject("ERR_UPDATES_DISABLED", "You cannot reload when expo-updates is not enabled."); return; } controller.relaunchReactApplication(getContext(), new Launcher.LauncherCallback() { </s> remove final LauncherWithSelectionPolicy newLauncher = new LauncherWithSelectionPolicy(mUpdatesDirectory, mSelectionPolicy); </s> add final DatabaseLauncher newLauncher = new DatabaseLauncher(mUpdatesDirectory, mSelectionPolicy); </s> remove mLauncher = new EmergencyLauncher(context, e); </s> add mLauncher = new NoDatabaseLauncher(context, e); mIsEmergencyLaunch = true;
https://github.com/expo/expo/commit/196e5da9c8f6c19a67632bac4aedf8a7a275ea32
packages/expo-updates/android/src/main/java/expo/modules/updates/UpdatesModule.java
keep keep keep keep replace keep keep keep keep keep
<mask> import java.util.Date; <mask> <mask> import expo.modules.updates.UpdatesController; <mask> import expo.modules.updates.db.entity.AssetEntity; <mask> import expo.modules.updates.launcher.EmergencyLauncher; <mask> import expo.modules.updates.manifest.Manifest; <mask> import expo.modules.updates.manifest.ManifestFactory; <mask> import okhttp3.CacheControl; <mask> import okhttp3.Call; <mask> import okhttp3.Callback; </s> [expo-updates] add easy setting to enable/disable updates (#7358) </s> remove import expo.modules.updates.launcher.LauncherWithSelectionPolicy; </s> add </s> remove import expo.modules.updates.launcher.EmergencyLauncher; </s> add import expo.modules.updates.launcher.DatabaseLauncher; import expo.modules.updates.launcher.NoDatabaseLauncher; </s> remove LauncherWithSelectionPolicy launcher = new LauncherWithSelectionPolicy(mUpdatesDirectory, mSelectionPolicy); </s> add DatabaseLauncher launcher = new DatabaseLauncher(mUpdatesDirectory, mSelectionPolicy); </s> add private boolean mIsEmergencyLaunch = false; </s> remove return mLauncher != null && mLauncher instanceof EmergencyLauncher; </s> add return mIsEmergencyLaunch; </s> add if (!mUpdatesConfiguration.isEnabled()) { mLauncher = new NoDatabaseLauncher(context); }
https://github.com/expo/expo/commit/196e5da9c8f6c19a67632bac4aedf8a7a275ea32
packages/expo-updates/android/src/main/java/expo/modules/updates/loader/FileDownloader.java
keep keep keep keep replace keep keep keep keep keep
<mask> <mask> String releaseChannel = UpdatesController.getInstance().getUpdatesConfiguration().getReleaseChannel(); <mask> requestBuilder = requestBuilder.header("Expo-Release-Channel", releaseChannel); <mask> <mask> String previousFatalError = EmergencyLauncher.consumeErrorLog(context); <mask> if (previousFatalError != null) { <mask> // some servers can have max length restrictions for headers, <mask> // so we restrict the length of the string to 1024 characters -- <mask> // this should satisfy the requirements of most servers <mask> requestBuilder = requestBuilder.header( </s> [expo-updates] add easy setting to enable/disable updates (#7358) </s> remove mLauncher = new EmergencyLauncher(context, mUpdatesDirectoryException); </s> add mLauncher = new NoDatabaseLauncher(context, mUpdatesDirectoryException); mIsEmergencyLaunch = true; } if (mLauncher != null) { </s> add if (!mUpdatesConfiguration.isEnabled()) { mLauncher = new NoDatabaseLauncher(context); } </s> remove return mLauncher != null && mLauncher instanceof EmergencyLauncher; </s> add return mIsEmergencyLaunch; </s> add private boolean mIsEmergencyLaunch = false; </s> remove final LauncherWithSelectionPolicy newLauncher = new LauncherWithSelectionPolicy(mUpdatesDirectory, mSelectionPolicy); </s> add final DatabaseLauncher newLauncher = new DatabaseLauncher(mUpdatesDirectory, mSelectionPolicy); </s> remove LauncherWithSelectionPolicy launcher = new LauncherWithSelectionPolicy(mUpdatesDirectory, mSelectionPolicy); </s> add DatabaseLauncher launcher = new DatabaseLauncher(mUpdatesDirectory, mSelectionPolicy);
https://github.com/expo/expo/commit/196e5da9c8f6c19a67632bac4aedf8a7a275ea32
packages/expo-updates/android/src/main/java/expo/modules/updates/loader/FileDownloader.java
keep keep keep keep replace keep keep keep keep keep
<mask> @property (nonatomic, readonly) EXUpdatesDatabase *database; <mask> @property (nonatomic, readonly) id<EXUpdatesSelectionPolicy> selectionPolicy; <mask> @property (nonatomic, readonly) NSURL *updatesDirectory; <mask> @property (nonatomic, readonly) dispatch_queue_t assetFilesQueue; <mask> @property (nonatomic, readonly, assign) BOOL isEnabled; <mask> @property (nonatomic, readonly, assign) BOOL isEmergencyLaunch; <mask> @property (nullable, nonatomic, readonly, strong) EXUpdatesUpdate *launchedUpdate; <mask> <mask> + (instancetype)sharedInstance; <mask> </s> [expo-updates] add easy setting to enable/disable updates (#7358) </s> add @property (nonatomic, readonly) BOOL isEnabled; </s> remove import expo.modules.updates.launcher.LauncherWithSelectionPolicy; </s> add </s> add private boolean mIsEmergencyLaunch = false; </s> remove return mLauncher != null && mLauncher instanceof EmergencyLauncher; </s> add return mIsEmergencyLaunch; </s> add if (!mUpdatesConfiguration.isEnabled()) { mLauncher = new NoDatabaseLauncher(context); } </s> remove mLauncher = new EmergencyLauncher(context, mUpdatesDirectoryException); </s> add mLauncher = new NoDatabaseLauncher(context, mUpdatesDirectoryException); mIsEmergencyLaunch = true; } if (mLauncher != null) {
https://github.com/expo/expo/commit/196e5da9c8f6c19a67632bac4aedf8a7a275ea32
packages/expo-updates/ios/EXUpdates/EXUpdatesAppController.h
keep keep keep add keep keep keep keep keep
<mask> }; <mask> <mask> @interface EXUpdatesConfig : NSObject <mask> <mask> @property (nonatomic, readonly) NSURL *updateUrl; <mask> @property (nonatomic, readonly) NSString *releaseChannel; <mask> @property (nonatomic, readonly) NSNumber *launchWaitMs; <mask> @property (nonatomic, readonly) EXUpdatesCheckAutomaticallyConfig checkOnLaunch; <mask> </s> [expo-updates] add easy setting to enable/disable updates (#7358) </s> remove @property (nonatomic, readonly, assign) BOOL isEnabled; </s> add </s> remove import expo.modules.updates.launcher.LauncherWithSelectionPolicy; </s> add </s> add private boolean mIsEmergencyLaunch = false; </s> remove return mLauncher != null && mLauncher instanceof EmergencyLauncher; </s> add return mIsEmergencyLaunch; </s> add if (!mUpdatesConfiguration.isEnabled()) { mLauncher = new NoDatabaseLauncher(context); } </s> remove mLauncher = new EmergencyLauncher(context, mUpdatesDirectoryException); </s> add mLauncher = new NoDatabaseLauncher(context, mUpdatesDirectoryException); mIsEmergencyLaunch = true; } if (mLauncher != null) {
https://github.com/expo/expo/commit/196e5da9c8f6c19a67632bac4aedf8a7a275ea32
packages/expo-updates/ios/EXUpdates/EXUpdatesConfig.h
keep keep keep add keep keep keep keep keep
<mask> }, <mask> "dependencies": { <mask> "@babel/runtime": "^7.5.5", <mask> "expo": "~42.0.0-alpha.0", <mask> "expo-splash-screen": "~0.11.0", <mask> "expo-status-bar": "~1.0.4", <mask> "expo-dev-client": "~0.4.7", <mask> "react": "17.0.1", <mask> "react-dom": "17.0.1", </s> [apps] Replace `@unimodules/*` imports with `expo-modules-core` (#14079) </s> remove "@unimodules/react-native-adapter" </s> add "expo-modules-core" </s> remove "react-native-web": "~0.17.1", "@unimodules/react-native-adapter": "^6.5.0-alpha.0" </s> add "react-native-web": "~0.17.1" </s> remove let { exists } = await FS.getInfoAsync(localUri); </s> add const { exists } = await FS.getInfoAsync(localUri); </s> remove let { exists } = await FS.getInfoAsync(localUri); </s> add const { exists } = await FS.getInfoAsync(localUri); </s> remove let { exists } = await FS.getInfoAsync(localUri); </s> add const { exists } = await FS.getInfoAsync(localUri); </s> remove import { UnavailabilityError } from '@unimodules/core'; </s> add import { UnavailabilityError } from 'expo-modules-core';
https://github.com/expo/expo/commit/19cbf4dc19ea9249fe565473becfdbe6be73647c
apps/bare-sandbox/package.json
keep keep keep keep replace replace keep keep keep keep keep
<mask> "react-native-gesture-handler": "~1.10.2", <mask> "react-native-reanimated": "~2.2.0", <mask> "react-native-screens": "~3.4.0", <mask> "react-native-unimodules": "~0.15.0-alpha.0", <mask> "react-native-web": "~0.17.1", <mask> "@unimodules/react-native-adapter": "^6.5.0-alpha.0" <mask> }, <mask> "devDependencies": { <mask> "@babel/core": "^7.12.9", <mask> "expo-module-scripts": "^2.0.0", <mask> "expo-yarn-workspaces": "^1.5.2", </s> [apps] Replace `@unimodules/*` imports with `expo-modules-core` (#14079) </s> remove "@unimodules/react-native-adapter" </s> add "expo-modules-core" </s> add "expo-modules-core": "~0.3.0-alpha.0", </s> remove let { exists } = await FS.getInfoAsync(localUri); </s> add const { exists } = await FS.getInfoAsync(localUri); </s> remove let { exists } = await FS.getInfoAsync(localUri); </s> add const { exists } = await FS.getInfoAsync(localUri); </s> remove let { exists } = await FS.getInfoAsync(localUri); </s> add const { exists } = await FS.getInfoAsync(localUri); </s> remove import { UnavailabilityError } from '@unimodules/core'; </s> add import { UnavailabilityError } from 'expo-modules-core';
https://github.com/expo/expo/commit/19cbf4dc19ea9249fe565473becfdbe6be73647c
apps/bare-sandbox/package.json
keep keep keep keep replace keep keep keep keep keep
<mask> }, <mask> "expo-yarn-workspaces": { <mask> "symlinks": [ <mask> "expo-constants", <mask> "@unimodules/react-native-adapter" <mask> ] <mask> }, <mask> "expo": { <mask> "autolinking": { <mask> "ios": { </s> [apps] Replace `@unimodules/*` imports with `expo-modules-core` (#14079) </s> add "expo-modules-core": "~0.3.0-alpha.0", </s> remove "react-native-web": "~0.17.1", "@unimodules/react-native-adapter": "^6.5.0-alpha.0" </s> add "react-native-web": "~0.17.1" </s> remove let { exists } = await FS.getInfoAsync(localUri); </s> add const { exists } = await FS.getInfoAsync(localUri); </s> remove let { exists } = await FS.getInfoAsync(localUri); </s> add const { exists } = await FS.getInfoAsync(localUri); </s> remove let { exists } = await FS.getInfoAsync(localUri); </s> add const { exists } = await FS.getInfoAsync(localUri); </s> remove import { UnavailabilityError } from '@unimodules/core'; </s> add import { UnavailabilityError } from 'expo-modules-core';
https://github.com/expo/expo/commit/19cbf4dc19ea9249fe565473becfdbe6be73647c
apps/bare-sandbox/package.json
keep keep replace keep keep keep keep keep
<mask> import AsyncStorage from '@react-native-async-storage/async-storage'; <mask> import Slider from '@react-native-community/slider'; <mask> import { Subscription } from '@unimodules/core'; <mask> import * as AppleAuthentication from 'expo-apple-authentication'; <mask> import React from 'react'; <mask> import { Alert, Button, ScrollView, StyleSheet, Text, View } from 'react-native'; <mask> <mask> import MonoText from '../components/MonoText'; </s> [apps] Replace `@unimodules/*` imports with `expo-modules-core` (#14079) </s> add import { Subscription } from 'expo-modules-core'; </s> remove import { Subscription } from '@unimodules/core'; </s> add import { Subscription } from 'expo-modules-core'; </s> remove import { Subscription } from '@unimodules/core'; </s> add import { Subscription } from 'expo-modules-core'; </s> remove import { Platform } from '@unimodules/core'; </s> add </s> add import { Platform } from 'expo-modules-core'; </s> remove import { Platform, Subscription } from '@unimodules/core'; </s> add import { Platform, Subscription } from 'expo-modules-core';
https://github.com/expo/expo/commit/19cbf4dc19ea9249fe565473becfdbe6be73647c
apps/native-component-list/src/screens/AppleAuthenticationScreen.tsx
keep keep add keep keep keep keep keep keep
<mask> import AsyncStorage from '@react-native-async-storage/async-storage'; <mask> import Slider from '@react-native-community/slider'; <mask> import * as AppleAuthentication from 'expo-apple-authentication'; <mask> import React from 'react'; <mask> import { Alert, Button, ScrollView, StyleSheet, Text, View } from 'react-native'; <mask> <mask> import MonoText from '../components/MonoText'; <mask> <mask> const { </s> [apps] Replace `@unimodules/*` imports with `expo-modules-core` (#14079) </s> remove import { Subscription } from '@unimodules/core'; </s> add </s> remove import { Platform } from '@unimodules/core'; </s> add </s> remove import { Subscription } from '@unimodules/core'; </s> add import { Subscription } from 'expo-modules-core'; </s> add import { Platform } from 'expo-modules-core'; </s> remove import { Subscription } from '@unimodules/core'; </s> add import { Subscription } from 'expo-modules-core'; </s> remove import { Platform } from '@unimodules/core'; </s> add
https://github.com/expo/expo/commit/19cbf4dc19ea9249fe565473becfdbe6be73647c
apps/native-component-list/src/screens/AppleAuthenticationScreen.tsx
keep keep replace keep keep keep keep keep
<mask> import { useFocusEffect } from '@react-navigation/native'; <mask> import { StackNavigationProp } from '@react-navigation/stack'; <mask> import { Platform } from '@unimodules/core'; <mask> import * as Contacts from 'expo-contacts'; <mask> import React from 'react'; <mask> import { RefreshControl, StyleSheet, Text, View } from 'react-native'; <mask> <mask> import HeaderIconButton, { HeaderContainerRight } from '../../components/HeaderIconButton'; </s> [apps] Replace `@unimodules/*` imports with `expo-modules-core` (#14079) </s> add import { Platform } from 'expo-modules-core'; </s> remove import { Platform } from '@unimodules/core'; </s> add </s> add import { Platform } from 'expo-modules-core'; </s> remove import { Platform } from '@unimodules/core'; </s> add import { Platform } from 'expo-modules-core'; </s> remove import { Subscription } from '@unimodules/core'; </s> add import { Subscription } from 'expo-modules-core'; </s> remove import { Subscription } from '@unimodules/core'; </s> add
https://github.com/expo/expo/commit/19cbf4dc19ea9249fe565473becfdbe6be73647c
apps/native-component-list/src/screens/Contacts/ContactsScreen.tsx
keep keep add keep keep keep keep keep
<mask> import { useFocusEffect } from '@react-navigation/native'; <mask> import { StackNavigationProp } from '@react-navigation/stack'; <mask> import * as Contacts from 'expo-contacts'; <mask> import React from 'react'; <mask> import { RefreshControl, StyleSheet, Text, View } from 'react-native'; <mask> <mask> import HeaderIconButton, { HeaderContainerRight } from '../../components/HeaderIconButton'; <mask> import usePermissions from '../../utilities/usePermissions'; </s> [apps] Replace `@unimodules/*` imports with `expo-modules-core` (#14079) </s> remove import { Platform } from '@unimodules/core'; </s> add </s> remove import { Platform } from '@unimodules/core'; </s> add </s> add import { Platform } from 'expo-modules-core'; </s> remove import { Subscription } from '@unimodules/core'; </s> add import { Subscription } from 'expo-modules-core'; </s> add import { Subscription } from 'expo-modules-core'; </s> remove import { Subscription } from '@unimodules/core'; </s> add
https://github.com/expo/expo/commit/19cbf4dc19ea9249fe565473becfdbe6be73647c
apps/native-component-list/src/screens/Contacts/ContactsScreen.tsx
replace keep keep keep keep keep
<mask> import { Platform } from '@unimodules/core'; <mask> import Constants, { ExecutionEnvironment } from 'expo-constants'; <mask> import * as Notifications from 'expo-notifications'; <mask> import React from 'react'; <mask> <mask> import ExpoAPIIcon from '../components/ExpoAPIIcon'; </s> [apps] Replace `@unimodules/*` imports with `expo-modules-core` (#14079) </s> add import { Platform } from 'expo-modules-core'; </s> remove import { Platform } from '@unimodules/core'; </s> add </s> remove import { Subscription } from '@unimodules/core'; </s> add import { Subscription } from 'expo-modules-core'; </s> add import { Platform } from 'expo-modules-core'; </s> remove import { Platform } from '@unimodules/core'; </s> add import { Platform } from 'expo-modules-core'; </s> remove import { Platform } from '@unimodules/core'; </s> add import { Platform } from 'expo-modules-core';
https://github.com/expo/expo/commit/19cbf4dc19ea9249fe565473becfdbe6be73647c
apps/native-component-list/src/screens/ExpoApisScreen.tsx
add keep keep keep keep keep keep
<mask> import Constants, { ExecutionEnvironment } from 'expo-constants'; <mask> import * as Notifications from 'expo-notifications'; <mask> import React from 'react'; <mask> <mask> import ExpoAPIIcon from '../components/ExpoAPIIcon'; <mask> import ComponentListScreen from './ComponentListScreen'; <mask> </s> [apps] Replace `@unimodules/*` imports with `expo-modules-core` (#14079) </s> remove import { Platform } from '@unimodules/core'; </s> add </s> remove import { Platform } from '@unimodules/core'; </s> add </s> remove import { Subscription } from '@unimodules/core'; </s> add import { Subscription } from 'expo-modules-core'; </s> add import { Platform } from 'expo-modules-core'; </s> remove import { Platform } from '@unimodules/core'; </s> add import { Platform } from 'expo-modules-core'; </s> remove import { Platform } from '@unimodules/core'; </s> add
https://github.com/expo/expo/commit/19cbf4dc19ea9249fe565473becfdbe6be73647c
apps/native-component-list/src/screens/ExpoApisScreen.tsx
keep keep replace keep keep keep keep keep
<mask> import './BeforePIXI'; <mask> <mask> import { Platform } from '@unimodules/core'; <mask> import { Asset } from 'expo-asset'; <mask> import * as PIXI from 'pixi.js'; <mask> import { Dimensions } from 'react-native'; <mask> <mask> import GLWrap from './GLWrap'; </s> [apps] Replace `@unimodules/*` imports with `expo-modules-core` (#14079) </s> add import { Platform } from 'expo-modules-core'; </s> remove import { Platform } from '@unimodules/core'; </s> add import { Platform } from 'expo-modules-core'; </s> remove import { Platform } from '@unimodules/core'; </s> add </s> remove import * as FS from 'expo-file-system'; </s> add </s> remove import { Platform } from '@unimodules/core'; </s> add import * as FS from 'expo-file-system'; import { Platform } from 'expo-modules-core'; </s> add import { Platform } from 'expo-modules-core';
https://github.com/expo/expo/commit/19cbf4dc19ea9249fe565473becfdbe6be73647c
apps/native-component-list/src/screens/GL/PIXISpriteScreen.tsx
keep add keep keep keep keep keep keep
<mask> <mask> import { Asset } from 'expo-asset'; <mask> import * as PIXI from 'pixi.js'; <mask> import { Dimensions } from 'react-native'; <mask> <mask> import GLWrap from './GLWrap'; <mask> <mask> export default GLWrap('pixi.js sprite rendering', async gl => { </s> [apps] Replace `@unimodules/*` imports with `expo-modules-core` (#14079) </s> remove import { Platform } from '@unimodules/core'; </s> add </s> remove import { Platform } from '@unimodules/core'; </s> add import * as FS from 'expo-file-system'; import { Platform } from 'expo-modules-core'; </s> remove import { Platform } from '@unimodules/core'; </s> add import { Platform } from 'expo-modules-core'; </s> remove import * as FS from 'expo-file-system'; </s> add </s> remove import { Platform } from '@unimodules/core'; </s> add </s> add import { Platform } from 'expo-modules-core';
https://github.com/expo/expo/commit/19cbf4dc19ea9249fe565473becfdbe6be73647c
apps/native-component-list/src/screens/GL/PIXISpriteScreen.tsx
replace keep keep keep keep keep
<mask> import { Subscription } from '@unimodules/core'; <mask> import * as Notifications from 'expo-notifications'; <mask> import * as TaskManager from 'expo-task-manager'; <mask> import React from 'react'; <mask> import { Alert, Platform, ScrollView, View } from 'react-native'; <mask> </s> [apps] Replace `@unimodules/*` imports with `expo-modules-core` (#14079) </s> remove import { Platform, Subscription } from '@unimodules/core'; </s> add import { Platform, Subscription } from 'expo-modules-core'; </s> remove import { Subscription } from '@unimodules/core'; </s> add </s> remove import { Platform } from '@unimodules/core'; </s> add </s> remove import { Subscription } from '@unimodules/core'; </s> add import { Subscription } from 'expo-modules-core'; </s> add import { Subscription } from 'expo-modules-core'; </s> add import { Platform } from 'expo-modules-core';
https://github.com/expo/expo/commit/19cbf4dc19ea9249fe565473becfdbe6be73647c
apps/native-component-list/src/screens/NotificationScreen.tsx
keep replace keep keep keep keep keep
<mask> import { Picker } from '@react-native-picker/picker'; <mask> import { Platform } from '@unimodules/core'; <mask> import * as React from 'react'; <mask> import { Text, Button } from 'react-native'; <mask> <mask> import { ScrollPage, Section } from '../components/Page'; <mask> </s> [apps] Replace `@unimodules/*` imports with `expo-modules-core` (#14079) </s> remove import { Platform } from '@unimodules/core'; </s> add import { Platform } from 'expo-modules-core'; </s> remove import { Platform } from '@unimodules/core'; </s> add </s> remove import { Platform } from '@unimodules/core'; </s> add </s> add import { Platform } from 'expo-modules-core'; </s> add import { Platform } from 'expo-modules-core'; </s> remove import { Subscription } from '@unimodules/core'; </s> add import { Subscription } from 'expo-modules-core';
https://github.com/expo/expo/commit/19cbf4dc19ea9249fe565473becfdbe6be73647c
apps/native-component-list/src/screens/PickerScreen.tsx
replace keep keep keep keep keep
<mask> import { Platform, Subscription } from '@unimodules/core'; <mask> import * as ScreenOrientation from 'expo-screen-orientation'; <mask> import React from 'react'; <mask> import { ScrollView, Text } from 'react-native'; <mask> <mask> import ListButton from '../components/ListButton'; </s> [apps] Replace `@unimodules/*` imports with `expo-modules-core` (#14079) </s> remove import { Subscription } from '@unimodules/core'; </s> add import { Subscription } from 'expo-modules-core'; </s> remove import { Subscription } from '@unimodules/core'; </s> add import { Subscription } from 'expo-modules-core'; </s> remove import { Subscription } from '@unimodules/core'; </s> add </s> add import { Subscription } from 'expo-modules-core'; </s> remove import { Platform } from '@unimodules/core'; </s> add </s> add import { Platform } from 'expo-modules-core';
https://github.com/expo/expo/commit/19cbf4dc19ea9249fe565473becfdbe6be73647c
apps/native-component-list/src/screens/ScreenOrientationScreen.tsx
replace keep keep keep keep keep
<mask> import { Subscription } from '@unimodules/core'; <mask> import * as Sensors from 'expo-sensors'; <mask> import React from 'react'; <mask> import { ScrollView, StyleSheet, Text, TouchableOpacity, View } from 'react-native'; <mask> <mask> const FAST_INTERVAL = 16; </s> [apps] Replace `@unimodules/*` imports with `expo-modules-core` (#14079) </s> remove import { Subscription } from '@unimodules/core'; </s> add </s> add import { Subscription } from 'expo-modules-core'; </s> remove import { Subscription } from '@unimodules/core'; </s> add import { Subscription } from 'expo-modules-core'; </s> remove import { Platform } from '@unimodules/core'; </s> add </s> add import { Platform } from 'expo-modules-core'; </s> remove import { Platform, Subscription } from '@unimodules/core'; </s> add import { Platform, Subscription } from 'expo-modules-core';
https://github.com/expo/expo/commit/19cbf4dc19ea9249fe565473becfdbe6be73647c
apps/native-component-list/src/screens/SensorScreen.tsx
replace keep keep keep keep keep
<mask> import { Platform } from '@unimodules/core'; <mask> import * as React from 'react'; <mask> import { Switch } from 'react-native'; <mask> <mask> import { Page, Section } from '../components/Page'; <mask> import Colors from '../constants/Colors'; </s> [apps] Replace `@unimodules/*` imports with `expo-modules-core` (#14079) </s> remove import { Platform } from '@unimodules/core'; </s> add import { Platform } from 'expo-modules-core'; </s> remove import { Platform } from '@unimodules/core'; </s> add </s> remove import { Platform } from '@unimodules/core'; </s> add </s> remove import { Platform } from '@unimodules/core'; </s> add </s> remove import { Subscription } from '@unimodules/core'; </s> add import { Subscription } from 'expo-modules-core'; </s> remove import { Platform } from '@unimodules/core'; </s> add
https://github.com/expo/expo/commit/19cbf4dc19ea9249fe565473becfdbe6be73647c
apps/native-component-list/src/screens/SwitchScreen.tsx
replace keep keep keep keep keep
<mask> import { Platform } from '@unimodules/core'; <mask> import { LinearGradient } from 'expo-linear-gradient'; <mask> import * as MediaLibrary from 'expo-media-library'; <mask> import * as Permissions from 'expo-permissions'; <mask> import React from 'react'; <mask> import { Dimensions, Image, ScrollView, StyleSheet, Text, View } from 'react-native'; </s> [apps] Replace `@unimodules/*` imports with `expo-modules-core` (#14079) </s> add import { Platform } from 'expo-modules-core'; </s> remove import { Subscription } from '@unimodules/core'; </s> add import { Subscription } from 'expo-modules-core'; </s> remove import { Platform } from '@unimodules/core'; </s> add </s> remove import { Subscription } from '@unimodules/core'; </s> add </s> add import { Subscription } from 'expo-modules-core'; </s> add import { Platform } from 'expo-modules-core';
https://github.com/expo/expo/commit/19cbf4dc19ea9249fe565473becfdbe6be73647c
apps/native-component-list/src/screens/ViewShotScreen.tsx
keep add keep keep keep keep
<mask> import { LinearGradient } from 'expo-linear-gradient'; <mask> import * as MediaLibrary from 'expo-media-library'; <mask> import * as Permissions from 'expo-permissions'; <mask> import React from 'react'; <mask> import { Dimensions, Image, ScrollView, StyleSheet, Text, View } from 'react-native'; <mask> import { captureRef as takeSnapshotAsync, captureScreen } from 'react-native-view-shot'; </s> [apps] Replace `@unimodules/*` imports with `expo-modules-core` (#14079) </s> remove import { Platform } from '@unimodules/core'; </s> add </s> remove import { Subscription } from '@unimodules/core'; </s> add import { Subscription } from 'expo-modules-core'; </s> add import { Subscription } from 'expo-modules-core'; </s> remove import { Subscription } from '@unimodules/core'; </s> add </s> remove import { Platform } from '@unimodules/core'; </s> add </s> remove import { Subscription } from '@unimodules/core'; </s> add import { Subscription } from 'expo-modules-core';
https://github.com/expo/expo/commit/19cbf4dc19ea9249fe565473becfdbe6be73647c
apps/native-component-list/src/screens/ViewShotScreen.tsx
keep keep replace keep keep keep keep keep
<mask> 'use strict'; <mask> <mask> import { Platform } from '@unimodules/core'; <mask> import Constants from 'expo-constants'; <mask> <mask> import ExponentTest from './ExponentTest'; <mask> import { isDeviceFarm } from './utils/Environment'; <mask> </s> [apps] Replace `@unimodules/*` imports with `expo-modules-core` (#14079) </s> add import { Platform } from 'expo-modules-core'; </s> remove import { UnavailabilityError } from '@unimodules/core'; </s> add import { UnavailabilityError } from 'expo-modules-core'; </s> remove import * as FS from 'expo-file-system'; </s> add </s> remove import { Platform } from '@unimodules/core'; </s> add </s> remove import { Platform } from '@unimodules/core'; </s> add import { Platform } from 'expo-modules-core'; </s> remove import { Platform } from '@unimodules/core'; </s> add
https://github.com/expo/expo/commit/19cbf4dc19ea9249fe565473becfdbe6be73647c
apps/test-suite/TestModules.js
keep keep add keep keep keep keep
<mask> 'use strict'; <mask> <mask> import Constants from 'expo-constants'; <mask> <mask> import ExponentTest from './ExponentTest'; <mask> import { isDeviceFarm } from './utils/Environment'; <mask> </s> [apps] Replace `@unimodules/*` imports with `expo-modules-core` (#14079) </s> remove import { Platform } from '@unimodules/core'; </s> add </s> remove import { UnavailabilityError } from '@unimodules/core'; </s> add import { UnavailabilityError } from 'expo-modules-core'; </s> remove import * as FS from 'expo-file-system'; </s> add </s> remove import { Platform } from '@unimodules/core'; </s> add </s> remove import { Platform } from '@unimodules/core'; </s> add import { Platform } from 'expo-modules-core'; </s> remove import { Platform } from '@unimodules/core'; </s> add
https://github.com/expo/expo/commit/19cbf4dc19ea9249fe565473becfdbe6be73647c
apps/test-suite/TestModules.js
keep keep replace keep keep keep keep keep
<mask> 'use strict'; <mask> <mask> import { UnavailabilityError } from '@unimodules/core'; <mask> <mask> import ExponentTest from './ExponentTest'; <mask> <mask> export async function acceptPermissionsAndRunCommandAsync(fn) { <mask> if (!ExponentTest) { </s> [apps] Replace `@unimodules/*` imports with `expo-modules-core` (#14079) </s> remove import { Platform } from '@unimodules/core'; </s> add </s> remove import { Platform } from '@unimodules/core'; </s> add import { Platform } from 'expo-modules-core'; </s> add import { Platform } from 'expo-modules-core'; </s> remove import { Platform } from '@unimodules/core'; </s> add </s> remove import { Platform } from '@unimodules/core'; </s> add import * as FS from 'expo-file-system'; import { Platform } from 'expo-modules-core'; </s> remove import * as FS from 'expo-file-system'; </s> add
https://github.com/expo/expo/commit/19cbf4dc19ea9249fe565473becfdbe6be73647c
apps/test-suite/TestUtils.js
replace keep keep keep keep keep
<mask> import { Platform } from '@unimodules/core'; <mask> import * as Battery from 'expo-battery'; <mask> import * as Device from 'expo-device'; <mask> <mask> export const name = 'Battery'; <mask> </s> [apps] Replace `@unimodules/*` imports with `expo-modules-core` (#14079) </s> add import { Platform } from 'expo-modules-core'; </s> add import { Platform } from 'expo-modules-core'; </s> remove import { Platform } from '@unimodules/core'; </s> add </s> remove import { Platform } from '@unimodules/core'; </s> add </s> add import { Platform } from 'expo-modules-core'; </s> remove import { UnavailabilityError } from '@unimodules/core'; </s> add
https://github.com/expo/expo/commit/19cbf4dc19ea9249fe565473becfdbe6be73647c
apps/test-suite/tests/Battery.js
keep add keep keep keep keep keep keep
<mask> import * as Battery from 'expo-battery'; <mask> import * as Device from 'expo-device'; <mask> <mask> export const name = 'Battery'; <mask> <mask> export async function test({ describe, it, expect, jasmine }) { <mask> const isExpectedToSupport = Device.isDevice || Platform.OS === 'android'; <mask> </s> [apps] Replace `@unimodules/*` imports with `expo-modules-core` (#14079) </s> remove import { Platform } from '@unimodules/core'; </s> add </s> remove import { Platform } from '@unimodules/core'; </s> add import * as FS from 'expo-file-system'; import { Platform } from 'expo-modules-core'; </s> remove import { Platform } from '@unimodules/core'; </s> add import { Platform } from 'expo-modules-core'; </s> add import { Platform } from 'expo-modules-core'; </s> remove import { Platform } from '@unimodules/core'; </s> add </s> remove import { Platform } from '@unimodules/core'; </s> add
https://github.com/expo/expo/commit/19cbf4dc19ea9249fe565473becfdbe6be73647c
apps/test-suite/tests/Battery.js
keep keep keep keep replace keep keep keep keep keep
<mask> <mask> if (isAvailable) { <mask> describe(`getBatteryLevelAsync()`, () => { <mask> it(`returns a number between 0 and 1`, async () => { <mask> let batteryLevel = await Battery.getBatteryLevelAsync(); <mask> expect(batteryLevel).toEqual(jasmine.any(Number)); <mask> expect(batteryLevel).toBeLessThanOrEqual(1); <mask> expect(batteryLevel).toBeGreaterThan(0); <mask> }); <mask> }); </s> [apps] Replace `@unimodules/*` imports with `expo-modules-core` (#14079) </s> remove let { exists } = await FS.getInfoAsync(localUri); </s> add const { exists } = await FS.getInfoAsync(localUri); </s> remove let { exists } = await FS.getInfoAsync(localUri); </s> add const { exists } = await FS.getInfoAsync(localUri); </s> remove let { exists } = await FS.getInfoAsync(localUri); </s> add const { exists } = await FS.getInfoAsync(localUri); </s> remove import { Platform } from '@unimodules/core'; </s> add import * as FS from 'expo-file-system'; import { Platform } from 'expo-modules-core'; </s> add import { Platform } from 'expo-modules-core'; </s> remove const { NativeModulesProxy } = require('@unimodules/react-native-adapter'); </s> add const { NativeModulesProxy } = require('expo-modules-core');
https://github.com/expo/expo/commit/19cbf4dc19ea9249fe565473becfdbe6be73647c
apps/test-suite/tests/Battery.js
add keep keep keep keep keep
<mask> import * as Calendar from 'expo-calendar'; <mask> import { Platform } from 'react-native'; <mask> <mask> import * as TestUtils from '../TestUtils'; <mask> <mask> export const name = 'Calendar'; </s> [apps] Replace `@unimodules/*` imports with `expo-modules-core` (#14079) </s> remove import { UnavailabilityError } from '@unimodules/core'; </s> add </s> add import { UnavailabilityError } from 'expo-modules-core'; </s> remove import { UnavailabilityError } from '@unimodules/core'; </s> add </s> add import { Platform } from 'expo-modules-core'; </s> add import { Platform } from 'expo-modules-core'; </s> add import { Platform } from 'expo-modules-core';
https://github.com/expo/expo/commit/19cbf4dc19ea9249fe565473becfdbe6be73647c
apps/test-suite/tests/Calendar.js
keep keep replace keep keep keep keep keep
<mask> import * as Calendar from 'expo-calendar'; <mask> import { Platform } from 'react-native'; <mask> import { UnavailabilityError } from '@unimodules/core'; <mask> <mask> import * as TestUtils from '../TestUtils'; <mask> <mask> export const name = 'Calendar'; <mask> </s> [apps] Replace `@unimodules/*` imports with `expo-modules-core` (#14079) </s> add import { UnavailabilityError } from 'expo-modules-core'; </s> remove import { UnavailabilityError } from '@unimodules/core'; </s> add </s> add import { UnavailabilityError } from 'expo-modules-core'; </s> add import { Platform } from 'expo-modules-core'; </s> remove import { Platform } from '@unimodules/core'; </s> add import { Platform } from 'expo-modules-core'; </s> add import { Platform } from 'expo-modules-core';
https://github.com/expo/expo/commit/19cbf4dc19ea9249fe565473becfdbe6be73647c
apps/test-suite/tests/Calendar.js
add keep keep keep keep keep
<mask> import * as Calendar from 'expo-calendar'; <mask> import { Platform } from 'react-native'; <mask> <mask> import * as TestUtils from '../TestUtils'; <mask> <mask> export const name = 'CalendarReminders'; </s> [apps] Replace `@unimodules/*` imports with `expo-modules-core` (#14079) </s> remove import { UnavailabilityError } from '@unimodules/core'; </s> add </s> add import { UnavailabilityError } from 'expo-modules-core'; </s> remove import { UnavailabilityError } from '@unimodules/core'; </s> add </s> add import { Platform } from 'expo-modules-core'; </s> add import { Platform } from 'expo-modules-core'; </s> add import { Platform } from 'expo-modules-core';
https://github.com/expo/expo/commit/19cbf4dc19ea9249fe565473becfdbe6be73647c
apps/test-suite/tests/CalendarReminders.js
keep keep replace keep keep keep keep keep
<mask> import * as Calendar from 'expo-calendar'; <mask> import { Platform } from 'react-native'; <mask> import { UnavailabilityError } from '@unimodules/core'; <mask> <mask> import * as TestUtils from '../TestUtils'; <mask> <mask> export const name = 'CalendarReminders'; <mask> </s> [apps] Replace `@unimodules/*` imports with `expo-modules-core` (#14079) </s> add import { UnavailabilityError } from 'expo-modules-core'; </s> remove import { UnavailabilityError } from '@unimodules/core'; </s> add </s> add import { UnavailabilityError } from 'expo-modules-core'; </s> add import { Platform } from 'expo-modules-core'; </s> remove import { Platform } from '@unimodules/core'; </s> add import { Platform } from 'expo-modules-core'; </s> add import { Platform } from 'expo-modules-core';
https://github.com/expo/expo/commit/19cbf4dc19ea9249fe565473becfdbe6be73647c
apps/test-suite/tests/CalendarReminders.js
keep replace keep keep keep keep keep
<mask> import * as Contacts from 'expo-contacts'; <mask> import { Platform, UnavailabilityError } from '@unimodules/core'; <mask> <mask> export const name = 'Contacts'; <mask> <mask> const unavailableMessage = `is unavailable on ${Platform.OS}`; <mask> </s> [apps] Replace `@unimodules/*` imports with `expo-modules-core` (#14079) </s> remove import { UnavailabilityError } from '@unimodules/core'; </s> add </s> remove import { UnavailabilityError } from '@unimodules/core'; </s> add </s> remove import { Platform } from '@unimodules/core'; </s> add </s> add import { UnavailabilityError } from 'expo-modules-core'; </s> add import { UnavailabilityError } from 'expo-modules-core'; </s> add import { Platform } from 'expo-modules-core';
https://github.com/expo/expo/commit/19cbf4dc19ea9249fe565473becfdbe6be73647c
apps/test-suite/tests/Contacts.web.js
replace keep keep keep keep keep
<mask> import { Platform } from '@unimodules/core'; <mask> import * as Device from 'expo-device'; <mask> import * as Facebook from 'expo-facebook'; <mask> <mask> import { isInteractive } from '../utils/Environment'; <mask> </s> [apps] Replace `@unimodules/*` imports with `expo-modules-core` (#14079) </s> add import { Platform } from 'expo-modules-core'; </s> add import { Platform } from 'expo-modules-core'; </s> remove import { Platform } from '@unimodules/core'; </s> add </s> remove import { Platform } from '@unimodules/core'; </s> add </s> remove import { Platform } from '@unimodules/core'; </s> add </s> remove import { Platform } from '@unimodules/core'; </s> add import { Platform } from 'expo-modules-core';
https://github.com/expo/expo/commit/19cbf4dc19ea9249fe565473becfdbe6be73647c
apps/test-suite/tests/Facebook.js
keep add keep keep keep keep
<mask> import * as Device from 'expo-device'; <mask> import * as Facebook from 'expo-facebook'; <mask> <mask> import { isInteractive } from '../utils/Environment'; <mask> <mask> export const name = 'Facebook'; </s> [apps] Replace `@unimodules/*` imports with `expo-modules-core` (#14079) </s> remove import { Platform } from '@unimodules/core'; </s> add </s> add import { Platform } from 'expo-modules-core'; </s> remove import { Platform } from '@unimodules/core'; </s> add </s> remove import { Platform } from '@unimodules/core'; </s> add </s> add import { Platform } from 'expo-modules-core'; </s> add import { UnavailabilityError } from 'expo-modules-core';
https://github.com/expo/expo/commit/19cbf4dc19ea9249fe565473becfdbe6be73647c
apps/test-suite/tests/Facebook.js
keep keep replace keep keep keep keep keep keep keep keep replace keep keep keep keep
<mask> <mask> import { Asset } from 'expo-asset'; <mask> import * as FS from 'expo-file-system'; <mask> import Constants from 'expo-constants'; <mask> import { Platform } from '@unimodules/core'; <mask> <mask> export const name = 'FileSystem'; <mask> <mask> import { Asset } from 'expo-asset'; <mask> import * as FS from 'expo-file-system'; <mask> import Constants from 'expo-constants'; <mask> import { Platform } from '@unimodules/core'; <mask> <mask> export const name = 'FileSystem'; <mask> <mask> export async function test({ describe, expect, it, ...t }) { </s> [apps] Replace `@unimodules/*` imports with `expo-modules-core` (#14079) </s> remove import { Platform } from '@unimodules/core'; </s> add import { Platform } from 'expo-modules-core'; </s> add import { Platform } from 'expo-modules-core'; </s> remove import { Platform } from '@unimodules/core'; </s> add </s> remove import { Platform } from '@unimodules/core'; </s> add </s> add import { Platform } from 'expo-modules-core';
https://github.com/expo/expo/commit/19cbf4dc19ea9249fe565473becfdbe6be73647c
apps/test-suite/tests/FileSystem.js
keep keep keep keep replace keep keep keep keep keep
<mask> async () => { <mask> const localUri = FS.documentDirectory + 'download1.png'; <mask> <mask> const assertExists = async expectedToExist => { <mask> let { exists } = await FS.getInfoAsync(localUri); <mask> if (expectedToExist) { <mask> expect(exists).toBeTruthy(); <mask> } else { <mask> expect(exists).not.toBeTruthy(); <mask> } </s> [apps] Replace `@unimodules/*` imports with `expo-modules-core` (#14079) </s> remove let { exists } = await FS.getInfoAsync(localUri); </s> add const { exists } = await FS.getInfoAsync(localUri); </s> remove let { exists } = await FS.getInfoAsync(localUri); </s> add const { exists } = await FS.getInfoAsync(localUri); </s> remove let batteryLevel = await Battery.getBatteryLevelAsync(); </s> add const batteryLevel = await Battery.getBatteryLevelAsync(); </s> remove import { Platform } from '@unimodules/core'; </s> add import * as FS from 'expo-file-system'; import { Platform } from 'expo-modules-core'; </s> add import { Platform } from 'expo-modules-core'; </s> remove import { UnavailabilityError } from '@unimodules/core'; </s> add import { UnavailabilityError } from 'expo-modules-core';
https://github.com/expo/expo/commit/19cbf4dc19ea9249fe565473becfdbe6be73647c
apps/test-suite/tests/FileSystem.js
keep keep keep keep replace keep keep keep keep keep
<mask> it('download(network failure)', async () => { <mask> const localUri = FS.documentDirectory + 'download1.png'; <mask> <mask> const assertExists = async expectedToExist => { <mask> let { exists } = await FS.getInfoAsync(localUri); <mask> if (expectedToExist) { <mask> expect(exists).toBeTruthy(); <mask> } else { <mask> expect(exists).not.toBeTruthy(); <mask> } </s> [apps] Replace `@unimodules/*` imports with `expo-modules-core` (#14079) </s> remove let { exists } = await FS.getInfoAsync(localUri); </s> add const { exists } = await FS.getInfoAsync(localUri); </s> remove let { exists } = await FS.getInfoAsync(localUri); </s> add const { exists } = await FS.getInfoAsync(localUri); </s> remove let batteryLevel = await Battery.getBatteryLevelAsync(); </s> add const batteryLevel = await Battery.getBatteryLevelAsync(); </s> remove import { Platform } from '@unimodules/core'; </s> add import * as FS from 'expo-file-system'; import { Platform } from 'expo-modules-core'; </s> add import { Platform } from 'expo-modules-core'; </s> remove import { UnavailabilityError } from '@unimodules/core'; </s> add import { UnavailabilityError } from 'expo-modules-core';
https://github.com/expo/expo/commit/19cbf4dc19ea9249fe565473becfdbe6be73647c
apps/test-suite/tests/FileSystem.js
keep keep keep keep replace keep keep keep keep keep
<mask> it('download(404)', async () => { <mask> const localUri = FS.documentDirectory + 'download1.png'; <mask> <mask> const assertExists = async expectedToExist => { <mask> let { exists } = await FS.getInfoAsync(localUri); <mask> if (expectedToExist) { <mask> expect(exists).toBeTruthy(); <mask> } else { <mask> expect(exists).not.toBeTruthy(); <mask> } </s> [apps] Replace `@unimodules/*` imports with `expo-modules-core` (#14079) </s> remove let { exists } = await FS.getInfoAsync(localUri); </s> add const { exists } = await FS.getInfoAsync(localUri); </s> remove let { exists } = await FS.getInfoAsync(localUri); </s> add const { exists } = await FS.getInfoAsync(localUri); </s> remove let batteryLevel = await Battery.getBatteryLevelAsync(); </s> add const batteryLevel = await Battery.getBatteryLevelAsync(); </s> remove import { Platform } from '@unimodules/core'; </s> add import * as FS from 'expo-file-system'; import { Platform } from 'expo-modules-core'; </s> add import { Platform } from 'expo-modules-core'; </s> remove import { UnavailabilityError } from '@unimodules/core'; </s> add import { UnavailabilityError } from 'expo-modules-core';
https://github.com/expo/expo/commit/19cbf4dc19ea9249fe565473becfdbe6be73647c
apps/test-suite/tests/FileSystem.js
keep replace keep keep keep keep keep
<mask> 'use strict'; <mask> import { Platform } from '@unimodules/core'; <mask> import { Asset } from 'expo-asset'; <mask> import { GLView } from 'expo-gl'; <mask> import React from 'react'; <mask> <mask> import { mountAndWaitFor } from './helpers'; </s> [apps] Replace `@unimodules/*` imports with `expo-modules-core` (#14079) </s> add import { Platform } from 'expo-modules-core'; </s> remove import { Platform } from '@unimodules/core'; </s> add import { Platform } from 'expo-modules-core'; </s> remove import * as FS from 'expo-file-system'; </s> add </s> remove import { Platform } from '@unimodules/core'; </s> add </s> remove import { Platform } from '@unimodules/core'; </s> add </s> remove import { Platform } from '@unimodules/core'; </s> add import { Platform } from 'expo-modules-core';
https://github.com/expo/expo/commit/19cbf4dc19ea9249fe565473becfdbe6be73647c
apps/test-suite/tests/GLView.js
keep keep add keep keep keep keep keep
<mask> 'use strict'; <mask> import { Asset } from 'expo-asset'; <mask> import { GLView } from 'expo-gl'; <mask> import React from 'react'; <mask> <mask> import { mountAndWaitFor } from './helpers'; <mask> <mask> export const name = 'GLView'; </s> [apps] Replace `@unimodules/*` imports with `expo-modules-core` (#14079) </s> remove import { Platform } from '@unimodules/core'; </s> add </s> remove import * as FS from 'expo-file-system'; </s> add </s> remove import { Platform } from '@unimodules/core'; </s> add import { Platform } from 'expo-modules-core'; </s> remove import { Platform } from '@unimodules/core'; </s> add </s> add import { Platform } from 'expo-modules-core'; </s> remove import { Platform } from '@unimodules/core'; </s> add import * as FS from 'expo-file-system'; import { Platform } from 'expo-modules-core';
https://github.com/expo/expo/commit/19cbf4dc19ea9249fe565473becfdbe6be73647c
apps/test-suite/tests/GLView.js
replace keep keep keep keep keep
<mask> import { Platform } from '@unimodules/core'; <mask> import * as GoogleSignIn from 'expo-google-sign-in'; <mask> import * as Localization from 'expo-localization'; <mask> import { Image } from 'react-native'; <mask> <mask> import { alertAndWaitForResponse } from './helpers'; </s> [apps] Replace `@unimodules/*` imports with `expo-modules-core` (#14079) </s> add import { Platform } from 'expo-modules-core'; </s> add import { Platform } from 'expo-modules-core'; </s> remove import { Platform } from '@unimodules/core'; </s> add </s> remove import { Platform } from '@unimodules/core'; </s> add import { Platform } from 'expo-modules-core'; </s> remove import { Platform } from '@unimodules/core'; </s> add import { Platform } from 'expo-modules-core'; </s> remove import { Platform } from '@unimodules/core'; </s> add
https://github.com/expo/expo/commit/19cbf4dc19ea9249fe565473becfdbe6be73647c
apps/test-suite/tests/GoogleSignIn.js
keep add keep keep keep keep keep
<mask> import * as GoogleSignIn from 'expo-google-sign-in'; <mask> import * as Localization from 'expo-localization'; <mask> import { Image } from 'react-native'; <mask> <mask> import { alertAndWaitForResponse } from './helpers'; <mask> <mask> export const name = 'GoogleSignIn'; </s> [apps] Replace `@unimodules/*` imports with `expo-modules-core` (#14079) </s> remove import { Platform } from '@unimodules/core'; </s> add </s> add import { Platform } from 'expo-modules-core'; </s> add import { UnavailabilityError } from 'expo-modules-core'; </s> remove import { UnavailabilityError } from '@unimodules/core'; </s> add </s> add import { UnavailabilityError } from 'expo-modules-core'; </s> remove import { UnavailabilityError } from '@unimodules/core'; </s> add
https://github.com/expo/expo/commit/19cbf4dc19ea9249fe565473becfdbe6be73647c
apps/test-suite/tests/GoogleSignIn.js
keep keep replace keep keep keep keep keep
<mask> 'use strict'; <mask> <mask> import { Platform } from '@unimodules/core'; <mask> import Constants from 'expo-constants'; <mask> import * as Device from 'expo-device'; <mask> import * as FileSystem from 'expo-file-system'; <mask> import * as Notifications from 'expo-notifications'; <mask> import { Alert, AppState } from 'react-native'; </s> [apps] Replace `@unimodules/*` imports with `expo-modules-core` (#14079) </s> add import { Platform } from 'expo-modules-core'; </s> remove import * as FS from 'expo-file-system'; </s> add </s> remove import { Subscription } from '@unimodules/core'; </s> add import { Subscription } from 'expo-modules-core'; </s> remove import { Platform } from '@unimodules/core'; </s> add </s> remove import { Platform } from '@unimodules/core'; </s> add </s> remove import { Platform } from '@unimodules/core'; </s> add import { Platform } from 'expo-modules-core';
https://github.com/expo/expo/commit/19cbf4dc19ea9249fe565473becfdbe6be73647c
apps/test-suite/tests/Notifications.js
keep add keep keep keep keep keep keep
<mask> import * as Device from 'expo-device'; <mask> import * as FileSystem from 'expo-file-system'; <mask> import * as Notifications from 'expo-notifications'; <mask> import { Alert, AppState } from 'react-native'; <mask> <mask> import * as TestUtils from '../TestUtils'; <mask> import { isInteractive } from '../utils/Environment'; <mask> import { waitFor } from './helpers'; </s> [apps] Replace `@unimodules/*` imports with `expo-modules-core` (#14079) </s> remove import { Platform } from '@unimodules/core'; </s> add </s> remove import { Platform } from '@unimodules/core'; </s> add </s> add import { Platform } from 'expo-modules-core'; </s> remove import { Subscription } from '@unimodules/core'; </s> add import { Subscription } from 'expo-modules-core'; </s> add import { UnavailabilityError } from 'expo-modules-core'; </s> add import { UnavailabilityError } from 'expo-modules-core';
https://github.com/expo/expo/commit/19cbf4dc19ea9249fe565473becfdbe6be73647c
apps/test-suite/tests/Notifications.js
keep keep replace keep keep keep keep keep
<mask> 'use strict'; <mask> <mask> import { Platform } from '@unimodules/core'; <mask> import { Asset } from 'expo-asset'; <mask> import * as FS from 'expo-file-system'; <mask> import * as SQLite from 'expo-sqlite'; <mask> <mask> export const name = 'SQLite'; </s> [apps] Replace `@unimodules/*` imports with `expo-modules-core` (#14079) </s> remove import * as FS from 'expo-file-system'; </s> add </s> remove import { Platform } from '@unimodules/core'; </s> add import * as FS from 'expo-file-system'; import { Platform } from 'expo-modules-core'; </s> remove import { Platform } from '@unimodules/core'; </s> add </s> add import { Platform } from 'expo-modules-core'; </s> remove import { Platform } from '@unimodules/core'; </s> add </s> remove import { Platform } from '@unimodules/core'; </s> add
https://github.com/expo/expo/commit/19cbf4dc19ea9249fe565473becfdbe6be73647c
apps/test-suite/tests/SQLite.js
keep replace keep keep keep keep keep
<mask> 'use strict'; <mask> import { Platform } from '@unimodules/core'; <mask> <mask> import ExponentTest from '../ExponentTest'; <mask> <mask> export function isDeviceFarm() { <mask> return ExponentTest && ExponentTest.isInCI && Platform.OS === 'android'; </s> [apps] Replace `@unimodules/*` imports with `expo-modules-core` (#14079) </s> remove import { UnavailabilityError } from '@unimodules/core'; </s> add import { UnavailabilityError } from 'expo-modules-core'; </s> remove import { Platform } from '@unimodules/core'; </s> add </s> add import { Platform } from 'expo-modules-core'; </s> add import { Platform } from 'expo-modules-core'; </s> remove import { Platform } from '@unimodules/core'; </s> add </s> remove import { Platform } from '@unimodules/core'; </s> add import { Platform } from 'expo-modules-core';
https://github.com/expo/expo/commit/19cbf4dc19ea9249fe565473becfdbe6be73647c
apps/test-suite/utils/Environment.js
keep keep keep keep replace keep keep keep keep keep
<mask> } <mask> }; <mask> // Clear all the native modules as a way to simulate running outside of Expo <mask> const { NativeModules } = require('react-native'); <mask> const { NativeModulesProxy } = require('@unimodules/react-native-adapter'); <mask> clearPropertiesInPlace(NativeModules); <mask> clearPropertiesInPlace(NativeModulesProxy); <mask> <mask> // Silence "No native module found" warnings raised in CRNA and expo-constants <mask> const warn = console.warn; </s> [apps] Replace `@unimodules/*` imports with `expo-modules-core` (#14079) </s> remove let batteryLevel = await Battery.getBatteryLevelAsync(); </s> add const batteryLevel = await Battery.getBatteryLevelAsync(); </s> remove let { exists } = await FS.getInfoAsync(localUri); </s> add const { exists } = await FS.getInfoAsync(localUri); </s> remove let { exists } = await FS.getInfoAsync(localUri); </s> add const { exists } = await FS.getInfoAsync(localUri); </s> remove let { exists } = await FS.getInfoAsync(localUri); </s> add const { exists } = await FS.getInfoAsync(localUri); </s> add import { Platform } from 'expo-modules-core'; </s> remove import { Platform } from '@unimodules/core'; </s> add import { Platform } from 'expo-modules-core';
https://github.com/expo/expo/commit/19cbf4dc19ea9249fe565473becfdbe6be73647c
packages/expo/src/__tests__/Expo-test.native.ts
keep keep keep keep replace keep keep keep keep keep
<mask> import android.content.Intent; <mask> import android.graphics.Bitmap; <mask> import android.graphics.drawable.Drawable; <mask> import android.os.AsyncTask; <mask> import androidx.annotation.NonNull; <mask> import android.util.Log; <mask> import android.view.View; <mask> <mask> import com.bumptech.glide.Glide; <mask> import com.bumptech.glide.load.engine.DiskCacheStrategy; </s> [@unimodules/react-native-adapter] Add support for fetching images using Futures (#6933) # Why In some places it may be easier to use `Future` instead of a full-fledged `Listener`. # How Added two methods analogous to existing ones for fetching images by URI, but returning `Future`s. # Test Plan Tested as a part of https://github.com/expo/expo/pull/6932. </s> add import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; </s> add import com.facebook.react.common.futures.SimpleSettableFuture; </s> add import androidx.annotation.NonNull;
https://github.com/expo/expo/commit/1abd758fc45238c3943f7ebb2d29fe2242abec27
packages/@unimodules/react-native-adapter/android/src/main/java/org/unimodules/adapters/react/services/UIManagerModuleWrapper.java
keep keep keep add keep keep keep keep keep
<mask> import com.facebook.imagepipeline.datasource.BaseBitmapDataSubscriber; <mask> import com.facebook.imagepipeline.image.CloseableImage; <mask> import com.facebook.imagepipeline.request.ImageRequest; <mask> import com.facebook.react.bridge.ReactContext; <mask> import com.facebook.react.uimanager.IllegalViewOperationException; <mask> import com.facebook.react.uimanager.NativeViewHierarchyManager; <mask> import com.facebook.react.uimanager.UIManagerModule; <mask> <mask> import org.unimodules.core.interfaces.ActivityEventListener; </s> [@unimodules/react-native-adapter] Add support for fetching images using Futures (#6933) # Why In some places it may be easier to use `Future` instead of a full-fledged `Listener`. # How Added two methods analogous to existing ones for fetching images by URI, but returning `Future`s. # Test Plan Tested as a part of https://github.com/expo/expo/pull/6932. </s> remove import androidx.annotation.NonNull; </s> add </s> add import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; </s> add import androidx.annotation.NonNull;
https://github.com/expo/expo/commit/1abd758fc45238c3943f7ebb2d29fe2242abec27
packages/@unimodules/react-native-adapter/android/src/main/java/org/unimodules/adapters/react/services/UIManagerModuleWrapper.java
keep add keep keep keep keep
<mask> import java.util.Map; <mask> import java.util.WeakHashMap; <mask> <mask> import androidx.annotation.NonNull; <mask> import androidx.annotation.Nullable; <mask> </s> [@unimodules/react-native-adapter] Add support for fetching images using Futures (#6933) # Why In some places it may be easier to use `Future` instead of a full-fledged `Listener`. # How Added two methods analogous to existing ones for fetching images by URI, but returning `Future`s. # Test Plan Tested as a part of https://github.com/expo/expo/pull/6932. </s> remove import androidx.annotation.NonNull; </s> add </s> add import androidx.annotation.NonNull; </s> add import com.facebook.react.common.futures.SimpleSettableFuture;
https://github.com/expo/expo/commit/1abd758fc45238c3943f7ebb2d29fe2242abec27
packages/@unimodules/react-native-adapter/android/src/main/java/org/unimodules/adapters/react/services/UIManagerModuleWrapper.java
keep keep keep add keep keep keep keep keep keep
<mask> import java.util.WeakHashMap; <mask> import java.util.concurrent.ExecutionException; <mask> import java.util.concurrent.Future; <mask> <mask> import androidx.annotation.Nullable; <mask> <mask> public class UIManagerModuleWrapper implements <mask> ActivityProvider, <mask> ImageLoader, <mask> InternalModule, </s> [@unimodules/react-native-adapter] Add support for fetching images using Futures (#6933) # Why In some places it may be easier to use `Future` instead of a full-fledged `Listener`. # How Added two methods analogous to existing ones for fetching images by URI, but returning `Future`s. # Test Plan Tested as a part of https://github.com/expo/expo/pull/6932. </s> add import com.facebook.react.common.futures.SimpleSettableFuture; </s> remove import androidx.annotation.NonNull; </s> add </s> add import java.util.concurrent.ExecutionException; import java.util.concurrent.Future;
https://github.com/expo/expo/commit/1abd758fc45238c3943f7ebb2d29fe2242abec27
packages/@unimodules/react-native-adapter/android/src/main/java/org/unimodules/adapters/react/services/UIManagerModuleWrapper.java
keep add keep keep keep keep
<mask> }; <mask> <mask> export default function DocumentationPage(props: Props) { <mask> const { version } = usePageApiVersion(); <mask> const { pathname } = useRouter(); <mask> </s> [docs] Fix description for a page not shown in social apps </s> remove <meta name="description" content={description === '' ? DEFAULT_DESCRIPTION : description} /> </s> add <meta name="description" content={description} /> </s> remove const DEFAULT_DESCRIPTION = `Expo is an open-source platform for making universal native apps for Android, iOS, and the web with JavaScript and React.`; </s> add </s> remove <Head title={props.title} description={props.description}> </s> add <Head title={props.title} description={props.description === '' ? DEFAULT_PAGE_DESCRIPTION : props.description}>
https://github.com/expo/expo/commit/1acb0d36ef0fde1d76971fe39c195e9819f7a433
docs/components/DocumentationPage.tsx
keep keep keep keep replace keep keep keep keep keep
<mask> tocVisible={props.tocVisible} <mask> isMobileMenuVisible={isMobileMenuVisible} <mask> onContentScroll={handleContentScroll} <mask> sidebarScrollPosition={sidebarScrollPosition}> <mask> <Head title={props.title} description={props.description}> <mask> {props.hideFromSearch !== true && ( <mask> <meta <mask> name="docsearch:version" <mask> content={RoutesUtils.isReferencePath(pathname) ? version : 'none'} <mask> /> </s> [docs] Fix description for a page not shown in social apps </s> remove <meta name="description" content={description === '' ? DEFAULT_DESCRIPTION : description} /> </s> add <meta name="description" content={description} /> </s> remove const DEFAULT_DESCRIPTION = `Expo is an open-source platform for making universal native apps for Android, iOS, and the web with JavaScript and React.`; </s> add </s> add const DEFAULT_PAGE_DESCRIPTION = `Expo is an open-source platform for making universal native apps for Android, iOS, and the web with JavaScript and React.`;
https://github.com/expo/expo/commit/1acb0d36ef0fde1d76971fe39c195e9819f7a433
docs/components/DocumentationPage.tsx
keep keep keep keep replace keep keep keep keep keep
<mask> <mask> type HeadProps = PropsWithChildren<{ title?: string; description?: string }>; <mask> <mask> const BASE_TITLE = 'Expo Documentation'; <mask> const DEFAULT_DESCRIPTION = `Expo is an open-source platform for making universal native apps for Android, iOS, and the web with JavaScript and React.`; <mask> <mask> const Head = ({ title, description, children }: HeadProps) => ( <mask> <NextHead> <mask> <title>{title ? `${title} - ${BASE_TITLE}` : BASE_TITLE}</title> <mask> <meta charSet="utf-8" /> </s> [docs] Fix description for a page not shown in social apps </s> remove <meta name="description" content={description === '' ? DEFAULT_DESCRIPTION : description} /> </s> add <meta name="description" content={description} /> </s> remove <Head title={props.title} description={props.description}> </s> add <Head title={props.title} description={props.description === '' ? DEFAULT_PAGE_DESCRIPTION : props.description}> </s> add const DEFAULT_PAGE_DESCRIPTION = `Expo is an open-source platform for making universal native apps for Android, iOS, and the web with JavaScript and React.`;
https://github.com/expo/expo/commit/1acb0d36ef0fde1d76971fe39c195e9819f7a433
docs/components/Head.tsx