Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
VLC-Android
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Casanowow Life for love
VLC-Android
Commits
d4874ce5
Commit
d4874ce5
authored
Mar 03, 2014
by
Adrien Maglo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
AudioPlayer: avoid multiple calls of getActivity()
parent
133d37bf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
10 deletions
+5
-10
vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.java
vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.java
+5
-10
No files found.
vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.java
View file @
d4874ce5
...
...
@@ -326,25 +326,20 @@ public class AudioPlayer extends Fragment implements IAudioPlayer {
mHeaderPlayPause
.
setContentDescription
(
getString
(
R
.
string
.
play
));
}
if
(
mAudioController
.
isShuffling
())
{
mShuffle
.
setImageResource
(
Util
.
getResourceFromAttribute
(
getActivity
(),
R
.
attr
.
ic_shuffle_pressed
));
mShuffle
.
setImageResource
(
Util
.
getResourceFromAttribute
(
act
,
R
.
attr
.
ic_shuffle_pressed
));
}
else
{
mShuffle
.
setImageResource
(
Util
.
getResourceFromAttribute
(
getActivity
(),
R
.
attr
.
ic_shuffle_normal
));
mShuffle
.
setImageResource
(
Util
.
getResourceFromAttribute
(
act
,
R
.
attr
.
ic_shuffle_normal
));
}
switch
(
mAudioController
.
getRepeatType
())
{
case
None:
mRepeat
.
setImageResource
(
Util
.
getResourceFromAttribute
(
getActivity
(),
R
.
attr
.
ic_repeat_normal
));
mRepeat
.
setImageResource
(
Util
.
getResourceFromAttribute
(
act
,
R
.
attr
.
ic_repeat_normal
));
break
;
case
Once:
mRepeat
.
setImageResource
(
Util
.
getResourceFromAttribute
(
getActivity
(),
R
.
attr
.
ic_repeat_one
));
mRepeat
.
setImageResource
(
Util
.
getResourceFromAttribute
(
act
,
R
.
attr
.
ic_repeat_one
));
break
;
default
:
case
All:
mRepeat
.
setImageResource
(
Util
.
getResourceFromAttribute
(
getActivity
(),
R
.
attr
.
ic_repeat_pressed
));
mRepeat
.
setImageResource
(
Util
.
getResourceFromAttribute
(
act
,
R
.
attr
.
ic_repeat_pressed
));
break
;
}
if
(
mAudioController
.
hasNext
())
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment