Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
A
Android
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 6
    • Merge Requests 6
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

and though bugs are the bane of my existence, rest assured the wretched thing will get the best of care here

  • Confidential and Proprietary
  • NYNJA
  • Android
  • Merge Requests
  • !2635

Merged
Opened May 29, 2020 by delete2@delete2Contributor

NY-9867: [AN]: android.app.RemoteServiceException (did not then call …

  • Overview 0
  • Commits 1
  • Changes 2

Created by: rvc-brickabode

…Service.startForeground())

Note: This complements same issue found in the Download Service (NY-9844)

From our internal process of review there are items to review in another PR but which shall not affect the current PR:

  • the condition for startWakeLock into onStartCommand
        else if (intent != null && START_CONFERENCE_WAKE_LOCK_ACTION.equalsIgnoreCase(intent.getAction())) {
            tryStartyWakeLock();
        }
  • the intent for StartWakeLock (unused)

    public static Intent getStartWakeLockIntent(Context context) {
        Intent startWLIntent = new Intent(context, ConferenceService.class);
        startWLIntent.setAction(START_CONFERENCE_WAKE_LOCK_ACTION);
        return startWLIntent;
    }
  • also, the class has been redundant regarding the startWakeLock, look:

    • They always start using a StartIntent with WakeLock:
    getContext().startForegroundService(ConferenceService.getStartIntent(getContext(), withWakeLock: true));
    • After that, it calls automatically onCreate and hence onStartCommand.
    • Inside onCreate, it always run:
    startForeground(START_CONFERENCE_FOREGROUND_ACTION, tryWakeLock: true)
    • Regardless the value of withWakeLock into the startIntent shouted

    • Then, at onStartCommand method, it catches the startIntent and the withWakeLock flag, and runs the startForeground again.

    • Although, the last startForeground is called with action equals to null, which does not execute anything, making sense, since the Service was already started with the onCreate method.

Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Reference: exconfidential/nynja/Android!2635
Source branch: NY-9867