ruboto 0.13.0 → 0.14.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ccf9964eb67eb09ea2597a828b52d06dff60115b
4
- data.tar.gz: 12313a6e4b4a2e1e4256a3c86e4155b4b48d6e83
3
+ metadata.gz: 99baa768052a043076db03f4d9598cf9d076bf2e
4
+ data.tar.gz: 3bf07e86b7f41a0cbba8dd9d6f02e750f31ee9ab
5
5
  SHA512:
6
- metadata.gz: 9155934ff5d0af26fdd163ab4627dce2303ea1359626a9ea2e2ac6fadf1ee8da067f756ee0ea49e99fca6978edec8529cbc4d6346109048973db344b28752525
7
- data.tar.gz: 5caee4391fcd9b3d094531fe8c807aaa8db72a08ba0313f9cf46f5b3413c6ffd02e73d043d600a23b2205e67fe1fa3da976875a367c1431a7ab2cded85799535
6
+ metadata.gz: f7bd276940850a60b549e140bb7eec8b2e2932c20a31a318034d831e74a46ea50221fbdb133e924cdc1598d73fe670af0ed2ef86da30dc84bf0b3eebf13bc1f4
7
+ data.tar.gz: 493aa40906f9100157163398355975c5570c3aa210eb7f6816c8413006bed929fca0fcf90841fde123643786d7d90a7d40b55a7b72134518c8a54fc9e913586f
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ruboto (0.13.0)
4
+ ruboto (0.14.0.dev)
5
5
  jruby-jars
6
6
  main (>= 4.7.2)
7
7
  rake
@@ -19,10 +19,9 @@ GEM
19
19
  fattr (>= 2.2.0)
20
20
  map (>= 5.1.0)
21
21
  map (6.5.1)
22
- rake (10.0.4)
22
+ rake (10.1.0)
23
23
 
24
24
  PLATFORMS
25
- java
26
25
  ruby
27
26
 
28
27
  DEPENDENCIES
@@ -1,12 +1,11 @@
1
- Subject: [ANN] Ruboto 0.13.0 release candidate
1
+ Subject: [ANN] Ruboto 0.14.0 release candidate
2
2
 
3
3
  Hi all!
4
4
 
5
- The Ruboto 0.13.0 release candidate is now available.
5
+ The Ruboto 0.14.0 release candidate is now available.
6
6
 
7
- In this release we add support for Android API level 17 and the Android
8
- SDK r22. There are improvements on the "ruboto setup" command, and
9
- general preparations for the 1.0 release.
7
+ In this release we change the startup to use a separate SplashActivity.
8
+ This simplifies the startup and makes it more robust.
10
9
 
11
10
  As always we need your help and feedback to ensure the quality of the release. Please install the release candidate using
12
11
 
data/RELEASE_DOC CHANGED
@@ -1,6 +1,6 @@
1
- Subject: [ANN] Ruboto 0.13.0 released!
1
+ Subject: [ANN] Ruboto 0.14.0 released!
2
2
 
3
- The Ruboto team is pleased to announce the release of Ruboto 0.13.0.
3
+ The Ruboto team is pleased to announce the release of Ruboto 0.14.0.
4
4
 
5
5
  Ruboto (JRuby on Android) is a platform for developing full stand-alone
6
6
  apps for Android using the Ruby language and libraries. It includes
@@ -8,69 +8,73 @@ support libraries and generators for creating projects, classes, tests,
8
8
  and more. The complete APIs of Android, Java, and Ruby are available to
9
9
  you using the Ruby language.
10
10
 
11
- New in version 0.13.0:
11
+ New in version 0.14.0:
12
12
 
13
- In this release we add support for Android API level 17 and the Android
14
- SDK r22. There are improvements on the "ruboto setup" command, and
15
- general preparations for the 1.0 release.
13
+ In this release we change the startup to use a separate SplashActivity.
14
+ This simplifies the startup and makes it more robust.
16
15
 
17
16
  Features:
18
17
 
19
- * Issue #176 Add option to allocate large heap at startup
20
- * Issue #252 View constant conversion errors aren't very clear
21
- * Issue #333 Prettier design for the Ruboto platform apk
22
- * Issue #405 "ruboto setup" on Windows
23
- * Issue #408 Setup: Need to look up the latest Android tool version
24
- (instead of hard coding it) if we can
25
- * Issue #409 Add support for Android SDK r22
26
- * Issue #410 Add -y option to "ruboto setup" to automatically install
27
- components, accept licenses, and add to configuration
28
- * Issue #412 Enable starting the emulator without a project
29
- * Issue #414 Add -t --target parameter to "ruboto setup" to set up for a
30
- specific api level
31
- * Issue #415 Update API xml file to cover android-17
32
- * Issue #416 Add code for generating the API xml file
33
- * Issue #422 Put RubotoActivity intent data directly in the Intent instead
34
- of inside a Bundle
35
- * Issue #423 Focus the "start_ruboto_activity" API
18
+ * Issue #433 Tests: add support for individual/matrix tests in Windows
19
+ * Issue #460 New startup sequence with SplashActivity
20
+ * Issue #471 Allow sending Intent extras with start_ruboto_activity
21
+ * Issue #473 Modify EntryPointActivity to send an Intent to SplashActivity
36
22
 
37
23
  Bugfixes:
38
24
 
39
- * Issue #264 Force rebuild of (release) apk when jar file is removed from
40
- the libs directory
41
- * Issue #268 Callback for Audio Focus
42
- * Issue #285 Look into pause/restart issues for secondary Activities
43
- * Issue #407 Process::Status#to_int not implemented (NotImplementedError)
44
- with jruby 1.7.x and ruboto 0.11.0
25
+ * Issue #428 Splash requests window feature too late
26
+ * Issue #429 ruboto emulator -t android-17 fails
27
+ * Issue #432 'ruboto update app' leaves some old files behind
28
+ * Issue #434 After JRuby is loaded, check the activity state before
29
+ calling onCreate
30
+ * Issue #442 Adding splash.xml crashes app.
31
+ * Issue #443 onCreateOptionsMenu (and other callbacks) not called on first
32
+ time startup
33
+ * Issue #449 Change ruboto setup to use /linux/ instead of /^linux(.*)/
34
+ * Issue #451 Changing device orientation during splash causes exception
35
+ * Issue #453 Builds but fails to load ruby scripts on uppercase package
36
+ name
37
+ * Issue #455 Rake install fails in ruboto-0.14.0-dev
38
+ * Issue #468 Using the EntryPointActivity check in the RubotoActivity
39
+ template doesn't work for other activities like PreferencesActivity
40
+ * Issue #470 "ruboto update app" deletes "src/ruboto/.svn" subversion
41
+ directory
45
42
 
46
43
  Support:
47
44
 
48
- * Issue #303 Ruboto should synchronise target in project.properties and
49
- targetSdkVersion in AndroidManifest.xml
50
- * Issue #314 Tool confusion: ruboto vs rake
51
- * Issue #424 Initiliaze the new App
45
+ * Issue #446 Bad call from ruboto setup
46
+ * Issue #450 Application aborts prematurely, when I add a Gemfile.apk
52
47
 
53
48
  Documentation:
54
49
 
55
- * Issue #258 Add welcome and information with links to RubotoCore
56
- * Issue #427 Add sidebar to the WIKI
50
+ * Issue #225 Investigate AIDE
51
+ * Issue #430 Add Downloads page to ruboto.org
57
52
 
58
- Internal:
53
+ Pull requests:
59
54
 
60
- * Issue #411 Use "ruboto setup -y" to install components in travis-ci
61
- automated testing
55
+ * Issue #439 Fixes #432
56
+ * Issue #440 Added check for compatible APIs for update examples: re issue
57
+ #437
58
+ * Issue #444 Fix building on Windows caused by mixed file separators. Also
59
+ pre-compressed the included PNGs with optipng, despite included pngcrush
60
+ during rake for increased loseless file compression.
61
+ * Issue #454 Fix android_package_directory for ones already installed
62
+ android sdk
63
+ * Issue #457 Allow uppercase package name
64
+ * Issue #462 Add SplashActivity for new startup sequence
65
+ * Issue #463 New APK size upper limit in test/ruboto_gen_test
66
+ * Issue #464 Fix #451 by locking screen orientation of SplashActivity
62
67
 
63
- Rejected:
68
+ Internal:
64
69
 
65
- * Issue #175 Rename "update_scripts" rake task to "update" for less typing
66
- * Issue #259 Link RubotoCore platform apk version to JRuby version
67
- * Issue #261 Rename RubotoCore platform apk display name to Ruboto
68
- * Issue #337 Change default for "ruboto gen app" to include JRuby in the
69
- app
70
+ * Issue #436 Use "ruboto emulator" instead of start_emulator.sh when
71
+ running tests on travis-ci
72
+ * Issue #437 test ruboto_update_test fails for old versions < 0.11.0
73
+ * Issue #465 Adjust update scripts to the new JRuby mavenized packaging
70
74
 
71
75
  You can find a complete list of issues here:
72
76
 
73
- * https://github.com/ruboto/ruboto/issues?state=closed&milestone=25
77
+ * https://github.com/ruboto/ruboto/issues?state=closed&milestone=26
74
78
 
75
79
 
76
80
  Installation:
data/Rakefile CHANGED
@@ -79,6 +79,12 @@ task :example => :install do
79
79
  Dir.chdir File.dirname(EXAMPLE_FILE) do
80
80
  FileUtils.rm_rf app_name
81
81
  sh "ruboto gen app --package org.ruboto.test_app --name #{app_name} --path #{app_name}"
82
+ Dir.chdir app_name do
83
+ sh 'rake patch_dex'
84
+ Dir.chdir 'test' do
85
+ sh 'ant instrument' # This will also build the main project.
86
+ end
87
+ end
82
88
  sh "tar czf #{EXAMPLE_FILE} #{app_name}"
83
89
  FileUtils.rm_rf app_name
84
90
  end
@@ -124,13 +130,9 @@ def get_github_issues
124
130
  req.basic_auth(user, pass)
125
131
  res = https.start { |http| http.request(req) }
126
132
  milestones = YAML.load(res.body).sort_by { |i| Date.parse(i['due_on']) }
127
- puts milestones.map { |m| "#{'%2d' % m['number']} #{m['title']}" }.join("\n")
128
-
129
- if defined? ask
130
- milestone = ask('milestone: ', Integer) { |q| q.echo = true }
131
- else
132
- print 'milestone: '; milestone = STDIN.gets.chomp
133
- end
133
+ milestone_entry = milestones.find{|m| m['title'] == Ruboto::VERSION}
134
+ raise "Milestone for version #{} not found." unless milestone_entry
135
+ milestone = milestone_entry['number']
134
136
 
135
137
  uri = URI("#{base_uri}/issues?milestone=#{milestone}&state=closed&per_page=1000")
136
138
  req = Net::HTTP::Get.new(uri.request_uri)
@@ -437,12 +439,13 @@ namespace :platform do
437
439
 
438
440
  desc 'Download the current RubotoCore platform release apk'
439
441
  file PLATFORM_CURRENT_RELEASE_APK do
442
+ FileUtils.mkdir_p File.dirname(PLATFORM_CURRENT_RELEASE_APK)
440
443
  puts 'Downloading the current RubotoCore platform release apk'
441
444
  uri = URI('http://ruboto.org/downloads/RubotoCore-release.apk')
442
445
  begin
443
446
  http = Net::HTTP.new(uri.host, uri.port)
444
447
  content = http.request(Net::HTTP::Get.new(uri.request_uri)).body
445
- File.open(PLATFORM_CURRENT_RELEASE_APK, 'w') { |f| f << content }
448
+ File.open(PLATFORM_CURRENT_RELEASE_APK, 'wb') { |f| f << content }
446
449
  rescue Exception, SystemExit
447
450
  FileUtils.rm(PLATFORM_CURRENT_RELEASE_APK) if File.exists?(PLATFORM_CURRENT_RELEASE_APK)
448
451
  raise
@@ -483,7 +486,6 @@ namespace :platform do
483
486
  puts "Package #{package} already installed, but of different size. Replacing package."
484
487
  output = `adb install -r #{PLATFORM_CURRENT_RELEASE_APK} 2>&1`
485
488
  if $? == 0 && output !~ failure_pattern && output =~ success_pattern
486
- clear_update
487
489
  return
488
490
  end
489
491
  case $1
@@ -559,3 +561,12 @@ namespace :platform do
559
561
  end
560
562
 
561
563
  end
564
+
565
+ desc 'Download the latest jruby-jars snapshot'
566
+ task :get_jruby_jars_snapshot do
567
+ current_gem = 'jruby-jars-1.7.5.dev.gem'
568
+ `wget http://ci.jruby.org/snapshots/master/#{current_gem}`
569
+ jars = Dir["#{current_gem}.*"]
570
+ jars[0..-2].each { |j| FileUtils.rm_f j } if jars.size > 1
571
+ FileUtils.mv(jars[-1], current_gem) if jars[-1]
572
+ end
@@ -20,7 +20,7 @@ end
20
20
  #
21
21
  def which(cmd)
22
22
  exts = ENV['PATHEXT'] ? ENV['PATHEXT'].split(';') : ['']
23
- ENV['PATH'].split(File::PATH_SEPARATOR).each do |path|
23
+ ENV['PATH'].gsub('\\', '/').split(File::PATH_SEPARATOR).each do |path|
24
24
  exts.each do |ext|
25
25
  exe = File.join(path, "#{cmd}#{ext}")
26
26
  return exe if File.executable? exe
@@ -33,39 +33,26 @@ adb_version_str = `adb version`
33
33
  (puts 'Android SDK platform tools not in PATH (adb command not found).'; exit 1) unless $? == 0
34
34
  (puts "Unrecognized adb version: #$1"; exit 1) unless adb_version_str =~ /Android Debug Bridge version (\d+\.\d+\.\d+)/
35
35
  (puts "adb version 1.0.31 or later required. Version found: #$1"; exit 1) unless Gem::Version.new($1) >= Gem::Version.new('1.0.31')
36
- if ENV['ANDROID_HOME'].nil? && (adb_path = which('adb'))
37
- ENV['ANDROID_HOME'] = File.dirname(File.dirname(adb_path))
36
+ android_home = ENV['ANDROID_HOME']
37
+ android_home = android_home.gsub("\\", "/") unless android_home.nil?
38
+ if android_home.nil?
39
+ if (adb_path = which('adb'))
40
+ android_home = File.dirname(File.dirname(adb_path))
41
+ else
42
+ abort 'You need to set the ANDROID_HOME environment variable.'
43
+ end
44
+ else
45
+ android_home.gsub! '\\', '/'
38
46
  end
39
- (puts 'You need to set the ANDROID_HOME environment variable.'; exit 1) unless ENV['ANDROID_HOME']
40
47
 
41
- # FIXME(uwe): Simplify when we stop supporting Android SDK < 22: Don't look in pltform-tools for dx
42
- dx_filename = Dir[File.join(ENV['ANDROID_HOME'], '{build-tools/*,platform-tools}', ON_WINDOWS ? 'dx.bat' : 'dx')][-1]
48
+ # FIXME(uwe): Simplify when we stop supporting Android SDK < 22: Don't look in platform-tools for dx
49
+ DX_FILENAME = Dir[File.join(android_home, '{build-tools/*,platform-tools}', ON_WINDOWS ? 'dx.bat' : 'dx')][-1]
43
50
  # EMXIF
44
51
 
45
- unless dx_filename
52
+ unless DX_FILENAME
46
53
  puts 'You need to install the Android SDK Build-tools!'
47
54
  exit 1
48
55
  end
49
- new_dx_content = File.read(dx_filename).dup
50
-
51
- xmx_pattern = ON_WINDOWS ? /^set defaultXmx=-Xmx(\d+)(M|m|G|g|T|t)/ : /^defaultMx="-Xmx(\d+)(M|m|G|g|T|t)"/
52
- MINIMUM_DX_HEAP_SIZE = 1600
53
- if new_dx_content =~ xmx_pattern &&
54
- ($1.to_i * 1024 ** {'M' => 2, 'G' => 3, 'T' => 4}[$2.upcase]) < MINIMUM_DX_HEAP_SIZE*1024**2
55
- puts "Increasing max heap space from #$1#$2 to #{MINIMUM_DX_HEAP_SIZE}M in #{dx_filename}"
56
- new_xmx_value = ON_WINDOWS ? %Q{set defaultXmx=-Xmx#{MINIMUM_DX_HEAP_SIZE}M} : %Q{defaultMx="-Xmx#{MINIMUM_DX_HEAP_SIZE}M"}
57
- new_dx_content.sub!(xmx_pattern, new_xmx_value)
58
-
59
- # FIXME(uwe): For travis debugging Remove when travis is stable.
60
- new_dx_content.sub!(/^exec/, "free\ncat /proc/meminfo\necho Virtual:\nps -e -ovsize=,args= | sort -b -k1,1n | tail -n10\necho RSS:\nps -e -orss=,args= | sort -b -k1,1n | tail -n10\necho $javaOpts\necho $@\njava -XX:+PrintFlagsFinal -version | grep InitialHeapSize\nexec") if RbConfig::CONFIG['host_os'] =~ /linux/
61
- # EMXIF
62
-
63
- File.open(dx_filename, 'w') { |f| f << new_dx_content } rescue puts "\n!!! Unable to increase dx heap size !!!\n\n"
64
-
65
- # FIXME(uwe): For travis debugging Remove when travis is stable.
66
- puts new_dx_content.lines.grep(xmx_pattern)
67
- # EMXIF
68
- end
69
56
 
70
57
  def manifest; @manifest ||= REXML::Document.new(File.read(MANIFEST_FILE)) end
71
58
  def package; manifest.root.attribute('package') end
@@ -91,7 +78,7 @@ RESOURCE_FILES = Dir[File.expand_path 'res/**/*']
91
78
  JAVA_SOURCE_FILES = Dir[File.expand_path 'src/**/*.java']
92
79
  RUBY_SOURCE_FILES = Dir[File.expand_path 'src/**/*.rb']
93
80
  CLASSES_CACHE = "#{PROJECT_DIR}/bin/#{build_project_name}-debug-unaligned.apk.d"
94
- APK_DEPENDENCIES = [MANIFEST_FILE, RUBOTO_CONFIG_FILE, BUNDLE_JAR, CLASSES_CACHE] + JRUBY_JARS + JARS + JAVA_SOURCE_FILES + RESOURCE_FILES + RUBY_SOURCE_FILES
81
+ APK_DEPENDENCIES = [:patch_dex, MANIFEST_FILE, RUBOTO_CONFIG_FILE, BUNDLE_JAR, CLASSES_CACHE] + JRUBY_JARS + JARS + JAVA_SOURCE_FILES + RESOURCE_FILES + RUBY_SOURCE_FILES
95
82
  KEYSTORE_FILE = (key_store = File.readlines('ant.properties').grep(/^key.store=/).first) ? File.expand_path(key_store.chomp.sub(/^key.store=/, '').sub('${user.home}', '~')) : "#{build_project_name}.keystore"
96
83
  KEYSTORE_ALIAS = (key_alias = File.readlines('ant.properties').grep(/^key.alias=/).first) ? key_alias.chomp.sub(/^key.alias=/, '') : build_project_name
97
84
  APK_FILE_REGEXP = /^-rw-r--r--\s+(?:system|\d+\s+\d+)\s+(?:system|\d+)\s+(\d+)\s+(\d{4}-\d{2}-\d{2} \d{2}:\d{2}|\w{3} \d{2}\s+(?:\d{4}|\d{2}:\d{2}))\s+(.*)$/
@@ -149,7 +136,7 @@ desc 'uninstall, build, and install the application'
149
136
  task :reinstall => [:uninstall, APK_FILE, :install]
150
137
 
151
138
  namespace :install do
152
- # FIXME(uwe): Remove in 2013
139
+ # FIXME(uwe): Remove December 2013
153
140
  desc 'Deprecated: use "reinstall" instead.'
154
141
  task :clean => :reinstall do
155
142
  puts '"rake install:clean" is deprecated. Use "rake reinstall" instead.'
@@ -262,6 +249,19 @@ file APK_FILE => APK_DEPENDENCIES do |t|
262
249
  build_apk(t, false)
263
250
  end
264
251
 
252
+ MINIMUM_DX_HEAP_SIZE = 2048
253
+ task :patch_dex do
254
+ new_dx_content = File.read(DX_FILENAME).dup
255
+ xmx_pattern = ON_WINDOWS ? /^set defaultXmx=-Xmx(\d+)(M|m|G|g|T|t)/ : /^defaultMx="-Xmx(\d+)(M|m|G|g|T|t)"/
256
+ if new_dx_content =~ xmx_pattern &&
257
+ ($1.to_i * 1024 ** {'M' => 2, 'G' => 3, 'T' => 4}[$2.upcase]) < MINIMUM_DX_HEAP_SIZE*1024**2
258
+ puts "Increasing max heap space from #$1#$2 to #{MINIMUM_DX_HEAP_SIZE}M in #{DX_FILENAME}"
259
+ new_xmx_value = ON_WINDOWS ? %Q{set defaultXmx=-Xmx#{MINIMUM_DX_HEAP_SIZE}M} : %Q{defaultMx="-Xmx#{MINIMUM_DX_HEAP_SIZE}M"}
260
+ new_dx_content.sub!(xmx_pattern, new_xmx_value)
261
+ File.open(DX_FILENAME, 'w') { |f| f << new_dx_content } rescue puts "\n!!! Unable to increase dx heap size !!!\n\n"
262
+ end
263
+ end
264
+
265
265
  desc 'Copy scripts to emulator or device'
266
266
  task :update_scripts => %w(install:quick) do
267
267
  update_scripts
@@ -291,11 +291,10 @@ namespace :test do
291
291
  task :quick => :update_scripts do
292
292
  Dir.chdir('test') do
293
293
  puts 'Running quick tests'
294
- sh "#{ANT_CMD} instrument"
295
294
  install_retry_count = 0
296
295
  begin
297
296
  timeout 120 do
298
- sh "#{ANT_CMD} installi"
297
+ sh "#{ANT_CMD} instrument install"
299
298
  end
300
299
  rescue TimeoutError
301
300
  puts 'Installing package timed out.'
@@ -355,7 +354,7 @@ file BUNDLE_JAR => [GEM_FILE, GEM_LOCK_FILE] do
355
354
  $VERBOSE = old_verbose
356
355
  end
357
356
  Gem.platforms = platforms
358
- Gem.paths = gem_paths
357
+ Gem.paths = gem_paths["GEM_PATH"]
359
358
  else
360
359
  # Bundler.settings[:platform] = Gem::Platform::DALVIK
361
360
  sh "bundle install --gemfile #{GEM_FILE} --path=#{BUNDLE_PATH} --platform=dalvik#{sdk_level}"
@@ -486,10 +485,9 @@ Java::json.ext.ParserService.new.basicLoad(JRuby.runtime)
486
485
  end
487
486
  end
488
487
 
489
-
490
488
  FileUtils.rm_f BUNDLE_JAR
491
489
  Dir["#{gem_path}/*"].each_with_index do |gem_dir, i|
492
- `jar #{i == 0 ? 'c' : 'u'}f #{BUNDLE_JAR} -C #{gem_dir}/lib .`
490
+ `jar #{i == 0 ? 'c' : 'u'}f "#{BUNDLE_JAR}" -C "#{gem_dir}/lib" .`
493
491
  end
494
492
  FileUtils.rm_rf BUNDLE_PATH
495
493
  end
@@ -586,11 +584,6 @@ def build_apk(t, release)
586
584
  if release
587
585
  sh "#{ANT_CMD} release"
588
586
  else
589
-
590
- # FIXME(uwe): For travis debugging Remove when travis is stable.
591
- sh 'free' if RbConfig::CONFIG['host_os'] =~ /linux/
592
- # EMXIF
593
-
594
587
  sh "#{ANT_CMD} debug"
595
588
  end
596
589
  true
@@ -10,18 +10,8 @@ import android.os.Bundle;
10
10
  public class THE_RUBOTO_CLASS THE_ACTION THE_ANDROID_CLASS {
11
11
  public static final String THEME_KEY = "RUBOTO_THEME";
12
12
  private final ScriptInfo scriptInfo = new ScriptInfo();
13
- private String remoteVariable = null;
14
13
  Bundle[] args;
15
14
 
16
- public THE_RUBOTO_CLASS setRemoteVariable(String var) {
17
- remoteVariable = var;
18
- return this;
19
- }
20
-
21
- public String getRemoteVariableCall(String call) {
22
- return (remoteVariable == null ? "" : (remoteVariable + ".")) + call;
23
- }
24
-
25
15
  public ScriptInfo getScriptInfo() {
26
16
  return scriptInfo;
27
17
  }
@@ -35,9 +25,9 @@ public class THE_RUBOTO_CLASS THE_ACTION THE_ANDROID_CLASS {
35
25
  System.out.println("THE_RUBOTO_CLASS onCreate(): " + getClass().getName());
36
26
 
37
27
  // Shut this RubotoActivity down if it's not able to restart
38
- if (!(this instanceof EntryPointActivity) && !JRubyAdapter.isInitialized()) {
28
+ if (this.getClass().getName().equals("org.ruboto.THE_RUBOTO_CLASS") && !JRubyAdapter.isInitialized()) {
39
29
  super.onCreate(bundle);
40
- System.out.println("Shutting down stale THE_RUBOTO_CLASS: " + getClass().getName());
30
+ System.out.println("Shutting down stale THE_RUBOTO_CLASS: " + getClass().getName());
41
31
  finish();
42
32
  return;
43
33
  }
@@ -46,8 +36,7 @@ public class THE_RUBOTO_CLASS THE_ACTION THE_ANDROID_CLASS {
46
36
  super.onCreate(bundle);
47
37
  return;
48
38
  }
49
- args = new Bundle[1];
50
- args[0] = bundle;
39
+ args = new Bundle[]{bundle};
51
40
 
52
41
  // FIXME(uwe): Deprecated as of Ruboto 0.13.0. Remove in june 2014 (twelve months).
53
42
  Bundle configBundle = getIntent().getBundleExtra("Ruboto Config");