Bug 1302336 - Rename ICodecManager into IMediaManager. r?jolin
MozReview-Commit-ID: JGIW3BfAwCI
--- a/mobile/android/base/AndroidManifest.xml.in
+++ b/mobile/android/base/AndroidManifest.xml.in
@@ -416,17 +416,17 @@
#include ../stumbler/manifests/StumblerManifest_services.xml.in
#endif
#ifdef MOZ_ANDROID_GCM
#include GcmAndroidManifest_services.xml.in
#endif
<service
- android:name="org.mozilla.gecko.media.CodecManager"
+ android:name="org.mozilla.gecko.media.MediaManager"
android:enabled="true"
android:exported="false"
android:process=":media"
android:isolatedProcess="false">
</service>
</application>
</manifest>
deleted file mode 100644
--- a/mobile/android/base/aidl/org/mozilla/gecko/media/ICodecManager.aidl
+++ /dev/null
@@ -1,13 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-package org.mozilla.gecko.media;
-
-// Non-default types used in interface.
-import org.mozilla.gecko.media.ICodec;
-
-interface ICodecManager {
- /** Creates a remote ICodec object. */
- ICodec createCodec();
-}
new file mode 100644
--- /dev/null
+++ b/mobile/android/base/aidl/org/mozilla/gecko/media/IMediaManager.aidl
@@ -0,0 +1,13 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+package org.mozilla.gecko.media;
+
+// Non-default types used in interface.
+import org.mozilla.gecko.media.ICodec;
+
+interface IMediaManager {
+ /** Creates a remote ICodec object. */
+ ICodec createCodec();
+}
deleted file mode 100644
--- a/mobile/android/base/java/org/mozilla/gecko/media/CodecManager.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-package org.mozilla.gecko.media;
-
-import android.app.Service;
-import android.content.Intent;
-import android.os.Binder;
-import android.os.IBinder;
-import android.os.RemoteException;
-
-public final class CodecManager extends Service {
- private Binder mBinder = new ICodecManager.Stub() {
- @Override
- public ICodec createCodec() throws RemoteException {
- return new Codec();
- }
- };
-
- @Override
- public IBinder onBind(Intent intent) {
- return mBinder;
- }
-}
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/mobile/android/base/java/org/mozilla/gecko/media/MediaManager.java
@@ -0,0 +1,25 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+package org.mozilla.gecko.media;
+
+import android.app.Service;
+import android.content.Intent;
+import android.os.Binder;
+import android.os.IBinder;
+import android.os.RemoteException;
+
+public final class MediaManager extends Service {
+ private Binder mBinder = new IMediaManager.Stub() {
+ @Override
+ public ICodec createCodec() throws RemoteException {
+ return new Codec();
+ }
+ };
+
+ @Override
+ public IBinder onBind(Intent intent) {
+ return mBinder;
+ }
+}
\ No newline at end of file
--- a/mobile/android/base/java/org/mozilla/gecko/media/RemoteManager.java
+++ b/mobile/android/base/java/org/mozilla/gecko/media/RemoteManager.java
@@ -32,28 +32,28 @@ public final class RemoteManager impleme
sRemoteManager = new RemoteManager();
}
sRemoteManager.init();
return sRemoteManager;
}
private List<CodecProxy> mProxies = new LinkedList<CodecProxy>();
- private volatile ICodecManager mRemote;
+ private volatile IMediaManager mRemote;
private volatile CountDownLatch mConnectionLatch;
private final ServiceConnection mConnection = new ServiceConnection() {
@Override
public void onServiceConnected(ComponentName name, IBinder service) {
if (DEBUG) Log.d(LOGTAG, "service connected");
try {
service.linkToDeath(RemoteManager.this, 0);
} catch (RemoteException e) {
e.printStackTrace();
}
- mRemote = ICodecManager.Stub.asInterface(service);
+ mRemote = IMediaManager.Stub.asInterface(service);
if (mConnectionLatch != null) {
mConnectionLatch.countDown();
}
}
/**
* Called when a connection to the Service has been lost. This typically
* happens when the process hosting the service has crashed or been killed.
@@ -78,17 +78,17 @@ public final class RemoteManager impleme
private synchronized boolean init() {
if (mRemote != null) {
return true;
}
if (DEBUG) Log.d(LOGTAG, "init remote manager " + this);
Context appCtxt = GeckoAppShell.getApplicationContext();
if (DEBUG) Log.d(LOGTAG, "ctxt=" + appCtxt);
- appCtxt.bindService(new Intent(appCtxt, CodecManager.class),
+ appCtxt.bindService(new Intent(appCtxt, MediaManager.class),
mConnection, Context.BIND_AUTO_CREATE);
if (!waitConnection()) {
appCtxt.unbindService(mConnection);
return false;
}
return true;
}
--- a/mobile/android/base/moz.build
+++ b/mobile/android/base/moz.build
@@ -535,21 +535,21 @@ gbjar.sources += ['java/org/mozilla/geck
'LauncherActivity.java',
'lwt/LightweightTheme.java',
'lwt/LightweightThemeDrawable.java',
'mdns/MulticastDNSManager.java',
'media/AsyncCodec.java',
'media/AsyncCodecFactory.java',
'media/AudioFocusAgent.java',
'media/Codec.java',
- 'media/CodecManager.java',
'media/CodecProxy.java',
'media/FormatParam.java',
'media/JellyBeanAsyncCodec.java',
'media/MediaControlService.java',
+ 'media/MediaManager.java',
'media/RemoteManager.java',
'media/Sample.java',
'media/VideoPlayer.java',
'MediaCastingBar.java',
'MemoryMonitor.java',
'menu/GeckoMenu.java',
'menu/GeckoMenuInflater.java',
'menu/GeckoMenuItem.java',
@@ -1081,10 +1081,10 @@ DEFINES['TOPOBJDIR'] = TOPOBJDIR
OBJDIR_PP_FILES.mobile.android.base += [
'AndroidManifest.xml.in',
]
gbjar.sources += ['generated/org/mozilla/gecko/' + x for x in [
'media/ICodec.java',
'media/ICodecCallbacks.java',
- 'media/ICodecManager.java',
+ 'media/IMediaManager.java',
]]