/**
 * Copyright (c) 2015-present, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 */

package com.facebook.react.bridge;

public class JSCJavaScriptExecutorFactory implements JavaScriptExecutorFactory {
  private final String mAppName;
  private final String mDeviceName;

  public JSCJavaScriptExecutorFactory(String appName, String deviceName) {
    this.mAppName = appName;
    this.mDeviceName = deviceName;
  }

  @Override
  public JavaScriptExecutor create() throws Exception {
    WritableNativeMap jscConfig = new WritableNativeMap();
    jscConfig.putString("OwnerIdentity", "ReactNative");
    jscConfig.putString("AppIdentity", mAppName);
    jscConfig.putString("DeviceIdentity", mDeviceName);
    return new JSCJavaScriptExecutor(jscConfig);
  }
}

/**
 * Copyright (c) 2015-present, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 */

package com.facebook.react.bridge;

public class JSCJavaScriptExecutorFactory implements JavaScriptExecutorFactory {
  private final String mAppName;
  private final String mDeviceName;

  public JSCJavaScriptExecutorFactory(String appName, String deviceName) {
    this.mAppName = appName;
    this.mDeviceName = deviceName;
  }

  @Override
  public JavaScriptExecutor create() throws Exception {
    WritableNativeMap jscConfig = new WritableNativeMap();
    jscConfig.putString("OwnerIdentity", "ReactNative");
    jscConfig.putString("AppIdentity", mAppName);
    jscConfig.putString("OwnerIdentity", mDeviceName);
    return new JSCJavaScriptExecutor(jscConfig);
  }
}

--- 
+++ 
@@ -23,7 +23,7 @@
     WritableNativeMap jscConfig = new WritableNativeMap();
     jscConfig.putString("OwnerIdentity", "ReactNative");
     jscConfig.putString("AppIdentity", mAppName);
-    jscConfig.putString("OwnerIdentity", mDeviceName);
+    jscConfig.putString("DeviceIdentity", mDeviceName);
     return new JSCJavaScriptExecutor(jscConfig);
   }
 }
Fix DeviceIdentity on RN for Android

Reviewed By: Hypuk

Differential Revision: D5963912

fbshipit-source-id: 3959e5ab6af66512f0035efea7919572554e10b4
