@Override public void onLowMemory() { if (service != null) { service.onLowMemory(); } super.onLowMemory(); }
@Override public void onLowMemory() { super.onLowMemory(); MainActivity.info( "service: onLowMemory" ); }
@Override public void onLowMemory() { super.onLowMemory(); Toast.makeText(getApplicationContext(), "onLowMemory", Toast.LENGTH_SHORT).show(); }
@Override public void onLowMemory() { if (PServiceSupervisor.getAliveServices().size() > 0) { // Notify all alive plugin service to do destroy for (PluginServiceWrapper plugin : PServiceSupervisor.getAliveServices().values()) { if (plugin != null && plugin.getCurrentService() != null) { plugin.getCurrentService().onLowMemory(); } } } else { super.onLowMemory(); } }
public void onLowMemory() { if (ScriptLoader.isCalledFromJRuby()) {super.onLowMemory(); return;} if (!JRubyAdapter.isInitialized()) { Log.i("Method called before JRuby runtime was initialized: RubotoService#onLowMemory"); {super.onLowMemory(); return;} } String rubyClassName = scriptInfo.getRubyClassName(); if (rubyClassName == null) {super.onLowMemory(); return;} if ((Boolean)JRubyAdapter.runScriptlet(rubyClassName + ".instance_methods(false).any?{|m| m.to_sym == :onLowMemory}")) { JRubyAdapter.runRubyMethod(scriptInfo.getRubyInstance(), "onLowMemory"); } else { if ((Boolean)JRubyAdapter.runScriptlet(rubyClassName + ".instance_methods(false).any?{|m| m.to_sym == :on_low_memory}")) { JRubyAdapter.runRubyMethod(scriptInfo.getRubyInstance(), "on_low_memory"); } else { if ((Boolean)JRubyAdapter.runScriptlet(rubyClassName + ".instance_methods(true).any?{|m| m.to_sym == :on_low_memory}")) { JRubyAdapter.runRubyMethod(scriptInfo.getRubyInstance(), "on_low_memory"); } else { JRubyAdapter.runRubyMethod(scriptInfo.getRubyInstance(), "onLowMemory"); } } } }