diff options
| author | Likai Ding <likaid@codeaurora.org> | 2016-05-20 14:21:43 +0800 |
|---|---|---|
| committer | Likai Ding <likaid@codeaurora.org> | 2016-06-03 15:39:39 +0800 |
| commit | 4dc5e6d88c57ca9ab34169572fbef104293bbe82 (patch) | |
| tree | 745ac090d61d85a7a91df8cff111e49860a9dd9f /src/org | |
| parent | fdb52c1657054bc3ae54c6006a8fd2807a6d7137 (diff) | |
| download | android_packages_apps_Gallery2-4dc5e6d88c57ca9ab34169572fbef104293bbe82.tar.gz android_packages_apps_Gallery2-4dc5e6d88c57ca9ab34169572fbef104293bbe82.tar.bz2 android_packages_apps_Gallery2-4dc5e6d88c57ca9ab34169572fbef104293bbe82.zip | |
Gallery: remove calls to @hide and internal API/members
CRs-Fixed: 986672
Change-Id: Ib7b9eb494da9c38191f75960f01e62dfbf356205
Diffstat (limited to 'src/org')
| -rw-r--r-- | src/org/codeaurora/gallery3d/video/CodeauroraVideoView.java | 14 | ||||
| -rw-r--r-- | src/org/codeaurora/gallery3d/video/SettingsActivity.java | 13 |
2 files changed, 15 insertions, 12 deletions
diff --git a/src/org/codeaurora/gallery3d/video/CodeauroraVideoView.java b/src/org/codeaurora/gallery3d/video/CodeauroraVideoView.java index ace5cec64..892c6d6b9 100644 --- a/src/org/codeaurora/gallery3d/video/CodeauroraVideoView.java +++ b/src/org/codeaurora/gallery3d/video/CodeauroraVideoView.java @@ -284,17 +284,17 @@ public class CodeauroraVideoView extends SurfaceView implements MediaPlayerContr * longer have a window, don't bother showing the user an error. */ if (getWindowToken() != null && mErrorDialogShowing == false) { - final Resources r = mContext.getResources(); + final Resources r = getContext().getResources(); int messageId; if (frameworkErr == MediaPlayer.MEDIA_ERROR_NOT_VALID_FOR_PROGRESSIVE_PLAYBACK) { - messageId = com.android.internal.R.string.VideoView_error_text_invalid_progressive_playback; + messageId = android.R.string.VideoView_error_text_invalid_progressive_playback; } else { - messageId = com.android.internal.R.string.VideoView_error_text_unknown; + messageId = android.R.string.VideoView_error_text_unknown; } - new AlertDialog.Builder(mContext) + new AlertDialog.Builder(getContext()) .setMessage(messageId) - .setPositiveButton(com.android.internal.R.string.VideoView_error_button, + .setPositiveButton(android.R.string.VideoView_error_button, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { /* If we get here, there is no onError listener, so @@ -484,7 +484,7 @@ public class CodeauroraVideoView extends SurfaceView implements MediaPlayerContr mMediaPlayer.setOnInfoListener(mOnInfoListener); mMediaPlayer.setOnBufferingUpdateListener(mBufferingUpdateListener); mCurrentBufferPercentage = 0; - mMediaPlayer.setDataSource(mContext, mUri, mHeaders); + mMediaPlayer.setDataSource(getContext(), mUri, mHeaders); mMediaPlayer.setDisplay(mSurfaceHolder); mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC); mMediaPlayer.setScreenOnWhilePlaying(true); @@ -956,7 +956,7 @@ public class CodeauroraVideoView extends SurfaceView implements MediaPlayerContr private boolean isKeyguardLocked() { if (mKeyguardManager == null) { mKeyguardManager = - (KeyguardManager) mContext.getSystemService(Context.KEYGUARD_SERVICE); + (KeyguardManager) getContext().getSystemService(Context.KEYGUARD_SERVICE); } // isKeyguardSecure excludes the slide lock case. boolean locked = (mKeyguardManager != null) diff --git a/src/org/codeaurora/gallery3d/video/SettingsActivity.java b/src/org/codeaurora/gallery3d/video/SettingsActivity.java index 5928846a5..46ad6b5cf 100644 --- a/src/org/codeaurora/gallery3d/video/SettingsActivity.java +++ b/src/org/codeaurora/gallery3d/video/SettingsActivity.java @@ -1,6 +1,7 @@ package org.codeaurora.gallery3d.video; import android.app.ActionBar; +import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.net.Uri; @@ -17,6 +18,7 @@ import android.util.Log; import android.view.MenuItem; import org.codeaurora.gallery.R; +import com.android.gallery3d.common.ApiHelper; import com.android.gallery3d.common.ApiHelper.SystemProperties; import java.util.ArrayList; @@ -113,7 +115,6 @@ public class SettingsActivity extends PreferenceActivity { private String[] getOperatorNumeric() { ArrayList<String> result = new ArrayList<String>(); - String mccMncFromSim = null; if (mUseNvOperatorForEhrpd) { String mccMncForEhrpd = SystemProperties.get("ro.cdma.home.operator.numeric", null); if (mccMncForEhrpd != null && mccMncForEhrpd.length() > 0) { @@ -121,8 +122,9 @@ public class SettingsActivity extends PreferenceActivity { } } - mccMncFromSim = TelephonyManager.getDefault().getSimOperator(); - + TelephonyManager manager = (TelephonyManager) getApplicationContext() + .getSystemService(Context.TELEPHONY_SERVICE); + String mccMncFromSim = manager.getSimOperator(); if (mccMncFromSim != null && mccMncFromSim.length() > 0) { result.add(mccMncFromSim); } @@ -221,8 +223,9 @@ public class SettingsActivity extends PreferenceActivity { Intent intent = new Intent(Settings.ACTION_APN_SETTINGS); int subscription = 0; try { - subscription = Settings.Global.getInt(SettingsActivity.this.getContentResolver(), - Settings.Global.MULTI_SIM_DATA_CALL_SUBSCRIPTION); + subscription = Settings.Global.getInt( + SettingsActivity.this.getContentResolver(), + ApiHelper.MULTI_SIM_DATA_CALL_SUBSCRIPTION); } catch (Exception e) { Log.d("SettingActivity", "Can't get subscription for Exception: " + e); } finally { |
